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

372 lines
1.2 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[62,3,5,6,7,8,9,17],{"+NIl":function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(z,P){"use strict";function Y(O,b){O.cmdState.push(b)}function F(O){return O.cmdState.length>0?O.cmdState[O.cmdState.length-1]:null}function A(O){var b=O.cmdState.pop();b&&b.closeBracket()}function j(O){for(var b=O.cmdState,p=b.length-1;p>=0;p--){var c=b[p];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function B(O,b,p){return function(){this.name=O,this.bracketNo=0,this.style=b,this.styles=p,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=B("importmodule","tag",["string","builtin"]),L.documentclass=B("documentclass","tag",["","atom"]),L.usepackage=B("usepackage","tag",["atom"]),L.begin=B("begin","tag",["atom"]),L.end=B("end","tag",["atom"]),L.label=B("label","tag",["atom"]),L.ref=B("ref","tag",["atom"]),L.eqref=B("eqref","tag",["atom"]),L.cite=B("cite","tag",["atom"]),L.bibitem=B("bibitem","tag",["atom"]),L.Bibitem=B("Bibitem","tag",["atom"]),L.RBibitem=B("RBibitem","tag",["atom"]),L.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function T(O,b){O.f=b}function v(O,b){var p;if(O.match(/^\\[a-zA-Z@]+/)){var c=O.current().slice(1);return p=L.hasOwnProperty(c)?L[c]:L.DEFAULT,p=new p,Y(b,p),T(b,k),p.style}if(O.match(/^\\[$&%#{}_]/))return"tag";if(O.match(/^\\[,;!\/\\]/))return"tag";if(O.match("\\["))return T(b,function(u,h){return C(u,h,"\\]")}),"keyword";if(O.match("\\("))return T(b,function(u,h){return C(u,h,"\\)")}),"keyword";if(O.match("$$"))return T(b,function(u,h){return C(u,h,"$$")}),"keyword";if(O.match("$"))return T(b,function(u,h){return C(u,h,"$")}),"keyword";var i=O.next();if(i=="%")return O.skipToEnd(),"comment";if(i=="}"||i=="]"){if(p=F(b),p)p.closeBracket(i),T(b,k);else return"error";return"bracket"}else return i=="{"||i=="["?(p=L.DEFAULT,p=new p,Y(b,p),"bracket"):/\d/.test(i)?(O.eatWhile(/[\w.%]/),"atom"):(O.eatWhile(/[\w\-_]/),p=j(b),p.name=="begin"&&(p.argument=O.current()),p.styleIdentifier())}function C(O,b,p){if(O.eatSpace())return null;if(p&&O.match(p))return T(b,v),"keyword";if(O.match(/^\\[a-zA-Z@]+/))return"tag";if(O.match(/^[a-zA-Z]+/))return"variable-2";if(O.match(/^\\[$&%#{}_]/))return"tag";if(O.match(/^\\[,;!\/]/))return"tag";if(O.match(/^[\^_&]/))return"tag";if(O.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(O.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var c=O.next();return c=="{"||c=="}"||c=="["||c=="]"||c=="("||c==")"?"bracket":c=="%"?(O.skipToEnd(),"comment"):"error"}function k(O,b){var p=O.peek(),c;return p=="{"||p=="["?(c=F(b),c.openBracket(p),O.eat(p),T(b,v),"bracket"):/[ \t\r]/.test(p)?(O.eat(p),null):(T(b,v),A(b),v(O,b))}return{startState:function(){var O=P.inMathMode?function(b,p){return C(b,p)}:v;return{cmdState:[],f:O}},copyState:function(O){return{cmdState:O.cmdState.slice(),f:O.f}},token:function(O,b){return b.f(O,b)},blankLine:function(O){O.f=v,O.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"/GNS":function(ze,De,W){ze.exports=W.p+"static/search1.c4136dd4.png"},"19Vz":function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){q.defineOption("placeholder","",function(B,L,T){var v=T&&T!=q.Init;if(L&&!v)B.on("blur",F),B.on("change",A),B.on("swapDoc",A),q.on(B.getInputField(),"compositionupdate",B.state.placeholderCompose=function(){Y(B)}),A(B);else if(!L&&v){B.off("blur",F),B.off("change",A),B.off("swapDoc",A),q.off(B.getInputField(),"compositionupdate",B.state.placeholderCompose),z(B);var C=B.getWrapperElement();C.className=C.className.replace(" CodeMirror-empty","")}L&&!B.hasFocus()&&F(B)});function z(B){B.state.placeholder&&(B.state.placeholder.parentNode.removeChild(B.state.placeholder),B.state.placeholder=null)}function P(B){z(B);var L=B.state.placeholder=document.createElement("pre");L.style.cssText="height: 0; overflow: visible",L.style.direction=B.getOption("direction"),L.className="CodeMirror-placeholder CodeMirror-line-like";var T=B.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),L.appendChild(T),B.display.lineSpace.insertBefore(L,B.display.lineSpace.firstChild)}function Y(B){setTimeout(function(){var L=!1,T=B.getInputField();T.nodeName=="TEXTAREA"?L=!T.value:B.lineCount()==1&&(L=!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)),L?P(B):z(B)},20)}function F(B){j(B)&&P(B)}function A(B){var L=B.getWrapperElement(),T=j(B);L.className=L.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?P(B):z(B)}function j(B){return B.lineCount()===1&&B.getLine(0)===""}})},"1eCo":function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){"use strict";var z={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(Y,F){var A=Y.indentUnit,j={},B=F.htmlMode?z:P;for(var L in B)j[L]=B[L];for(var L in F)j[L]=F[L];var T,v;function C(a,x){function E(I){return x.tokenize=I,I(a,x)}var m=a.next();if(m=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?E(b("atom","]]>")):null:a.match("--")?E(b("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),E(p(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),x.tokenize=b("meta","?>"),"meta"):(T=a.eat("/")?"closeTag":"openTag",x.tokenize=k,"tag bracket");if(m=="&"){var _;return a.eat("#")?a.eat("x")?_=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):_=a.eatWhile(/[\d]/)&&a.eat(";"):_=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),_?"atom":"error"}else return a.eatWhile(/[^&<]/),null}C.isInText=!0;function k(a,x){var E=a.next();if(E==">"||E=="/"&&a.eat(">"))return x.tokenize=C,T=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return T="equals",null;if(E=="<"){x.tokenize=C,x.state=h,x.tagName=x.tagStart=null;var m=x.tokenize(a,x);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(E)?(x.tokenize=O(E),x.stringStartCol=a.column(),x.tokenize(a,x)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function O(a){var x=function(E,m){for(;!E.eol();)if(E.next()==a){m.tokenize=k;break}return"string"};return x.isInAttribute=!0,x}function b(a,x){return function(E,m){for(;!E.eol();){if(E.match(x)){m.tokenize=C;break}E.next()}return a}}function p(a){return function(x,E){for(var m;(m=x.next())!=null;){if(m=="<")return E.tokenize=p(a+1),E.tokenize(x,E);if(m==">")if(a==1){E.tokenize=C;break}else return E.tokenize=p(a-1),E.tokenize(x,E)}return"meta"}}function c(a,x,E){this.prev=a.context,this.tagName=x,this.indent=a.indented,this.startOfLine=E,(j.doNotIndent.hasOwnProperty(x)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function i(a){a.context&&(a.context=a.context.prev)}function u(a,x){for(var E;;){if(!a.context)return;if(E=a.context.tagName,!j.contextGrabbers.hasOwnProperty(E)||!j.contextGrabbers[E].hasOwnProperty(x))return;i(a)}}function h(a,x,E){return a=="openTag"?(E.tagStart=x.column(),R):a=="closeTag"?y:h}function R(a,x,E){return a=="word"?(E.tagName=x.current(),v="tag",S):j.allowMissingTagName&&a=="endTag"?(v="tag bracket",S(a,x,E)):(v="error",R)}function y(a,x,E){if(a=="word"){var m=x.current();return E.context&&E.context.tagName!=m&&j.implicitlyClosed.hasOwnProperty(E.context.tagName)&&i(E),E.context&&E.context.tagName==m||j.matchClosing===!1?(v="tag",g):(v="tag error",D)}else return j.allowMissingTagName&&a=="endTag"?(v="tag bracket",g(a,x,E)):(v="error",D)}function g(a,x,E){return a!="endTag"?(v="error",g):(i(E),h)}function D(a,x,E){return v="error",g(a,x,E)}function S(a,x,E){if(a=="word")return v="attribute",d;if(a=="endTag"||a=="selfcloseTag"){var m=E.tagName,_=E.tagStart;return E.tagName=E.tagStart=null,a=="selfcloseTag"||j.autoSelfClosers.hasOwnProperty(m)?u(E,m):(u(E,m),E.context=new c(E,m,_==E.indented)),h}return v="error",S}function d(a,x,E){return a=="equals"?l:(j.allowMissing||(v="error"),S(a,x,E))}function l(a,x,E){return a=="string"?o:a=="word"&&j.allowUnquoted?(v="string",S):(v="error",S(a,x,E))}function o(a,x,E){return a=="string"?o:S(a,x,E)}return{startState:function(a){var x={tokenize:C,state:h,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(x.baseIndent=a),x},token:function(a,x){if(!x.tagName&&a.sol()&&(x.indented=a.indentation()),a.eatSpace())return null;T=null;var E=x.tokenize(a,x);return(E||T)&&E!="comment"&&(v=null,x.state=x.state(T||E,a,x),v&&(E=v=="error"?E+" error":v)),E},indent:function(a,x,E){var m=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+A;if(m&&m.noIndent)return q.Pass;if(a.tokenize!=k&&a.tokenize!=C)return E?E.match(/^(\s*)/)[0].length:0;if(a.tagName)return j.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+A*(j.multilineTagIndentFactor||1);if(j.alignCDATA&&/<!\[CDATA\[/.test(x))return 0;var _=x&&/^<(\/)?([\w_:\.-]*)/.exec(x);if(_&&_[1])for(;m;)if(m.tagName==_[2]){m=m.prev;break}else if(j.implicitlyClosed.hasOwnProperty(m.tagName))m=m.prev;else break;else if(_)for(;m;){var I=j.contextGrabbers[m.tagName];if(I&&I.hasOwnProperty(_[2]))m=m.prev;else break}for(;m&&m.prev&&!m.startOfLine;)m=m.prev;return m?m.indent+A:a.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:j.htmlMode?"html":"xml",helperType:j.htmlMode?"html":"xml",skipAttribute:function(a){a.state==l&&(a.state=S)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var x=[],E=a.context;E;E=E.prev)E.tagName&&x.push(E.tagName);return x.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(ze,De,W){"use strict";W.d(De,"d",function(){return St}),W.d(De,"b",function(){return Le}),W.d(De,"c",function(){return dt}),W.d(De,"a",function(){return Ht});var q=W("VTBJ"),z=W("1OyB"),P=W("vuIU"),Y=W("JX7q"),F=W("Ji7U"),A=W("LK+K"),j=W("q1tI"),B=W("I8Z2"),L=W("BGR+"),T=W("wx14"),v=W("rePB"),C=W("4IlW"),k=W("2GS6"),O=W("Gytx"),b=W.n(O),p=W("TSYQ"),c=W.n(p),i=W("U8pU"),u=W("ODXe"),h=/iPhone/i,R=/iPod/i,y=/iPad/i,g=/\bAndroid(?:.+)Mobile\b/i,D=/Android/i,S=/\bAndroid(?:.+)SD4930UR\b/i,d=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,l=/Windows Phone/i,o=/\bWindows(?:.+)ARM\b/i,a=/BlackBerry/i,x=/BB10/i,E=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,_=/Mobile(?:.+)Firefox\b/i;function I(gt,Qe){return gt.test(Qe)}function U(gt){var Qe=gt||(typeof navigator!="undefined"?navigator.userAgent:""),Ze=Qe.split("[FBAN");if(typeof Ze[1]!="undefined"){var Fe=Ze,oe=Object(u.a)(Fe,1);Qe=oe[0]}if(Ze=Qe.split("Twitter"),typeof Ze[1]!="undefined"){var ve=Ze,nt=Object(u.a)(ve,1);Qe=nt[0]}var He={apple:{phone:I(h,Qe)&&!I(l,Qe),ipod:I(R,Qe),tablet:!I(h,Qe)&&I(y,Qe)&&!I(l,Qe),device:(I(h,Qe)||I(R,Qe)||I(y,Qe))&&!I(l,Qe)},amazon:{phone:I(S,Qe),tablet:!I(S,Qe)&&I(d,Qe),device:I(S,Qe)||I(d,Qe)},android:{phone:!I(l,Qe)&&I(S,Qe)||!I(l,Qe)&&I(g,Qe),tablet:!I(l,Qe)&&!I(S,Qe)&&!I(g,Qe)&&(I(d,Qe)||I(D,Qe)),device:!I(l,Qe)&&(I(S,Qe)||I(d,Qe)||I(g,Qe)||I(D,Qe))||I(/\bokhttp\b/i,Qe)},windows:{phone:I(l,Qe),tablet:I(o,Qe),device:I(l,Qe)||I(o,Qe)},other:{blackberry:I(a,Qe),blackberry10:I(x,Qe),opera:I(E,Qe),firefox:I(_,Qe),chrome:I(m,Qe),device:I(a,Qe)||I(x,Qe)||I(E,Qe)||I(_,Qe)||I(m,Qe)},any:null,phone:null,tablet:null};return He.any=He.apple.device||He.android.device||He.windows.device||He.other.device,He.phone=He.apple.phone||He.android.phone||He.windows.phone,He.tablet=He.apple.tablet||He.android.tablet||He.windows.tablet,He}var M=Object(q.a)(Object(q.a)({},U()),{},{isMobile:U}),H=M;function K(){}function Z(gt,Qe,Ze){var Fe=Qe||"";return gt.key||"".concat(Fe,"item_").concat(Ze)}function le(gt){return"".concat(gt,"-menu-")}function he(gt,Qe){var Ze=-1;j.Children.forEach(gt,function(Fe){Ze+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?j.Children.forEach(Fe.props.children,function(oe){Ze+=1,Qe(oe,Ze)}):Qe(Fe,Ze)})}function ye(gt,Qe,Ze){if(!gt||Ze.find)return;j.Children.forEach(gt,function(Fe){if(Fe){var oe=Fe.type;if(!oe||!(oe.isSubMenu||oe.isMenuItem||oe.isMenuItemGroup))return;Qe.indexOf(Fe.key)!==-1?Ze.find=!0:Fe.props.children&&ye(Fe.props.children,Qe,Ze)}})}var Ue=["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"],Me=function(Qe){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Qe&&typeof Qe.getBoundingClientRect=="function"&&Qe.getBoundingClientRect().width;if(Fe){if(Ze){var oe=getComputedStyle(Qe),ve=oe.marginLeft,nt=oe.marginRight;Fe+=+ve.replace("px","")+ +nt.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},_e=function(Qe,Ze,Fe){Qe&&Object(i.a)(Qe.style)==="object"&&(Qe.style[Ze]=Fe)},Ie=function(){return H.any},ke=W("KQm4"),me=W("Ff2n"),ce=W("i8i4"),te=W("bdgK"),be=W("uciX"),ae=W("8XRh"),we={adjustX:1,adjustY:1},Pe={topLeft:{points:["bl","tl"],overflow:we,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:we,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:we,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:we,offset:[4,0]}},Ce={topLeft:{points:["bl","tl"],overflow:we,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:we,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:we,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:we,offset:[4,0]}},Ve=Pe,Ge=0,tt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Je=function(Qe,Ze,Fe){var oe=le(Ze),ve=Qe.getState();Qe.setState({defaultActiveFirst:Object(q.a)(Object(q.a)({},ve.defaultActiveFirst),{},Object(v.a)({},oe,Fe))})},Ye=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(Fe){var oe;Object(z.a)(this,Ze),oe=Qe.call(this,Fe),oe.onDestroy=function(Re){oe.props.onDestroy(Re)},oe.onKeyDown=function(Re){var qe=Re.keyCode,vt=oe.menuInstance,Ct=oe.props,wt=Ct.isOpen,lt=Ct.store;if(qe===C.a.ENTER)return oe.onTitleClick(Re),Je(lt,oe.props.eventKey,!0),!0;if(qe===C.a.RIGHT)return wt?vt.onKeyDown(Re):(oe.triggerOpenChange(!0),Je(lt,oe.props.eventKey,!0)),!0;if(qe===C.a.LEFT){var Ft;if(wt)Ft=vt.onKeyDown(Re);else return;return Ft||(oe.triggerOpenChange(!1),Ft=!0),Ft}return wt&&(qe===C.a.UP||qe===C.a.DOWN)?vt.onKeyDown(Re):void 0},oe.onOpenChange=function(Re){oe.props.onOpenChange(Re)},oe.onPopupVisibleChange=function(Re){oe.triggerOpenChange(Re,Re?"mouseenter":"mouseleave")},oe.onMouseEnter=function(Re){var qe=oe.props,vt=qe.eventKey,Ct=qe.onMouseEnter,wt=qe.store;Je(wt,oe.props.eventKey,!1),Ct({key:vt,domEvent:Re})},oe.onMouseLeave=function(Re){var qe=oe.props,vt=qe.parentMenu,Ct=qe.eventKey,wt=qe.onMouseLeave;vt.subMenuInstance=Object(Y.a)(oe),wt({key:Ct,domEvent:Re})},oe.onTitleMouseEnter=function(Re){var qe=oe.props,vt=qe.eventKey,Ct=qe.onItemHover,wt=qe.onTitleMouseEnter;Ct({key:vt,hover:!0}),wt({key:vt,domEvent:Re})},oe.onTitleMouseLeave=function(Re){var qe=oe.props,vt=qe.parentMenu,Ct=qe.eventKey,wt=qe.onItemHover,lt=qe.onTitleMouseLeave;vt.subMenuInstance=Object(Y.a)(oe),wt({key:Ct,hover:!1}),lt({key:Ct,domEvent:Re})},oe.onTitleClick=function(Re){var qe=Object(Y.a)(oe),vt=qe.props;if(vt.onTitleClick({key:vt.eventKey,domEvent:Re}),vt.triggerSubMenuAction==="hover")return;oe.triggerOpenChange(!vt.isOpen,"click"),Je(vt.store,oe.props.eventKey,!1)},oe.onSubMenuClick=function(Re){typeof oe.props.onClick=="function"&&oe.props.onClick(oe.addKeyPath(Re))},oe.onSelect=function(Re){oe.props.onSelect(Re)},oe.onDeselect=function(Re){oe.props.onDeselect(Re)},oe.getPrefixCls=function(){return"".concat(oe.props.rootPrefixCls,"-submenu")},oe.getActiveClassName=function(){return"".concat(oe.getPrefixCls(),"-active")},oe.getDisabledClassName=function(){return"".concat(oe.getPrefixCls(),"-disabled")},oe.getSelectedClassName=function(){return"".concat(oe.getPrefixCls(),"-selected")},oe.getOpenClassName=function(){return"".concat(oe.props.rootPrefixCls,"-submenu-open")},oe.saveMenuInstance=function(Re){oe.menuInstance=Re},oe.addKeyPath=function(Re){return Object(q.a)(Object(q.a)({},Re),{},{keyPath:(Re.keyPath||[]).concat(oe.props.eventKey)})},oe.triggerOpenChange=function(Re,qe){var vt=oe.props.eventKey,Ct=function(){oe.onOpenChange({key:vt,item:Object(Y.a)(oe),trigger:qe,open:Re})};qe==="mouseenter"?oe.mouseenterTimeout=setTimeout(function(){Ct()},0):Ct()},oe.isChildrenSelected=function(){var Re={find:!1};return ye(oe.props.children,oe.props.selectedKeys,Re),Re.find},oe.isOpen=function(){return oe.props.openKeys.indexOf(oe.props.eventKey)!==-1},oe.adjustWidth=function(){if(!oe.subMenuTitle||!oe.menuInstance)return;var Re=ce.findDOMNode(oe.menuInstance);if(Re.offsetWidth>=oe.subMenuTitle.offsetWidth)return;Re.style.minWidth="".concat(oe.subMenuTitle.offsetWidth,"px")},oe.saveSubMenuTitle=function(Re){oe.subMenuTitle=Re},oe.getBaseProps=function(){var Re=Object(Y.a)(oe),qe=Re.props;return{mode:qe.mode==="horizontal"?"vertical":qe.mode,visible:oe.props.isOpen,level:qe.level+1,inlineIndent:qe.inlineIndent,focusable:!1,onClick:oe.onSubMenuClick,onSelect:oe.onSelect,onDeselect:oe.onDeselect,onDestroy:oe.onDestroy,selectedKeys:qe.selectedKeys,eventKey:"".concat(qe.eventKey,"-menu-"),openKeys:qe.openKeys,motion:qe.motion,onOpenChange:oe.onOpenChange,subMenuOpenDelay:qe.subMenuOpenDelay,parentMenu:Object(Y.a)(oe),subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,triggerSubMenuAction:qe.triggerSubMenuAction,builtinPlacements:qe.builtinPlacements,defaultActiveFirst:qe.store.getState().defaultActiveFirst[le(qe.eventKey)],multiple:qe.multiple,prefixCls:qe.rootPrefixCls,id:oe.internalMenuId,manualRef:oe.saveMenuInstance,itemIcon:qe.itemIcon,expandIcon:qe.expandIcon,direction:qe.direction}},oe.getMotion=function(Re,qe){var vt=Object(Y.a)(oe),Ct=vt.haveRendered,wt=oe.props,lt=wt.motion,Ft=wt.rootPrefixCls,$t=Object(q.a)(Object(q.a)({},lt),{},{leavedClassName:"".concat(Ft,"-hidden"),removeOnLeave:!1,motionAppear:Ct||!qe||Re!=="inline"});return $t};var ve=Fe.store,nt=Fe.eventKey,He=ve.getState(),bt=He.defaultActiveFirst;oe.isRootMenu=!1;var mt=!1;return bt&&(mt=bt[nt]),Je(ve,nt,mt),oe}return Object(P.a)(Ze,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var oe=this,ve=this.props,nt=ve.mode,He=ve.parentMenu,bt=ve.manualRef;if(bt&&bt(this),nt!=="horizontal"||!He.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return oe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var oe=this.props,ve=oe.onDestroy,nt=oe.eventKey;ve&&ve(nt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(oe){var ve=this,nt=this.getBaseProps(),He=this.getMotion(nt.mode,nt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||nt.visible||nt.forceSubMenuRender,!this.haveOpened)return j.createElement("div",null);var bt=nt.direction;return j.createElement(ae.default,Object.assign({visible:nt.visible},He),function(mt){var Re=mt.className,qe=mt.style,vt=c()("".concat(nt.prefixCls,"-sub"),Re,Object(v.a)({},"".concat(nt.prefixCls,"-rtl"),bt==="rtl"));return j.createElement(xe,Object.assign({},nt,{id:ve.internalMenuId,className:vt,style:qe}),oe)})}},{key:"render",value:function(){var oe,ve=Object(q.a)({},this.props),nt=ve.isOpen,He=this.getPrefixCls(),bt=ve.mode==="inline",mt=c()(He,"".concat(He,"-").concat(ve.mode),(oe={},Object(v.a)(oe,ve.className,!!ve.className),Object(v.a)(oe,this.getOpenClassName(),nt),Object(v.a)(oe,this.getActiveClassName(),ve.active||nt&&!bt),Object(v.a)(oe,this.getDisabledClassName(),ve.disabled),Object(v.a)(oe,this.getSelectedClassName(),this.isChildrenSelected()),oe));this.internalMenuId||(ve.eventKey?this.internalMenuId="".concat(ve.eventKey,"$Menu"):(Ge+=1,this.internalMenuId="$__$".concat(Ge,"$Menu")));var Re={},qe={},vt={};ve.disabled||(Re={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},qe={onClick:this.onTitleClick},vt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ct={},wt=ve.direction;bt&&(wt==="rtl"?Ct.paddingRight=ve.inlineIndent*ve.level:Ct.paddingLeft=ve.inlineIndent*ve.level);var lt={};this.props.isOpen&&(lt={"aria-owns":this.internalMenuId});var Ft=null;ve.mode!=="horizontal"&&(Ft=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ft=j.createElement(this.props.expandIcon,Object(q.a)({},this.props))));var $t=j.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Ct,className:"".concat(He,"-title"),role:"button"},vt,qe,{"aria-expanded":nt},lt,{"aria-haspopup":"true",title:typeof ve.title=="string"?ve.title:void 0}),ve.title,Ft||j.createElement("i",{className:"".concat(He,"-arrow")})),Rt=this.renderChildren(ve.children),Zt=ve.parentMenu.isRootMenu?ve.parentMenu.props.getPopupContainer:function(pn){return pn.parentNode},dn=tt[ve.mode],Jt=ve.popupOffset?{offset:ve.popupOffset}:{},Gt=ve.mode==="inline"?"":ve.popupClassName;Gt+=wt==="rtl"?" ".concat(He,"-rtl"):"";var fn=ve.disabled,On=ve.triggerSubMenuAction,Pn=ve.subMenuOpenDelay,ft=ve.forceSubMenuRender,Wt=ve.subMenuCloseDelay,Qt=ve.builtinPlacements;Ue.forEach(function(pn){return delete ve[pn]}),delete ve.onClick;var mn=wt==="rtl"?Object.assign({},Ce,Qt):Object.assign({},Pe,Qt);return delete ve.direction,j.createElement("li",Object.assign({},ve,Re,{className:mt,role:"menuitem"}),bt&&$t,bt&&Rt,!bt&&j.createElement(be.a,{prefixCls:He,popupClassName:c()("".concat(He,"-popup"),Gt),getPopupContainer:Zt,builtinPlacements:mn,popupPlacement:dn,popupVisible:nt,popupAlign:Jt,popup:Rt,action:fn?[]:[On],mouseEnterDelay:Pn,mouseLeaveDelay:Wt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:ft},$t))}}]),Ze}(j.Component);Ye.defaultProps={onMouseEnter:K,onMouseLeave:K,onTitleMouseEnter:K,onTitleMouseLeave:K,onTitleClick:K,manualRef:K,mode:"vertical",title:""};var et=Object(B.b)(function(gt,Qe){var Ze=gt.openKeys,Fe=gt.activeKey,oe=gt.selectedKeys,ve=Qe.eventKey,nt=Qe.subMenuKey;return{isOpen:Ze.indexOf(ve)>-1,active:Fe[nt]===ve,selectedKeys:oe}})(Ye);et.isSubMenu=!0;var St=et,At="menuitem-overflowed",ht=.5,xt=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(){var Fe;return Object(z.a)(this,Ze),Fe=Qe.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.getMenuItemNodes=function(){var oe=Fe.props.prefixCls,ve=ce.findDOMNode(Object(Y.a)(Fe));return ve?[].slice.call(ve.children).filter(function(nt){return nt.className.split(" ").indexOf("".concat(oe,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(oe,ve,nt){var He=Fe.props,bt=He.overflowedIndicator,mt=He.level,Re=He.mode,qe=He.prefixCls,vt=He.theme;if(mt!==1||Re!=="horizontal")return null;var Ct=Fe.props.children[0],wt=Ct.props,lt=wt.children,Ft=wt.title,$t=wt.style,Rt=Object(me.a)(wt,["children","title","style"]),Zt=Object(q.a)({},$t),dn="".concat(oe,"-overflowed-indicator"),Jt="".concat(oe,"-overflowed-indicator");ve.length===0&&nt!==!0?Zt=Object(q.a)(Object(q.a)({},Zt),{},{display:"none"}):nt&&(Zt=Object(q.a)(Object(q.a)({},Zt),{},{visibility:"hidden",position:"absolute"}),dn="".concat(dn,"-placeholder"),Jt="".concat(Jt,"-placeholder"));var Gt=vt?"".concat(qe,"-").concat(vt):"",fn={};return Ue.forEach(function(On){Rt[On]!==void 0&&(fn[On]=Rt[On])}),j.createElement(St,Object.assign({title:bt,className:"".concat(qe,"-overflowed-submenu"),popupClassName:Gt},fn,{key:dn,eventKey:Jt,disabled:!1,style:Zt}),ve)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var oe=ce.findDOMNode(Object(Y.a)(Fe));if(!oe)return;var ve=oe.children;if(!ve||ve.length===0)return;var nt=oe.children[ve.length-1];_e(nt,"display","inline-block");var He=Fe.getMenuItemNodes(),bt=He.filter(function(mt){return mt.className.split(" ").indexOf(At)>=0});bt.forEach(function(mt){_e(mt,"display","inline-block")}),Fe.menuItemSizes=He.map(function(mt){return Me(mt,!0)}),bt.forEach(function(mt){_e(mt,"display","none")}),Fe.overflowedIndicatorWidth=Me(oe.children[oe.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(mt,Re){return mt+Re},0),Fe.handleResize(),_e(nt,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var oe=ce.findDOMNode(Object(Y.a)(Fe));if(!oe)return;var ve=Me(oe);Fe.overflowedItems=[];var nt=0,He;Fe.originalTotalWidth>ve+ht&&(He=-1,Fe.menuItemSizes.forEach(function(bt){nt+=bt,nt+Fe.overflowedIndicatorWidth<=ve&&(He+=1)})),Fe.setState({lastVisibleIndex:He})},Fe}return Object(P.a)(Ze,[{key:"componentDidMount",value:function(){var oe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ve=ce.findDOMNode(this);if(!ve)return;this.resizeObserver=new te.default(function(nt){nt.forEach(function(){var He=oe.cancelFrameId;cancelAnimationFrame(He),oe.cancelFrameId=requestAnimationFrame(oe.setChildrenWidthAndResize)})}),[].slice.call(ve.children).concat(ve).forEach(function(nt){oe.resizeObserver.observe(nt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){oe.resizeObserver.disconnect(),[].slice.call(ve.children).concat(ve).forEach(function(nt){oe.resizeObserver.observe(nt)}),oe.setChildrenWidthAndResize()}),this.mutationObserver.observe(ve,{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(oe){var ve=this,nt=this.state.lastVisibleIndex;return(oe||[]).reduce(function(He,bt,mt){var Re=bt;if(ve.props.mode==="horizontal"){var qe=ve.getOverflowedSubMenuItem(bt.props.eventKey,[]);nt!==void 0&&ve.props.className.indexOf("".concat(ve.props.prefixCls,"-root"))!==-1&&(mt>nt&&(Re=j.cloneElement(bt,{style:{display:"none"},eventKey:"".concat(bt.props.eventKey,"-hidden"),className:"".concat(At)})),mt===nt+1&&(ve.overflowedItems=oe.slice(nt+1).map(function(Ct){return j.cloneElement(Ct,{key:Ct.props.eventKey,mode:"vertical-left"})}),qe=ve.getOverflowedSubMenuItem(bt.props.eventKey,ve.overflowedItems)));var vt=[].concat(Object(ke.a)(He),[qe,Re]);return mt===oe.length-1&&vt.push(ve.getOverflowedSubMenuItem(bt.props.eventKey,[],!0)),vt}return[].concat(Object(ke.a)(He),[Re])},[])}},{key:"render",value:function(){var oe=this.props,ve=oe.visible,nt=oe.prefixCls,He=oe.overflowedIndicator,bt=oe.mode,mt=oe.level,Re=oe.tag,qe=oe.children,vt=oe.theme,Ct=Object(me.a)(oe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),wt=Re;return j.createElement(wt,Object.assign({},Ct),this.renderChildren(qe))}}]),Ze}(j.Component);xt.defaultProps={tag:"div",className:""};var Tt=xt;function Ot(gt){return gt.length?gt.every(function(Qe){return!!Qe.props.disabled}):!0}function Oe(gt,Qe,Ze){var Fe=gt.getState();gt.setState({activeKey:Object(q.a)(Object(q.a)({},Fe.activeKey),{},Object(v.a)({},Qe,Ze))})}function Te(gt){return gt.eventKey||"0-menu-"}function rt(gt,Qe){var Ze=Qe,Fe=gt.children,oe=gt.eventKey;if(Ze){var ve;if(he(Fe,function(nt,He){nt&&nt.props&&!nt.props.disabled&&Ze===Z(nt,oe,He)&&(ve=!0)}),ve)return Ze}return Ze=null,gt.defaultActiveFirst&&he(Fe,function(nt,He){!Ze&&nt&&!nt.props.disabled&&(Ze=Z(nt,oe,He))}),Ze}function ot(gt){if(gt){var Qe=this.instanceArray.indexOf(gt);Qe!==-1?this.instanceArray[Qe]=gt:this.instanceArray.push(gt)}}var Ne=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(Fe){var oe;return Object(z.a)(this,Ze),oe=Qe.call(this,Fe),oe.onKeyDown=function(ve,nt){var He=ve.keyCode,bt;if(oe.getFlatInstanceArray().forEach(function(Re){Re&&Re.props.active&&Re.onKeyDown&&(bt=Re.onKeyDown(ve))}),bt)return 1;var mt=null;return(He===C.a.UP||He===C.a.DOWN)&&(mt=oe.step(He===C.a.UP?-1:1)),mt?(ve.preventDefault(),Oe(oe.props.store,Te(oe.props),mt.props.eventKey),typeof nt=="function"&&nt(mt),1):void 0},oe.onItemHover=function(ve){var nt=ve.key,He=ve.hover;Oe(oe.props.store,Te(oe.props),He?nt:null)},oe.onDeselect=function(ve){oe.props.onDeselect(ve)},oe.onSelect=function(ve){oe.props.onSelect(ve)},oe.onClick=function(ve){oe.props.onClick(ve)},oe.onOpenChange=function(ve){oe.props.onOpenChange(ve)},oe.onDestroy=function(ve){oe.props.onDestroy(ve)},oe.getFlatInstanceArray=function(){return oe.instanceArray},oe.step=function(ve){var nt=oe.getFlatInstanceArray(),He=oe.props.store.getState().activeKey[Te(oe.props)],bt=nt.length;if(!bt)return null;ve<0&&(nt=nt.concat().reverse());var mt=-1;if(nt.every(function(Ct,wt){return Ct&&Ct.props.eventKey===He?(mt=wt,!1):!0}),!oe.props.defaultActiveFirst&&mt!==-1&&Ot(nt.slice(mt,bt-1)))return;var Re=(mt+1)%bt,qe=Re;do{var vt=nt[qe];if(!vt||vt.props.disabled)qe=(qe+1)%bt;else return vt}while(qe!==Re);return null},oe.renderCommonMenuItem=function(ve,nt,He){var bt=oe.props.store.getState(),mt=Object(Y.a)(oe),Re=mt.props,qe=Z(ve,Re.eventKey,nt),vt=ve.props;if(!vt||typeof ve.type=="string")return ve;var Ct=qe===bt.activeKey,wt=Object(q.a)(Object(q.a)({mode:vt.mode||Re.mode,level:Re.level,inlineIndent:Re.inlineIndent,renderMenuItem:oe.renderMenuItem,rootPrefixCls:Re.prefixCls,index:nt,parentMenu:Re.parentMenu,manualRef:vt.disabled?void 0:Object(k.a)(ve.ref,ot.bind(Object(Y.a)(oe))),eventKey:qe,active:!vt.disabled&&Ct,multiple:Re.multiple,onClick:function(Ft){(vt.onClick||K)(Ft),oe.onClick(Ft)},onItemHover:oe.onItemHover,motion:Re.motion,subMenuOpenDelay:Re.subMenuOpenDelay,subMenuCloseDelay:Re.subMenuCloseDelay,forceSubMenuRender:Re.forceSubMenuRender,onOpenChange:oe.onOpenChange,onDeselect:oe.onDeselect,onSelect:oe.onSelect,builtinPlacements:Re.builtinPlacements,itemIcon:vt.itemIcon||oe.props.itemIcon,expandIcon:vt.expandIcon||oe.props.expandIcon},He),{},{direction:Re.direction});return(Re.mode==="inline"||Ie())&&(wt.triggerSubMenuAction="click"),j.cloneElement(ve,wt)},oe.renderMenuItem=function(ve,nt,He){if(!ve)return null;var bt=oe.props.store.getState(),mt={openKeys:bt.openKeys,selectedKeys:bt.selectedKeys,triggerSubMenuAction:oe.props.triggerSubMenuAction,subMenuKey:He};return oe.renderCommonMenuItem(ve,nt,mt)},Fe.store.setState({activeKey:Object(q.a)(Object(q.a)({},Fe.store.getState().activeKey),{},Object(v.a)({},Fe.eventKey,rt(Fe,Fe.activeKey)))}),oe.instanceArray=[],oe}return Object(P.a)(Ze,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(oe){return this.props.visible||oe.visible||this.props.className!==oe.className||!b()(this.props.style,oe.style)}},{key:"componentDidUpdate",value:function(oe){var ve=this.props,nt="activeKey"in ve?ve.activeKey:ve.store.getState().activeKey[Te(ve)],He=rt(ve,nt);if(He!==nt)Oe(ve.store,Te(ve),He);else if("activeKey"in oe){var bt=rt(oe,oe.activeKey);He!==bt&&Oe(ve.store,Te(ve),He)}}},{key:"render",value:function(){var oe=this,ve=Object(T.a)({},this.props);this.instanceArray=[];var nt=c()(ve.prefixCls,ve.className,"".concat(ve.prefixCls,"-").concat(ve.mode)),He={className:nt,role:ve.role||"menu"};ve.id&&(He.id=ve.id),ve.focusable&&(He.tabIndex=0,He.onKeyDown=this.onKeyDown);var bt=ve.prefixCls,mt=ve.eventKey,Re=ve.visible,qe=ve.level,vt=ve.mode,Ct=ve.overflowedIndicator,wt=ve.theme;return Ue.forEach(function(lt){return delete ve[lt]}),delete ve.onClick,j.createElement(Tt,Object.assign({},ve,{prefixCls:bt,mode:vt,tag:"ul",level:qe,theme:wt,visible:Re,overflowedIndicator:Ct},He),j.Children.map(ve.children,function(lt,Ft){return oe.renderMenuItem(lt,Ft,mt||"0-menu-")}))}}]),Ze}(j.Component);Ne.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:K};var $e=Object(B.b)()(Ne),xe=$e,fe=W("Kwbf");function pe(gt,Qe,Ze){var Fe=gt.prefixCls,oe=gt.motion,ve=gt.defaultMotions,nt=ve===void 0?{}:ve,He=gt.openAnimation,bt=gt.openTransitionName,mt=Qe.switchingModeFromInline;if(oe)return oe;if(Object(i.a)(He)==="object"&&He)Object(fe.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof He=="string")return{motionName:"".concat(Fe,"-open-").concat(He)};if(bt)return{motionName:bt};var Re=nt[Ze];return Re||(mt?null:nt.other)}var re=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(Fe){var oe;Object(z.a)(this,Ze),oe=Qe.call(this,Fe),oe.inlineOpenKeys=[],oe.onSelect=function(He){var bt=Object(Y.a)(oe),mt=bt.props;if(mt.selectable){var Re=oe.store.getState(),qe=Re.selectedKeys,vt=He.key;mt.multiple?qe=qe.concat([vt]):qe=[vt],"selectedKeys"in mt||oe.store.setState({selectedKeys:qe}),mt.onSelect(Object(q.a)(Object(q.a)({},He),{},{selectedKeys:qe}))}},oe.onClick=function(He){var bt=oe.getRealMenuMode(),mt=Object(Y.a)(oe),Re=mt.store,qe=mt.props.onOpenChange;bt!=="inline"&&!("openKeys"in oe.props)&&(Re.setState({openKeys:[]}),qe([])),oe.props.onClick(He)},oe.onKeyDown=function(He,bt){oe.innerMenu.getWrappedInstance().onKeyDown(He,bt)},oe.onOpenChange=function(He){var bt=Object(Y.a)(oe),mt=bt.props,Re=oe.store.getState().openKeys.concat(),qe=!1,vt=function(wt){var lt=!1;if(wt.open)lt=Re.indexOf(wt.key)===-1,lt&&Re.push(wt.key);else{var Ft=Re.indexOf(wt.key);lt=Ft!==-1,lt&&Re.splice(Ft,1)}qe=qe||lt};Array.isArray(He)?He.forEach(vt):vt(He),qe&&("openKeys"in oe.props||oe.store.setState({openKeys:Re}),mt.onOpenChange(Re))},oe.onDeselect=function(He){var bt=Object(Y.a)(oe),mt=bt.props;if(mt.selectable){var Re=oe.store.getState().selectedKeys.concat(),qe=He.key,vt=Re.indexOf(qe);vt!==-1&&Re.splice(vt,1),"selectedKeys"in mt||oe.store.setState({selectedKeys:Re}),mt.onDeselect(Object(q.a)(Object(q.a)({},He),{},{selectedKeys:Re}))}},oe.onMouseEnter=function(He){oe.restoreModeVerticalFromInline();var bt=oe.props.onMouseEnter;bt&&bt(He)},oe.onTransitionEnd=function(He){var bt=He.propertyName==="width"&&He.target===He.currentTarget,mt=He.target.className,Re=Object.prototype.toString.call(mt)==="[object SVGAnimatedString]"?mt.animVal:mt,qe=He.propertyName==="font-size"&&Re.indexOf("anticon")>=0;(bt||qe)&&oe.restoreModeVerticalFromInline()},oe.setInnerMenu=function(He){oe.innerMenu=He},oe.isRootMenu=!0;var ve=Fe.defaultSelectedKeys,nt=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(ve=Fe.selectedKeys||[]),"openKeys"in Fe&&(nt=Fe.openKeys||[]),oe.store=Object(B.c)({selectedKeys:ve,openKeys:nt,activeKey:{"0-menu-":rt(Fe,Fe.activeKey)}}),oe.state={switchingModeFromInline:!1},oe}return Object(P.a)(Ze,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(oe){this.updateOpentKeysWhenSwitchMode(oe),this.updateMiniStore();var ve=this.props,nt=ve.siderCollapsed,He=ve.inlineCollapsed,bt=ve.onOpenChange;(!oe.inlineCollapsed&&He||!oe.siderCollapsed&&nt)&&bt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(oe){var ve=this.props,nt=this.store,He=this.inlineOpenKeys,bt=nt.getState(),mt={};oe.mode==="inline"&&ve.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in ve||((ve.inlineCollapsed&&!oe.inlineCollapsed||ve.siderCollapsed&&!oe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=bt.openKeys.concat(),mt.openKeys=[]),(!ve.inlineCollapsed&&oe.inlineCollapsed||!ve.siderCollapsed&&oe.siderCollapsed)&&(mt.openKeys=He,this.inlineOpenKeys=[])),Object.keys(mt).length&&nt.setState(mt)}},{key:"updateMenuDisplay",value:function(){var oe=this.props.collapsedWidth,ve=this.store,nt=this.prevOpenKeys,He=this.getInlineCollapsed()&&(oe===0||oe==="0"||oe==="0px");He?(this.prevOpenKeys=ve.getState().openKeys.concat(),this.store.setState({openKeys:[]})):nt&&(this.store.setState({openKeys:nt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var oe=this.props.mode,ve=this.state.switchingModeFromInline,nt=this.getInlineCollapsed();return ve&&nt?"inline":nt?"vertical":oe}},{key:"getInlineCollapsed",value:function(){var oe=this.props,ve=oe.inlineCollapsed,nt=oe.siderCollapsed;return nt!==void 0?nt:ve}},{key:"restoreModeVerticalFromInline",value:function(){var oe=this.state.switchingModeFromInline;oe&&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 oe=Object(q.a)({},Object(L.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ve=this.getRealMenuMode();return oe.className+=" ".concat(oe.prefixCls,"-root"),oe.direction==="rtl"&&(oe.className+=" ".concat(oe.prefixCls,"-rtl")),oe=Object(q.a)(Object(q.a)({},oe),{},{mode:ve,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:pe(this.props,this.state,ve)}),delete oe.openAnimation,delete oe.openTransitionName,j.createElement(B.a,{store:this.store},j.createElement(xe,Object.assign({},oe,{ref:this.setInnerMenu}),this.props.children))}}]),Ze}(j.Component);re.defaultProps={selectable:!0,onClick:K,onSelect:K,onOpenChange:K,onDeselect:K,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:j.createElement("span",null,"\xB7\xB7\xB7")};var ie=re,se=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(){var Fe;return Object(z.a)(this,Ze),Fe=Qe.apply(this,arguments),Fe.onKeyDown=function(oe){var ve=oe.keyCode;return ve===C.a.ENTER?(Fe.onClick(oe),!0):void 0},Fe.onMouseLeave=function(oe){var ve=Fe.props,nt=ve.eventKey,He=ve.onItemHover,bt=ve.onMouseLeave;He({key:nt,hover:!1}),bt({key:nt,domEvent:oe})},Fe.onMouseEnter=function(oe){var ve=Fe.props,nt=ve.eventKey,He=ve.onItemHover,bt=ve.onMouseEnter;He({key:nt,hover:!0}),bt({key:nt,domEvent:oe})},Fe.onClick=function(oe){var ve=Fe.props,nt=ve.eventKey,He=ve.multiple,bt=ve.onClick,mt=ve.onSelect,Re=ve.onDeselect,qe=ve.isSelected,vt={key:nt,keyPath:[nt],item:Object(Y.a)(Fe),domEvent:oe};bt(vt),He?qe?Re(vt):mt(vt):qe||mt(vt)},Fe.saveNode=function(oe){Fe.node=oe},Fe}return Object(P.a)(Ze,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var oe=this.props;oe.onDestroy&&oe.onDestroy(oe.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 oe,ve=Object(q.a)({},this.props),nt=c()(this.getPrefixCls(),ve.className,(oe={},Object(v.a)(oe,this.getActiveClassName(),!ve.disabled&&ve.active),Object(v.a)(oe,this.getSelectedClassName(),ve.isSelected),Object(v.a)(oe,this.getDisabledClassName(),ve.disabled),oe)),He=Object(q.a)(Object(q.a)({},ve.attribute),{},{title:typeof ve.title=="string"?ve.title:void 0,className:nt,role:ve.role||"menuitem","aria-disabled":ve.disabled});ve.role==="option"?He=Object(q.a)(Object(q.a)({},He),{},{role:"option","aria-selected":ve.isSelected}):(ve.role===null||ve.role==="none")&&(He.role="none");var bt={onClick:ve.disabled?null:this.onClick,onMouseLeave:ve.disabled?null:this.onMouseLeave,onMouseEnter:ve.disabled?null:this.onMouseEnter},mt=Object(q.a)({},ve.style);ve.mode==="inline"&&(ve.direction==="rtl"?mt.paddingRight=ve.inlineIndent*ve.level:mt.paddingLeft=ve.inlineIndent*ve.level),Ue.forEach(function(qe){return delete ve[qe]}),delete ve.direction;var Re=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Re=j.createElement(this.props.itemIcon,this.props)),j.createElement("li",Object.assign({},Object(L.default)(ve,["onClick","onMouseEnter","onMouseLeave","onSelect"]),He,bt,{style:mt,ref:this.saveNode}),ve.children,Re)}}]),Ze}(j.Component);se.isMenuItem=!0,se.defaultProps={onSelect:K,onMouseEnter:K,onMouseLeave:K,manualRef:K};var de=Object(B.b)(function(gt,Qe){var Ze=gt.activeKey,Fe=gt.selectedKeys,oe=Qe.eventKey,ve=Qe.subMenuKey;return{active:Ze[ve]===oe,isSelected:Fe.indexOf(oe)!==-1}})(se),Le=de,Ke=function(gt){Object(F.a)(Ze,gt);var Qe=Object(A.a)(Ze);function Ze(){var Fe;return Object(z.a)(this,Ze),Fe=Qe.apply(this,arguments),Fe.renderInnerMenuItem=function(oe){var ve=Fe.props,nt=ve.renderMenuItem,He=ve.index;return nt(oe,He,Fe.props.subMenuKey)},Fe}return Object(P.a)(Ze,[{key:"render",value:function(){var oe=Object(T.a)({},this.props),ve=oe.className,nt=ve===void 0?"":ve,He=oe.rootPrefixCls,bt="".concat(He,"-item-group-title"),mt="".concat(He,"-item-group-list"),Re=oe.title,qe=oe.children;return Ue.forEach(function(vt){return delete oe[vt]}),delete oe.onClick,delete oe.direction,j.createElement("li",Object.assign({},oe,{className:"".concat(nt," ").concat(He,"-item-group")}),j.createElement("div",{className:bt,title:typeof Re=="string"?Re:void 0},Re),j.createElement("ul",{className:mt},j.Children.map(qe,this.renderInnerMenuItem)))}}]),Ze}(j.Component);Ke.isMenuItemGroup=!0,Ke.defaultProps={disabled:!0};var dt=Ke,_t=function(Qe){var Ze=Qe.className,Fe=Qe.rootPrefixCls,oe=Qe.style;return j.createElement("li",{className:"".concat(Ze," ").concat(Fe,"-item-divider"),style:oe})};_t.defaultProps={disabled:!0,className:"",style:{}};var Ht=_t,it=De.e=ie},"4qgm":function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB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WTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"55Ip":function(ze,De,W){"use strict";W.d(De,"a",function(){return u}),W.d(De,"b",function(){return S});var q=W("Ty5D"),z=W("dI71"),P=W("q1tI"),Y=W.n(P),F=W("YS25"),A=W("17x9"),j=W.n(A),B=W("wx14"),L=W("zLVn"),T=W("9R94"),v=function(l){Object(z.a)(o,l);function o(){for(var x,E=arguments.length,m=new Array(E),_=0;_<E;_++)m[_]=arguments[_];return x=l.call.apply(l,[this].concat(m))||this,x.history=Object(F.a)(x.props),x}var a=o.prototype;return a.render=function(){return Y.a.createElement(q.c,{history:this.history,children:this.props.children})},o}(Y.a.Component),C=function(l){Object(z.a)(o,l);function o(){for(var x,E=arguments.length,m=new Array(E),_=0;_<E;_++)m[_]=arguments[_];return x=l.call.apply(l,[this].concat(m))||this,x.history=Object(F.b)(x.props),x}var a=o.prototype;return a.render=function(){return Y.a.createElement(q.c,{history:this.history,children:this.props.children})},o}(Y.a.Component),k=function(o,a){return typeof o=="function"?o(a):o},O=function(o,a){return typeof o=="string"?Object(F.c)(o,null,null,a):o},b=function(o){return o},p=Y.a.forwardRef;typeof p=="undefined"&&(p=b);function c(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}var i=p(function(l,o){var a=l.innerRef,x=l.navigate,E=l.onClick,m=Object(L.a)(l,["innerRef","navigate","onClick"]),_=m.target,I=Object(B.a)({},m,{onClick:function(M){try{E&&E(M)}catch(H){throw M.preventDefault(),H}!M.defaultPrevented&&M.button===0&&(!_||_==="_self")&&!c(M)&&(M.preventDefault(),x())}});return b!==p?I.ref=o||a:I.ref=a,Y.a.createElement("a",I)}),u=p(function(l,o){var a=l.component,x=a===void 0?i:a,E=l.replace,m=l.to,_=l.innerRef,I=Object(L.a)(l,["component","replace","to","innerRef"]);return Y.a.createElement(q.e.Consumer,null,function(U){U||Object(T.a)(!1);var M=U.history,H=O(k(m,U.location),U.location),K=H?M.createHref(H):"",Z=Object(B.a)({},I,{href:K,navigate:function(){var he=k(m,U.location),ye=E?M.replace:M.push;ye(he)}});return b!==p?Z.ref=o||_:Z.innerRef=_,Y.a.createElement(x,Z)})});if(!1)var h,R;var y=function(o){return o},g=Y.a.forwardRef;typeof g=="undefined"&&(g=y);function D(){for(var l=arguments.length,o=new Array(l),a=0;a<l;a++)o[a]=arguments[a];return o.filter(function(x){return x}).join(" ")}var S=g(function(l,o){var a=l["aria-current"],x=a===void 0?"page":a,E=l.activeClassName,m=E===void 0?"active":E,_=l.activeStyle,I=l.className,U=l.exact,M=l.isActive,H=l.location,K=l.sensitive,Z=l.strict,le=l.style,he=l.to,ye=l.innerRef,Ue=Object(L.a)(l,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Y.a.createElement(q.e.Consumer,null,function(Me){Me||Object(T.a)(!1);var _e=H||Me.location,Ie=O(k(he,_e),_e),ke=Ie.pathname,me=ke&&ke.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ce=me?Object(q.f)(_e.pathname,{path:me,exact:U,sensitive:K,strict:Z}):null,te=!!(M?M(ce,_e):ce),be=te?D(I,m):I,ae=te?Object(B.a)({},le,{},_):le,we=Object(B.a)({"aria-current":te&&x||null,className:be,style:ae,to:Ie},Ue);return y!==g?we.ref=o||ye:we.innerRef=ye,Y.a.createElement(u,we)})});if(!1)var d},"5D2P":function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993Uz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grhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"6+eU":function(ze,De,W){"use strict";W.d(De,"a",function(){return g});var q=W("wx14"),z=W("rePB"),P=W("VTBJ"),Y=W("1OyB"),F=W("vuIU"),A=W("Ji7U"),j=W("LK+K"),B=W("q1tI"),L=W.n(B),T=W("TSYQ"),v=W.n(T),C=function(S){var d,l="".concat(S.rootPrefixCls,"-item"),o=v()(l,"".concat(l,"-").concat(S.page),(d={},Object(z.a)(d,"".concat(l,"-active"),S.active),Object(z.a)(d,S.className,!!S.className),Object(z.a)(d,"".concat(l,"-disabled"),!S.page),d)),a=function(){S.onClick(S.page)},x=function(m){S.onKeyPress(m,S.onClick,S.page)};return L.a.createElement("li",{title:S.showTitle?S.page:null,className:o,onClick:a,onKeyPress:x,tabIndex:"0"},S.itemRender(S.page,"page",L.a.createElement("a",{rel:"nofollow"},S.page)))},k=C,O={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},b=function(D){Object(A.a)(d,D);var S=Object(j.a)(d);function d(){var l;Object(Y.a)(this,d);for(var o=arguments.length,a=new Array(o),x=0;x<o;x++)a[x]=arguments[x];return l=S.call.apply(S,[this].concat(a)),l.state={goInputText:""},l.buildOptionText=function(E){return"".concat(E," ").concat(l.props.locale.items_per_page)},l.changeSize=function(E){l.props.changeSize(Number(E))},l.handleChange=function(E){l.setState({goInputText:E.target.value})},l.handleBlur=function(E){var m=l.props,_=m.goButton,I=m.quickGo,U=m.rootPrefixCls,M=l.state.goInputText;if(_||M==="")return;if(E.relatedTarget&&(E.relatedTarget.className.indexOf("".concat(U,"-prev"))>=0||E.relatedTarget.className.indexOf("".concat(U,"-next"))>=0))return;l.setState({goInputText:""}),I(l.getValidValue())},l.go=function(E){var m=l.state.goInputText;if(m==="")return;(E.keyCode===O.ENTER||E.type==="click")&&(l.setState({goInputText:""}),l.props.quickGo(l.getValidValue()))},l}return Object(F.a)(d,[{key:"getValidValue",value:function(){var o=this.state,a=o.goInputText,x=o.current;return!a||isNaN(a)?x:Number(a)}},{key:"getPageSizeOptions",value:function(){var o=this.props,a=o.pageSize,x=o.pageSizeOptions;return x.some(function(E){return E.toString()===a.toString()})?x:x.concat([a.toString()]).sort(function(E,m){var _=isNaN(Number(E))?0:Number(E),I=isNaN(Number(m))?0:Number(m);return _-I})}},{key:"render",value:function(){var o=this,a=this.props,x=a.pageSize,E=a.locale,m=a.rootPrefixCls,_=a.changeSize,I=a.quickGo,U=a.goButton,M=a.selectComponentClass,H=a.buildOptionText,K=a.selectPrefixCls,Z=a.disabled,le=this.state.goInputText,he="".concat(m,"-options"),ye=M,Ue=null,Me=null,_e=null;if(!_&&!I)return null;var Ie=this.getPageSizeOptions();if(_&&ye){var ke=Ie.map(function(me,ce){return L.a.createElement(ye.Option,{key:ce,value:me.toString()},(H||o.buildOptionText)(me))});Ue=L.a.createElement(ye,{disabled:Z,prefixCls:K,showSearch:!1,className:"".concat(he,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(x||Ie[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ce){return ce.parentNode}},ke)}return I&&(U&&(_e=typeof U=="boolean"?L.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Z,className:"".concat(he,"-quick-jumper-button")},E.jump_to_confirm):L.a.createElement("span",{onClick:this.go,onKeyUp:this.go},U)),Me=L.a.createElement("div",{className:"".concat(he,"-quick-jumper")},E.jump_to,L.a.createElement("input",{disabled:Z,type:"text",value:le,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,_e)),L.a.createElement("li",{className:"".concat(he)},Ue,Me)}}]),d}(L.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var p=b,c=W("N2Kk");function i(){}function u(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function h(D,S,d){return d}function R(D,S,d){var l=typeof D=="undefined"?S.pageSize:D;return Math.floor((d.total-1)/l)+1}var y=function(D){Object(A.a)(d,D);var S=Object(j.a)(d);function d(l){var o;Object(Y.a)(this,d),o=S.call(this,l),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(R(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(_,I){var U=o.props.prefixCls,M=_||L.a.createElement("button",{type:"button","aria-label":I,className:"".concat(U,"-item-link")});return typeof _=="function"&&(M=L.a.createElement(_,Object(P.a)({},o.props))),M},o.savePaginationNode=function(_){o.paginationNode=_},o.isValid=function(_){return u(_)&&_!==o.state.current},o.shouldDisplayQuickJumper=function(){var _=o.props,I=_.showQuickJumper,U=_.pageSize,M=_.total;return M<=U?!1:I},o.handleKeyDown=function(_){(_.keyCode===O.ARROW_UP||_.keyCode===O.ARROW_DOWN)&&_.preventDefault()},o.handleKeyUp=function(_){var I=o.getValidValue(_),U=o.state.currentInputValue;I!==U&&o.setState({currentInputValue:I}),_.keyCode===O.ENTER?o.handleChange(I):_.keyCode===O.ARROW_UP?o.handleChange(I-1):_.keyCode===O.ARROW_DOWN&&o.handleChange(I+1)},o.changePageSize=function(_){var I=o.state.current,U=R(_,o.state,o.props);I=I>U?U:I,U===0&&(I=o.state.current),typeof _=="number"&&("pageSize"in o.props||o.setState({pageSize:_}),"current"in o.props||o.setState({current:I,currentInputValue:I})),o.props.onShowSizeChange(I,_),"onChange"in o.props&&o.props.onChange&&o.props.onChange(I,_)},o.handleChange=function(_){var I=o.props.disabled,U=_;if(o.isValid(U)&&!I){var M=R(void 0,o.state,o.props);U>M?U=M:U<1&&(U=1),"current"in o.props||o.setState({current:U,currentInputValue:U});var H=o.state.pageSize;return o.props.onChange(U,H),U}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current<R(void 0,o.state,o.props)},o.runIfEnter=function(_,I){if(_.key==="Enter"||_.charCode===13){for(var U=arguments.length,M=new Array(U>2?U-2:0),H=2;H<U;H++)M[H-2]=arguments[H];I.apply(void 0,M)}},o.runIfEnterPrev=function(_){o.runIfEnter(_,o.prev)},o.runIfEnterNext=function(_){o.runIfEnter(_,o.next)},o.runIfEnterJumpPrev=function(_){o.runIfEnter(_,o.jumpPrev)},o.runIfEnterJumpNext=function(_){o.runIfEnter(_,o.jumpNext)},o.handleGoTO=function(_){(_.keyCode===O.ENTER||_.type==="click")&&o.handleChange(o.state.currentInputValue)};var a=l.onChange!==i,x="current"in l;x&&!a&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var E=l.defaultCurrent;"current"in l&&(E=l.current);var m=l.defaultPageSize;return"pageSize"in l&&(m=l.pageSize),E=Math.min(E,R(m,void 0,l)),o.state={current:E,currentInputValue:E,pageSize:m},o}return Object(F.a)(d,[{key:"componentDidUpdate",value:function(o,a){var x=this.props.prefixCls;if(a.current!==this.state.current&&this.paginationNode){var E=this.paginationNode.querySelector(".".concat(x,"-item-").concat(a.current));E&&document.activeElement===E&&E.blur()}}},{key:"getValidValue",value:function(o){var a=o.target.value,x=R(void 0,this.state,this.props),E=this.state.currentInputValue,m;return a===""?m=a:isNaN(Number(a))?m=E:a>=x?m=x:m=Number(a),m}},{key:"getShowSizeChanger",value:function(){var o=this.props,a=o.showSizeChanger,x=o.total,E=o.totalBoundaryShowSizeChanger;return typeof a!="undefined"?a:x>E}},{key:"renderPrev",value:function(o){var a=this.props,x=a.prevIcon,E=a.itemRender,m=E(o,"prev",this.getItemIcon(x,"prev page")),_=!this.hasPrev();return Object(B.isValidElement)(m)?Object(B.cloneElement)(m,{disabled:_}):m}},{key:"renderNext",value:function(o){var a=this.props,x=a.nextIcon,E=a.itemRender,m=E(o,"next",this.getItemIcon(x,"next page")),_=!this.hasNext();return Object(B.isValidElement)(m)?Object(B.cloneElement)(m,{disabled:_}):m}},{key:"render",value:function(){var o=this,a=this.props,x=a.prefixCls,E=a.className,m=a.style,_=a.disabled,I=a.hideOnSinglePage,U=a.total,M=a.locale,H=a.showQuickJumper,K=a.showLessItems,Z=a.showTitle,le=a.showTotal,he=a.simple,ye=a.itemRender,Ue=a.showPrevNextJumpers,Me=a.jumpPrevIcon,_e=a.jumpNextIcon,Ie=a.selectComponentClass,ke=a.selectPrefixCls,me=a.pageSizeOptions,ce=this.state,te=ce.current,be=ce.pageSize,ae=ce.currentInputValue;if(I===!0&&U<=be)return null;var we=R(void 0,this.state,this.props),Pe=[],Ce=null,Ve=null,Ge=null,tt=null,Je=null,Ye=H&&H.goButton,et=K?1:2,St=te-1>0?te-1:0,At=te+1<we?te+1:we,ht=Object.keys(this.props).reduce(function(re,ie){return(ie.substr(0,5)==="data-"||ie.substr(0,5)==="aria-"||ie==="role")&&(re[ie]=o.props[ie]),re},{});if(he)return Ye&&(typeof Ye=="boolean"?Je=L.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},M.jump_to_confirm):Je=L.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ye),Je=L.a.createElement("li",{title:Z?"".concat(M.jump_to).concat(te,"/").concat(we):null,className:"".concat(x,"-simple-pager")},Je)),L.a.createElement("ul",Object(q.a)({className:v()(x,"".concat(x,"-simple"),Object(z.a)({},"".concat(x,"-disabled"),_),E),style:m,ref:this.savePaginationNode},ht),L.a.createElement("li",{title:Z?M.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:v()("".concat(x,"-prev"),Object(z.a)({},"".concat(x,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(St)),L.a.createElement("li",{title:Z?"".concat(te,"/").concat(we):null,className:"".concat(x,"-simple-pager")},L.a.createElement("input",{type:"text",value:ae,disabled:_,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),L.a.createElement("span",{className:"".concat(x,"-slash")},"/"),we),L.a.createElement("li",{title:Z?M.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:v()("".concat(x,"-next"),Object(z.a)({},"".concat(x,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(At)),Je);if(we<=3+et*2){var xt={locale:M,rootPrefixCls:x,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Z,itemRender:ye};we||Pe.push(L.a.createElement(k,Object(q.a)({},xt,{key:"noPager",page:we,className:"".concat(x,"-disabled")})));for(var Tt=1;Tt<=we;Tt+=1){var Ot=te===Tt;Pe.push(L.a.createElement(k,Object(q.a)({},xt,{key:Tt,page:Tt,active:Ot})))}}else{var Oe=K?M.prev_3:M.prev_5,Te=K?M.next_3:M.next_5;Ue&&(Ce=L.a.createElement("li",{title:Z?Oe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:v()("".concat(x,"-jump-prev"),Object(z.a)({},"".concat(x,"-jump-prev-custom-icon"),!!Me))},ye(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Me,"prev page"))),Ve=L.a.createElement("li",{title:Z?Te:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:v()("".concat(x,"-jump-next"),Object(z.a)({},"".concat(x,"-jump-next-custom-icon"),!!_e))},ye(this.getJumpNextPage(),"jump-next",this.getItemIcon(_e,"next page")))),tt=L.a.createElement(k,{locale:M,last:!0,rootPrefixCls:x,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:we,page:we,active:!1,showTitle:Z,itemRender:ye}),Ge=L.a.createElement(k,{locale:M,rootPrefixCls:x,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Z,itemRender:ye});var rt=Math.max(1,te-et),ot=Math.min(te+et,we);te-1<=et&&(ot=1+et*2),we-te<=et&&(rt=we-et*2);for(var Ne=rt;Ne<=ot;Ne+=1){var $e=te===Ne;Pe.push(L.a.createElement(k,{locale:M,rootPrefixCls:x,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:$e,showTitle:Z,itemRender:ye}))}te-1>=et*2&&te!==1+2&&(Pe[0]=Object(B.cloneElement)(Pe[0],{className:"".concat(x,"-item-after-jump-prev")}),Pe.unshift(Ce)),we-te>=et*2&&te!==we-2&&(Pe[Pe.length-1]=Object(B.cloneElement)(Pe[Pe.length-1],{className:"".concat(x,"-item-before-jump-next")}),Pe.push(Ve)),rt!==1&&Pe.unshift(Ge),ot!==we&&Pe.push(tt)}var xe=null;le&&(xe=L.a.createElement("li",{className:"".concat(x,"-total-text")},le(U,[U===0?0:(te-1)*be+1,te*be>U?U:te*be])));var fe=!this.hasPrev()||!we,pe=!this.hasNext()||!we;return L.a.createElement("ul",Object(q.a)({className:v()(x,E,Object(z.a)({},"".concat(x,"-disabled"),_)),style:m,unselectable:"unselectable",ref:this.savePaginationNode},ht),xe,L.a.createElement("li",{title:Z?M.prev_page:null,onClick:this.prev,tabIndex:fe?null:0,onKeyPress:this.runIfEnterPrev,className:v()("".concat(x,"-prev"),Object(z.a)({},"".concat(x,"-disabled"),fe)),"aria-disabled":fe},this.renderPrev(St)),Pe,L.a.createElement("li",{title:Z?M.next_page:null,onClick:this.next,tabIndex:pe?null:0,onKeyPress:this.runIfEnterNext,className:v()("".concat(x,"-next"),Object(z.a)({},"".concat(x,"-disabled"),pe)),"aria-disabled":pe},this.renderNext(At)),L.a.createElement(p,{disabled:_,locale:M,rootPrefixCls:x,selectComponentClass:Ie,selectPrefixCls:ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:be,pageSizeOptions:me,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ye}))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var x={};if("current"in o&&(x.current=o.current,o.current!==a.current&&(x.currentInputValue=x.current)),"pageSize"in o&&o.pageSize!==a.pageSize){var E=a.current,m=R(o.pageSize,a,o);E=E>m?m:E,"current"in o||(x.current=E,x.currentInputValue=E),x.pageSize=o.pageSize}return x}}]),d}(L.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:c.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var g=y},"6RRn":function(ze,De,W){"use strict";var q=W("wCXF"),z=W("n6Qo");W.d(De,"b",function(){return z.a});var P=W("IBYe"),Y=W("6eGT"),F=W("hW8S");W.d(De,"a",function(){return F.a}),De.c=q.b},"6eGT":function(ze,De,W){"use strict";function q(z){return null}De.a=q},"7Cbv":function(ze,De,W){"use strict";var q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),z=new Uint8Array(16);function P(){if(!q)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return q(z)}var Y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F(k){return typeof k=="string"&&Y.test(k)}for(var A=F,j=[],B=0;B<256;++B)j.push((B+256).toString(16).substr(1));function L(k){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=(j[k[O+0]]+j[k[O+1]]+j[k[O+2]]+j[k[O+3]]+"-"+j[k[O+4]]+j[k[O+5]]+"-"+j[k[O+6]]+j[k[O+7]]+"-"+j[k[O+8]]+j[k[O+9]]+"-"+j[k[O+10]]+j[k[O+11]]+j[k[O+12]]+j[k[O+13]]+j[k[O+14]]+j[k[O+15]]).toLowerCase();if(!A(b))throw TypeError("Stringified UUID is invalid");return b}var T=L;function v(k,O,b){k=k||{};var p=k.random||(k.rng||P)();if(p[6]=p[6]&15|64,p[8]=p[8]&63|128,O){b=b||0;for(var c=0;c<16;++c)O[b+c]=p[c];return O}return T(p)}var C=De.a=v},"7ZXX":function(ze,De,W){ze.exports=W.p+"static/err.6e7c5817.png"},"7ahc":function(ze,De,W){"use strict";W.d(De,"a",function(){return R});var q=W("k1fw"),z=W("0Owb"),P=W("+L6B"),Y=W("2/Rp"),F=W("y8nQ"),A=W("Vl3Y"),j=W("tJVT"),B=W("OaEy"),L=W("2fM7"),T=W("q1tI"),v=W.n(T),C=W("VrN/"),k=W.n(C),O=W("p77/"),b=W.n(O),p=W("c5Ni"),c=W.n(p),i=L.a.Option,u={labelCol:{span:4},wrapperCol:{span:20}},h={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};De.b=function(y){var g=y.callback,D=y.onCancel,S=Object(T.useState)("python"),d=Object(j.a)(S,2),l=d[0],o=d[1];function a(E){o(h[E][1])}function x(E){g(E)}return v.a.createElement(A.a,Object(z.a)({},u,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:x}),v.a.createElement(A.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(L.a,{onChange:a},Object.keys(h).map(function(E){return v.a.createElement(i,{key:E,value:E},h[E][0])}))),v.a.createElement(A.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(R,{mode:l})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(Y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(Y.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function R(y){var g=y.value,D=y.onChange,S=y.mode,d=y.options,l=d===void 0?{}:d,o=Object(T.useRef)(),a=Object(T.useState)(),x=Object(j.a)(a,2),E=x[0],m=x[1];return Object(T.useEffect)(function(){if(E){function _(I){var U=I.getValue();D&&D(U)}return E.on("change",_),function(){E.off("change",_)}}},[E,D]),Object(T.useEffect)(function(){E&&E.setOption("mode",S)},[E,S]),Object(T.useEffect)(function(){E&&((g!==E.getValue()||g==="")&&setTimeout(function(){E.setValue(g||" ")},300))},[E,g]),Object(T.useEffect)(function(){if(o.current&&!E){var _=k.a.fromTextArea(o.current,Object(q.a)({mode:S,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(_)}},[o.current,E]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:o}))}},"7ixt":function(ze,De,W){"use strict";W.d(De,"a",function(){return P});var q={adjustX:1,adjustY:1},z=[0,0],P={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:z}},Y=P},"7v3h":function(ze,De,W){ze.exports=W.p+"static/empty2.dd73f390.png"},"8/bI":function(ze,De,W){ze.exports=W.p+"static/empty.8918e228.png"},"815F":function(ze,De,W){"use strict";W.d(De,"e",function(){return j}),W.d(De,"c",function(){return L}),W.d(De,"d",function(){return T}),W.d(De,"a",function(){return C}),W.d(De,"f",function(){return k}),W.d(De,"b",function(){return O});var q=W("KQm4"),z=W("VTBJ"),P=W("Ff2n"),Y=W("Zm9Q"),F=W("Kwbf"),A=W("OZM5");function j(b,p){return b!=null?b:p}function B(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=new Map;function c(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(h){var R=h.key,y=h.children;Object(F.a)(R!=null,"Tree node must have a certain key: [".concat(u).concat(R,"]"));var g=String(R);Object(F.a)(!p.has(g)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(g)),p.set(g,!0),c(y,"".concat(u).concat(g," > "))})}c(b)}function L(b){function p(c){var i=Object(Y.a)(c);return i.map(function(u){if(!Object(A.i)(u))return Object(F.a)(!u,"Tree/TreeNode can only accept TreeNode as children."),null;var h=u.key,R=u.props,y=R.children,g=Object(P.a)(R,["children"]),D=Object(z.a)({key:h},g),S=p(y);return S.length&&(D.children=S),D}).filter(function(u){return u})}return p(b)}function T(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(p===!0?[]:p),i=[];function u(h){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(y,g){var D=Object(A.h)(R?R.pos:"0",g),S=j(y.key,D),d=Object(z.a)(Object(z.a)({},y),{},{parent:R,pos:D,children:null,data:y,isStart:[].concat(Object(q.a)(R?R.isStart:[]),[g===0]),isEnd:[].concat(Object(q.a)(R?R.isEnd:[]),[g===h.length-1])});return i.push(d),p===!0||c.has(S)?d.children=u(y.children||[],d):d.children=[],d})}return u(b),i}function v(b,p,c){var i;c?typeof c=="string"?i=function(R){return R[c]}:typeof c=="function"&&(i=function(R){return c(R)}):i=function(R,y){return j(R.key,y)};function u(h,R,y){var g=h?h.children:b,D=h?Object(A.h)(y.pos,R):"0";if(h){var S=i(h,D),d={node:h,index:R,pos:D,key:S,parentPos:y.node?y.pos:null,level:y.level+1};p(d)}g&&g.forEach(function(l,o){u(l,o,{node:h,pos:D,level:y?y.level+1:-1})})}u(null)}function C(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=p.initWrapper,i=p.processEntity,u=p.onProcessFinished,h=arguments.length>2?arguments[2]:void 0,R={},y={},g={posEntities:R,keyEntities:y};return c&&(g=c(g)||g),v(b,function(D){var S=D.node,d=D.index,l=D.pos,o=D.key,a=D.parentPos,x=D.level,E={node:S,index:d,key:o,pos:l,level:x},m=j(o,l);R[l]=E,y[m]=E,E.parent=R[a],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),i&&i(E,g)},h),u&&u(g),g}function k(b,p){var c=p.expandedKeys,i=p.selectedKeys,u=p.loadedKeys,h=p.loadingKeys,R=p.checkedKeys,y=p.halfCheckedKeys,g=p.dragOverNodeKey,D=p.dropPosition,S=p.keyEntities,d=S[b],l={eventKey:b,expanded:c.indexOf(b)!==-1,selected:i.indexOf(b)!==-1,loaded:u.indexOf(b)!==-1,loading:h.indexOf(b)!==-1,checked:R.indexOf(b)!==-1,halfChecked:y.indexOf(b)!==-1,pos:String(d?d.pos:""),dragOver:g===b&&D===0,dragOverGapTop:g===b&&D===-1,dragOverGapBottom:g===b&&D===1};return l}function O(b){var p=b.data,c=b.expanded,i=b.selected,u=b.checked,h=b.loaded,R=b.loading,y=b.halfChecked,g=b.dragOver,D=b.dragOverGapTop,S=b.dragOverGapBottom,d=b.pos,l=b.active,o=Object(z.a)(Object(z.a)({},p),{},{expanded:c,selected:i,checked:u,loaded:h,loading:R,halfChecked:y,dragOver:g,dragOverGapTop:D,dragOverGapBottom:S,pos:d,active:l});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(F.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),b}}),o}},"8EBN":function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){"use strict";q.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<q.modeInfo.length;z++){var P=q.modeInfo[z];P.mimes&&(P.mime=P.mimes[0])}q.findModeByMIME=function(Y){Y=Y.toLowerCase();for(var F=0;F<q.modeInfo.length;F++){var A=q.modeInfo[F];if(A.mime==Y)return A;if(A.mimes){for(var j=0;j<A.mimes.length;j++)if(A.mimes[j]==Y)return A}}if(/\+xml$/.test(Y))return q.findModeByMIME("application/xml");if(/\+json$/.test(Y))return q.findModeByMIME("application/json")},q.findModeByExtension=function(Y){Y=Y.toLowerCase();for(var F=0;F<q.modeInfo.length;F++){var A=q.modeInfo[F];if(A.ext){for(var j=0;j<A.ext.length;j++)if(A.ext[j]==Y)return A}}},q.findModeByFileName=function(Y){for(var F=0;F<q.modeInfo.length;F++){var A=q.modeInfo[F];if(A.file&&A.file.test(Y))return A}var j=Y.lastIndexOf("."),B=j>-1&&Y.substring(j+1,Y.length);if(B)return q.findModeByExtension(B)},q.findModeByName=function(Y){Y=Y.toLowerCase();for(var F=0;F<q.modeInfo.length;F++){var A=q.modeInfo[F];if(A.name.toLowerCase()==Y)return A;if(A.alias){for(var j=0;j<A.alias.length;j++)if(A.alias[j].toLowerCase()==Y)return A}}}})},"8hTe":function(ze,De,W){ze.exports={button:"button___1wy9m"}},"9Bee":function(ze,De,W){"use strict";var q=W("DYRE"),z=W("zeV3"),P=W("+L6B"),Y=W("2/Rp"),F=W("k1fw"),A=W("9og8"),j=W("tJVT"),B=W("WmNS"),L=W.n(B),T=W("q1tI"),v=W.n(T),C=W("vg9a"),k=W("DlQD"),O=W.n(k),b=W("rUJ1");function p(X,f){var w=X.match(/^(\s+)(?:```)/);if(w===null)return f;var G=w[1];return f.split(`
`).map(function(ee){var V=ee.match(/^\s+/);if(V===null)return ee;var Se=Object(j.a)(V,1),st=Se[0];return st.length>=G.length?ee.slice(G.length):ee}).join(`
`)}var c=[],i=["<ul>"],u=new O.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){c.length=0,i=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(X,f,w,G){if(f>=X.length||X[f].level<=w)return f;var ee=X[f];G.push("<li><a href='#"+ee.anchor+"'>"+ee.text+"</a>"),f++;var V=[];return f=g(X,f,ee.level,V),V.length>0&&(G.push("<ul>"),V.forEach(function(Se){G.push(Se)}),G.push("</ul>")),G.push("</li>"),f=g(X,f,w,G),f}function D(){return g(c,0,0,i),i.push("</ul>"),i.join("")}var S={heading:function(f){var w=h.exec(f);if(w)return{type:"heading",raw:w[0],depth:w[1].length,text:w[2]}},fences:function(f){var w=this.rules.block.fences.exec(f);if(w){var G=w[0],ee=p(G,w[3]||""),V=w[2]?w[2].trim():w[2];if(["latex","katex","math"].indexOf(V)>=0){var Se=o(),st=ee;ee=Se,a[Se]={type:"block",expression:st}}return{type:"code",raw:G,lang:V,text:ee}}}},d=/(?:\${2})([^\n`]+?)(?:\${2})/gi,l=0,o=function(){return"__special_katext_id_".concat(l++,"__")},a={};function x(){return a}function E(){l=0,a={}}function m(X){return X=X.replace(d,function(f,w){var G=o();return a[G]={type:"inline",expression:w},G}),X}var _=u.listitem;u.listitem=function(X){return _(m(X))};var I=u.paragraph;u.paragraph=function(X){return I(m(X))};var U=u.tablecell;u.tablecell=function(X,f){return U(m(X),f)},u.code=function(X,f,w){var G=(f||"").match(/\S*/)[0];return G?["latex","katex","math"].indexOf(G)>=0?"<p class='editormd-tex'>".concat(X,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(f,'">').concat(w?X:Object(b.escape)(X,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(w?X:Object(b.escape)(X,!0))+"</code></pre>"},u.heading=function(X,f,w){var G=this.options.headerPrefix+w.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:G,level:f,text:X}),"<h"+f+' id="'+G+'">'+X+"</h"+f+">"},O.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),O.a.use({tokenizer:S,renderer:u});var M=O.a,H=W("SJMd"),K=W("ulZh"),Z=W.n(K),le=W("m3rI"),he=W("Oy/b"),ye=W("p5ED"),Ue=W("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Me=function(X,f){return(Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,G){w.__proto__=G}||function(w,G){for(var ee in G)Object.prototype.hasOwnProperty.call(G,ee)&&(w[ee]=G[ee])})(X,f)};function _e(X,f){function w(){this.constructor=X}Me(X,f),X.prototype=f===null?Object.create(f):(w.prototype=f.prototype,new w)}function Ie(X,f,w,G){return new(w||(w=Promise))(function(ee,V){function Se(Pt){try{je(G.next(Pt))}catch(ut){V(ut)}}function st(Pt){try{je(G.throw(Pt))}catch(ut){V(ut)}}function je(Pt){var ut;Pt.done?ee(Pt.value):(ut=Pt.value,ut instanceof w?ut:new w(function(Vt){Vt(ut)})).then(Se,st)}je((G=G.apply(X,f||[])).next())})}function ke(X,f){var w,G,ee,V,Se={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function st(je){return function(Pt){return function(ut){if(w)throw new TypeError("Generator is already executing.");for(;Se;)try{if(w=1,G&&(ee=2&ut[0]?G.return:ut[0]?G.throw||((ee=G.return)&&ee.call(G),0):G.next)&&!(ee=ee.call(G,ut[1])).done)return ee;switch(G=0,ee&&(ut=[2&ut[0],ee.value]),ut[0]){case 0:case 1:ee=ut;break;case 4:return Se.label++,{value:ut[1],done:!1};case 5:Se.label++,G=ut[1],ut=[0];continue;case 7:ut=Se.ops.pop(),Se.trys.pop();continue;default:if(!(ee=Se.trys,(ee=ee.length>0&&ee[ee.length-1])||ut[0]!==6&&ut[0]!==2)){Se=0;continue}if(ut[0]===3&&(!ee||ut[1]>ee[0]&&ut[1]<ee[3])){Se.label=ut[1];break}if(ut[0]===6&&Se.label<ee[1]){Se.label=ee[1],ee=ut;break}if(ee&&Se.label<ee[2]){Se.label=ee[2],Se.ops.push(ut);break}ee[2]&&Se.ops.pop(),Se.trys.pop();continue}ut=f.call(X,Se)}catch(Vt){ut=[6,Vt],G=0}finally{w=ee=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([je,Pt])}}}function me(){for(var X=0,f=0,w=arguments.length;f<w;f++)X+=arguments[f].length;var G=Array(X),ee=0;for(f=0;f<w;f++)for(var V=arguments[f],Se=0,st=V.length;Se<st;Se++,ee++)G[ee]=V[Se];return G}var ce=function(){function X(){}return X.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},X.setAttributes=function(f,w){for(var G=0,ee=w;G<ee.length;G++){var V=ee[G],Se=V[0],st=V[1];f.setAttribute(Se,st)}},X.createRect=function(f,w,G){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",f.toString()),ee.setAttribute("height",w.toString()),G&&X.setAttributes(ee,G),ee},X.createLine=function(f,w,G,ee,V){var Se=document.createElementNS("http://www.w3.org/2000/svg","line");return Se.setAttribute("x1",f.toString()),Se.setAttribute("y1",w.toString()),Se.setAttribute("x2",G.toString()),Se.setAttribute("y2",ee.toString()),V&&X.setAttributes(Se,V),Se},X.createPolygon=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","polygon");return G.setAttribute("points",f),w&&X.setAttributes(G,w),G},X.createCircle=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","circle");return G.setAttribute("cx",(f/2).toString()),G.setAttribute("cy",(f/2).toString()),G.setAttribute("r",f.toString()),w&&X.setAttributes(G,w),G},X.createEllipse=function(f,w,G){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(f/2).toString()),ee.setAttribute("cy",(w/2).toString()),ee.setAttribute("rx",(f/2).toString()),ee.setAttribute("ry",(w/2).toString()),G&&X.setAttributes(ee,G),ee},X.createGroup=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return f&&X.setAttributes(w,f),w},X.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},X.createMarker=function(f,w,G,ee,V,Se,st){var je=document.createElementNS("http://www.w3.org/2000/svg","marker");return X.setAttributes(je,[["id",f],["orient",w],["markerWidth",G.toString()],["markerHeight",ee.toString()],["refX",V.toString()],["refY",Se.toString()]]),je.appendChild(st),je},X.createText=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),f&&X.setAttributes(w,f),w},X.createTSpan=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","tspan");return G.textContent=f,w&&X.setAttributes(G,w),G},X.createImage=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return f&&X.setAttributes(w,f),w},X.createPoint=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return G.x=f,G.y=w,G},X.createPath=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","path");return G.setAttribute("d",f),w&&X.setAttributes(G,w),G},X}(),te=function(){function X(){}return X.addKey=function(f){X.key=f},Object.defineProperty(X,"isLicensed",{get:function(){return!!X.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(X.key)},enumerable:!1,configurable:!0}),X}(),be=function(){function X(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return X.prototype.rasterize=function(f,w,G){var ee=this;return new Promise(function(V){var Se=G!==void 0?G:document.createElement("canvas");f===null&&(ee.markersOnly=!0,ee.naturalSize=!1);var st=document.createElementNS("http://www.w3.org/2000/svg","svg");st.setAttribute("xmlns","http://www.w3.org/2000/svg"),st.setAttribute("width",w.width.baseVal.valueAsString),st.setAttribute("height",w.height.baseVal.valueAsString),st.setAttribute("viewBox","0 0 "+w.viewBox.baseVal.width.toString()+" "+w.viewBox.baseVal.height.toString()),st.innerHTML=w.innerHTML,ee.naturalSize===!0?(st.width.baseVal.value=f.naturalWidth,st.height.baseVal.value=f.naturalHeight):ee.width!==void 0&&ee.height!==void 0&&(st.width.baseVal.value=ee.width,st.height.baseVal.value=ee.height),Se.width=st.width.baseVal.value,Se.height=st.height.baseVal.value;var je=st.outerHTML,Pt=Se.getContext("2d");ee.markersOnly!==!0&&Pt.drawImage(f,0,0,Se.width,Se.height);var ut=window.URL,Vt=new Image(Se.width,Se.height);Vt.setAttribute("crossOrigin","anonymous");var qt=new Blob([je],{type:"image/svg+xml"}),yn=ut.createObjectURL(qt);Vt.onload=function(){Pt.drawImage(Vt,0,0),ut.revokeObjectURL(yn);var Tn=Se.toDataURL(ee.imageType,ee.imageQuality);V(Tn)},Vt.src=yn})},X}(),ae=function(){},we=function(){function X(f){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+f+"_"}return Object.defineProperty(X.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),X.prototype.addClass=function(f){return this.styleSheet===void 0&&this.addStyleSheet(),f.name=""+this.classNamePrefix+f.localName,this.classes.push(f),this.styleSheet.sheet.insertRule("."+f.name+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length),f},X.prototype.addRule=function(f){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(f),this.styleSheet.sheet.insertRule(f.selector+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length)},X.prototype.addStyleSheet=function(){var f;this.styleSheet=document.createElement("style"),((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).appendChild(this.styleSheet),this.addRule(new Pe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Pe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Pe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ce("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ce("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},X.prototype.removeStyleSheet=function(){var f;this.styleSheet&&(((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},X}(),Pe=function(X,f){this.selector=X,this.style=f},Ce=function(X,f){this.localName=X,this.style=f},Ve=function(){function X(f,w,G,ee,V){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=f,this.displayMode=w,this.markerItems=G,this.uiStyleSettings=ee,this.styles=V,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return X.prototype.show=function(f){var w=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=f,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var G=document.createElement("div");G.className=this.toolbarBlockStyleClass.name,G.style.whiteSpace="nowrap",this.uiContainer.appendChild(G),this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(V){var Se=document.createElement("div");Se.className=""+w.toolbarButtonStyleClass.name,Se.setAttribute("data-type-name",V.typeName),Se.innerHTML=V.icon,Se.addEventListener("click",function(){w.markerToolbarButtonClicked(Se,V)}),w.buttons.push(Se),w.markerButtons.push(Se)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ee,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},X.prototype.addButtonClickListener=function(f){this.buttonClickListeners.push(f)},X.prototype.removeButtonClickListener=function(f){this.buttonClickListeners.indexOf(f)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(f),1)},X.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},X.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var f=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var w=0;w<this.markerButtons.length;w++)w<f||w===f&&this.markerButtons.length-1===f?this.markerButtonBlock.appendChild(this.markerButtons[w]):(w===f&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[w]))}},X.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},X.prototype.resetButtonStyles=function(){var f=this;this.buttons.forEach(function(w){w.className=w.className.replace(f.uiStyleSettings.toolbarButtonStyleColorsClassName?f.uiStyleSettings.toolbarButtonStyleColorsClassName:f.toolbarButtonStyleColorsClass.name,"").trim(),w.className=w.className.replace(f.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?f.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:f.toolbarActiveButtonStyleColorsClass.name,"").trim(),w.className+=" "+(f.uiStyleSettings.toolbarButtonStyleColorsClassName?f.uiStyleSettings.toolbarButtonStyleColorsClassName:f.toolbarButtonStyleColorsClass.name)})},X.prototype.addActionButton=function(f,w,G){var ee=this,V=document.createElement("div");switch(V.className=""+this.toolbarButtonStyleClass.name,V.innerHTML=w,V.setAttribute("data-action",G),V.addEventListener("click",function(){ee.actionToolbarButtonClicked(V,G)}),G){case"select":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":V.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":V.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":V.style.fill=this.uiStyleSettings.closeButtonColor}f.appendChild(V),this.buttons.push(V)},X.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ce("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ce("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ce("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ce("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Ce("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var f=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ce("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
padding: `+f+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ce("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ce("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Pe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Pe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},X.prototype.markerToolbarButtonClicked=function(f,w){this.setActiveButton(f),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(G){return G("marker",w)}),this.markerButtonOverflowBlock.style.display="none"},X.prototype.actionToolbarButtonClicked=function(f,w){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(G){return G("action",w)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},X.prototype.setActiveButton=function(f){this.resetButtonStyles(),f.className=f.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),f.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},X.prototype.setActiveMarkerButton=function(f){var w=this.markerButtons.find(function(G){return G.getAttribute("data-type-name")===f});w&&this.setActiveButton(w)},X.prototype.setCurrentMarker=function(f){var w=this;this.currentMarker=f,this.buttons.filter(function(G){return/delete|notes/.test(G.getAttribute("data-action"))}).forEach(function(G){w.currentMarker===void 0?(G.style.fillOpacity="0.4",G.style.pointerEvents="none"):(G.style.fillOpacity="1",G.style.pointerEvents="all")})},X}(),Ge=function(){function X(f,w,G,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=f,this.displayMode=w,this.uiStyleSettings=G,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return X.prototype.addStyles=function(){var f;this.toolboxStyleClass=this.styles.addClass(new Ce("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Ce("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var w=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ce("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ce("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ce("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Ce("toolbox-panel-row_colors",`
background-color: `+((f=this.uiStyleSettings.toolboxBackgroundColor)!==null&&f!==void 0?f:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ce("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
padding: `+w+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ce("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ce("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Pe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Pe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},X.prototype.show=function(f){var w;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=f,this.uiContainer.className=this.toolboxStyleClass.name+" "+((w=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},X.prototype.setPanelButtons=function(f){var w,G,ee=this;this.panels=f,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((w=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((G=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&G!==void 0?G:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(V){var Se;V.uiStyleSettings=ee.uiStyleSettings;var st=document.createElement("div");st.className=ee.toolboxButtonStyleClass.name+" "+((Se=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Se!==void 0?Se:ee.toolboxButtonStyleColorsClass.name),st.innerHTML=V.icon,st.title=V.title,st.addEventListener("click",function(){ee.panelButtonClick(V)}),ee.panelButtons.push(st),ee.buttonRow.appendChild(st)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},X.prototype.panelButtonClick=function(f){var w=this,G=-1;if(f!==this.activePanel){G=this.panels.indexOf(f),this.panelRow.innerHTML="";var ee=f.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=f}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){w.displayMode==="inline"?w.panelRow.style.display="none":w.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(V,Se){var st,je;V.className=w.toolboxButtonStyleClass.name+" "+(Se===G?""+((st=w.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&st!==void 0?st:w.toolboxActiveButtonStyleColorsClass.name):""+((je=w.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:w.toolboxButtonStyleColorsClass.name))})},X}(),tt=function(X,f){this.title=X,this.icon=f},Je=function(X){function f(w,G,ee,V){var Se=X.call(this,w,V||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Se.colors=[],Se.addTransparent=!1,Se.colorBoxes=[],Se.colors=G,Se.currentColor=ee,Se.setCurrentColor=Se.setCurrentColor.bind(Se),Se.getColorBox=Se.getColorBox.bind(Se),Se}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");return G.style.overflow="hidden",G.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var V=w.getColorBox(ee);G.appendChild(V),w.colorBoxes.push(V)}),G},f.prototype.getColorBox=function(w){var G=this,ee=this.uiStyleSettings.toolbarHeight/4,V=this.uiStyleSettings.toolbarHeight-ee,Se=document.createElement("div");Se.style.display="inline-block",Se.style.boxSizing="content-box",Se.style.width=V-2+"px",Se.style.height=V-2+"px",Se.style.padding="1px",Se.style.marginRight="2px",Se.style.marginBottom="2px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderRadius=(V+2)/2+"px",Se.style.borderColor=w===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){G.setCurrentColor(w,Se)});var st=document.createElement("div");return st.style.display="inline-block",st.style.width=V-2+"px",st.style.height=V-2+"px",st.style.backgroundColor=w,st.style.borderRadius=V/2+"px",w==="transparent"&&(st.style.fill=this.uiStyleSettings.toolboxAccentColor,st.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Se.appendChild(st),Se},f.prototype.setCurrentColor=function(w,G){var ee=this;this.currentColor=w,this.colorBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(w)},f}(tt),Ye=function(){function X(f,w,G){this._state="new",this._isSelected=!1,this._container=f,this._overlayContainer=w,this.globalSettings=G,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(X.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),X.prototype.ownsTarget=function(f){return!1},Object.defineProperty(X.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),X.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},X.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},X.prototype.pointerDown=function(f,w){},X.prototype.dblClick=function(f,w){},X.prototype.manipulate=function(f){},X.prototype.pointerUp=function(f){this.stateChanged()},X.prototype.dispose=function(){},X.prototype.addMarkerVisualToContainer=function(f){this.container.childNodes.length>0?this.container.insertBefore(f,this.container.childNodes[0]):this.container.appendChild(f)},X.prototype.getState=function(){return{typeName:X.typeName,state:this.state,notes:this.notes}},X.prototype.restoreState=function(f){this._state=f.state,this.notes=f.notes},X.prototype.scale=function(f,w){},X.prototype.colorChanged=function(f){this.onColorChanged&&this.onColorChanged(f),this.stateChanged()},X.prototype.fillColorChanged=function(f){this.onFillColorChanged&&this.onFillColorChanged(f),this.stateChanged()},X.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var f=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),f.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(f)&&this.onStateChanged(this)}},X.typeName="MarkerBase",X}(),et=function(){function X(){this.findGripByVisual=this.findGripByVisual.bind(this)}return X.prototype.findGripByVisual=function(f){return this.topLeft.ownsTarget(f)?this.topLeft:this.topCenter.ownsTarget(f)?this.topCenter:this.topRight.ownsTarget(f)?this.topRight:this.centerLeft.ownsTarget(f)?this.centerLeft:this.centerRight.ownsTarget(f)?this.centerRight:this.bottomLeft.ownsTarget(f)?this.bottomLeft:this.bottomCenter.ownsTarget(f)?this.bottomCenter:this.bottomRight.ownsTarget(f)?this.bottomRight:void 0},X}(),St=function(){function X(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(f){return f===this.visual||f===this.visual.childNodes[0]||f===this.visual.childNodes[1]},X}(),At=function(){function X(){}return X.toITransformMatrix=function(f){return{a:f.a,b:f.b,c:f.c,d:f.d,e:f.e,f:f.f}},X.toSVGMatrix=function(f,w){return f.a=w.a,f.b=w.b,f.c=w.c,f.d=w.d,f.e=w.e,f.f=w.f,f},X}(),ht=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.left=0,V.top=0,V.width=0,V.height=0,V.defaultSize={x:50,y:20},V.offsetX=0,V.offsetY=0,V.rotationAngle=0,V.CB_DISTANCE=10,V._suppressMarkerCreateEvent=!1,V.container.transform.baseVal.appendItem(ce.createTransform()),V.setupControlBox(),V}return _e(f,X),Object.defineProperty(f.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"visual",{get:function(){return this._visual},set:function(w){this._visual=w;var G=ce.createTransform();this._visual.transform.baseVal.appendItem(G)},enumerable:!1,configurable:!0}),f.prototype.ownsTarget=function(w){return!!X.prototype.ownsTarget.call(this,w)||!!(this.controlGrips.findGripByVisual(w)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(w))},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="new"&&(this.left=w.x,this.top=w.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(w);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(G),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(G)){this.activeGrip=this.rotatorGrip;var V=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=V.x-this.width/2,this.top=V.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Se=this.container.transform.baseVal.getItem(0);Se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Se,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},f.prototype.pointerUp=function(w){var G=this.state;X.prototype.pointerUp.call(this,w),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(w),this._state="select",G==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},f.prototype.moveVisual=function(w){this.visual.style.transform="translate("+w.x+"px, "+w.y+"px)"},f.prototype.manipulate=function(w){var G=this.unrotatePoint(w);this.state==="creating"?this.resize(w):this.state==="move"?(this.left=this.manipulationStartLeft+(G.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(G.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(G):this.state==="rotate"&&this.rotate(w)},f.prototype.resize=function(w){var G=this.manipulationStartLeft,ee=this.manipulationStartWidth,V=this.manipulationStartTop,Se=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:G=this.manipulationStartLeft+w.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-G;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+w.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:V=this.manipulationStartTop+w.y-this.manipulationStartY,Se=this.manipulationStartHeight+this.manipulationStartTop-V;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Se=this.manipulationStartHeight+w.y-this.manipulationStartY}ee>=0?(this.left=G,this.width=ee):(this.left=G+ee,this.width=-ee),Se>=0?(this.top=V,this.height=Se):(this.top=V+Se,this.height=-Se),this.setSize()},f.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},f.prototype.rotate=function(w){if(Math.abs(w.x-this.centerX)>.1){var G=Math.sign(w.x-this.centerX);this.rotationAngle=180*Math.atan((w.y-this.centerY)/(w.x-this.centerX))/Math.PI+90*G,this.applyRotation()}},f.prototype.applyRotation=function(){var w=this.container.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(w,0)},f.prototype.rotatePoint=function(w){if(this.rotationAngle===0)return w;var G=this.container.getCTM(),ee=ce.createPoint(w.x,w.y);return{x:(ee=ee.matrixTransform(G)).x,y:ee.y}},f.prototype.unrotatePoint=function(w){if(this.rotationAngle===0)return w;var G=this.container.getCTM();G=G.inverse();var ee=ce.createPoint(w.x,w.y);return{x:(ee=ee.matrixTransform(G)).x,y:ee.y}},f.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},f.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},f.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var w=ce.createTransform();w.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(w),this.container.appendChild(this.controlBox),this.controlRect=ce.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ce.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new et,this.addControlGrips(),this.controlBox.style.display="none"},f.prototype.adjustControlBox=function(){var w=this.controlBox.transform.baseVal.getItem(0);w.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(w,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},f.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},f.prototype.createGrip=function(){var w=new St;return w.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(w.visual),w},f.prototype.positionGrips=function(){var w=this.controlGrips.topLeft.GRIP_SIZE,G=-w/2,ee=G,V=(this.width+this.CB_DISTANCE)/2-w/2,Se=(this.height+this.CB_DISTANCE)/2-w/2,st=this.height+this.CB_DISTANCE-w/2,je=this.width+this.CB_DISTANCE-w/2;this.positionGrip(this.controlGrips.topLeft.visual,G,ee),this.positionGrip(this.controlGrips.topCenter.visual,V,ee),this.positionGrip(this.controlGrips.topRight.visual,je,ee),this.positionGrip(this.controlGrips.centerLeft.visual,G,Se),this.positionGrip(this.controlGrips.centerRight.visual,je,Se),this.positionGrip(this.controlGrips.bottomLeft.visual,G,st),this.positionGrip(this.controlGrips.bottomCenter.visual,V,st),this.positionGrip(this.controlGrips.bottomRight.visual,je,st),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,V,ee-3*this.CB_DISTANCE)},f.prototype.positionGrip=function(w,G,ee){var V=w.transform.baseVal.getItem(0);V.setTranslate(G,ee),w.transform.baseVal.replaceItem(V,0)},f.prototype.hideControlBox=function(){this.controlBox.style.display="none"},f.prototype.showControlBox=function(){this.controlBox.style.display=""},f.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:At.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:At.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},X.prototype.getState.call(this))},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w);var G=w;this.left=G.left,this.top=G.top,this.width=G.width,this.height=G.height,this.rotationAngle=G.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(At.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,G.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(At.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,G.containerTransformMatrix))},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G);var ee=this.rotatePoint({x:this.left,y:this.top}),V=this.unrotatePoint({x:ee.x*w,y:ee.y*G});this.left=V.x,this.top=V.y,this.width=this.width*w,this.height=this.height*G,this.adjustControlBox()},f}(Ye),xt=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.createVisual=V.createVisual.bind(V),V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.visual)},f.prototype.createVisual=function(){this.visual=ce.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},f.prototype.manipulate=function(w){X.prototype.manipulate.call(this,w)},f.prototype.resize=function(w){X.prototype.resize.call(this,w),this.setSize()},f.prototype.setSize=function(){X.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},f.prototype.pointerUp=function(w){X.prototype.pointerUp.call(this,w),this.setSize()},f.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},f.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},f.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},f.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},f.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this))},f.prototype.restoreState=function(w){var G=w;this.fillColor=G.fillColor,this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.opacity=G.opacity,this.createVisual(),X.prototype.restoreState.call(this,w),this.setSize()},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.setSize()},f.title="Rectangle marker",f}(ht),Tt=function(X){function f(w,G,ee,V){var Se=X.call(this,w,V||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Se.widths=[],Se.widthBoxes=[],Se.widths=G,Se.currentWidth=ee,Se.setCurrentWidth=Se.setCurrentWidth.bind(Se),Se}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",this.widths.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.flexGrow="2",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===w.currentWidth?w.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){w.setCurrentWidth(ee,V)}),G.appendChild(V);var Se=document.createElement("div");Se.innerText=ee.toString(),Se.style.marginRight="5px",V.appendChild(Se);var st=document.createElement("div");st.style.minHeight="20px",st.style.flexGrow="2",st.style.display="flex",st.style.alignItems="center";var je=document.createElement("hr");je.style.minWidth="20px",je.style.border="0px",je.style.borderTop=ee+"px solid "+w.uiStyleSettings.toolboxColor,je.style.flexGrow="2",st.appendChild(je),V.appendChild(st),w.widthBoxes.push(V)}),G},f.prototype.setCurrentWidth=function(w,G){var ee=this;this.currentWidth=w,this.widthBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},f}(tt),Ot=function(X){function f(w,G,ee,V){var Se=X.call(this,w,V||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Se.styles=[],Se.styleBoxes=[],Se.styles=G,Se.currentStyle=ee,Se.setCurrentStyle=Se.setCurrentStyle.bind(Se),Se}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",this.styles.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/w.styles.length-5+"%",V.style.borderColor=ee===w.currentStyle?w.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){w.setCurrentStyle(ee,V)}),G.appendChild(V);var Se=document.createElement("div");Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.overflow="hidden";var st=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+w.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ee!==""?'stroke-dasharray="'+ee+'"':"")+` />
</svg>`;Se.innerHTML=st,V.appendChild(Se),w.styleBoxes.push(V)}),G},f.prototype.setCurrentStyle=function(w,G){var ee=this;this.currentStyle=w,this.styleBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},f}(tt),Oe=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Je("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new Tt("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new Ot("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return _e(f,X),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=X.prototype.getState.call(this);return w.typeName=f.typeName,w},f.typeName="FrameMarker",f.title="Frame marker",f.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',f}(xt),Te=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},rt=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return _e(f,X),f.prototype.ownsTarget=function(w){return!!X.prototype.ownsTarget.call(this,w)||!(!this.grip1.ownsTarget(w)&&!this.grip2.ownsTarget(w))},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.manipulationStartX=w.x,this.manipulationStartY=w.y,this.state==="new"&&(this.x1=w.x,this.y1=w.y,this.x2=w.x,this.y2=w.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(G)?this.activeGrip=this.grip1:this.grip2.ownsTarget(G)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},f.prototype.pointerUp=function(w){var G=this.state;X.prototype.pointerUp.call(this,w),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(w),this._state="select",G==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},f.prototype.adjustVisual=function(){},f.prototype.manipulate=function(w){this.state==="creating"?this.resize(w):this.state==="move"?(this.x1=this.manipulationStartX1+w.x-this.manipulationStartX,this.y1=this.manipulationStartY1+w.y-this.manipulationStartY,this.x2=this.manipulationStartX2+w.x-this.manipulationStartX,this.y2=this.manipulationStartY2+w.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(w)},f.prototype.resize=function(w){switch(this.activeGrip){case this.grip1:this.x1=w.x,this.y1=w.y;break;case this.grip2:case void 0:this.x2=w.x,this.y2=w.y}this.adjustVisual(),this.adjustControlBox()},f.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},f.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},f.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},f.prototype.adjustControlBox=function(){this.positionGrips()},f.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},f.prototype.createGrip=function(){var w=new St;return w.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(w.visual),w},f.prototype.positionGrips=function(){var w=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-w/2,this.y1-w/2),this.positionGrip(this.grip2.visual,this.x2-w/2,this.y2-w/2)},f.prototype.positionGrip=function(w,G,ee){var V=w.transform.baseVal.getItem(0);V.setTranslate(G,ee),w.transform.baseVal.replaceItem(V,0)},f.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},X.prototype.getState.call(this))},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w);var G=w;this.x1=G.x1,this.y1=G.y1,this.x2=G.x2,this.y2=G.y2},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.x1=this.x1*w,this.y1=this.y1*G,this.x2=this.x2*w,this.y2=this.y2*G,this.adjustVisual(),this.adjustControlBox()},f}(Ye),ot=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Je("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new Tt("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new Ot("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorLine&&w!==this.visibleLine)},f.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},f.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},f.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},f.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},f.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w);var G=w;this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.createVisual(),this.adjustVisual()},f.typeName="LineMarker",f.title="Line marker",f.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',f}(rt),Ne=function(X){function f(w,G,ee,V){var Se=X.call(this,w,V||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Se.fonts=[],Se.fontBoxes=[],Se.fonts=G,Se.currentFont=ee,Se.setCurrentFont=Se.setCurrentFont.bind(Se),Se}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");return G.style.overflow="hidden",G.style.flexGrow="2",this.fonts.forEach(function(ee){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/w.fonts.length-5+"%",V.style.borderColor=ee===w.currentFont?w.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){w.setCurrentFont(ee,V)}),G.appendChild(V);var Se=document.createElement("div");Se.style.display="flex",Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.fontFamily=ee,Se.style.overflow="hidden";var st=document.createElement("div");st.style.whiteSpace="nowrap",st.style.overflow="hidden",st.style.textOverflow="ellipsis",st.innerHTML="The quick brown fox jumps over the lazy dog",Se.appendChild(st),V.appendChild(Se),w.fontBoxes.push(V)}),G},f.prototype.setCurrentFont=function(w,G){var ee=this;this.currentFont=w,this.fontBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},f}(tt),$e=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=ee.defaultColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new Je("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new Ne("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return _e(f,X),f.prototype.ownsTarget=function(w){if(X.prototype.ownsTarget.call(this,w)||w===this.visual||w===this.textElement||w===this.bgRectangle)return!0;var G=!1;return this.textElement.childNodes.forEach(function(ee){ee===w&&(G=!0)}),G},f.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.isMoved=!1,this.pointerDownPoint=w,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},f.prototype.renderText=function(){var w=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(G){w.textElement.appendChild(ce.createTSpan(G.trim()===""?" ":G.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},f.prototype.getTextScale=function(){var w=this.textElement.getBBox(),G=1;if(w.width>0&&w.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/w.width,V=(1*this.height-this.height*this.padding*2/100)/w.height;G=Math.min(ee,V)}return G},f.prototype.getTextPosition=function(w){var G=this.textElement.getBBox(),ee=0,V=0;return G.width>0&&G.height>0&&(ee=(this.width-G.width*w)/2,V=this.height/2-G.height*w/2),{x:ee,y:V}},f.prototype.sizeText=function(){var w=this.textElement.getBBox(),G=this.getTextScale(),ee=this.getTextPosition(G);ee.y-=w.y*G,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+G+", "+G+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(G,G))},f.prototype.manipulate=function(w){X.prototype.manipulate.call(this,w),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(w.x-this.pointerDownPoint.x)>5||Math.abs(w.y-this.pointerDownPoint.y)>5)},f.prototype.resize=function(w){X.prototype.resize.call(this,w),this.isMoved=!0,this.setSize(),this.sizeText()},f.prototype.setSize=function(){X.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},f.prototype.pointerUp=function(w){var G=this.state;G==="creating"&&(this._suppressMarkerCreateEvent=!0),X.prototype.pointerUp.call(this,w),this.setSize(),(G==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},f.prototype.showTextEditor=function(){var w=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(G){G.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var G=Number.parseFloat(w.textEditor.style.fontSize);w.textEditor.clientWidth>=Number.parseInt(w.textEditor.style.maxWidth)&&G>.9;)G-=.1,w.textEditor.style.fontSize=Math.max(G,.9)+"em"}),this.textEditor.addEventListener("keyup",function(G){G.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(G){if(G.clipboardData){var ee=G.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(ee)),G.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){w.textEditDivClicked(w.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},f.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var w=this.getTextScale(),G=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),V={x:ee.width*w,y:ee.height*w};G.x-=V.x/2,G.y-=V.y/2,this.textEditor.style.top=G.y+"px",this.textEditor.style.left=G.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-G.x+"px",this.textEditor.style.fontSize=Math.max(16*w,12)+"px",this.textElement.style.display="none"}},f.prototype.textEditDivClicked=function(w){this.text=w.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},f.prototype.select=function(){X.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},f.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),X.prototype.deselect.call(this)},f.prototype.dblClick=function(w,G){X.prototype.dblClick.call(this,w,G),this.showTextEditor()},f.prototype.setColor=function(w){this.textElement&&ce.setAttributes(this.textElement,[["fill",w]]),this.color=w,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(w)},f.prototype.setFont=function(w){this.textElement&&ce.setAttributes(this.textElement,[["font-family",w]]),this.fontFamily=w,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},f.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},f.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){var G=w;this.color=G.color,this.fontFamily=G.fontFamily,this.padding=G.padding,this.text=G.text,this.createVisual(),X.prototype.restoreState.call(this,w),this.setSize()},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.setSize(),this.sizeText(),this.positionTextEditor()},f.typeName="TextMarker",f.title="Text marker",f.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',f}(ht),xe=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=ee.defaultColor,V.lineWidth=ee.defaultStrokeWidth,V.pixelRatio=ee.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new Je("Color",ee.defaultColorSet,ee.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new Tt("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.drawingImage)},f.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var w=ce.createTransform();this.visual.transform.baseVal.appendItem(w),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(w,G){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(w.x,w.y),this.drawing=!0):X.prototype.pointerDown.call(this,w,G)},f.prototype.manipulate=function(w){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(w.x,w.y),this.canvasContext.stroke()):X.prototype.manipulate.call(this,w)},f.prototype.resize=function(w){X.prototype.resize.call(this,w),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},f.prototype.pointerUp=function(w){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):X.prototype.pointerUp.call(this,w)},f.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},f.prototype.select=function(){this.state==="creating"&&this.finishCreation(),X.prototype.select.call(this)},f.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),X.prototype.deselect.call(this)},f.prototype.finishCreation=function(){for(var w=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),G=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=G[0],V=G[1],Se=G[2],st=G[3],je=!1,Pt=0;Pt<this.canvasElement.height;Pt++)for(var ut=0;ut<this.canvasElement.width;ut++)w.data[Pt*this.canvasElement.width*4+4*ut+3]>0&&(je=!0,Pt<V&&(V=Pt),ut<ee&&(ee=ut),Pt>st&&(st=Pt),ut>Se&&(Se=ut));if(je){this.left=ee/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(Se-ee)/this.pixelRatio,this.height=(st-V)/this.pixelRatio;var Vt=document.createElement("canvas");Vt.width=Se-ee,Vt.height=st-V,Vt.getContext("2d").putImageData(this.canvasContext.getImageData(ee,V,Se-ee,st-V),0,0),this.drawingImgUrl=Vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},f.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},f.prototype.setColor=function(w){this.color=w,this.colorChanged(w)},f.prototype.setLineWidth=function(w){this.lineWidth=w},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({drawingImgUrl:this.drawingImgUrl},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){this.createVisual(),X.prototype.restoreState.call(this,w),this.drawingImgUrl=w.drawingImgUrl,this.setDrawingImage()},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.setDrawingImage()},f.typeName="FreehandMarker",f.title="Freehand marker",f.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',f}(ht),fe=function(X){function f(w,G,ee){var V=X.call(this,w,ee||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return V.typeBoxes=[],V.currentType=G,V.setCurrentType=V.setCurrentType.bind(V),V}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2";for(var ee=function(st){var je="both";switch(st){case 0:je="both";break;case 1:je="start";break;case 2:je="end";break;case 3:je="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=je===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){w.setCurrentType(je,Pt)}),G.appendChild(Pt),je==="both"||je==="start"){var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ut.style.marginLeft="5px",Pt.appendChild(ut)}var Vt=document.createElement("div");Vt.style.display="flex",Vt.style.alignItems="center",Vt.style.minHeight="20px",Vt.style.flexGrow="2";var qt=document.createElement("hr");if(qt.style.minWidth="20px",qt.style.border="0px",qt.style.borderTop="3px solid "+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee"),qt.style.flexGrow="2",Vt.appendChild(qt),Pt.appendChild(Vt),je==="both"||je==="end"){var yn=document.createElement("div");yn.style.display="flex",yn.style.alignItems="center",yn.style.minHeight="20px",yn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,yn.style.marginRight="5px",Pt.appendChild(yn)}V.typeBoxes.push(Pt)},V=this,Se=0;Se<4;Se++)ee(Se);return G},f.prototype.setCurrentType=function(w,G){var ee=this;this.currentType=w,this.typeBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},f}(tt),pe=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new fe("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.arrow1&&w!==this.arrow2)},f.prototype.getArrowPoints=function(w,G){var ee=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return w-ee/2+","+(G+V/2)+" "+w+","+(G-V/2)+" "+(w+ee/2)+","+(G+V/2)},f.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="creating"&&this.createTips()},f.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),G=this.arrow1.transform.baseVal.getItem(0);G.setRotate(w,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(G,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(w+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},f.prototype.setArrowType=function(w){this.arrowType=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({arrowType:this.arrowType},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w);var G=w;this.arrowType=G.arrowType,this.createTips(),this.adjustVisual()},f.typeName="ArrowMarker",f.title="Arrow marker",f.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',f}(ot),re=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.fillColor=ee.defaultFillColor,V.strokeWidth=0,V.fillPanel=new Je("Color",ee.defaultColorSet,ee.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return _e(f,X),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=X.prototype.getState.call(this);return w.typeName=f.typeName,w},f.typeName="CoverMarker",f.title="Cover marker",f.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',f}(xt),ie=function(X){function f(w,G,ee,V){var Se=X.call(this,w,V||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Se.opacities=[],Se.opacityBoxes=[],Se.opacities=G,Se.currentOpacity=ee,Se.setCurrentOpacity=Se.setCurrentOpacity.bind(Se),Se}return _e(f,X),f.prototype.getUi=function(){var w=this,G=document.createElement("div");return G.style.display="flex",G.style.overflow="hidden",G.style.flexGrow="2",G.style.justifyContent="space-between",this.opacities.forEach(function(ee){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=ee===w.currentOpacity?w.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){w.setCurrentOpacity(ee,V)}),G.appendChild(V);var Se=document.createElement("div");Se.innerText=100*ee+"%",V.appendChild(Se),w.opacityBoxes.push(V)}),G},f.prototype.setCurrentOpacity=function(w,G){var ee=this;this.currentOpacity=w,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===G?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},f}(tt),se=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=ee.defaultHighlightColor,V.strokeWidth=0,V.opacity=ee.defaultHighlightOpacity,V.fillPanel=new Je("Color",ee.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new ie("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return _e(f,X),f.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=X.prototype.getState.call(this);return w.typeName=f.typeName,w},f.typeName="HighlightMarker",f.title="Highlight marker",f.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',f}(re),de='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Le=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=ee.defaultStrokeColor,V.bgColor=ee.defaultFillColor,V.fontFamily=ee.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new Je("Text color",ee.defaultColorSet,V.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new Je("Fill color",ee.defaultColorSet,V.bgColor,de),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new Ne("Font",ee.defaultFontFamilies,ee.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new St,V.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return _e(f,X),f.prototype.ownsTarget=function(w){return X.prototype.ownsTarget.call(this,w)||this.tipGrip.ownsTarget(w)||this.tip===w},f.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},f.prototype.pointerDown=function(w,G){this.state==="new"&&X.prototype.pointerDown.call(this,w,G),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(G)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):X.prototype.pointerDown.call(this,w,G)},f.prototype.pointerUp=function(w){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,X.prototype.pointerUp.call(this,w);else{var G=this.state==="creating";X.prototype.pointerUp.call(this,w),this.setTipPoints(G),this.positionTip()}},f.prototype.manipulate=function(w){if(this.tipMoving){var G=this.unrotatePoint(w);this.tipPosition={x:G.x-this.manipulationStartLeft,y:G.y-this.manipulationStartTop},this.positionTip()}else X.prototype.manipulate.call(this,w)},f.prototype.setBgColor=function(w){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",w]]),ce.setAttributes(this.tip,[["fill",w]])),this.bgColor=w,this.fillColorChanged(w)},f.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},f.prototype.setTipPoints=function(w){w===void 0&&(w=!1);var G=Math.min(this.height/2,15),ee=this.height/5;w&&(this.tipPosition={x:G+ee/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:G,y:0},this.tipBase2Position={x:G+ee,y:0}):(this.tipBase1Position={x:0,y:G},this.tipBase2Position={x:0,y:G+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-G-ee,y:0},this.tipBase2Position={x:this.width-G,y:0}):(this.tipBase1Position={x:this.width,y:G},this.tipBase2Position={x:this.width,y:G+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?V<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-G-ee,y:this.height},this.tipBase2Position={x:this.width-G,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-G-ee},this.tipBase2Position={x:this.width,y:this.height-G}):V<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,G=Math.min(this.width/2,15),this.tipBase1Position={x:G,y:this.height},this.tipBase2Position={x:G+ee,y:this.height}):(this.tipBase1Position={x:0,y:this.height-G},this.tipBase2Position={x:0,y:this.height-G-ee})},f.prototype.resize=function(w){X.prototype.resize.call(this,w),this.positionTip()},f.prototype.positionTip=function(){ce.setAttributes(this.tip,[["points",this.getTipPoints()]]);var w=this.tipGrip.visual.transform.baseVal.getItem(0);w.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(w,0)},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),f.prototype.select=function(){this.positionTip(),X.prototype.select.call(this)},f.prototype.getState=function(){var w=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){var G=w;this.bgColor=G.bgColor,this.tipPosition=G.tipPosition,X.prototype.restoreState.call(this,w),this.createTip(),this.setTipPoints()},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.tipPosition={x:this.tipPosition.x*w,y:this.tipPosition.y*G},this.positionTip()},f.typeName="CalloutMarker",f.title="Callout marker",f.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',f}($e),Ke=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.fillColor=ee.defaultFillColor,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.setOpacity=V.setOpacity.bind(V),V.createVisual=V.createVisual.bind(V),V.strokePanel=new Je("Line color",me(ee.defaultColorSet,["transparent"]),ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.fillPanel=new Je("Fill color",me(ee.defaultColorSet,["transparent"]),V.fillColor,de),V.fillPanel.onColorChanged=V.setFillColor,V.strokeWidthPanel=new Tt("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new Ot("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V.opacityPanel=new ie("Opacity",ee.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.visual)},f.prototype.createVisual=function(){this.visual=ce.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},f.prototype.manipulate=function(w){X.prototype.manipulate.call(this,w)},f.prototype.resize=function(w){X.prototype.resize.call(this,w),this.setSize()},f.prototype.setSize=function(){X.prototype.setSize.call(this),ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},f.prototype.pointerUp=function(w){X.prototype.pointerUp.call(this,w),this.setSize()},f.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},f.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(w),this.stateChanged()},f.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},f.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},f.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){var G=w;this.fillColor=G.fillColor,this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.opacity=G.opacity,this.createVisual(),X.prototype.restoreState.call(this,w),this.setSize()},f.prototype.scale=function(w,G){X.prototype.scale.call(this,w,G),this.setSize()},f.typeName="EllipseMarker",f.title="Ellipse marker",f.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',f}(ht),dt=function(X){function f(w,G,ee){return X.call(this,w,G,ee)||this}return _e(f,X),Object.defineProperty(f.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.tip1&&w!==this.tip2)},f.prototype.createTips=function(){this.tip1=ce.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ce.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip2)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.state==="creating"&&this.createTips()},f.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ce.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),G=this.tip1.transform.baseVal.getItem(0);G.setRotate(w,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(G,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(w+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=X.prototype.getState.call(this);return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w),this.createTips(),this.adjustVisual()},f.typeName="MeasurementMarker",f.title="Measurement marker",f.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',f}(ot),_t=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.strokePanel.colors=ee.defaultColorSet,V.fillColor="transparent",V}return _e(f,X),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=X.prototype.getState.call(this);return w.typeName=f.typeName,w},f.typeName="EllipseFrameMarker",f.title="Ellipse frame marker",f.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',f}(Ke),Ht=function(){function X(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),X.prototype.addUndoStep=function(f){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(f)||(this.undoStack.push(f),JSON.stringify(this.lastRedoStep)!==JSON.stringify(f)&&this.redoStack.splice(0,this.redoStack.length))},X.prototype.replaceLastUndoStep=function(f){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=f)},X.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},X.prototype.undo=function(){if(this.undoStack.length>1){var f=this.undoStack.pop();return f!==void 0&&this.redoStack.push(f),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},X.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},X}(),it=function(X){function f(w,G,ee){var V=X.call(this,w,G,ee)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=ee.defaultColor,V.strokeWidth=ee.defaultStrokeWidth,V.strokeDasharray=ee.defaultStrokeDasharray,V.strokePanel=new Je("Line color",ee.defaultColorSet,ee.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new Tt("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new Ot("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return _e(f,X),f.prototype.ownsTarget=function(w){return!(!X.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorCurve&&w!==this.visibleCurve&&!this.curveGrip.ownsTarget(w))},f.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},f.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(w,G){X.prototype.pointerDown.call(this,w,G),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=w.x,this.curveY=w.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(G)&&(this.activeGrip=this.curveGrip,this._state="resize")},f.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},f.prototype.setupControlBox=function(){X.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},f.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,X.prototype.addControlGrips.call(this)},f.prototype.positionGrips=function(){X.prototype.positionGrips.call(this);var w=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-w/2,this.curveY-w/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},f.prototype.manipulate=function(w){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+w.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+w.y-this.manipulationStartY),X.prototype.manipulate.call(this,w)},f.prototype.resize=function(w){this.activeGrip===this.curveGrip&&(this.curveX=w.x,this.curveY=w.y),X.prototype.resize.call(this,w),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},f.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},f.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},f.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual()},f.prototype.scale=function(w,G){this.curveX=this.curveX*w,this.curveY=this.curveY*G,X.prototype.scale.call(this,w,G)},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},X.prototype.getState.call(this));return w.typeName=f.typeName,w},f.prototype.restoreState=function(w){X.prototype.restoreState.call(this,w);var G=w;this.strokeColor=G.strokeColor,this.strokeWidth=G.strokeWidth,this.strokeDasharray=G.strokeDasharray,this.curveX=G.curveX,this.curveY=G.curveY,this.createVisual(),this.adjustVisual()},f.typeName="CurveMarker",f.title="Curve marker",f.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',f}(rt),gt=function(){function X(f,w){w===void 0&&(w=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=f,this.cancelable=w}return Object.defineProperty(X.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),X.prototype.preventDefault=function(){this._defaultPrevented=!0},X}(),Qe=function(X){function f(w,G,ee){var V=X.call(this,w,!1)||this;return V.dataUrl=G,V.state=ee,V}return _e(f,X),f}(gt),Ze=function(X){function f(w,G,ee){ee===void 0&&(ee=!1);var V=X.call(this,w,ee)||this;return V.marker=G,V}return _e(f,X),f}(gt),Fe=function(){function X(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return X.prototype.addEventListener=function(f,w){this[f].push(w)},X.prototype.removeEventListener=function(f,w){var G=this[f].indexOf(w);G>-1&&this[f].splice(G,1)},X}(),oe=function(){function X(f){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Te,this._isOpen=!1,this.undoRedoManager=new Ht,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Fe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=X.instanceCounter++,this.styles=new we(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=f,this.targetRoot=document.body,this.width=f.clientWidth,this.height=f.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(X.prototype,"ALL_MARKER_TYPES",{get:function(){return[Oe,xe,pe,$e,_t,Ke,se,Le,dt,re,ot,it]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Oe,xe,pe,$e,Ke,se,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Oe,xe,pe,$e,se]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(f){var w=this;this._availableMarkerTypes.splice(0),f.forEach(function(G){if(typeof G=="string"){var ee=w.ALL_MARKER_TYPES.find(function(V){return V.typeName===G});ee!==void 0&&w._availableMarkerTypes.push(ee)}else w._availableMarkerTypes.push(G)})},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(f){this._zoomLevel=f,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),te.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},X.prototype.show=function(){var f=this;this.styles.styleSheetRoot===void 0&&ae.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ae.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(w){return w(new gt(f))})},X.prototype.render=function(){return Ie(this,void 0,void 0,function(){var f;return ke(this,function(w){switch(w.label){case 0:return this.setCurrentMarker(),(f=new be).naturalSize=this.renderAtNaturalSize,f.imageType=this.renderImageType,f.imageQuality=this.renderImageQuality,f.markersOnly=this.renderMarkersOnly,f.width=this.renderWidth,f.height=this.renderHeight,[4,f.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return w.sent(),[4,f.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,w.sent()]}})})},X.prototype.close=function(f){var w=this;if(f===void 0&&(f=!1),this.isOpen){var G=!1;f||this.eventListeners.beforeclose.forEach(function(ee){var V=new gt(w,!0);ee(V),V.defaultPrevented&&(G=!0)}),G||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ee){return ee(new gt(w))}),this.detachEvents(),this._isOpen=!1)}},X.prototype.addMarkersToToolbar=function(){for(var f,w=[],G=0;G<arguments.length;G++)w[G]=arguments[G];(f=this._availableMarkerTypes).push.apply(f,w)},X.prototype.addRenderEventListener=function(f){this.addEventListener("render",function(w){f(w.dataUrl,w.state)})},X.prototype.removeRenderEventListener=function(f){},X.prototype.addCloseEventListener=function(f){this.addEventListener("close",function(){f()})},X.prototype.removeCloseEventListener=function(f){},X.prototype.setupResizeObserver=function(){var f=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){f.resize(f.target.clientWidth,f.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return f.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},X.prototype.onPopupTargetResize=function(){var f=1*this.target.clientWidth/this.target.clientHeight,w=this.editorCanvas.clientWidth/f>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*f:this.editorCanvas.clientWidth,G=w<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/f;this.resize(w,G)},X.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},X.prototype.resize=function(f,w){this._isResizing=!0;var G=f/this.imageWidth,ee=w/this.imageHeight;this.imageWidth=Math.round(f),this.imageHeight=Math.round(w),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(G,ee),this._isResizing=!1},X.prototype.scaleMarkers=function(f,w){var G,ee=this;this._currentMarker&&this._currentMarker instanceof $e?this._currentMarker.scale(f,w):(G=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(V){V!==ee._currentMarker&&V.scale(f,w)}),G!==void 0&&this.setCurrentMarker(G)},X.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},X.prototype.setTopLeft=function(){var f=this.editingTarget.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=f.left-w.left,this.top=f.top-w.top},X.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},X.prototype.addDefs=function(){for(var f,w=[],G=0;G<arguments.length;G++)w[G]=arguments[G];this.defs=ce.createDefs(),this.addDefsToImage(),(f=this.defs).append.apply(f,w)},X.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},X.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},X.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},X.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},X.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},X.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},X.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},X.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var f=document.createElement("a");f.href="https://markerjs.com/",f.target="_blank",f.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',f.title="Powered by marker.js",f.style.display="grid",f.style.alignItems="center",f.style.justifyItems="center",f.style.padding="3px",f.style.width="20px",f.style.height="20px",this.logoUI.appendChild(f),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},X.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},X.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},X.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},X.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var f=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=f+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ve(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Ge(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},X.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},X.prototype.removeMarker=function(f){this.markerImage.removeChild(f.container),this.markers.indexOf(f)>-1&&this.markers.splice(this.markers.indexOf(f),1),f.dispose()},X.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},X.prototype.toolbarButtonClicked=function(f,w){if(f==="marker"&&w!==void 0)this.createNewMarker(w);else if(f==="action")switch(w){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},X.prototype.deleteSelectedMarker=function(){var f=this;if(this._currentMarker!==void 0){var w=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var V=new Ze(f,f._currentMarker,!0);ee(V),V.defaultPrevented&&(w=!0)}),!w){var G=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ee){return ee(new Ze(f,G))})}}},X.prototype.clear=function(){var f=this,w=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Se){var st=new Ze(f,void 0,!0);Se(st),st.defaultPrevented&&(w=!0)}),!w)){this.setCurrentMarker();for(var G=function(Se){var st=ee.markers[Se];ee.setCurrentMarker(ee.markers[Se]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(je){return je(new Ze(f,st))})},ee=this,V=this.markers.length-1;V>=0;V--)G(V);this.addUndoStep()}},Object.defineProperty(X.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),X.prototype.showNotesEditor=function(){var f;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(f=this._currentMarker.notes)!==null&&f!==void 0?f:"",this.overlayContainer.appendChild(this.notesArea))},X.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},X.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},X.prototype.addUndoStep=function(){var f=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var w=this.getState(),G=this.undoRedoManager.getLastUndoStep();if(!G||G.width===w.width&&G.height===w.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(w),ee<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(V){return V(new gt(f))})}else this.undoRedoManager.replaceLastUndoStep(w),this.eventListeners.statechange.forEach(function(V){return V(new gt(f))})}},X.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},X.prototype.undoStep=function(){var f=this,w=this.undoRedoManager.undo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(G){return G(new gt(f))}))},X.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},X.prototype.redoStep=function(){var f=this,w=this.undoRedoManager.redo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(G){return G(new gt(f))}))},X.prototype.stepZoom=function(){var f=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=f<this.zoomSteps.length-1?this.zoomSteps[f+1]:this.zoomSteps[0]},X.prototype.panTo=function(f){this.contentDiv.scrollBy({left:this.prevPanPoint.x-f.x,top:this.prevPanPoint.y-f.y}),this.prevPanPoint=f},X.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var f,w,G=this;return ke(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return f=ee.sent(),w=this.getState(),this.eventListeners.render.forEach(function(V){return V(new Qe(G,f,w))}),this.close(!0),[2]}})})},X.prototype.getState=function(f){f===!0&&this.setCurrentMarker();var w={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(G){return w.markers.push(G.getState())}),w},X.prototype.restoreState=function(f){var w=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);f.markers.forEach(function(G){var ee=w._availableMarkerTypes.find(function(Se){return Se.typeName===G.typeName});if(ee!==void 0){var V=w.addNewMarker(ee);V.restoreState(G),w.markers.push(V)}}),f.width&&f.height&&(f.width!==this.imageWidth||f.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/f.width,this.imageHeight/f.height),this.eventListeners.restorestate.forEach(function(G){return G(new gt(w))})},X.prototype.addNewMarker=function(f){var w=ce.createGroup();return this.markerImage.appendChild(w),new f(w,this.overlayContainer,this.settings)},X.prototype.createNewMarker=function(f){var w,G=this;(w=typeof f=="string"?this._availableMarkerTypes.find(function(ee){return ee.typeName===f}):f)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(w),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(w.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ee){return ee(new Ze(G,G._currentMarker))}))},X.prototype.markerCreated=function(f){var w=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(f),this.setCurrentMarker(f),f instanceof xe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(xe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(G){return G(new Ze(w,w._currentMarker))})},X.prototype.colorChanged=function(f){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=f,this.settings.defaultStrokeColor=f)},X.prototype.fillColorChanged=function(f){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=f)},X.prototype.markerStateChanged=function(f){var w=this;this.eventListeners.markerchange.forEach(function(G){return G(new Ze(w,f))})},X.prototype.setCurrentMarker=function(f){var w=this;this._currentMarker!==f&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(G){return G(new Ze(w,w._currentMarker))})),this._currentMarker=f,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(G){return G(new Ze(w,w._currentMarker))}))},X.prototype.onPointerDown=function(f){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||f.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var w=this.markers.find(function(G){return G.ownsTarget(f.target)});w!==void 0?(this.setCurrentMarker(w),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(f.clientX,f.clientY),f.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:f.clientX,y:f.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(f.clientX,f.clientY))},X.prototype.onDblClick=function(f){if(this._isFocused||this.focus(),this.mode==="select"){var w=this.markers.find(function(G){return G.ownsTarget(f.target)});w!==void 0&&w!==this._currentMarker&&this.setCurrentMarker(w),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(f.clientX,f.clientY),f.target):this.setCurrentMarker()}},X.prototype.onPointerMove=function(f){this.touchPoints!==1&&f.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||f.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(f.clientX,f.clientY)):this.zoomLevel>1&&this.panTo({x:f.clientX,y:f.clientY}))},X.prototype.onPointerUp=function(f){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(f.clientX,f.clientY)),this.isDragging=!1,this.addUndoStep()},X.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},X.prototype.onKeyUp=function(f){this._currentMarker===void 0||this.notesArea!==void 0||f.key!=="Delete"&&f.key!=="Backspace"||this.deleteSelectedMarker()},X.prototype.clientToLocalCoordinates=function(f,w){var G=this.markerImage.getBoundingClientRect();return{x:(f-G.left)/this.zoomLevel,y:(w-G.top)/this.zoomLevel}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var f=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=f+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},X.prototype.addLicenseKey=function(f){te.addKey(f)},X.prototype.addEventListener=function(f,w){this.eventListeners.addEventListener(f,w)},X.prototype.removeEventListener=function(f,w){this.eventListeners.removeEventListener(f,w)},X.prototype.renderState=function(f){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(f),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(X.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),X.prototype.focus=function(){var f=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(w){return w(new gt(f))}))},X.prototype.blur=function(){var f=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(w){return w(new gt(f))}))},X.instanceCounter=0,X}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ve=function(X,f){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,G){w.__proto__=G}||function(w,G){for(var ee in G)Object.prototype.hasOwnProperty.call(G,ee)&&(w[ee]=G[ee])})(X,f)};function nt(X,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function w(){this.constructor=X}ve(X,f),X.prototype=f===null?Object.create(f):(w.prototype=f.prototype,new w)}function He(X,f,w,G){return new(w||(w=Promise))(function(ee,V){function Se(Pt){try{je(G.next(Pt))}catch(ut){V(ut)}}function st(Pt){try{je(G.throw(Pt))}catch(ut){V(ut)}}function je(Pt){var ut;Pt.done?ee(Pt.value):(ut=Pt.value,ut instanceof w?ut:new w(function(Vt){Vt(ut)})).then(Se,st)}je((G=G.apply(X,f||[])).next())})}function bt(X,f){var w,G,ee,V,Se={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function st(je){return function(Pt){return function(ut){if(w)throw new TypeError("Generator is already executing.");for(;Se;)try{if(w=1,G&&(ee=2&ut[0]?G.return:ut[0]?G.throw||((ee=G.return)&&ee.call(G),0):G.next)&&!(ee=ee.call(G,ut[1])).done)return ee;switch(G=0,ee&&(ut=[2&ut[0],ee.value]),ut[0]){case 0:case 1:ee=ut;break;case 4:return Se.label++,{value:ut[1],done:!1};case 5:Se.label++,G=ut[1],ut=[0];continue;case 7:ut=Se.ops.pop(),Se.trys.pop();continue;default:if(!(ee=Se.trys,(ee=ee.length>0&&ee[ee.length-1])||ut[0]!==6&&ut[0]!==2)){Se=0;continue}if(ut[0]===3&&(!ee||ut[1]>ee[0]&&ut[1]<ee[3])){Se.label=ut[1];break}if(ut[0]===6&&Se.label<ee[1]){Se.label=ee[1],ee=ut;break}if(ee&&Se.label<ee[2]){Se.label=ee[2],Se.ops.push(ut);break}ee[2]&&Se.ops.pop(),Se.trys.pop();continue}ut=f.call(X,Se)}catch(Vt){ut=[6,Vt],G=0}finally{w=ee=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([je,Pt])}}}var mt=function(){function X(){}return X.addKey=function(f){X.key=f},Object.defineProperty(X,"isLicensed",{get:function(){return!!X.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(X.key)},enumerable:!1,configurable:!0}),X}(),Re=function(){function X(){}return X.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},X.setAttributes=function(f,w){for(var G=0,ee=w;G<ee.length;G++){var V=ee[G],Se=V[0],st=V[1];f.setAttribute(Se,st)}},X.createRect=function(f,w,G){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",f.toString()),ee.setAttribute("height",w.toString()),G&&X.setAttributes(ee,G),ee},X.createLine=function(f,w,G,ee,V){var Se=document.createElementNS("http://www.w3.org/2000/svg","line");return Se.setAttribute("x1",f.toString()),Se.setAttribute("y1",w.toString()),Se.setAttribute("x2",G.toString()),Se.setAttribute("y2",ee.toString()),V&&X.setAttributes(Se,V),Se},X.createPolygon=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","polygon");return G.setAttribute("points",f),w&&X.setAttributes(G,w),G},X.createCircle=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","circle");return G.setAttribute("cx",(f/2).toString()),G.setAttribute("cy",(f/2).toString()),G.setAttribute("r",f.toString()),w&&X.setAttributes(G,w),G},X.createEllipse=function(f,w,G){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(f/2).toString()),ee.setAttribute("cy",(w/2).toString()),ee.setAttribute("rx",(f/2).toString()),ee.setAttribute("ry",(w/2).toString()),G&&X.setAttributes(ee,G),ee},X.createGroup=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return f&&X.setAttributes(w,f),w},X.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},X.createMarker=function(f,w,G,ee,V,Se,st){var je=document.createElementNS("http://www.w3.org/2000/svg","marker");return X.setAttributes(je,[["id",f],["orient",w],["markerWidth",G.toString()],["markerHeight",ee.toString()],["refX",V.toString()],["refY",Se.toString()]]),je.appendChild(st),je},X.createText=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),f&&X.setAttributes(w,f),w},X.createTSpan=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","tspan");return G.textContent=f,w&&X.setAttributes(G,w),G},X.createImage=function(f){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return f&&X.setAttributes(w,f),w},X.createPoint=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return G.x=f,G.y=w,G},X.createPath=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg","path");return G.setAttribute("d",f),w&&X.setAttributes(G,w),G},X.createElement=function(f,w){var G=document.createElementNS("http://www.w3.org/2000/svg",f);return w&&X.setAttributes(G,w),G},X.getHollowRectanglePath=function(f,w,G,ee,V,Se,st,je){return"M"+f+","+w+"V"+(w+ee)+"H"+(f+G)+"V"+w+"H"+V+"V"+Se+"H"+(V+st)+"V"+(Se+je)+"H"+V+"V"+w+"Z"},X}(),qe=function(){function X(f){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+f+"_"}return Object.defineProperty(X.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),X.prototype.addClass=function(f){return this.styleSheet===void 0&&this.addStyleSheet(),f.name=""+this.classNamePrefix+f.localName,this.classes.push(f),this.styleSheet.sheet.insertRule("."+f.name+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length),f},X.prototype.addRule=function(f){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(f),this.styleSheet.sheet.insertRule(f.selector+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length)},X.prototype.addStyleSheet=function(){var f;this.styleSheet=document.createElement("style"),((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).appendChild(this.styleSheet),this.addRule(new vt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new vt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new vt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ct("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ct("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},X.prototype.removeStyleSheet=function(){var f;this.styleSheet&&(((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},X}(),vt=function(X,f){this.selector=X,this.style=f},Ct=function(X,f){this.localName=X,this.style=f},wt=function(){function X(){this.blocks=[],this.display=""}return X.prototype.addButtonBlock=function(f){f.className=this.blockClassName,f.buttonClassName=this.buttonClassName,f.buttonColorsClassName=this.buttonColorsClassName,f.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(f)},X.prototype.addElementBlock=function(f){f.className===void 0&&(f.className=this.blockClassName),this.blocks.push(f)},X.prototype.getUI=function(){var f=document.createElement("div");return f.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,f.style.display=this.display,this.blocks.forEach(function(w){return f.appendChild(w.getUI())}),f},X}(),lt=function(){function X(){}return X.prototype.getUI=function(){var f=document.createElement("div");if(f.className=this.className,this.minWidth!==void 0&&(f.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":f.style.justifyContent="flex-start";break;case"center":f.style.justifyContent="center";break;case"end":f.style.justifyContent="flex-end"}return f.style.whiteSpace="nowrap",f},X}(),Ft=function(X){function f(){var w=X!==null&&X.apply(this,arguments)||this;return w.buttons=[],w}return nt(f,X),f.prototype.addButton=function(w){w.className=this.buttonClassName,w.colorsClassName=this.buttonColorsClassName,w.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(w)},f.prototype.getUI=function(){var w=X.prototype.getUI.call(this);return this.buttons.forEach(function(G){return w.appendChild(G.getUI())}),w},f}(lt),$t=function(){function X(f,w){this._isActive=!1,this._isHidden=!1,this._icon=f,this.title=w,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(X.prototype,"icon",{get:function(){return this._icon},set:function(f){this._icon=f,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isActive",{get:function(){return this._isActive},set:function(f){this._isActive=f,this.adjustClassName()},enumerable:!1,configurable:!0}),X.prototype.getUI=function(){var f=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return f.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},X.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},X.prototype.hide=function(){this._isHidden=!0},X}(),Rt=function(X){function f(){var w=X!==null&&X.apply(this,arguments)||this;return w.elements=[],w}return nt(f,X),f.prototype.addElement=function(w){this.elements.push(w)},f.prototype.getUI=function(){var w=X.prototype.getUI.call(this);return this.elements.forEach(function(G){return w.appendChild(G)}),w},f}(lt),Zt=function(){function X(f,w){this.horizontal=f,this.vertical=w}return Object.defineProperty(X.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),X.prototype.getVerticalLength=function(f){return f/this.ratio},X.prototype.getHorizontalLength=function(f){return f*this.ratio},X}(),dn=function(){function X(){}return X.getIcon=function(f,w){if(f>0&&w>0){var G=new Zt(f,w),ee=G.ratio>=1?20:G.getHorizontalLength(20),V=G.ratio<1?20:G.getVerticalLength(20),Se=document.createElementNS("http://www.w3.org/2000/svg","svg");Se.setAttribute("xmlns","http://www.w3.org/2000/svg"),Se.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Se);var st=Re.createDefs();Se.appendChild(st);var je=Re.createElement("clipPath",[["id","text-bg-clip"]]);st.appendChild(je);var Pt=Re.createPath(Re.getHollowRectanglePath((24-ee)/2,(24-V)/2,ee,V,(24-ee)/2+2,(24-V)/2+2,ee-4,V-4));Se.appendChild(Pt);var ut=Re.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ut.appendChild(Re.createTSpan(f+":"+w)),Se.appendChild(ut);var Vt=ut.getBBox();Re.setAttributes(ut,[["x",((24-Vt.width)/2).toString()],["y",((24-Vt.height)/2-Vt.y).toString()]]);var qt=Re.createPath(Re.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Vt.width))/2,(24-Math.ceil(Vt.height))/2,Math.ceil(Vt.width),Math.ceil(Vt.height)));return je.appendChild(qt),Re.setAttributes(Pt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Se),Se.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},X}(),Jt=function(X){function f(w,G,ee){var V=X.call(this,w,G)||this;return V.isDropdownOpen=!1,V.onClick=V.dropdownButtonClicked,V.dropdownButtons=ee,V}return nt(f,X),f.prototype.setupDropdown=function(){var w=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(G){G.className=w.className,G.colorsClassName=w.colorsClassName,w.dropdownBlock.appendChild(G.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},f.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},f.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},f.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},f.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},f.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},f}($t),Gt=function(){function X(f,w){this.GRIP_SIZE=10,this.color=f,this.fillColor=w,this.visual=Re.createGroup(),this.visual.appendChild(Re.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Re.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(f){return f===this.visual||f===this.visual.childNodes[0]||f===this.visual.childNodes[1]},X.prototype.setCenter=function(f,w){this.visual.childNodes.forEach(function(G){return Re.setAttributes(G,[["cx",f.toString()],["cy",w.toString()]])})},X}(),fn=function(){function X(f,w,G,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=f,this.canvasHeight=w,this.margin=G,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(X.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(f){this._aspectRatio=f,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(f){this._isGridVisible=f,this.gridContainer&&Re.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(f){this._zoomFactor=f,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),X.prototype.open=function(){var f=this;this.cropShadeElement=Re.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Re.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var w=0;w<this.numberOfGridLines;w++)this.horizontalGridLines.push(Re.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Re.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(G){return f.gridContainer.appendChild(G)}),this.verticalGridLines.forEach(function(G){return f.gridContainer.appendChild(G)}),this.cropRectElement=Re.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Gt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Gt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Gt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Gt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},X.prototype.setCropRectangle=function(f){this.cropRect=f;var w=Object.assign({},this.cropRect);this.zoomFactor!==1&&(w.width=this.cropRect.width*this.zoomFactor,w.height=this.cropRect.height*this.zoomFactor,w.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-w.width/2,w.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-w.height/2),Re.setAttributes(this.cropRectElement,[["x",w.x.toString()],["y",w.y.toString()],["width",w.width.toString()],["height",w.height.toString()]]);var G=w.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(V,Se){var st=w.y+G*(Se+1);Re.setAttributes(V,[["x1",""+w.x],["y1",""+st],["x2",""+(w.x+w.width)],["y2",""+st]])});var ee=w.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(V,Se){var st=w.x+ee*(Se+1);Re.setAttributes(V,[["x1",""+st],["y1",""+w.y],["x2",""+st],["y2",""+(w.y+w.height)]])}),Re.setAttributes(this.cropShadeElement,[["d",Re.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,w.x,w.y,w.width,w.height)]]),this.topLeftGrip.setCenter(w.x,w.y),this.topRightGrip.setCenter(w.x+w.width,w.y),this.bottomLeftGrip.setCenter(w.x,w.y+w.height),this.bottomRightGrip.setCenter(w.x+w.width,w.y+w.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},X.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},X.prototype.clientToLocalCoordinates=function(f,w){var G=this.container.getBoundingClientRect();return{x:f-G.left+this.margin,y:w-G.top+this.margin}},X.prototype.onPointerDown=function(f){this.container.setPointerCapture(f.pointerId),this.previousPoint=this.clientToLocalCoordinates(f.clientX,f.clientY),this.cropRectElement===f.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(f.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(f.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(f.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(f.target)&&(this.activeGrip=this.bottomRightGrip)},X.prototype.onPointerMove=function(f){if(this.isMoving)this.move(this.clientToLocalCoordinates(f.clientX,f.clientY));else if(this.activeGrip){var w=this.clientToLocalCoordinates(f.clientX,f.clientY);this.resize(w)}f.preventDefault()},X.prototype.onPointerUp=function(f){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(f.pointerId)},X.prototype.move=function(f){var w=f.x-this.previousPoint.x,G=f.y-this.previousPoint.y;this.zoomFactor!==1&&(w=-w/this.zoomFactor,G=-G/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+w),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+G),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=f},X.prototype.resize=function(f){var w=Object.assign({},this.cropRect),G=f.x-this.previousPoint.x,ee=f.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:w.x+G<this.margin&&(G=this.margin-w.x),w.x+=G,w.width=this.cropRect.x+this.cropRect.width-w.x;break;case this.bottomRightGrip:case this.topRightGrip:w.width+G>this.canvasWidth*this.zoomFactor&&(G=this.canvasWidth*this.zoomFactor-w.width),w.width+=G}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(w.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(G),w.height=this.aspectRatio.getVerticalLength(w.width)):(w.y+=ee,w.height=this.cropRect.y+this.cropRect.height-w.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?w.height=this.aspectRatio.getVerticalLength(w.width):w.height+=ee}w.width<10&&(w.x=this.cropRect.x,w.width=10),w.height<10&&(w.y=this.cropRect.y,w.height=10),this.previousPoint=f,w.x>=this.margin&&w.y>=this.margin&&w.x-this.margin+w.width<=this.canvasWidth&&w.y-this.margin+w.height<=this.canvasHeight&&(this.cropRect=w,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},X.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var f=this.cropRect.x+this.cropRect.width/2,w=this.cropRect.y+this.cropRect.height/2,G=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);G/this.canvasWidth<ee/this.canvasHeight?this.cropRect.width=G:this.cropRect.height=ee,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=f-this.cropRect.width/2,this.cropRect.y=w-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},X.prototype.getRescaledRect=function(f,w,G,ee,V,Se){var st=G/f,je=ee/w;return{x:(V.x-Se)*st+Se,y:(V.y-Se)*je+Se,width:V.width*st,height:V.height*je}},X.prototype.scaleCanvas=function(f,w){var G=this.getRescaledRect(this.canvasWidth,this.canvasHeight,f,w,this.cropRect,this.margin);this.canvasWidth=f,this.canvasHeight=w,this.onCropChange&&this.onCropChange(G),this.setCropRectangle(G)},X}(),On=function(){function X(f){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=f,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(X.prototype,"angle",{get:function(){return this._angle},set:function(f){this._angle=f,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),X.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},X.prototype.onPointerDown=function(f){this.controlContainer.setPointerCapture(f.pointerId),this.isDragging=!0,this.previousPoint={x:f.clientX,y:f.clientY}},X.prototype.onPointerMove=function(f){this.isDragging&&(this.onAngleChange&&this.onAngleChange((f.clientX-this.previousPoint.x)/5),this.previousPoint.x=f.clientX)},X.prototype.onPointerUp=function(f){this.isDragging&&this.onAngleChange&&this.onAngleChange((f.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(f.pointerId)},X.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var f=this.angleLabelText.getBBox();Re.setAttributes(this.angleLabelElement,[["x",((this.width-f.width)/2).toString()],["y",(this.height/2).toString()]])}},X.prototype.positionScaleShape=function(){if(this.scaleShape){var f=this.scaleShape.transform.baseVal.getItem(0);f.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(f,0)}},X.prototype.getVisual=function(){var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("xmlns","http://www.w3.org/2000/svg"),f.setAttribute("width",this.width+"px"),f.setAttribute("height",this.height+"px"),f.setAttribute("viewBox","0 0 "+this.width+" "+this.height),f.style.flexShrink="0",document.body.appendChild(f);for(var w="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,G=1;G<=this.width/5+10;G++){var ee=G%5==0?this.height/3:this.height/6;w+="h4v"+-ee+"h1v"+ee}w+="v1H0Z",this.scaleShape=Re.createPath(w);var V=Re.createTransform();this.scaleShape.transform.baseVal.appendItem(V),f.appendChild(this.scaleShape),this.angleLabelElement=Re.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Re.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Se=Re.createTSpan("");return Se.innerHTML="&deg;",this.angleLabelElement.appendChild(Se),f.appendChild(this.angleLabelElement),document.body.removeChild(f),f},X}(),Pn=function(){function X(){this.naturalSize=!1,this.imageType="image/png"}return X.prototype.rasterize=function(f,w,G,ee,V,Se,st){var je=this;return new Promise(function(Pt){var ut=document.createElement("canvas");ut.width=f.width.baseVal.value-2*ee,ut.height=f.height.baseVal.value-2*ee;var Vt=1,qt=1;je.naturalSize===!0?(Vt=w.naturalWidth/(f.width.baseVal.value-2*ee)/Se,qt=w.naturalHeight/(f.height.baseVal.value-2*ee)/st,ut.width=w.naturalWidth/Se,ut.height=w.naturalHeight/st):je.width!==void 0&&je.height!==void 0&&(Vt=je.width/G.width,qt=je.height/G.height,ut.width*=Vt,ut.height*=qt);var yn=ut.getContext("2d");yn.translate(ut.width/2,ut.height/2),yn.rotate(V*Math.PI/180),yn.scale(Se,st),yn.translate(-ut.width/2,-ut.height/2),yn.drawImage(w,0,0,ut.width,ut.height);var Tn=document.createElement("canvas");Tn.width=G.width*Vt,Tn.height=G.height*qt,Tn.getContext("2d").putImageData(yn.getImageData((G.x-ee)*Vt,(G.y-ee)*qt,G.width*Vt,G.height*qt),0,0),Pt(Tn.toDataURL(je.imageType,je.imageQuality))})},X}(),ft=function(){function X(f){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=X.instanceCounter++,this.styles=new qe(this.instanceNo),this.target=f,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(f){this._zoomToCropEnabled=f,f?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(f){this._isGridVisible=f,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"gridLines",{get:function(){return this._gridLines},set:function(f){this._gridLines=f,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(f){this._rotationAngle=f,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"aspectRatio",{get:function(){var f;return(f=this._aspectRatio)!==null&&f!==void 0?f:this.aspectRatios[0]},set:function(f){this._aspectRatio=f},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},X.prototype.show=function(){this.showUI(),this.open()},X.prototype.close=function(f){f===void 0&&(f=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),f||this.closeEventListeners.forEach(function(w){return w()}),this._isOpen=!1)},X.prototype.addRenderEventListener=function(f){this.renderEventListeners.push(f)},X.prototype.removeRenderEventListener=function(f){this.renderEventListeners.indexOf(f)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(f),1)},X.prototype.addCloseEventListener=function(f){this.closeEventListeners.push(f)},X.prototype.removeCloseEventListener=function(f){this.closeEventListeners.indexOf(f)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(f),1)},X.prototype.setupResizeObserver=function(){var f=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){f.resize(f.target.clientWidth,f.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},X.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var f=1*this.target.clientWidth/this.target.clientHeight,w=this.contentDiv.clientWidth/f>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*f:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,G=w+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/f;this.resize(w,G)}},X.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},X.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Re.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},X.prototype.resize=function(f,w){this.imageWidth=Math.round(f),this.imageHeight=Math.round(w),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},X.prototype.setEditingTarget=function(){var f=document.createElement("canvas");f.width=this.target.naturalWidth,f.height=this.target.naturalHeight,f.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var w=f.toDataURL();Re.setAttributes(this.editingTarget,[["href",w]]),this.setEditingTargetSize()},X.prototype.setTopLeft=function(){var f=this.target.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=f.left-w.left-this.CANVAS_MARGIN,this.top=f.top-w.top-this.CANVAS_MARGIN},X.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Re.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Re.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Re.createGroup(),this.editingTargetRotationScaleContainer=Re.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var f=Re.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(f);var w=Re.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(w),this.editingTargetContainer=Re.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},X.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},X.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Re.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new fn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},X.prototype.zoomToCrop=function(){if(this.cropRect){var f=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,w=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=f+"px "+w+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-f+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-w+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},X.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},X.prototype.cropRectChanged=function(f){this.cropRect=f,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},X.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},X.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},X.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},X.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var f=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,w=this.target.offsetTop>f+this.CANVAS_MARGIN?this.target.offsetTop-(f+this.CANVAS_MARGIN):0;this.coverDiv.style.top=w+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},X.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},X.prototype.addTopToolbar=function(){var f=this;this.topToolbar=new wt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new Ft;w.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(w);var G=[];this.aspectRatios.forEach(function(qt){var yn=new $t(dn.getIcon(qt.horizontal,qt.vertical),qt.horizontal===0&&qt.vertical===0?"FREE":qt.horizontal+":"+qt.vertical);yn.onClick=function(){return f.ratioButtonClicked(qt)},G.push(yn)}),this.aspectRatioButton=new Jt(dn.getIcon(0,0),"Aspect ratio",G),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,w.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new $t('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){f.isGridVisible=!f.isGridVisible,ee.isActive=f.isGridVisible},w.addButton(ee);var V=new $t('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(V.isActive=this.zoomToCropEnabled,V.onClick=function(){f.zoomToCropEnabled=!f.zoomToCropEnabled,V.isActive=f.zoomToCropEnabled},w.addButton(V),!mt.isLicensed){var Se=new Rt;this.topToolbar.addElementBlock(Se);var st=document.createElement("div");st.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var je=document.createElement("a");je.style.color="currentColor",je.href="https://markerjs.com/products/cropro",je.target="_blank",je.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',st.appendChild(je),Se.addElement(st)}var Pt=new Ft;Pt.minWidth=3*this.toolbarHeight+"px",Pt.contentAlign="end",this.topToolbar.addButtonBlock(Pt);var ut=new $t('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");ut.onClick=this.startRenderAndClose,Pt.addButton(ut),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ut.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Vt=new $t('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Vt.onClick=this.close,Pt.addButton(Vt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Vt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},X.prototype.addBottomToolbar=function(){var f=this;this.bottomToolbar=new wt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new Ft;w.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(w);var G=new $t('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");G.onClick=this.rotateLeftButtonClicked,w.addButton(G);var ee=new $t('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ee.onClick=this.rotateRightButtonClicked,w.addButton(ee);var V=new Rt;V.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(V),this.straightener=new On("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Pt){f.rotateBy(Pt),f.straightener.angle=f.rotationAngle},V.addElement(this.straightener.getUI());var Se=new Ft;Se.minWidth=2*this.toolbarHeight+"px",Se.contentAlign="end",this.bottomToolbar.addButtonBlock(Se);var st=new $t('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");st.onClick=this.flipHorizontallyButtonClicked,Se.addButton(st);var je=new $t('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");je.onClick=this.flipVerticallyButtonClicked,Se.addButton(je)},X.prototype.ratioButtonClicked=function(f){this.aspectRatio=f,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},X.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=dn.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},X.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Zt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},X.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},X.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},X.prototype.restoreState=function(f){if(f){var w=this.cropLayer.getRescaledRect(f.width,f.height,this.imageWidth,this.imageHeight,f.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(w),this.cropRectChanged(w),this.flippedHorizontally=f.flippedHorizontally,this.flippedVertically=f.flippedVertically,this.applyFlip(),this.rotationAngle=f.rotationAngle,this.applyRotation()}},X.prototype.clientToLocalCoordinates=function(f,w){var G=this.cropImage.getBoundingClientRect();return{x:f-G.left,y:w-G.top}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var f=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=f+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},X.prototype.rotateLeftButtonClicked=function(){var f=this.rotationAngle-90;this.rotationAngle%90!=0&&(f+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(f)},X.prototype.rotateRightButtonClicked=function(){var f=this.rotationAngle+90;this.rotationAngle%90!=0&&(f-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(f)},X.prototype.rotateTo=function(f){f=(f=f>180?f-360:f)<=-180?f+360:f,this.rotationAngle=f,this.applyRotation()},X.prototype.rotateBy=function(f){this.rotateTo((this.rotationAngle+f)%360)},X.prototype.applyRotation=function(){var f=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var w=this.editingTargetRotationContainer.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(w,0);var G=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/G.width,this.imageHeight/G.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=f},X.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},X.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},X.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},X.prototype.startRenderAndClose=function(){return He(this,void 0,void 0,function(){var f,w;return bt(this,function(G){switch(G.label){case 0:return[4,this.render()];case 1:return f=G.sent(),w=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(f,w)}),this.close(!0),[2]}})})},X.prototype.render=function(){return He(this,void 0,void 0,function(){var f;return bt(this,function(w){switch(w.label){case 0:return(f=new Pn).naturalSize=this.renderAtNaturalSize,f.imageType=this.renderImageType,f.imageQuality=this.renderImageQuality,f.width=this.renderWidth,f.height=this.renderHeight,this.unzoomFromCrop(),Re.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,f.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return w.sent(),[4,f.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,w.sent()]}})})},X.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ct("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ct("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ct("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var f=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ct("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*f)+`px;
height: `+(this.toolbarHeight-2*f)+`px;
padding: `+f+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new vt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new vt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ct("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ct("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ct("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ct("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*f)+`px;
padding: `+f+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ct("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},X.instanceCounter=0,X}(),Wt=W("8hTe"),Qt=W.n(Wt),mn=/<pre[^>]*>/g;function pn(X){var f=document.createElement("div");return f.innerHTML=X,f.childNodes.length===0?"":f.childNodes[0].nodeValue}var Dn=De.a=function(X){var f=X.value,w=f===void 0?"":f,G=X.edit,ee=G===void 0?!1:G,V=X.className,Se=X.showTextOnly,st=X.showLines,je=X.replaces,Pt=X.zoomImg,ut=X.hasMask,Vt=X.style,qt=Vt===void 0?{}:Vt,yn=X.stylesPrev,Tn=yn===void 0?{}:yn,wn=String(w),kn=Object(T.useRef)(),mr=Object(T.useRef)(),Kr=Object(T.useState)(""),Zn=Object(j.a)(Kr,2),tr=Zn[0],Sr=Zn[1],Rr=Object(T.useState)("office"),gr=Object(j.a)(Rr,2),br=gr[0],Ar=gr[1],Tr=function(){var ge=new ft(mr.current);ge.displayMode="popup",ge.addRenderEventListener(function(){var Cn=Object(A.a)(L.a.mark(function Sn(jn){var tn;return L.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return kn.current.style.display="none",Hn.next=3,Object(Ue.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:jn}});case 3:tn=Hn.sent,tn!=null&&tn.id&&je(mr.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(tn==null?void 0:tn.id,"?type=").concat(tn.content_type));case 5:case"end":return Hn.stop()}},Sn)}));return function(Sn){return Cn.apply(this,arguments)}}()),ge.show()},Jr=function(){var ge=new oe(mr.current);ge.settings.displayMode="popup",ge.addEventListener("render",function(){var Cn=Object(A.a)(L.a.mark(function Sn(jn){var tn;return L.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(kn.current.style.display="none",!mr.current){Hn.next=6;break}return Hn.next=4,Object(Ue.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:jn.dataUrl}});case 4:tn=Hn.sent,tn!=null&&tn.id&&je(mr.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(tn==null?void 0:tn.id,"?type=").concat(tn.content_type));case 6:case"end":return Hn.stop()}},Sn)}));return function(Sn){return Cn.apply(this,arguments)}}()),ge.show(),window.markerArea=ge},lr=Object(T.useMemo)(function(){try{var _n=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ge=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Cn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;wn=wn.replace(_n,"("+le.a.API_SERVER+"/api/attachments/").replace(ge,'"'+le.a.API_SERVER+"/api/attachments/").replace(Cn,'"'+le.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),wn=wn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Xr){}var Sn=M(wn),jn=x();if(wn.match(/\[TOC\]/)&&(Sn=Sn.replace("<p>[TOC]</p>",D()),R()),Sn=Sn.replace(/(__special_katext_id_\d+__)/g,function(Xr,Hn){var Wn=jn[Hn],rr=Wn.type,Or=Wn.expression;return Object(he.renderToString)(pn(Or)||"",{displayMode:rr==="block",throwOnError:!1,output:"html"})}),Sn=Sn.replace(/▁/g,"\u2581\u2581\u2581"),E(),Se){var tn=document.createElement("div");return tn.innerHTML=Sn,tn.innerText}return setTimeout(function(){return cn()},500),Sn},[wn]),nr=Object(T.useRef)();y.WebkitLineClamp=st,st&&(qt=Object(F.a)(Object(F.a)({},qt),y));function Hr(_n){var ge=_n.target;if(ge.tagName.toUpperCase()==="IMG"){if(Pt){var Cn=ge.getAttribute("src");Sr(Cn),Ar("image")}}else if(ge.tagName.toUpperCase()==="A"){var Sn=ge.getAttribute("href");if(Sn.indexOf("office")>-1)_n.preventDefault(),Sr(Sn),Ar("office");else if(Sn.indexOf("application/pdf")>-1)_n.preventDefault(),Sr(Sn),Ar("pdf");else if(Sn.indexOf("type=text")>-1)_n.preventDefault(),Sr(Sn),Ar("html");else if(Sn.startsWith("#")){_n.preventDefault();var jn=document.getElementById(Sn.replace("#",""));jn&&jn.scrollIntoView(!0)}}}var cn=function(){var ge,Cn=(ge=nr.current)===null||ge===void 0?void 0:ge.querySelectorAll("video");Cn==null||Cn.forEach(function(Sn){if(Sn.oncontextmenu=function(){return!1},Sn.src.indexOf(".m3u8")>-1&&!Sn.canPlayType("application/vnd.apple.mpegurl")){if(Z.a.isSupported()){var jn=new Z.a;jn.loadSource(Sn.src),jn.attachMedia(Sn)}}})};Object(T.useEffect)(function(){if(nr.current&&lr&&(lr.match(mn)&&window.PR.prettyPrint()),nr.current)return nr.current.addEventListener("click",Hr),function(){nr.current.removeEventListener("click",Hr),E(),R()}},[lr,nr.current,Hr]);var Nr=function(ge){if(!ee)return;ge.target.nodeName==="IMG"?(kn.current.style.display="flex",kn.current.style.width=ge.target.clientWidth+"px",kn.current.style.height=ge.target.clientHeight+"px",kn.current.style.top=ge.target.offsetTop+"px",kn.current.style.left=ge.target.offsetLeft+"px",mr.current.src=ge.target.getAttribute("src")):kn.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:nr,style:Object(F.a)({},qt),className:"".concat(V||""," markdown-body ").concat(Qt.a.mdBody),onMouseOver:Nr,dangerouslySetInnerHTML:{__html:lr}}),v.a.createElement("div",{ref:kn,className:Qt.a.button},v.a.createElement(z.a,null,v.a.createElement(Y.a,{onClick:function(){return Tr()}},"\u88C1\u526A"),v.a.createElement(Y.a,{onClick:function(){return Jr()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:mr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),v.a.createElement(ye.a,{close:!0,data:tr,hasMask:ut,type:tr!=null&&tr.length?br:"",style:Object(F.a)({},Tn),onClose:function(){return Sr("")}}))}},"9VGf":function(ze,De,W){"use strict";W.d(De,"a",function(){return P});var q=W("q1tI"),z=W.n(q);function P(Y,F){var A=Object(q.useRef)();Object(q.useEffect)(function(){A.current=Y}),Object(q.useEffect)(function(){function j(){A.current()}if(F!==null){var B=setInterval(j,F);return function(){return clearInterval(B)}}},[F])}},"A/g1":function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEu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GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},BU3w:function(ze,De,W){"use strict";W.d(De,"a",function(){return A});var q=W("MNnm"),z="rc-util-key";function P(j){if(j.attachTo)return j.attachTo;var B=document.querySelector("head");return B||document.body}function Y(j){var B,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(q.a)())return null;var T=document.createElement("style");if((B=L.csp)===null||B===void 0?void 0:B.nonce){var v;T.nonce=(v=L.csp)===null||v===void 0?void 0:v.nonce}T.innerHTML=j;var C=P(L),k=C.firstChild;return L.prepend&&C.prepend?C.prepend(T):L.prepend&&k?C.insertBefore(T,k):C.appendChild(T),T}var F=new Map;function A(j,B){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=P(L);if(!F.has(T)){var v=Y("",L),C=v.parentNode;F.set(T,C),C.removeChild(v)}var k=Array.from(F.get(T).children).find(function(i){return i.tagName==="STYLE"&&i[z]===B});if(k){var O,b;if(((O=L.csp)===null||O===void 0?void 0:O.nonce)&&k.nonce!==((b=L.csp)===null||b===void 0?void 0:b.nonce)){var p;k.nonce=(p=L.csp)===null||p===void 0?void 0:p.nonce}return k.innerHTML!==j&&(k.innerHTML=j),k}var c=Y(j,L);return c[z]=B,c}},Bd2K:function(ze,De,W){(function(q){q(W("VrN/"),W("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(L,T,v){if(v!=q.Init&&v&&L.removeKeyMap("autoCloseTags"),!T)return;var C={name:"autoCloseTags"};(typeof T!="object"||T.whenClosing!==!1)&&(C["'/'"]=function(k){return A(k)}),(typeof T!="object"||T.whenOpening!==!1)&&(C["'>'"]=function(k){return Y(k)}),L.addKeyMap(C)});var z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["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 Y(L){if(L.getOption("disableInput"))return q.Pass;for(var T=L.listSelections(),v=[],C=L.getOption("autoCloseTags"),k=0;k<T.length;k++){if(!T[k].empty())return q.Pass;var O=T[k].head,b=L.getTokenAt(O),p=q.innerMode(L.getMode(),b.state),c=p.state,i=p.mode.xmlCurrentTag&&p.mode.xmlCurrentTag(c),u=i&&i.name;if(!u)return q.Pass;var h=p.mode.configuration=="html",R=typeof C=="object"&&C.dontCloseTags||h&&z,y=typeof C=="object"&&C.indentTags||h&&P;b.end>O.ch&&(u=u.slice(0,u.length-b.end+O.ch));var g=u.toLowerCase();if(!u||b.type=="string"&&(b.end!=O.ch||!/[\"\']/.test(b.string.charAt(b.string.length-1))||b.string.length==1)||b.type=="tag"&&i.close||b.string.indexOf("/")==O.ch-b.start-1||R&&j(R,g)>-1||B(L,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(c)||[],u,O,!0))return q.Pass;var D=typeof C=="object"&&C.emptyTags;if(D&&j(D,u)>-1){v[k]={text:"/>",newPos:q.Pos(O.line,O.ch+2)};continue}var S=y&&j(y,g)>-1;v[k]={indent:S,text:">"+(S?`
`:"")+"</"+u+">",newPos:S?q.Pos(O.line+1,0):q.Pos(O.line,O.ch+1)}}for(var d=typeof C=="object"&&C.dontIndentOnAutoClose,k=T.length-1;k>=0;k--){var l=v[k];L.replaceRange(l.text,T[k].head,T[k].anchor,"+insert");var o=L.listSelections().slice(0);o[k]={head:l.newPos,anchor:l.newPos},L.setSelections(o),!d&&l.indent&&(L.indentLine(l.newPos.line,null,!0),L.indentLine(l.newPos.line+1,null,!0))}}function F(L,T){for(var v=L.listSelections(),C=[],k=T?"/":"</",O=L.getOption("autoCloseTags"),b=typeof O=="object"&&O.dontIndentOnSlash,p=0;p<v.length;p++){if(!v[p].empty())return q.Pass;var c=v[p].head,i=L.getTokenAt(c),u=q.innerMode(L.getMode(),i.state),h=u.state;if(T&&(i.type=="string"||i.string.charAt(0)!="<"||i.start!=c.ch-1))return q.Pass;var R,y=u.mode.name!="xml"&&L.getMode().name=="htmlmixed";if(y&&u.mode.name=="javascript")R=k+"script";else if(y&&u.mode.name=="css")R=k+"style";else{var g=u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(h);if(!g||g.length&&B(L,g,g[g.length-1],c))return q.Pass;R=k+g[g.length-1]}L.getLine(c.line).charAt(i.end)!=">"&&(R+=">"),C[p]=R}if(L.replaceSelections(C),v=L.listSelections(),!b)for(var p=0;p<v.length;p++)(p==v.length-1||v[p].head.line<v[p+1].head.line)&&L.indentLine(v[p].head.line)}function A(L){return L.getOption("disableInput")?q.Pass:F(L,!0)}q.commands.closeTag=function(L){return F(L)};function j(L,T){if(L.indexOf)return L.indexOf(T);for(var v=0,C=L.length;v<C;++v)if(L[v]==T)return v;return-1}function B(L,T,v,C,k){if(!q.scanForClosingTag)return!1;var O=Math.min(L.lastLine()+1,C.line+500),b=q.scanForClosingTag(L,C,null,O);if(!b||b.tag!=v)return!1;for(var p=k?1:0,c=T.length-1;c>=0&&T[c]==v;c--)++p;C=b.to;for(var c=1;c<p;c++){var i=q.scanForClosingTag(L,C,null,O);if(!i||i.tag!=v)return!1;C=i.to}return!0}})},BjJ7:function(ze,De,W){"use strict";W.d(De,"d",function(){return z}),W.d(De,"c",function(){return P}),W.d(De,"e",function(){return Y}),W.d(De,"b",function(){return F}),W.d(De,"a",function(){return j});var q=W("m3rI");function z(B){var L=!0;if(B.length>0){for(var T=0;T<B.length;T++)if(B[T].compile_success==0||!B[T].compile_success){L=!1;break}}else L=!1;return L}function P(B){for(var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",T=[],v=0;v<B.length;v++){var C=B[v],k=L?"".concat(L,"/").concat(C.name):"".concat(C.name);T.push({title:C.name,isLeaf:!(C.type==="tree"),key:k})}return T}function Y(B,L,T){for(var v=0;v<B.length;v++){var C=B[v];if(C.key===L){C.children=T;break}C.children&&Y(C.children,L,T)}return B}function F(B,L,T){var v;return function(){var C=this,k=arguments,O=function(){v=null,T||B.apply(C,k)},b=T&&!v;clearTimeout(v),v=setTimeout(O,L),b&&B.apply(C,k)}}var A=!0,j=q.a.API_SERVER},BlwA:function(ze,De,W){"use strict";var q=W("9og8"),z=W("miYZ"),P=W("tsqr"),Y=W("tJVT"),F=W("WmNS"),A=W.n(F),j=W("q1tI"),B=W.n(j),L=W("Ty5D"),T=W("ErOA"),v=W("m3rI"),C=W("DR4n"),k=W.n(C),O=function(c,i){for(var u=c.split(","),h=u[0].match(/:(.*?);/)[1],R=atob(u[1]),y=R.length,g=new Uint8Array(y);y--;)g[y]=R.charCodeAt(y);return new Blob([g],{type:h})},b=Object(j.forwardRef)(function(p,c){var i=p.time,u=p.number,h=p.supportCamera,R=p.take_photo,y=p.update,g=p.id,D=Object(j.useRef)(),S=Object(j.useRef)(),d=Object(L.i)(),l=Object(j.useState)([]),o=Object(Y.a)(l,2),a=o[0],x=o[1],E=Object(j.useState)(0),m=Object(Y.a)(E,2),_=m[0],I=m[1],U=Object(j.useState)(""),M=Object(Y.a)(U,2),H=M[0],K=M[1],Z=Object(j.useState)(),le=Object(Y.a)(Z,2),he=le[0],ye=le[1],Ue=Object(j.useState)(0),Me=Object(Y.a)(Ue,2),_e=Me[0],Ie=Me[1];Object(j.useEffect)(function(){return ce(),function(){be(),ke()}},[]),Object(j.useEffect)(function(){_===2&&i&&u>0&&(me(),Ie(1))},[i]),Object(j.useEffect)(function(){if(_e===0)return;if(_e===2)clearInterval(he);else{var we=0,Pe=setInterval(function(){a.includes(we)&&te(),we++},1e3);ye(Pe)}return function(){return clearInterval(he)}},[_e]),Object(j.useImperativeHandle)(c,function(){return{handlePhoto:te}});var ke=function(){Ie(2)},me=function(){var Pe=i/u,Ce=[];function Ve(Ge,tt){return parseInt(Math.floor(Math.random()*(tt-Ge+1))+Ge)}new Array(u).fill(0).map(function(Ge,tt){R?Ce.push(Ve(Pe*tt,Pe*(tt+1))):tt==0?Ce.push(0):Ce.push(Ve(Pe*tt,Pe*(tt+1)))}),a=Ce,x([].concat(Ce)),console.log(Ce)},ce=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(Pe){var Ce=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return Ce?new Promise(function(Ve,Ge){Ce.call(navigator,Pe,Ve,Ge)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia({video:{width:640,height:480}}).then(function(Pe){h&&h(2),I(2),"srcObject"in D.current?D.current.srcObject=Pe:D.current.src=window.URL.createObjectURL(Pe),D.current.onloadedmetadata=function(Ce){D.current.play()},D.current.addEventListener("ended",function(){console.log("\u64AD\u653E\u7ED3\u675F"),ke(),P.b.error({content:"\u60A8\u5DF2\u7ECF\u5173\u95ED\u4E86\u6444\u50CF\u5934\uFF0C\u8BF7\u572810\u79D2\u949F\u5185\u6062\u590D\u6444\u50CF\u5934\uFF0C\u5426\u5219\u5C06\u63A8\u51FA\u8003\u8BD5",duration:10,key:9998})},!1)}).catch(function(Pe){I(1),h&&h(1),Pe.message==="Permission denied"||Pe.name==="NotAllowedError"?P.b.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):P.b.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"),console.log("errname: "+Pe.name),console.log("err: "+Pe.message)})},te=function(){try{S.current.width=D.current.videoWidth,S.current.height=D.current.videoHeight;var Pe=S.current.getContext("2d");Pe.drawImage(D.current,0,0,S.current.width,S.current.height),K(S.current.toDataURL("image/png")),ae(S.current.toDataURL("image/png"))}catch(Ce){}},be=function(){try{var Pe=D.current.srcObject,Ce=Pe.getTracks();Ce.forEach(function(Ve){Ve.stop()}),D.current.srcObject=null}catch(Ve){}},ae=function(){var we=Object(q.a)(A.a.mark(function Pe(Ce){var Ve,Ge;return A.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:Ve=new FormData,Ve.append("file",O(Ce,"1")),Ve.append("1","123"),Ge=new window.XMLHttpRequest,Ge.withCredentials=!0,Ge.addEventListener("load",function(Ye){var et=JSON.parse(Ye.target.responseText);Object(T.a)("/api/exercises/".concat(g,"/upload_photo.json"),{method:"post",body:{attachment_id:et.id}})},!1),Ge.addEventListener("error",function(Ye){console.error(Ye)},!1),Ge.open("POST","".concat(v.a.API_SERVER,"/api/attachments.json")),Ge.send(Ve);case 9:case"end":return Je.stop()}},Pe)}));return function(Ce){return we.apply(this,arguments)}}();return B.a.createElement(B.a.Fragment,null,_!==3&&B.a.createElement("aside",{className:k.a.video,id:"screenshot"},_===0&&B.a.createElement("span",null,"\u6B63\u5728\u5F00\u542F\u6444\u50CF\u5934..."),_===1&&B.a.createElement("span",null,"\u6444\u50CF\u5934\u5F00\u542F\u5931\u8D25"),_===2&&B.a.createElement("div",null,B.a.createElement("video",{width:"288",ref:D,autoPlay:!0}),B.a.createElement("canvas",{style:{display:"none"},ref:S}))))});De.a=b},"C+DQ":function(ze,De,W){},C6hP:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAAA+CAYAAACV4fZsAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4lMUWPVuzISwETUKPNEFCF+lI710EpHekSO+d0HvvKIKIiCCCRvEBAgGpSpGSIFLEAIoJhMASsmy2vO9c3q4JBIIoCY/M/T6+Dcn+/86cf+bMvefemdUgGXO5XJrk3qP+rhBQCCgE/k0ENBqN63H3S5KUkiKr8ePHJ/nesLAwRWz/5hNT91IIpAEEChUqlCQxjRs37qHfJ0ViD5FOQtIiWbmJKSoqSt5rsVjk1Wq1KsJKAwNMdVEh8CwRMJlMQlRms1le/f395ZXElpDEHiSvROTjJi03YZGsSFQkqcDAQE1cXJzm3r17co3NZlPE9SyfqLq3QiANIGA0GoWovLy8XN7e3q6IiAgXyYxERhJLSGAJyctDPg+S1sWLF7UkLH9/f63FYuHPWl9fX43dbpd/aQBT1UWFgEIgBRDQ6/Uu/ouJiSFpOc1mszMqKspJAsuTJ48zKfISAkqKtAICArSRkZE6s9lM4tJZrVadj4+PxuFwaJxOp7ymQJ/URygEFAIvMAI6nc6l1WpdfI2NjSVxOcxms8NisTgDAgIckZGRzqTIKxFxtWjRQktPy01aer1eHxsb62116DoCruYACgCa9C8wjqprCgGFQKog4LoD4Cyg2WjSOVb7+PjE2e12e0Ly2rBhg5NNY8joIS7qWqGhodqoqCityWQiZ+ktVmtOmw2fAiiSKn1RH6oQUAikRQROGY1oZTaZLpO8rFar3d/f31mlShUnBftExOX2tsxmsw6A/vr16z5Wh26HIq20OG5UnxUCqY7AKZPOUdPPz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szb6r6AIWAQkAhQARcd14ym3IZDAabwWDgIXj2KlWqOBN5XCQub29vXUREBM+TMd5z6rYDmpIKQIWAQkAhkDoIuI56aR21ANgCAwPj4+LiHImIi41q0aKFNjw8XOcW6G/dtfcA8Nfh36nTcvWpCgGFQNpFYHjGdPplAOKtVqs9KCjIsWHDBifh4NFQ3A+nIXFdvHhRazab+XXO+uvXr/tYHbodAP762pO0C6DquUJAIZCyCJwy6Rw1/fz8eJ623WKxOPLkyeMkcWk0GpeHuJhZZLgYFRWlpddFs1itOW028PvMFXml7ENTn6YQSMsInDIa0cpsMl222+12elv+/v5OT5iYkLjc4SK9roCAAG1kZKSO5BUbG+ttdeg6Aq7mPOBUCfZpeTypvisEnhUCLn77y1lAs9Gkc6z28fGJI2kFBAQjAAKYAAABW0lEQVQ4IiMjnW5vS8LEB4mLXldYWJgmIXmZzWatxWLRWa1WnY+Pj8bhcGicTqe8PqsuqPsqBBQCaQMBnU7n0mq1Lr7Gxsa6TCaTw2w2OywWizMhaRUqVMjFbGIi4nLrXHxNSF5Wq1Xj7+9P4tJarVatr6+vxm63y7+0AavqpUJAIfCsEdDr9S7+i4mJIXE5zWazMyoqymkymVz0tB4kLY84724YRfqE5BUVFaWxWCwaElhgYKAmLi5Oc+/ePXmPzWZT5PWsn6i6v0LgBUfAaDSKF+Xl5eXy9vZ2RUREkLxcZrPZ5e/v70qKtB4iroSeV0IC488kMb6SyPhKMnvBMVXdUwgoBJ4xAiQpfgSJiq8kK74mJCx3eJiwKUmSj9vzSvhGhpBJ9YGa2DPum7q9QkAh8IIhQGJKqktuHSsRSWk0D703WdJJisReMAxVdxQCCoHnDAFmDh/XpP8CGmr69Rx3DAoAAAAASUVORK5CYII="},D1Df:function(ze,De,W){"use strict";function q(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q=function(I){return typeof I}:q=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},q(m)}function z(){return z=Object.assign||function(m){for(var _=1;_<arguments.length;_++){var I=arguments[_];for(var U in I)Object.prototype.hasOwnProperty.call(I,U)&&(m[U]=I[U])}return m},z.apply(this,arguments)}function P(m,_){var I=Object.keys(m);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(m);_&&(U=U.filter(function(M){return Object.getOwnPropertyDescriptor(m,M).enumerable})),I.push.apply(I,U)}return I}function Y(m){for(var _=1;_<arguments.length;_++){var I=arguments[_]!=null?arguments[_]:{};_%2?P(I,!0).forEach(function(U){b(m,U,I[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(I)):P(I).forEach(function(U){Object.defineProperty(m,U,Object.getOwnPropertyDescriptor(I,U))})}return m}function F(m,_){if(m==null)return{};var I=A(m,_),U,M;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(m);for(M=0;M<H.length;M++){if(U=H[M],_.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(m,U))continue;I[U]=m[U]}}return I}function A(m,_){if(m==null)return{};var I={},U=Object.keys(m),M,H;for(H=0;H<U.length;H++){if(M=U[H],_.indexOf(M)>=0)continue;I[M]=m[M]}return I}function j(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function B(m,_){for(var I=0;I<_.length;I++){var U=_[I];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(m,U.key,U)}}function L(m,_,I){return _&&B(m.prototype,_),I&&B(m,I),m}function T(m,_){return _&&(q(_)==="object"||typeof _=="function")?_:C(m)}function v(m){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},v(m)}function C(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function k(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&O(m,_)}function O(m,_){return O=Object.setPrototypeOf||function(U,M){return U.__proto__=M,U},O(m,_)}function b(m,_,I){return _ in m?Object.defineProperty(m,_,{value:I,enumerable:!0,configurable:!0,writable:!0}):m[_]=I,m}var p=W("q1tI"),c=W("17x9"),i=W("H38U"),u=W("aRTE");function h(m){for(var _="",I=0;I<m.length;I++){var U=m.charCodeAt(I);U<128?_+=String.fromCharCode(U):U<2048?(_+=String.fromCharCode(192|U>>6),_+=String.fromCharCode(128|U&63)):U<55296||U>=57344?(_+=String.fromCharCode(224|U>>12),_+=String.fromCharCode(128|U>>6&63),_+=String.fromCharCode(128|U&63)):(I++,U=65536+((U&1023)<<10|m.charCodeAt(I)&1023),_+=String.fromCharCode(240|U>>18),_+=String.fromCharCode(128|U>>12&63),_+=String.fromCharCode(128|U>>6&63),_+=String.fromCharCode(128|U&63))}return _}var R={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},y={},g=4,D=.1;function S(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=[];return m.forEach(function(U,M){var H=null;U.forEach(function(K,Z){if(!K&&H!==null){I.push("M".concat(H+_," ").concat(M+_,"h").concat(Z-H,"v1H").concat(H+_,"z")),H=null;return}if(Z===U.length-1){if(!K)return;H===null?I.push("M".concat(Z+_,",").concat(M+_," h1v1H").concat(Z+_,"z")):I.push("M".concat(H+_,",").concat(M+_," h").concat(Z+1-H,"v1H").concat(H+_,"z"));return}K&&H===null&&(H=Z)})}),I.join("")}function d(m,_){return m.slice().map(function(I,U){return U<_.y||U>=_.y+_.h?I:I.map(function(M,H){return H<_.x||H>=_.x+_.w?M:!1})})}function l(m,_){var I=m.imageSettings,U=m.size,M=m.includeMargin;if(I==null)return null;var H=M?g:0,K=_.length+H*2,Z=Math.floor(U*D),le=K/U,he=(I.width||Z)*le,ye=(I.height||Z)*le,Ue=I.x==null?_.length/2-he/2:I.x*le,Me=I.y==null?_.length/2-ye/2:I.y*le,_e=null;if(I.excavate){var Ie=Math.floor(Ue),ke=Math.floor(Me),me=Math.ceil(he+Ue-Ie),ce=Math.ceil(ye+Me-ke);_e={x:Ie,y:ke,w:me,h:ce}}return{x:Ue,y:Me,h:ye,w:he,excavation:_e}}var o=function(){try{new Path2D().addPath(new Path2D)}catch(m){return!1}return!0}(),a=function(m){k(_,m);function _(){var I,U;j(this,_);for(var M=arguments.length,H=new Array(M),K=0;K<M;K++)H[K]=arguments[K];return U=T(this,(I=v(_)).call.apply(I,[this].concat(H))),b(C(U),"_canvas",void 0),b(C(U),"_image",void 0),b(C(U),"state",{imgLoaded:!1}),b(C(U),"handleImageLoad",function(){U.setState({imgLoaded:!0})}),U}return L(_,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var U=this.props,M=U.value,H=U.size,K=U.level,Z=U.bgColor,le=U.fgColor,he=U.includeMargin,ye=U.imageSettings,Ue=new i(-1,u[K]);if(Ue.addData(h(M)),Ue.make(),this._canvas!=null){var Me=this._canvas,_e=Me.getContext("2d");if(!_e)return;var Ie=Ue.modules;if(Ie===null)return;var ke=he?g:0,me=Ie.length+ke*2,ce=l(this.props,Ie);ye!=null&&ce!=null&&(ce.excavation!=null&&(Ie=d(Ie,ce.excavation)));var te=window.devicePixelRatio||1;Me.height=Me.width=H*te;var be=H/me*te;_e.scale(be,be),_e.fillStyle=Z,_e.fillRect(0,0,me,me),_e.fillStyle=le,o?_e.fill(new Path2D(S(Ie,ke))):Ie.forEach(function(ae,we){ae.forEach(function(Pe,Ce){Pe&&_e.fillRect(Ce+ke,we+ke,1,1)})}),this.state.imgLoaded&&this._image&&ce!=null&&_e.drawImage(this._image,ce.x+ke,ce.y+ke,ce.w,ce.h)}}},{key:"render",value:function(){var U=this,M=this.props,H=M.value,K=M.size,Z=M.level,le=M.bgColor,he=M.fgColor,ye=M.style,Ue=M.includeMargin,Me=M.imageSettings,_e=F(M,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Ie=Y({height:K,width:K},ye),ke=null,me=Me&&Me.src;return Me!=null&&me!=null&&(ke=p.createElement("img",{src:me,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(te){return U._image=te}})),p.createElement(p.Fragment,null,p.createElement("canvas",z({style:Ie,height:K,width:K,ref:function(te){return U._canvas=te}},_e)),ke)}}]),_}(p.PureComponent);b(a,"defaultProps",R);var x=function(m){k(_,m);function _(){return j(this,_),T(this,v(_).apply(this,arguments))}return L(_,[{key:"render",value:function(){var U=this.props,M=U.value,H=U.size,K=U.level,Z=U.bgColor,le=U.fgColor,he=U.includeMargin,ye=U.imageSettings,Ue=F(U,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),Me=new i(-1,u[K]);Me.addData(h(M)),Me.make();var _e=Me.modules;if(_e===null)return null;var Ie=he?g:0,ke=_e.length+Ie*2,me=l(this.props,_e),ce=null;ye!=null&&me!=null&&(me.excavation!=null&&(_e=d(_e,me.excavation)),ce=p.createElement("image",{xlinkHref:ye.src,height:me.h,width:me.w,x:me.x+Ie,y:me.y+Ie,preserveAspectRatio:"none"}));var te=S(_e,Ie);return p.createElement("svg",z({shapeRendering:"crispEdges",height:H,width:H,viewBox:"0 0 ".concat(ke," ").concat(ke)},Ue),p.createElement("path",{fill:Z,d:"M0,0 h".concat(ke,"v").concat(ke,"H0z")}),p.createElement("path",{fill:le,d:te}),ce)}}]),_}(p.PureComponent);b(x,"defaultProps",R);var E=function(_){var I=_.renderAs,U=F(_,["renderAs"]),M=I==="svg"?x:a;return p.createElement(M,U)};E.defaultProps=Y({renderAs:"canvas"},R),ze.exports=E},DR4n:function(ze,De,W){ze.exports={flex_box_center:"flex_box_center___2zmmW",flex_space_between:"flex_space_between___3nCIw",flex_box_vertical_center:"flex_box_vertical_center___1PFij",flex_box_center_end:"flex_box_center_end___2FA05",flex_box_column:"flex_box_column___2k0kx",video:"video___1mYnG"}},DlQD:function(ze,De,W){(function(q,z){ze.exports=z()})(this,function(){"use strict";function q(xe,fe){for(var pe=0;pe<fe.length;pe++){var re=fe[pe];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(xe,re.key,re)}}function z(xe,fe,pe){return fe&&q(xe.prototype,fe),pe&&q(xe,pe),xe}function P(xe,fe){if(!xe)return;if(typeof xe=="string")return Y(xe,fe);var pe=Object.prototype.toString.call(xe).slice(8,-1);if(pe==="Object"&&xe.constructor&&(pe=xe.constructor.name),pe==="Map"||pe==="Set")return Array.from(xe);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return Y(xe,fe)}function Y(xe,fe){(fe==null||fe>xe.length)&&(fe=xe.length);for(var pe=0,re=new Array(fe);pe<fe;pe++)re[pe]=xe[pe];return re}function F(xe,fe){var pe;if(typeof Symbol=="undefined"||xe[Symbol.iterator]==null){if(Array.isArray(xe)||(pe=P(xe))||fe&&xe&&typeof xe.length=="number"){pe&&(xe=pe);var re=0;return function(){return re>=xe.length?{done:!0}:{done:!1,value:xe[re++]}}}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 pe=xe[Symbol.iterator](),pe.next.bind(pe)}function A(xe,fe){return fe={exports:{}},xe(fe,fe.exports),fe.exports}var j=A(function(xe){function fe(){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 pe(re){xe.exports.defaults=re}xe.exports={defaults:fe(),getDefaults:fe,changeDefaults:pe}}),B=j.defaults,L=j.getDefaults,T=j.changeDefaults,v=/[&<>"']/,C=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=function(fe){return b[fe]};function c(xe,fe){if(fe){if(v.test(xe))return xe.replace(C,p)}else if(k.test(xe))return xe.replace(O,p);return xe}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(xe){return xe.replace(i,function(fe,pe){return pe=pe.toLowerCase(),pe==="colon"?":":pe.charAt(0)==="#"?pe.charAt(1)==="x"?String.fromCharCode(parseInt(pe.substring(2),16)):String.fromCharCode(+pe.substring(1)):""})}var h=/(^|[^\[])\^/g;function R(xe,fe){xe=xe.source||xe,fe=fe||"";var pe={replace:function(ie,se){return se=se.source||se,se=se.replace(h,"$1"),xe=xe.replace(ie,se),pe},getRegex:function(){return new RegExp(xe,fe)}};return pe}var y=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(xe,fe,pe){if(xe){var re;try{re=decodeURIComponent(u(pe)).replace(y,"").toLowerCase()}catch(ie){return null}if(re.indexOf("javascript:")===0||re.indexOf("vbscript:")===0||re.indexOf("data:")===0)return null}fe&&!g.test(pe)&&(pe=a(fe,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(ie){return null}return pe}var S={},d=/^[^:]+:\/*[^/]*$/,l=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(xe,fe){S[" "+xe]||(d.test(xe)?S[" "+xe]=xe+"/":S[" "+xe]=_(xe,"/",!0)),xe=S[" "+xe];var pe=xe.indexOf(":")===-1;return fe.substring(0,2)==="//"?pe?fe:xe.replace(l,"$1")+fe:fe.charAt(0)==="/"?pe?fe:xe.replace(o,"$1")+fe:xe+fe}var x={exec:function(){}};function E(xe){for(var fe=1,pe,re;fe<arguments.length;fe++){pe=arguments[fe];for(re in pe)Object.prototype.hasOwnProperty.call(pe,re)&&(xe[re]=pe[re])}return xe}function m(xe,fe){var pe=xe.replace(/\|/g,function(se,de,Le){for(var Ke=!1,dt=de;--dt>=0&&Le[dt]==="\\";)Ke=!Ke;return Ke?"|":" |"}),re=pe.split(/ \|/),ie=0;if(re.length>fe)re.splice(fe);else for(;re.length<fe;)re.push("");for(;ie<re.length;ie++)re[ie]=re[ie].trim().replace(/\\\|/g,"|");return re}function _(xe,fe,pe){var re=xe.length;if(re===0)return"";for(var ie=0;ie<re;){var se=xe.charAt(re-ie-1);if(se===fe&&!pe)ie++;else if(se!==fe&&pe)ie++;else break}return xe.substr(0,re-ie)}function I(xe,fe){if(xe.indexOf(fe[1])===-1)return-1;for(var pe=xe.length,re=0,ie=0;ie<pe;ie++)if(xe[ie]==="\\")ie++;else if(xe[ie]===fe[0])re++;else if(xe[ie]===fe[1]&&(re--,re<0))return ie;return-1}function U(xe){xe&&xe.sanitize&&!xe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var M={escape:c,unescape:u,edit:R,cleanUrl:D,resolveUrl:a,noopTest:x,merge:E,splitCells:m,rtrim:_,findClosingBracket:I,checkSanitizeDeprecation:U},H=j.defaults,K=M.rtrim,Z=M.splitCells,le=M.escape,he=M.findClosingBracket;function ye(xe,fe,pe){var re=fe.href,ie=fe.title?le(fe.title):null,se=xe[1].replace(/\\([\[\]])/g,"$1");return xe[0].charAt(0)!=="!"?{type:"link",raw:pe,href:re,title:ie,text:se}:{type:"image",raw:pe,href:re,title:ie,text:le(se)}}function Ue(xe,fe){var pe=xe.match(/^(\s+)(?:```)/);if(pe===null)return fe;var re=pe[1];return fe.split(`
`).map(function(ie){var se=ie.match(/^\s+/);if(se===null)return ie;var de=se[0];return de.length>=re.length?ie.slice(re.length):ie}).join(`
`)}var Me=function(){function xe(pe){this.options=pe||H}var fe=xe.prototype;return fe.space=function(re){var ie=this.rules.block.newline.exec(re);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},fe.code=function(re,ie){var se=this.rules.block.code.exec(re);if(se){var de=ie[ie.length-1];if(de&&de.type==="paragraph")return{raw:se[0],text:se[0].trimRight()};var Le=se[0].replace(/^ {4}/gm,"");return{type:"code",raw:se[0],codeBlockStyle:"indented",text:this.options.pedantic?Le:K(Le,`
`)}}},fe.fences=function(re){var ie=this.rules.block.fences.exec(re);if(ie){var se=ie[0],de=Ue(se,ie[3]||"");return{type:"code",raw:se,lang:ie[2]?ie[2].trim():ie[2],text:de}}},fe.heading=function(re){var ie=this.rules.block.heading.exec(re);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},fe.nptable=function(re){var ie=this.rules.block.nptable.exec(re);if(ie){var se={type:"table",header:Z(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(se.header.length===se.align.length){var de=se.align.length,Le;for(Le=0;Le<de;Le++)/^ *-+: *$/.test(se.align[Le])?se.align[Le]="right":/^ *:-+: *$/.test(se.align[Le])?se.align[Le]="center":/^ *:-+ *$/.test(se.align[Le])?se.align[Le]="left":se.align[Le]=null;for(de=se.cells.length,Le=0;Le<de;Le++)se.cells[Le]=Z(se.cells[Le],se.header.length);return se}}},fe.hr=function(re){var ie=this.rules.block.hr.exec(re);if(ie)return{type:"hr",raw:ie[0]}},fe.blockquote=function(re){var ie=this.rules.block.blockquote.exec(re);if(ie){var se=ie[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ie[0],text:se}}},fe.list=function(re){var ie=this.rules.block.list.exec(re);if(ie){for(var se=ie[0],de=ie[2],Le=de.length>1,Ke=de[de.length-1]===")",dt={type:"list",raw:se,ordered:Le,start:Le?+de.slice(0,-1):"",loose:!1,items:[]},_t=ie[0].match(this.rules.block.item),Ht=!1,it,gt,Qe,Ze,Fe,oe,ve,nt=_t.length,He=0;He<nt;He++)it=_t[He],se=it,gt=it.length,it=it.replace(/^ *([*+-]|\d+[.)]) */,""),~it.indexOf(`
`)&&(gt-=it.length,it=this.options.pedantic?it.replace(/^ {1,4}/gm,""):it.replace(new RegExp("^ {1,"+gt+"}","gm"),"")),He!==nt-1&&(Qe=this.rules.block.bullet.exec(_t[He+1])[0],(Le?Qe.length===1||!Ke&&Qe[Qe.length-1]===")":Qe.length>1||this.options.smartLists&&Qe!==de)&&(Ze=_t.slice(He+1).join(`
`),dt.raw=dt.raw.substring(0,dt.raw.length-Ze.length),He=nt-1)),Fe=Ht||/\n\n(?!\s*$)/.test(it),He!==nt-1&&(Ht=it.charAt(it.length-1)===`
`,Fe||(Fe=Ht)),Fe&&(dt.loose=!0),oe=/^\[[ xX]\] /.test(it),ve=void 0,oe&&(ve=it[1]!==" ",it=it.replace(/^\[[ xX]\] +/,"")),dt.items.push({type:"list_item",raw:se,task:oe,checked:ve,loose:Fe,text:it});return dt}},fe.html=function(re){var ie=this.rules.block.html.exec(re);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):le(ie[0]):ie[0]}},fe.def=function(re){var ie=this.rules.block.def.exec(re);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var se=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:se,raw:ie[0],href:ie[2],title:ie[3]}}},fe.table=function(re){var ie=this.rules.block.table.exec(re);if(ie){var se={type:"table",header:Z(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(se.header.length===se.align.length){se.raw=ie[0];var de=se.align.length,Le;for(Le=0;Le<de;Le++)/^ *-+: *$/.test(se.align[Le])?se.align[Le]="right":/^ *:-+: *$/.test(se.align[Le])?se.align[Le]="center":/^ *:-+ *$/.test(se.align[Le])?se.align[Le]="left":se.align[Le]=null;for(de=se.cells.length,Le=0;Le<de;Le++)se.cells[Le]=Z(se.cells[Le].replace(/^ *\| *| *\| *$/g,""),se.header.length);return se}}},fe.lheading=function(re){var ie=this.rules.block.lheading.exec(re);if(ie)return{type:"heading",raw:ie[0],depth:ie[2].charAt(0)==="="?1:2,text:ie[1]}},fe.paragraph=function(re){var ie=this.rules.block.paragraph.exec(re);if(ie)return{type:"paragraph",raw:ie[0],text:ie[1].charAt(ie[1].length-1)===`
`?ie[1].slice(0,-1):ie[1]}},fe.text=function(re,ie){var se=this.rules.block.text.exec(re);if(se){var de=ie[ie.length-1];return de&&de.type==="text"?{raw:se[0],text:se[0]}:{type:"text",raw:se[0],text:se[0]}}},fe.escape=function(re){var ie=this.rules.inline.escape.exec(re);if(ie)return{type:"escape",raw:ie[0],text:le(ie[1])}},fe.tag=function(re,ie,se){var de=this.rules.inline.tag.exec(re);if(de)return!ie&&/^<a /i.test(de[0])?ie=!0:ie&&/^<\/a>/i.test(de[0])&&(ie=!1),!se&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?se=!0:se&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(se=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ie,inRawBlock:se,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):le(de[0]):de[0]}},fe.link=function(re){var ie=this.rules.inline.link.exec(re);if(ie){var se=he(ie[2],"()");if(se>-1){var de=ie[0].indexOf("!")===0?5:4,Le=de+ie[1].length+se;ie[2]=ie[2].substring(0,se),ie[0]=ie[0].substring(0,Le).trim(),ie[3]=""}var Ke=ie[2],dt="";if(this.options.pedantic){var _t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ke);_t?(Ke=_t[1],dt=_t[3]):dt=""}else dt=ie[3]?ie[3].slice(1,-1):"";Ke=Ke.trim().replace(/^<([\s\S]*)>$/,"$1");var Ht=ye(ie,{href:Ke&&Ke.replace(this.rules.inline._escapes,"$1"),title:dt&&dt.replace(this.rules.inline._escapes,"$1")},ie[0]);return Ht}},fe.reflink=function(re,ie){var se;if((se=this.rules.inline.reflink.exec(re))||(se=this.rules.inline.nolink.exec(re))){var de=(se[2]||se[1]).replace(/\s+/g," ");if(de=ie[de.toLowerCase()],!de||!de.href){var Le=se[0].charAt(0);return{type:"text",raw:Le,text:Le}}var Ke=ye(se,de,se[0]);return Ke}},fe.strong=function(re,ie,se){se===void 0&&(se="");var de=this.rules.inline.strong.start.exec(re);if(de&&(!de[1]||de[1]&&(se===""||this.rules.inline.punctuation.exec(se)))){ie=ie.slice(-1*re.length);var Le=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Le.lastIndex=0;for(var Ke;(de=Le.exec(ie))!=null;)if(Ke=this.rules.inline.strong.middle.exec(ie.slice(0,de.index+3)),Ke)return{type:"strong",raw:re.slice(0,Ke[0].length),text:re.slice(2,Ke[0].length-2)}}},fe.em=function(re,ie,se){se===void 0&&(se="");var de=this.rules.inline.em.start.exec(re);if(de&&(!de[1]||de[1]&&(se===""||this.rules.inline.punctuation.exec(se)))){ie=ie.slice(-1*re.length);var Le=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Le.lastIndex=0;for(var Ke;(de=Le.exec(ie))!=null;)if(Ke=this.rules.inline.em.middle.exec(ie.slice(0,de.index+2)),Ke)return{type:"em",raw:re.slice(0,Ke[0].length),text:re.slice(1,Ke[0].length-1)}}},fe.codespan=function(re){var ie=this.rules.inline.code.exec(re);if(ie){var se=ie[2].replace(/\n/g," "),de=/[^ ]/.test(se),Le=se.startsWith(" ")&&se.endsWith(" ");return de&&Le&&(se=se.substring(1,se.length-1)),se=le(se,!0),{type:"codespan",raw:ie[0],text:se}}},fe.br=function(re){var ie=this.rules.inline.br.exec(re);if(ie)return{type:"br",raw:ie[0]}},fe.del=function(re){var ie=this.rules.inline.del.exec(re);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},fe.autolink=function(re,ie){var se=this.rules.inline.autolink.exec(re);if(se){var de,Le;return se[2]==="@"?(de=le(this.options.mangle?ie(se[1]):se[1]),Le="mailto:"+de):(de=le(se[1]),Le=de),{type:"link",raw:se[0],text:de,href:Le,tokens:[{type:"text",raw:de,text:de}]}}},fe.url=function(re,ie){var se;if(se=this.rules.inline.url.exec(re)){var de,Le;if(se[2]==="@")de=le(this.options.mangle?ie(se[0]):se[0]),Le="mailto:"+de;else{var Ke;do Ke=se[0],se[0]=this.rules.inline._backpedal.exec(se[0])[0];while(Ke!==se[0]);de=le(se[0]),se[1]==="www."?Le="http://"+de:Le=de}return{type:"link",raw:se[0],text:de,href:Le,tokens:[{type:"text",raw:de,text:de}]}}},fe.inlineText=function(re,ie,se){var de=this.rules.inline.text.exec(re);if(de){var Le;return ie?Le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):le(de[0]):de[0]:Le=le(this.options.smartypants?se(de[0]):de[0]),{type:"text",raw:de[0],text:Le}}},xe}(),_e=M.noopTest,Ie=M.edit,ke=M.merge,me={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:_e,table:_e,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};me._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,me._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,me.def=Ie(me.def).replace("label",me._label).replace("title",me._title).getRegex(),me.bullet=/(?:[*+-]|\d{1,9}[.)])/,me.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,me.item=Ie(me.item,"gm").replace(/bull/g,me.bullet).getRegex(),me.list=Ie(me.list).replace(/bull/g,me.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+me.def.source+")").getRegex(),me._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",me._comment=/<!--(?!-?>)[\s\S]*?-->/,me.html=Ie(me.html,"i").replace("comment",me._comment).replace("tag",me._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me.paragraph=Ie(me._paragraph).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.blockquote=Ie(me.blockquote).replace("paragraph",me.paragraph).getRegex(),me.normal=ke({},me),me.gfm=ke({},me.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*|$)"}),me.gfm.nptable=Ie(me.gfm.nptable).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.gfm.table=Ie(me.gfm.table).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.pedantic=ke({},me.normal,{html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",me._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:_e,paragraph:Ie(me.normal._paragraph).replace("hr",me.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",me.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_e,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_e,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ce._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ce.punctuation=Ie(ce.punctuation).replace(/punctuation/g,ce._punctuation).getRegex(),ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ce.em.start=Ie(ce.em.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.middle=Ie(ce.em.middle).replace(/punctuation/g,ce._punctuation).replace(/overlapSkip/g,ce._overlapSkip).getRegex(),ce.em.endAst=Ie(ce.em.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.endUnd=Ie(ce.em.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.start=Ie(ce.strong.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.middle=Ie(ce.strong.middle).replace(/punctuation/g,ce._punctuation).replace(/blockSkip/g,ce._blockSkip).getRegex(),ce.strong.endAst=Ie(ce.strong.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.endUnd=Ie(ce.strong.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.blockSkip=Ie(ce._blockSkip,"g").getRegex(),ce.overlapSkip=Ie(ce._overlapSkip,"g").getRegex(),ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ce._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])?)+(?![-_])/,ce.autolink=Ie(ce.autolink).replace("scheme",ce._scheme).replace("email",ce._email).getRegex(),ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ce.tag=Ie(ce.tag).replace("comment",me._comment).replace("attribute",ce._attribute).getRegex(),ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ce.link=Ie(ce.link).replace("label",ce._label).replace("href",ce._href).replace("title",ce._title).getRegex(),ce.reflink=Ie(ce.reflink).replace("label",ce._label).getRegex(),ce.reflinkSearch=Ie(ce.reflinkSearch,"g").replace("reflink",ce.reflink).replace("nolink",ce.nolink).getRegex(),ce.normal=ke({},ce),ce.pedantic=ke({},ce.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:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",ce._label).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce._label).getRegex()}),ce.gfm=ke({},ce.normal,{escape:Ie(ce.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ce.gfm.url=Ie(ce.gfm.url,"i").replace("email",ce.gfm._extended_email).getRegex(),ce.breaks=ke({},ce.gfm,{br:Ie(ce.br).replace("{2,}","*").getRegex(),text:Ie(ce.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:me,inline:ce},be=j.defaults,ae=te.block,we=te.inline;function Pe(xe){return xe.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ce(xe){var fe="",pe,re,ie=xe.length;for(pe=0;pe<ie;pe++)re=xe.charCodeAt(pe),Math.random()>.5&&(re="x"+re.toString(16)),fe+="&#"+re+";";return fe}var Ve=function(){function xe(pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=pe||be,this.options.tokenizer=this.options.tokenizer||new Me,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var re={block:ae.normal,inline:we.normal};this.options.pedantic?(re.block=ae.pedantic,re.inline=we.pedantic):this.options.gfm&&(re.block=ae.gfm,this.options.breaks?re.inline=we.breaks:re.inline=we.gfm),this.tokenizer.rules=re}xe.lex=function(re,ie){var se=new xe(ie);return se.lex(re)};var fe=xe.prototype;return fe.lex=function(re){return re=re.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(re,this.tokens,!0),this.inline(this.tokens),this.tokens},fe.blockTokens=function(re,ie,se){ie===void 0&&(ie=[]),se===void 0&&(se=!0),re=re.replace(/^ +$/gm,"");for(var de,Le,Ke,dt;re;){if(de=this.tokenizer.space(re)){re=re.substring(de.raw.length),de.type&&ie.push(de);continue}if(de=this.tokenizer.code(re,ie)){re=re.substring(de.raw.length),de.type?ie.push(de):(dt=ie[ie.length-1],dt.raw+=`
`+de.raw,dt.text+=`
`+de.text);continue}if(de=this.tokenizer.fences(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.heading(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.nptable(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.hr(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.blockquote(re)){re=re.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],se),ie.push(de);continue}if(de=this.tokenizer.list(re)){for(re=re.substring(de.raw.length),Ke=de.items.length,Le=0;Le<Ke;Le++)de.items[Le].tokens=this.blockTokens(de.items[Le].text,[],!1);ie.push(de);continue}if(de=this.tokenizer.html(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(se&&(de=this.tokenizer.def(re))){re=re.substring(de.raw.length),this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.lheading(re)){re=re.substring(de.raw.length),ie.push(de);continue}if(se&&(de=this.tokenizer.paragraph(re))){re=re.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.text(re,ie)){re=re.substring(de.raw.length),de.type?ie.push(de):(dt=ie[ie.length-1],dt.raw+=`
`+de.raw,dt.text+=`
`+de.text);continue}if(re){var _t="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(_t);break}else throw new Error(_t)}}return ie},fe.inline=function(re){var ie,se,de,Le,Ke,dt,_t=re.length;for(ie=0;ie<_t;ie++){dt=re[ie];switch(dt.type){case"paragraph":case"text":case"heading":{dt.tokens=[],this.inlineTokens(dt.text,dt.tokens);break}case"table":{for(dt.tokens={header:[],cells:[]},Le=dt.header.length,se=0;se<Le;se++)dt.tokens.header[se]=[],this.inlineTokens(dt.header[se],dt.tokens.header[se]);for(Le=dt.cells.length,se=0;se<Le;se++)for(Ke=dt.cells[se],dt.tokens.cells[se]=[],de=0;de<Ke.length;de++)dt.tokens.cells[se][de]=[],this.inlineTokens(Ke[de],dt.tokens.cells[se][de]);break}case"blockquote":{this.inline(dt.tokens);break}case"list":{for(Le=dt.items.length,se=0;se<Le;se++)this.inline(dt.items[se].tokens);break}}}return re},fe.inlineTokens=function(re,ie,se,de,Le){ie===void 0&&(ie=[]),se===void 0&&(se=!1),de===void 0&&(de=!1),Le===void 0&&(Le="");var Ke,dt=re,_t;if(this.tokens.links){var Ht=Object.keys(this.tokens.links);if(Ht.length>0)for(;(_t=this.tokenizer.rules.inline.reflinkSearch.exec(dt))!=null;)Ht.includes(_t[0].slice(_t[0].lastIndexOf("[")+1,-1))&&(dt=dt.slice(0,_t.index)+"["+"a".repeat(_t[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(_t=this.tokenizer.rules.inline.blockSkip.exec(dt))!=null;)dt=dt.slice(0,_t.index)+"["+"a".repeat(_t[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;re;){if(Ke=this.tokenizer.escape(re)){re=re.substring(Ke.raw.length),ie.push(Ke);continue}if(Ke=this.tokenizer.tag(re,se,de)){re=re.substring(Ke.raw.length),se=Ke.inLink,de=Ke.inRawBlock,ie.push(Ke);continue}if(Ke=this.tokenizer.link(re)){re=re.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,de)),ie.push(Ke);continue}if(Ke=this.tokenizer.reflink(re,this.tokens.links)){re=re.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,de)),ie.push(Ke);continue}if(Ke=this.tokenizer.strong(re,dt,Le)){re=re.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],se,de),ie.push(Ke);continue}if(Ke=this.tokenizer.em(re,dt,Le)){re=re.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],se,de),ie.push(Ke);continue}if(Ke=this.tokenizer.codespan(re)){re=re.substring(Ke.raw.length),ie.push(Ke);continue}if(Ke=this.tokenizer.br(re)){re=re.substring(Ke.raw.length),ie.push(Ke);continue}if(Ke=this.tokenizer.del(re)){re=re.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],se,de),ie.push(Ke);continue}if(Ke=this.tokenizer.autolink(re,Ce)){re=re.substring(Ke.raw.length),ie.push(Ke);continue}if(!se&&(Ke=this.tokenizer.url(re,Ce))){re=re.substring(Ke.raw.length),ie.push(Ke);continue}if(Ke=this.tokenizer.inlineText(re,de,Pe)){re=re.substring(Ke.raw.length),Le=Ke.raw.slice(-1),ie.push(Ke);continue}if(re){var it="Infinite loop on byte: "+re.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return ie},z(xe,null,[{key:"rules",get:function(){return{block:ae,inline:we}}}]),xe}(),Ge=j.defaults,tt=M.cleanUrl,Je=M.escape,Ye=function(){function xe(pe){this.options=pe||Ge}var fe=xe.prototype;return fe.code=function(re,ie,se){var de=(ie||"").match(/\S*/)[0];if(this.options.highlight){var Le=this.options.highlight(re,de);Le!=null&&Le!==re&&(se=!0,re=Le)}return de?'<pre><code class="'+this.options.langPrefix+Je(de,!0)+'">'+(se?re:Je(re,!0))+`</code></pre>
`:"<pre><code>"+(se?re:Je(re,!0))+`</code></pre>
`},fe.blockquote=function(re){return`<blockquote>
`+re+`</blockquote>
`},fe.html=function(re){return re},fe.heading=function(re,ie,se,de){return this.options.headerIds?"<h"+ie+' id="'+this.options.headerPrefix+de.slug(se)+'">'+re+"</h"+ie+`>
`:"<h"+ie+">"+re+"</h"+ie+`>
`},fe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},fe.list=function(re,ie,se){var de=ie?"ol":"ul",Le=ie&&se!==1?' start="'+se+'"':"";return"<"+de+Le+`>
`+re+"</"+de+`>
`},fe.listitem=function(re){return"<li>"+re+`</li>
`},fe.checkbox=function(re){return"<input "+(re?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},fe.paragraph=function(re){return"<p>"+re+`</p>
`},fe.table=function(re,ie){return ie&&(ie="<tbody>"+ie+"</tbody>"),`<table>
<thead>
`+re+`</thead>
`+ie+`</table>
`},fe.tablerow=function(re){return`<tr>
`+re+`</tr>
`},fe.tablecell=function(re,ie){var se=ie.header?"th":"td",de=ie.align?"<"+se+' align="'+ie.align+'">':"<"+se+">";return de+re+"</"+se+`>
`},fe.strong=function(re){return"<strong>"+re+"</strong>"},fe.em=function(re){return"<em>"+re+"</em>"},fe.codespan=function(re){return"<code>"+re+"</code>"},fe.br=function(){return this.options.xhtml?"<br/>":"<br>"},fe.del=function(re){return"<del>"+re+"</del>"},fe.link=function(re,ie,se){if(re=tt(this.options.sanitize,this.options.baseUrl,re),re===null)return se;var de='<a href="'+Je(re)+'"';return ie&&(de+=' title="'+ie+'"'),de+=">"+se+"</a>",de},fe.image=function(re,ie,se){if(re=tt(this.options.sanitize,this.options.baseUrl,re),re===null)return se;var de='<img src="'+re+'" alt="'+se+'"';return ie&&(de+=' title="'+ie+'"'),de+=this.options.xhtml?"/>":">",de},fe.text=function(re){return re},xe}(),et=function(){function xe(){}var fe=xe.prototype;return fe.strong=function(re){return re},fe.em=function(re){return re},fe.codespan=function(re){return re},fe.del=function(re){return re},fe.html=function(re){return re},fe.text=function(re){return re},fe.link=function(re,ie,se){return""+se},fe.image=function(re,ie,se){return""+se},fe.br=function(){return""},xe}(),St=function(){function xe(){this.seen={}}var fe=xe.prototype;return fe.slug=function(re){var ie=re.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ie)){var se=ie;do this.seen[se]++,ie=se+"-"+this.seen[se];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},xe}(),At=j.defaults,ht=M.unescape,xt=function(){function xe(pe){this.options=pe||At,this.options.renderer=this.options.renderer||new Ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new et,this.slugger=new St}xe.parse=function(re,ie){var se=new xe(ie);return se.parse(re)};var fe=xe.prototype;return fe.parse=function(re,ie){ie===void 0&&(ie=!0);var se="",de,Le,Ke,dt,_t,Ht,it,gt,Qe,Ze,Fe,oe,ve,nt,He,bt,mt,Re,qe=re.length;for(de=0;de<qe;de++){Ze=re[de];switch(Ze.type){case"space":continue;case"hr":{se+=this.renderer.hr();continue}case"heading":{se+=this.renderer.heading(this.parseInline(Ze.tokens),Ze.depth,ht(this.parseInline(Ze.tokens,this.textRenderer)),this.slugger);continue}case"code":{se+=this.renderer.code(Ze.text,Ze.lang,Ze.escaped);continue}case"table":{for(gt="",it="",dt=Ze.header.length,Le=0;Le<dt;Le++)it+=this.renderer.tablecell(this.parseInline(Ze.tokens.header[Le]),{header:!0,align:Ze.align[Le]});for(gt+=this.renderer.tablerow(it),Qe="",dt=Ze.cells.length,Le=0;Le<dt;Le++){for(Ht=Ze.tokens.cells[Le],it="",_t=Ht.length,Ke=0;Ke<_t;Ke++)it+=this.renderer.tablecell(this.parseInline(Ht[Ke]),{header:!1,align:Ze.align[Ke]});Qe+=this.renderer.tablerow(it)}se+=this.renderer.table(gt,Qe);continue}case"blockquote":{Qe=this.parse(Ze.tokens),se+=this.renderer.blockquote(Qe);continue}case"list":{for(Fe=Ze.ordered,oe=Ze.start,ve=Ze.loose,dt=Ze.items.length,Qe="",Le=0;Le<dt;Le++)He=Ze.items[Le],bt=He.checked,mt=He.task,nt="",He.task&&(Re=this.renderer.checkbox(bt),ve?He.tokens.length>0&&He.tokens[0].type==="text"?(He.tokens[0].text=Re+" "+He.tokens[0].text,He.tokens[0].tokens&&He.tokens[0].tokens.length>0&&He.tokens[0].tokens[0].type==="text"&&(He.tokens[0].tokens[0].text=Re+" "+He.tokens[0].tokens[0].text)):He.tokens.unshift({type:"text",text:Re}):nt+=Re),nt+=this.parse(He.tokens,ve),Qe+=this.renderer.listitem(nt,mt,bt);se+=this.renderer.list(Qe,Fe,oe);continue}case"html":{se+=this.renderer.html(Ze.text);continue}case"paragraph":{se+=this.renderer.paragraph(this.parseInline(Ze.tokens));continue}case"text":{for(Qe=Ze.tokens?this.parseInline(Ze.tokens):Ze.text;de+1<qe&&re[de+1].type==="text";)Ze=re[++de],Qe+=`
`+(Ze.tokens?this.parseInline(Ze.tokens):Ze.text);se+=ie?this.renderer.paragraph(Qe):Qe;continue}default:{var vt='Token with "'+Ze.type+'" type was not found.';if(this.options.silent){console.error(vt);return}else throw new Error(vt)}}}return se},fe.parseInline=function(re,ie){ie=ie||this.renderer;var se="",de,Le,Ke=re.length;for(de=0;de<Ke;de++){Le=re[de];switch(Le.type){case"escape":{se+=ie.text(Le.text);break}case"html":{se+=ie.html(Le.text);break}case"link":{se+=ie.link(Le.href,Le.title,this.parseInline(Le.tokens,ie));break}case"image":{se+=ie.image(Le.href,Le.title,Le.text);break}case"strong":{se+=ie.strong(this.parseInline(Le.tokens,ie));break}case"em":{se+=ie.em(this.parseInline(Le.tokens,ie));break}case"codespan":{se+=ie.codespan(Le.text);break}case"br":{se+=ie.br();break}case"del":{se+=ie.del(this.parseInline(Le.tokens,ie));break}case"text":{se+=ie.text(Le.text);break}default:{var dt='Token with "'+Le.type+'" type was not found.';if(this.options.silent){console.error(dt);return}else throw new Error(dt)}}}return se},xe}(),Tt=M.merge,Ot=M.checkSanitizeDeprecation,Oe=M.escape,Te=j.getDefaults,rt=j.changeDefaults,ot=j.defaults;function Ne(xe,fe,pe){if(typeof xe=="undefined"||xe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof xe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(xe)+", string expected");if(typeof fe=="function"&&(pe=fe,fe=null),fe=Tt({},Ne.defaults,fe||{}),Ot(fe),pe){var re=fe.highlight,ie;try{ie=Ve.lex(xe,fe)}catch(Ke){return pe(Ke)}var se=function(dt){var _t;if(!dt)try{_t=xt.parse(ie,fe)}catch(Ht){dt=Ht}return fe.highlight=re,dt?pe(dt):pe(null,_t)};if(!re||re.length<3)return se();if(delete fe.highlight,!ie.length)return se();var de=0;Ne.walkTokens(ie,function(Ke){Ke.type==="code"&&(de++,setTimeout(function(){re(Ke.text,Ke.lang,function(dt,_t){if(dt)return se(dt);_t!=null&&_t!==Ke.text&&(Ke.text=_t,Ke.escaped=!0),de--,de===0&&se()})},0))}),de===0&&se();return}try{var Le=Ve.lex(xe,fe);return fe.walkTokens&&Ne.walkTokens(Le,fe.walkTokens),xt.parse(Le,fe)}catch(Ke){if(Ke.message+=`
Please report this to https://github.com/markedjs/marked.`,fe.silent)return"<p>An error occurred:</p><pre>"+Oe(Ke.message+"",!0)+"</pre>";throw Ke}}Ne.options=Ne.setOptions=function(xe){return Tt(Ne.defaults,xe),rt(Ne.defaults),Ne},Ne.getDefaults=Te,Ne.defaults=ot,Ne.use=function(xe){var fe=Tt({},xe);if(xe.renderer&&function(){var re=Ne.defaults.renderer||new Ye,ie=function(Le){var Ke=re[Le];re[Le]=function(){for(var dt=arguments.length,_t=new Array(dt),Ht=0;Ht<dt;Ht++)_t[Ht]=arguments[Ht];var it=xe.renderer[Le].apply(re,_t);return it===!1&&(it=Ke.apply(re,_t)),it}};for(var se in xe.renderer)ie(se);fe.renderer=re}(),xe.tokenizer&&function(){var re=Ne.defaults.tokenizer||new Me,ie=function(Le){var Ke=re[Le];re[Le]=function(){for(var dt=arguments.length,_t=new Array(dt),Ht=0;Ht<dt;Ht++)_t[Ht]=arguments[Ht];var it=xe.tokenizer[Le].apply(re,_t);return it===!1&&(it=Ke.apply(re,_t)),it}};for(var se in xe.tokenizer)ie(se);fe.tokenizer=re}(),xe.walkTokens){var pe=Ne.defaults.walkTokens;fe.walkTokens=function(re){xe.walkTokens(re),pe&&pe(re)}}Ne.setOptions(fe)},Ne.walkTokens=function(xe,fe){for(var pe=F(xe),re;!(re=pe()).done;){var ie=re.value;fe(ie);switch(ie.type){case"table":{for(var se=F(ie.tokens.header),de;!(de=se()).done;){var Le=de.value;Ne.walkTokens(Le,fe)}for(var Ke=F(ie.tokens.cells),dt;!(dt=Ke()).done;)for(var _t=dt.value,Ht=F(_t),it;!(it=Ht()).done;){var gt=it.value;Ne.walkTokens(gt,fe)}break}case"list":{Ne.walkTokens(ie.items,fe);break}default:ie.tokens&&Ne.walkTokens(ie.tokens,fe)}}},Ne.Parser=xt,Ne.parser=xt.parse,Ne.Renderer=Ye,Ne.TextRenderer=et,Ne.Lexer=Ve,Ne.lexer=Ve.lex,Ne.Tokenizer=Me,Ne.Slugger=St,Ne.parse=Ne;var $e=Ne;return $e})},E7E6:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyFEhIj+UwjxaHNz8+ls+ebrewYkX5J3IN9169YNv3DhwsRYLIbXJAWBDoZRmbKFYkPRhw4dqgEwdCgAwOfyPiDKyefzWS454Dh58iQdPPiJBk0fKN1E9KyU8gehUKjVcuIOPciAOCRYJ5J95JFHyq9cuaJZACHEJCklIOgHQUqZ0QIAACg/FB+//niPwxD/H3793QqwJkePHqW2tjaSUsKinCOibwWDwfVulcFIPgyIESm5FGfDhg0lBw8ehOM7qbe3dxIggCXAe58VgBOcts0AgP6XfwCACho2bBgNGTLEpZoYz6arq4vee2+PBooQosvv999y//33bzaegrMxGRBn5ZuQOpR77dq1dVB4BQCsQB8AgGB8JicY3RsAgNewYQO//EOHDnPdAtgttr1736cjR44g2VPl5eXXLF++HBYl74EBsbkJHnnkkZFQ/p6eHk3xdd2gpj6nuDxTlvAB8GufDAH+h+8Ga0A365133qHTp8/AkvwiGAx+3wt1ZUBMtsL69evLTpw4gZEfKH+THoC+z9WZk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CCFOE8m1ZWUVq0aPHn3CqZo6CogqNNZ1RaPhb8Zi9D0iWXi7nZySPqdrQQJit89H/11XF3haCNFlIQFTj7gCiL5E4XB4MZEMEdEdUsps9/KaqgxHHpwSEELg/NLnicSqQCCw2c1aug6IqhwWQvb09HyVSH6LiL7Ivoqbze79vOK+Bf0fkXiypKTkudra2sR1Ry5VIW+A6OsXjUZre3t778DBmPAAAAI6SURBVO6DZb5LdedsvCmBdwCF3+9fV1dXF98slMfgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){var z={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},P=q.Pos;q.defineOption("autoCloseBrackets",!1,function(b,p,c){c&&c!=q.Init&&(b.removeKeyMap(F),b.state.closeBrackets=null),p&&(A(Y(p,"pairs")),b.state.closeBrackets=p,b.addKeyMap(F))});function Y(b,p){return p=="pairs"&&typeof b=="string"?b:typeof b=="object"&&b[p]!=null?b[p]:z[p]}var F={Backspace:L,Enter:T};function A(b){for(var p=0;p<b.length;p++){var c=b.charAt(p),i="'"+c+"'";F[i]||(F[i]=j(c))}}A(z.pairs+"`");function j(b){return function(p){return C(p,b)}}function B(b){var p=b.state.closeBrackets;if(!p||p.override)return p;var c=b.getModeAt(b.getCursor());return c.closeBrackets||p}function L(b){var p=B(b);if(!p||b.getOption("disableInput"))return q.Pass;for(var c=Y(p,"pairs"),i=b.listSelections(),u=0;u<i.length;u++){if(!i[u].empty())return q.Pass;var h=k(b,i[u].head);if(!h||c.indexOf(h)%2!=0)return q.Pass}for(var u=i.length-1;u>=0;u--){var R=i[u].head;b.replaceRange("",P(R.line,R.ch-1),P(R.line,R.ch+1),"+delete")}}function T(b){var p=B(b),c=p&&Y(p,"explode");if(!c||b.getOption("disableInput"))return q.Pass;for(var i=b.listSelections(),u=0;u<i.length;u++){if(!i[u].empty())return q.Pass;var h=k(b,i[u].head);if(!h||c.indexOf(h)%2!=0)return q.Pass}b.operation(function(){var R=b.lineSeparator()||`
`;b.replaceSelection(R+R,null),b.execCommand("goCharLeft"),i=b.listSelections();for(var y=0;y<i.length;y++){var g=i[y].head.line;b.indentLine(g,null,!0),b.indentLine(g+1,null,!0)}})}function v(b){var p=q.cmpPos(b.anchor,b.head)>0;return{anchor:new P(b.anchor.line,b.anchor.ch+(p?-1:1)),head:new P(b.head.line,b.head.ch+(p?1:-1))}}function C(b,p){var c=B(b);if(!c||b.getOption("disableInput"))return q.Pass;var i=Y(c,"pairs"),u=i.indexOf(p);if(u==-1)return q.Pass;for(var h=Y(c,"closeBefore"),R=Y(c,"triples"),y=i.charAt(u+1)==p,g=b.listSelections(),D=u%2==0,S,d=0;d<g.length;d++){var l=g[d],o=l.head,a,x=b.getRange(o,P(o.line,o.ch+1));if(D&&!l.empty())a="surround";else if((y||!D)&&x==p)y&&O(b,o)?a="both":R.indexOf(p)>=0&&b.getRange(o,P(o.line,o.ch+3))==p+p+p?a="skipThree":a="skip";else if(y&&o.ch>1&&R.indexOf(p)>=0&&b.getRange(P(o.line,o.ch-2),o)==p+p){if(o.ch>2&&/\bstring/.test(b.getTokenTypeAt(P(o.line,o.ch-2))))return q.Pass;a="addFour"}else if(y){var E=o.ch==0?" ":b.getRange(P(o.line,o.ch-1),o);if(!q.isWordChar(x)&&E!=p&&!q.isWordChar(E))a="both";else return q.Pass}else if(D&&(x.length===0||/\s/.test(x)||h.indexOf(x)>-1))a="both";else return q.Pass;if(!S)S=a;else if(S!=a)return q.Pass}var m=u%2?i.charAt(u-1):p,_=u%2?p:i.charAt(u+1);b.operation(function(){if(S=="skip")b.execCommand("goCharRight");else if(S=="skipThree")for(var I=0;I<3;I++)b.execCommand("goCharRight");else if(S=="surround"){for(var U=b.getSelections(),I=0;I<U.length;I++)U[I]=m+U[I]+_;b.replaceSelections(U,"around"),U=b.listSelections().slice();for(var I=0;I<U.length;I++)U[I]=v(U[I]);b.setSelections(U)}else S=="both"?(b.replaceSelection(m+_,null),b.triggerElectric(m+_),b.execCommand("goCharLeft")):S=="addFour"&&(b.replaceSelection(m+m+m+m,"before"),b.execCommand("goCharRight"))})}function k(b,p){var c=b.getRange(P(p.line,p.ch-1),P(p.line,p.ch+1));return c.length==2?c:null}function O(b,p){var c=b.getTokenAt(P(p.line,p.ch+1));return/\bstring/.test(c.type)&&c.start==p.ch&&(p.ch==0||!/\bstring/.test(b.getTokenTypeAt(p)))}})},FOrL:function(ze,De,W){ze.exports=W.p+"static/nodata.a6b3f948.png"},FPkq:function(ze,De,W){ze.exports=W.p+"static/qrCode.dd0fe9b2.png"},GABl:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSU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Kf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},Gytx:function(ze,De){ze.exports=function(q,z,P,Y){var F=P?P.call(Y,q,z):void 0;if(F!==void 0)return!!F;if(q===z)return!0;if(typeof q!="object"||!q||typeof z!="object"||!z)return!1;var A=Object.keys(q),j=Object.keys(z);if(A.length!==j.length)return!1;for(var B=Object.prototype.hasOwnProperty.bind(z),L=0;L<A.length;L++){var T=A[L];if(!B(T))return!1;var v=q[T],C=z[T];if(F=P?P.call(Y,v,C,T):void 0,F===!1||F===void 0&&v!==C)return!1}return!0}},H38U:function(ze,De,W){var q=W("f4xo"),z=W("rcnY"),P=W("wU8J"),Y=W("Iq15"),F=W("dWSS");function A(B,L){this.typeNumber=B,this.errorCorrectLevel=L,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var j=A.prototype;j.addData=function(B){var L=new q(B);this.dataList.push(L),this.dataCache=null},j.isDark=function(B,L){if(B<0||this.moduleCount<=B||L<0||this.moduleCount<=L)throw new Error(B+","+L);return this.modules[B][L]},j.getModuleCount=function(){return this.moduleCount},j.make=function(){if(this.typeNumber<1){var B=1;for(B=1;B<40;B++){for(var L=z.getRSBlocks(B,this.errorCorrectLevel),T=new P,v=0,C=0;C<L.length;C++)v+=L[C].dataCount;for(var C=0;C<this.dataList.length;C++){var k=this.dataList[C];T.put(k.mode,4),T.put(k.getLength(),Y.getLengthInBits(k.mode,B)),k.write(T)}if(T.getLengthInBits()<=v*8)break}this.typeNumber=B}this.makeImpl(!1,this.getBestMaskPattern())},j.makeImpl=function(B,L){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var T=0;T<this.moduleCount;T++){this.modules[T]=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++)this.modules[T][v]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(B,L),this.typeNumber>=7&&this.setupTypeNumber(B),this.dataCache==null&&(this.dataCache=A.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,L)},j.setupPositionProbePattern=function(B,L){for(var T=-1;T<=7;T++){if(B+T<=-1||this.moduleCount<=B+T)continue;for(var v=-1;v<=7;v++){if(L+v<=-1||this.moduleCount<=L+v)continue;0<=T&&T<=6&&(v==0||v==6)||0<=v&&v<=6&&(T==0||T==6)||2<=T&&T<=4&&2<=v&&v<=4?this.modules[B+T][L+v]=!0:this.modules[B+T][L+v]=!1}}},j.getBestMaskPattern=function(){for(var B=0,L=0,T=0;T<8;T++){this.makeImpl(!0,T);var v=Y.getLostPoint(this);(T==0||B>v)&&(B=v,L=T)}return L},j.createMovieClip=function(B,L,T){var v=B.createEmptyMovieClip(L,T),C=1;this.make();for(var k=0;k<this.modules.length;k++)for(var O=k*C,b=0;b<this.modules[k].length;b++){var p=b*C,c=this.modules[k][b];c&&(v.beginFill(0,100),v.moveTo(p,O),v.lineTo(p+C,O),v.lineTo(p+C,O+C),v.lineTo(p,O+C),v.endFill())}return v},j.setupTimingPattern=function(){for(var B=8;B<this.moduleCount-8;B++){if(this.modules[B][6]!=null)continue;this.modules[B][6]=B%2==0}for(var L=8;L<this.moduleCount-8;L++){if(this.modules[6][L]!=null)continue;this.modules[6][L]=L%2==0}},j.setupPositionAdjustPattern=function(){for(var B=Y.getPatternPosition(this.typeNumber),L=0;L<B.length;L++)for(var T=0;T<B.length;T++){var v=B[L],C=B[T];if(this.modules[v][C]!=null)continue;for(var k=-2;k<=2;k++)for(var O=-2;O<=2;O++)k==-2||k==2||O==-2||O==2||k==0&&O==0?this.modules[v+k][C+O]=!0:this.modules[v+k][C+O]=!1}},j.setupTypeNumber=function(B){for(var L=Y.getBCHTypeNumber(this.typeNumber),T=0;T<18;T++){var v=!B&&(L>>T&1)==1;this.modules[Math.floor(T/3)][T%3+this.moduleCount-8-3]=v}for(var T=0;T<18;T++){var v=!B&&(L>>T&1)==1;this.modules[T%3+this.moduleCount-8-3][Math.floor(T/3)]=v}},j.setupTypeInfo=function(B,L){for(var T=this.errorCorrectLevel<<3|L,v=Y.getBCHTypeInfo(T),C=0;C<15;C++){var k=!B&&(v>>C&1)==1;C<6?this.modules[C][8]=k:C<8?this.modules[C+1][8]=k:this.modules[this.moduleCount-15+C][8]=k}for(var C=0;C<15;C++){var k=!B&&(v>>C&1)==1;C<8?this.modules[8][this.moduleCount-C-1]=k:C<9?this.modules[8][15-C-1+1]=k:this.modules[8][15-C-1]=k}this.modules[this.moduleCount-8][8]=!B},j.mapData=function(B,L){for(var T=-1,v=this.moduleCount-1,C=7,k=0,O=this.moduleCount-1;O>0;O-=2)for(O==6&&O--;;){for(var b=0;b<2;b++)if(this.modules[v][O-b]==null){var p=!1;k<B.length&&(p=(B[k]>>>C&1)==1);var c=Y.getMask(L,v,O-b);c&&(p=!p),this.modules[v][O-b]=p,C--,C==-1&&(k++,C=7)}if(v+=T,v<0||this.moduleCount<=v){v-=T,T=-T;break}}},A.PAD0=236,A.PAD1=17,A.createData=function(B,L,T){for(var v=z.getRSBlocks(B,L),C=new P,k=0;k<T.length;k++){var O=T[k];C.put(O.mode,4),C.put(O.getLength(),Y.getLengthInBits(O.mode,B)),O.write(C)}for(var b=0,k=0;k<v.length;k++)b+=v[k].dataCount;if(C.getLengthInBits()>b*8)throw new Error("code length overflow. ("+C.getLengthInBits()+">"+b*8+")");for(C.getLengthInBits()+4<=b*8&&C.put(0,4);C.getLengthInBits()%8!=0;)C.putBit(!1);for(;!(C.getLengthInBits()>=b*8);){if(C.put(A.PAD0,8),C.getLengthInBits()>=b*8)break;C.put(A.PAD1,8)}return A.createBytes(C,v)},A.createBytes=function(B,L){for(var T=0,v=0,C=0,k=new Array(L.length),O=new Array(L.length),b=0;b<L.length;b++){var p=L[b].dataCount,c=L[b].totalCount-p;v=Math.max(v,p),C=Math.max(C,c),k[b]=new Array(p);for(var i=0;i<k[b].length;i++)k[b][i]=255&B.buffer[i+T];T+=p;var u=Y.getErrorCorrectPolynomial(c),h=new F(k[b],u.getLength()-1),R=h.mod(u);O[b]=new Array(u.getLength()-1);for(var i=0;i<O[b].length;i++){var y=i+R.getLength()-O[b].length;O[b][i]=y>=0?R.get(y):0}}for(var g=0,i=0;i<L.length;i++)g+=L[i].totalCount;for(var D=new Array(g),S=0,i=0;i<v;i++)for(var b=0;b<L.length;b++)i<k[b].length&&(D[S++]=k[b][i]);for(var i=0;i<C;i++)for(var b=0;b<L.length;b++)i<O[b].length&&(D[S++]=O[b][i]);return D},ze.exports=A},HmJG:function(ze,De,W){},HpTS:function(ze,De,W){ze.exports=W.p+"static/small_program.f74069ec.png"},I8Z2:function(ze,De,W){"use strict";W.d(De,"a",function(){return Y}),W.d(De,"b",function(){return k}),W.d(De,"c",function(){return b});var q=W("q1tI"),z=function(){var p=function(c,i){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var R in h)h.hasOwnProperty(R)&&(u[R]=h[R])},p(c,i)};return function(c,i){p(c,i);function u(){this.constructor=c}c.prototype=i===null?Object.create(i):(u.prototype=i.prototype,new u)}}(),P=q.createContext(null),Y=function(p){z(c,p);function c(){return p!==null&&p.apply(this,arguments)||this}return c.prototype.render=function(){return q.createElement(P.Provider,{value:this.props.store},this.props.children)},c}(q.Component),F=W("Gytx"),A=W.n(F),j=W("2mql"),B=W.n(j),L=function(){var p=function(c,i){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var R in h)h.hasOwnProperty(R)&&(u[R]=h[R])},p(c,i)};return function(c,i){p(c,i);function u(){this.constructor=c}c.prototype=i===null?Object.create(i):(u.prototype=i.prototype,new u)}}(),T=function(){return T=Object.assign||function(p){for(var c,i=1,u=arguments.length;i<u;i++){c=arguments[i];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(p[h]=c[h])}return p},T.apply(this,arguments)};function v(p){return p.displayName||p.name||"Component"}var C=function(){return{}};function k(p,c){c===void 0&&(c={});var i=!!p,u=p||C;return function(R){var y=function(D){L(S,D);function S(d,l){var o=D.call(this,d,l)||this;return o.unsubscribe=null,o.handleChange=function(){if(!o.unsubscribe)return;var a=u(o.store.getState(),o.props);o.setState({subscribed:a})},o.store=o.context,o.state={subscribed:u(o.store.getState(),d),store:o.store,props:d},o}return S.getDerivedStateFromProps=function(d,l){return p&&p.length===2&&d!==l.props?{subscribed:u(l.store.getState(),d),props:d}:{props:d}},S.prototype.componentDidMount=function(){this.trySubscribe()},S.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},S.prototype.shouldComponentUpdate=function(d,l){return!A()(this.props,d)||!A()(this.state.subscribed,l.subscribed)},S.prototype.trySubscribe=function(){i&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},S.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},S.prototype.render=function(){var d=T(T(T({},this.props),this.state.subscribed),{store:this.store});return q.createElement(R,T({},d,{ref:this.props.miniStoreForwardedRef}))},S.displayName="Connect("+v(R)+")",S.contextType=P,S}(q.Component);if(c.forwardRef){var g=q.forwardRef(function(D,S){return q.createElement(y,T({},D,{miniStoreForwardedRef:S}))});return B()(g,R)}return B()(y,R)}}var O=function(){return O=Object.assign||function(p){for(var c,i=1,u=arguments.length;i<u;i++){c=arguments[i];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(p[h]=c[h])}return p},O.apply(this,arguments)};function b(p){var c=p,i=[];function u(y){c=O(O({},c),y);for(var g=0;g<i.length;g++)i[g]()}function h(){return c}function R(y){return i.push(y),function(){var D=i.indexOf(y);i.splice(D,1)}}return{setState:u,getState:h,subscribe:R}}},IBYe:function(ze,De,W){"use strict";function q(z){return null}De.a=q},Iq15:function(ze,De,W){var q=W("nVVt"),z=W("dWSS"),P=W("dQei"),Y={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},F={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(A){for(var j=A<<10;F.getBCHDigit(j)-F.getBCHDigit(F.G15)>=0;)j^=F.G15<<F.getBCHDigit(j)-F.getBCHDigit(F.G15);return(A<<10|j)^F.G15_MASK},getBCHTypeNumber:function(A){for(var j=A<<12;F.getBCHDigit(j)-F.getBCHDigit(F.G18)>=0;)j^=F.G18<<F.getBCHDigit(j)-F.getBCHDigit(F.G18);return A<<12|j},getBCHDigit:function(A){for(var j=0;A!=0;)j++,A>>>=1;return j},getPatternPosition:function(A){return F.PATTERN_POSITION_TABLE[A-1]},getMask:function(A,j,B){switch(A){case Y.PATTERN000:return(j+B)%2==0;case Y.PATTERN001:return j%2==0;case Y.PATTERN010:return B%3==0;case Y.PATTERN011:return(j+B)%3==0;case Y.PATTERN100:return(Math.floor(j/2)+Math.floor(B/3))%2==0;case Y.PATTERN101:return j*B%2+j*B%3==0;case Y.PATTERN110:return(j*B%2+j*B%3)%2==0;case Y.PATTERN111:return(j*B%3+(j+B)%2)%2==0;default:throw new Error("bad maskPattern:"+A)}},getErrorCorrectPolynomial:function(A){for(var j=new z([1],0),B=0;B<A;B++)j=j.multiply(new z([1,P.gexp(B)],0));return j},getLengthInBits:function(A,j){if(1<=j&&j<10)switch(A){case q.MODE_NUMBER:return 10;case q.MODE_ALPHA_NUM:return 9;case q.MODE_8BIT_BYTE:return 8;case q.MODE_KANJI:return 8;default:throw new Error("mode:"+A)}else if(j<27)switch(A){case q.MODE_NUMBER:return 12;case q.MODE_ALPHA_NUM:return 11;case q.MODE_8BIT_BYTE:return 16;case q.MODE_KANJI:return 10;default:throw new Error("mode:"+A)}else if(j<41)switch(A){case q.MODE_NUMBER:return 14;case q.MODE_ALPHA_NUM:return 13;case q.MODE_8BIT_BYTE:return 16;case q.MODE_KANJI:return 12;default:throw new Error("mode:"+A)}else throw new Error("type:"+j)},getLostPoint:function(A){for(var j=A.getModuleCount(),B=0,L=0;L<j;L++)for(var T=0;T<j;T++){for(var v=0,C=A.isDark(L,T),k=-1;k<=1;k++){if(L+k<0||j<=L+k)continue;for(var O=-1;O<=1;O++){if(T+O<0||j<=T+O)continue;if(k==0&&O==0)continue;C==A.isDark(L+k,T+O)&&v++}}v>5&&(B+=3+v-5)}for(var L=0;L<j-1;L++)for(var T=0;T<j-1;T++){var b=0;A.isDark(L,T)&&b++,A.isDark(L+1,T)&&b++,A.isDark(L,T+1)&&b++,A.isDark(L+1,T+1)&&b++,(b==0||b==4)&&(B+=3)}for(var L=0;L<j;L++)for(var T=0;T<j-6;T++)A.isDark(L,T)&&!A.isDark(L,T+1)&&A.isDark(L,T+2)&&A.isDark(L,T+3)&&A.isDark(L,T+4)&&!A.isDark(L,T+5)&&A.isDark(L,T+6)&&(B+=40);for(var T=0;T<j;T++)for(var L=0;L<j-6;L++)A.isDark(L,T)&&!A.isDark(L+1,T)&&A.isDark(L+2,T)&&A.isDark(L+3,T)&&A.isDark(L+4,T)&&!A.isDark(L+5,T)&&A.isDark(L+6,T)&&(B+=40);for(var p=0,T=0;T<j;T++)for(var L=0;L<j;L++)A.isDark(L,T)&&p++;var c=Math.abs(100*p/j/j-50)/5;return B+=c*10,B}};ze.exports=F},J66h:function(ze,De,W){(function(q){var z,P;(function(Y,F){ze.exports=F(Y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof q!="undefined"?q:this,function(Y){"use strict";Y=Y||{};var F=Y.Base64,A="2.6.4",j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=function(m){for(var _={},I=0,U=m.length;I<U;I++)_[m.charAt(I)]=I;return _}(j),L=String.fromCharCode,T=function(m){if(m.length<2){var _=m.charCodeAt(0);return _<128?m:_<2048?L(192|_>>>6)+L(128|_&63):L(224|_>>>12&15)+L(128|_>>>6&63)+L(128|_&63)}else{var _=65536+(m.charCodeAt(0)-55296)*1024+(m.charCodeAt(1)-56320);return L(240|_>>>18&7)+L(128|_>>>12&63)+L(128|_>>>6&63)+L(128|_&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,C=function(m){return m.replace(v,T)},k=function(m){var _=[0,2,1][m.length%3],I=m.charCodeAt(0)<<16|(m.length>1?m.charCodeAt(1):0)<<8|(m.length>2?m.charCodeAt(2):0),U=[j.charAt(I>>>18),j.charAt(I>>>12&63),_>=2?"=":j.charAt(I>>>6&63),_>=1?"=":j.charAt(I&63)];return U.join("")},O=Y.btoa&&typeof Y.btoa=="function"?function(m){return Y.btoa(m)}:function(m){if(m.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return m.replace(/[\s\S]{1,3}/g,k)},b=function(m){return O(C(String(m)))},p=function(m){return m.replace(/[+\/]/g,function(_){return _=="+"?"-":"_"}).replace(/=/g,"")},c=function(m,_){return _?p(b(m)):b(m)},i=function(m){return c(m,!0)},u;Y.Uint8Array&&(u=function(m,_){for(var I="",U=0,M=m.length;U<M;U+=3){var H=m[U],K=m[U+1],Z=m[U+2],le=H<<16|K<<8|Z;I+=j.charAt(le>>>18)+j.charAt(le>>>12&63)+(typeof K!="undefined"?j.charAt(le>>>6&63):"=")+(typeof Z!="undefined"?j.charAt(le&63):"=")}return _?p(I):I});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=function(m){switch(m.length){case 4:var _=(7&m.charCodeAt(0))<<18|(63&m.charCodeAt(1))<<12|(63&m.charCodeAt(2))<<6|63&m.charCodeAt(3),I=_-65536;return L((I>>>10)+55296)+L((I&1023)+56320);case 3:return L((15&m.charCodeAt(0))<<12|(63&m.charCodeAt(1))<<6|63&m.charCodeAt(2));default:return L((31&m.charCodeAt(0))<<6|63&m.charCodeAt(1))}},y=function(m){return m.replace(h,R)},g=function(m){var _=m.length,I=_%4,U=(_>0?B[m.charAt(0)]<<18:0)|(_>1?B[m.charAt(1)]<<12:0)|(_>2?B[m.charAt(2)]<<6:0)|(_>3?B[m.charAt(3)]:0),M=[L(U>>>16),L(U>>>8&255),L(U&255)];return M.length-=[0,0,2,1][I],M.join("")},D=Y.atob&&typeof Y.atob=="function"?function(m){return Y.atob(m)}:function(m){return m.replace(/\S{1,4}/g,g)},S=function(m){return D(String(m).replace(/[^A-Za-z0-9\+\/]/g,""))},d=function(m){return y(D(m))},l=function(m){return String(m).replace(/[-_]/g,function(_){return _=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(m){return d(l(m))},a;Y.Uint8Array&&(a=function(m){return Uint8Array.from(S(l(m)),function(_){return _.charCodeAt(0)})});var x=function(){var m=Y.Base64;return Y.Base64=F,m};if(Y.Base64={VERSION:A,atob:S,btoa:O,fromBase64:o,toBase64:c,utob:C,encode:c,encodeURI:i,btou:y,decode:o,noConflict:x,fromUint8Array:u,toUint8Array:a},typeof Object.defineProperty=="function"){var E=function(m){return{value:m,enumerable:!1,writable:!0,configurable:!0}};Y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(m){return c(this,m)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return c(this,!0)}))}}return Y.Meteor&&(Base64=Y.Base64),ze.exports?ze.exports.Base64=Y.Base64:!(z=[],P=function(){return Y.Base64}.apply(De,z),P!==void 0&&(ze.exports=P)),{Base64:Y.Base64}})}).call(this,W("IyRk"))},JWDV:function(ze,De,W){ze.exports=W.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ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eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(ze,De,W){ze.exports=W.p+"static/qrcode.54870d9b.png"},LdHM:function(ze,De,W){"use strict";W.d(De,"b",function(){return h}),W.d(De,"a",function(){return y});var q=W("1OyB"),z=W("vuIU"),P=W("Ji7U"),Y=W("LK+K"),F=W("q1tI"),A=W("rePB"),j=W("Ff2n"),B=W("ODXe"),L=W("4IlW"),T=W("bX4T"),v=W("YrtM"),C=W("TSYQ"),k=W.n(C),O=W("+nKL"),b=W("8OUc"),p=function(Z,le){var he=Z.prefixCls,ye=Z.id,Ue=Z.flattenOptions,Me=Z.childrenAsData,_e=Z.values,Ie=Z.searchValue,ke=Z.multiple,me=Z.defaultActiveFirstOption,ce=Z.height,te=Z.itemHeight,be=Z.notFoundContent,ae=Z.open,we=Z.menuItemSelectedIcon,Pe=Z.virtual,Ce=Z.onSelect,Ve=Z.onToggleOpen,Ge=Z.onActiveValue,tt=Z.onScroll,Je=Z.onMouseEnter,Ye="".concat(he,"-item"),et=Object(v.a)(function(){return Ue},[ae,Ue],function($e,xe){return xe[0]&&$e[1]!==xe[1]}),St=F.useRef(null),At=function(xe){xe.preventDefault()},ht=function(xe){St.current&&St.current.scrollTo({index:xe})},xt=function(xe){for(var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pe=et.length,re=0;re<pe;re+=1){var ie=(xe+re*fe+pe)%pe,se=et[ie],de=se.group,Le=se.data;if(!de&&!Le.disabled)return ie}return-1},Tt=F.useState(function(){return xt(0)}),Ot=Object(B.a)(Tt,2),Oe=Ot[0],Te=Ot[1],rt=function(xe){Te(xe);var fe=et[xe];if(!fe){Ge(null,-1);return}Ge(fe.data.value,xe)};F.useEffect(function(){rt(me!==!1?xt(0):-1)},[et.length,Ie]),F.useEffect(function(){var $e=setTimeout(function(){if(!ke&&ae&&_e.size===1){var xe=Array.from(_e)[0],fe=et.findIndex(function(pe){var re=pe.data;return re.value===xe});rt(fe),ht(fe)}});return function(){return clearTimeout($e)}},[ae]);var ot=function(xe){xe!==void 0&&Ce(xe,{selected:!_e.has(xe)}),ke||Ve(!1)};if(F.useImperativeHandle(le,function(){return{onKeyDown:function(xe){var fe=xe.which;switch(fe){case L.a.UP:case L.a.DOWN:{var pe=0;if(fe===L.a.UP?pe=-1:fe===L.a.DOWN&&(pe=1),pe!==0){var re=xt(Oe+pe,pe);ht(re),rt(re)}break}case L.a.ENTER:{var ie=et[Oe];ie&&!ie.data.disabled?ot(ie.data.value):ot(void 0),ae&&xe.preventDefault();break}case L.a.ESC:Ve(!1)}},onKeyUp:function(){},scrollTo:function(xe){ht(xe)}}}),et.length===0)return F.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),className:"".concat(Ye,"-empty"),onMouseDown:At},be);function Ne($e){var xe=et[$e];if(!xe)return null;var fe=xe.data||{},pe=fe.value,re=fe.label,ie=fe.children,se=Object(T.a)(fe,!0),de=Me?ie:re;return xe?F.createElement("div",Object.assign({"aria-label":typeof de=="string"?de:null},se,{key:$e,role:"option",id:"".concat(ye,"_list_").concat($e),"aria-selected":_e.has(pe)}),pe):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(ye,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ne(Oe-1),Ne(Oe),Ne(Oe+1)),F.createElement(O.a,{itemKey:"key",ref:St,data:et,height:ce,itemHeight:te,fullHeight:!1,onMouseDown:At,onScroll:tt,virtual:Pe,onMouseEnter:Je},function($e,xe){var fe,pe=$e.group,re=$e.groupOption,ie=$e.data,se=ie.label,de=ie.key;if(pe)return F.createElement("div",{className:k()(Ye,"".concat(Ye,"-group"))},se!==void 0?se:de);var Le=ie.disabled,Ke=ie.value,dt=ie.title,_t=ie.children,Ht=ie.style,it=ie.className,gt=Object(j.a)(ie,["disabled","value","title","children","style","className"]),Qe=_e.has(Ke),Ze="".concat(Ye,"-option"),Fe=k()(Ye,Ze,it,(fe={},Object(A.a)(fe,"".concat(Ze,"-grouped"),re),Object(A.a)(fe,"".concat(Ze,"-active"),Oe===xe&&!Le),Object(A.a)(fe,"".concat(Ze,"-disabled"),Le),Object(A.a)(fe,"".concat(Ze,"-selected"),Qe),fe)),oe=Me?_t:se,ve=!we||typeof we=="function"||Qe;return F.createElement("div",Object.assign({},gt,{"aria-selected":Qe,className:Fe,title:dt,onMouseMove:function(){if(Oe===xe||Le)return;rt(xe)},onClick:function(){Le||ot(Ke)},style:Ht}),F.createElement("div",{className:"".concat(Ze,"-content")},oe||Ke),F.isValidElement(we)||Qe,ve&&F.createElement(b.a,{className:"".concat(Ye,"-option-state"),customizeIcon:we,customizeIconProps:{isSelected:Qe}},Qe?"\u2713":null))}))},c=F.forwardRef(p);c.displayName="OptionList";var i=c,u=function(){return null};u.isSelectOption=!0;var h=u,R=function(){return null};R.isSelectOptGroup=!0;var y=R,g=W("VTBJ"),D=W("Zm9Q");function S(K){var Z=K.key,le=K.props,he=le.children,ye=le.value,Ue=Object(j.a)(le,["children","value"]);return Object(g.a)({key:Z,value:ye!==void 0?ye:Z,children:he},Ue)}function d(K){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(K).map(function(le,he){if(!F.isValidElement(le)||!le.type)return null;var ye=le.type.isSelectOptGroup,Ue=le.key,Me=le.props,_e=Me.children,Ie=Object(j.a)(Me,["children"]);return Z||!ye?S(le):Object(g.a)(Object(g.a)({key:"__RC_SELECT_GRP__".concat(Ue===null?he:Ue,"__"),label:Ue},Ie),{},{options:d(_e)})}).filter(function(le){return le})}var l=W("2Qr1"),o=W("qNPg"),a=W("U8pU"),x=W("Kwbf"),E=W("WKfj");function m(K){var Z=K.mode,le=K.options,he=K.children,ye=K.backfill,Ue=K.allowClear,Me=K.placeholder,_e=K.getInputElement,Ie=K.showSearch,ke=K.onSearch,me=K.defaultOpen,ce=K.autoFocus,te=K.labelInValue,be=K.value,ae=K.inputValue,we=K.optionLabelProp,Pe=Z==="multiple"||Z==="tags",Ce=Ie!==void 0?Ie:Pe||Z==="combobox",Ve=le||d(he);if(Object(x.a)(Z!=="tags"||Ve.every(function(Ye){return!Ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Z==="tags"||Z==="combobox"){var Ge=Ve.some(function(Ye){return Ye.options?Ye.options.some(function(et){return typeof("value"in et?et.value:et.key)=="number"}):typeof("value"in Ye?Ye.value:Ye.key)=="number"});Object(x.a)(!Ge,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(x.a)(Z!=="combobox"||!we,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(x.a)(Z==="combobox"||!ye,"`backfill` only works with `combobox` mode."),Object(x.a)(Z==="combobox"||!_e,"`getInputElement` only work with `combobox` mode."),Object(x.b)(Z!=="combobox"||!_e||!Ue||!Me,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ke&&!Ce&&Z!=="combobox"&&Z!=="tags"&&Object(x.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(x.b)(!me||ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var tt=Object(E.d)(be);Object(x.a)(!te||tt.every(function(Ye){return Object(a.a)(Ye)==="object"&&("key"in Ye||"value"in Ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(x.a)(!Pe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Je=null;Object(D.a)(he).some(function(Ye){if(!F.isValidElement(Ye)||!Ye.type)return!1;var et=Ye.type;if(et.isSelectOption)return!1;if(et.isSelectOptGroup){var St=Object(D.a)(Ye.props.children).every(function(At){return!F.isValidElement(At)||!Ye.type||At.type.isSelectOption?!0:(Je=At.type,!1)});return!St}return Je=et,!0}),Je&&Object(x.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Je.displayName||Je.name||Je,"`.")),Object(x.a)(ae===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var _=m,I=Object(o.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:d,flattenOptions:l.d,getLabeledValue:l.e,filterOptions:l.b,isValueDisabled:l.g,findValueOption:l.c,warningProps:_,fillOptionsWithMissingValue:l.a}),U=function(K){Object(P.a)(le,K);var Z=Object(Y.a)(le);function le(){var he;return Object(q.a)(this,le),he=Z.apply(this,arguments),he.selectRef=F.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(z.a)(le,[{key:"render",value:function(){return F.createElement(I,Object.assign({ref:this.selectRef},this.props))}}]),le}(F.Component);U.Option=h,U.OptGroup=y;var M=U,H=De.c=M},M8RZ:function(ze,De,W){"use strict";W.d(De,"a",function(){return L});var q=W("fWQN"),z=W("mtLc"),P=W("yKVA"),Y=W("879j"),F=W("q1tI"),A=W.n(F),j=W("i8i4"),B=W.n(j),L=function(T){Object(P.a)(C,T);var v=Object(Y.a)(C);function C(k){var O;Object(q.a)(this,C),O=v.call(this,k);var b=window.document;return O.node=b.createElement("div"),b.body.appendChild(O.node),O}return Object(z.a)(C,[{key:"render",value:function(){var O=this.props.children;return Object(j.createPortal)(O,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),C}(A.a.Component)},MvOs:function(ze,De,W){"use strict";W.r(De);var q=W("/zsF"),z=W("PArb"),P=W("sPJy"),Y=W("bE4q"),F=W("+L6B"),A=W("2/Rp"),j=W("14J3"),B=W("BMrR"),L=W("jCWc"),T=W("kPKH"),v=W("5Dmo"),C=W("3S7+"),k=W("sRBo"),O=W("kaz8"),b=W("T2oS"),p=W("W9HT"),c=W("7Kak"),i=W("9yH6"),u=W("MXD1"),h=W("CFYs"),R=W("miYZ"),y=W("tsqr"),g=W("k1fw"),D=W("9og8"),S=W("2qtc"),d=W("kLXV"),l=W("tJVT"),o=W("PpiC"),a=W("5NDa"),x=W("5rEg"),E=W("aHsQ"),m=W("sGsY"),_=W("WmNS"),I=W.n(_),U=W("q1tI"),M=W.n(U),H=W("Ty5D"),K=W("55Ip"),Z=W("9kvl"),le=W("D1Df"),he=W.n(le),ye=W("Icgb"),Ue=W("gUdW"),Me=W("xGfz"),_e=W("jhfD"),Ie=W("Llu2"),ke=W("BlwA"),me=W("bPs0"),ce=W("wd/R"),te=W.n(ce),be=W("V5fa"),ae=W.n(be),we=W("1vsH"),Pe=W("s8TD"),Ce=W("xKgJ"),Ve=W("bntm"),Ge=W("V0Rq"),tt=W("HBuW"),Je=W("9Bee"),Ye=W("Ot1p"),et=function(Re){var qe,vt,Ct,wt,lt=Re.item,Ft=Re.answerData,$t=Re.isEducation,Rt=Re.onBlur,Zt=Rt===void 0?function(){}:Rt,dn=Object(U.useRef)(""),Jt=Object(U.useState)(),Gt=Object(l.a)(Jt,2),fn=Gt[0],On=Gt[1],Pn=Object(U.useState)(!1),ft=Object(l.a)(Pn,2),Wt=ft[0],Qt=ft[1],mn=Object(U.useState)($t||!1),pn=Object(l.a)(mn,2),Dn=pn[0],X=pn[1],f=Object(U.useRef)(),w=function(){clearInterval(f.current),f.current=setInterval(function(){Wt&&Zt(dn.current)},30*1e3)},G=function(V){Zt(dn.current);var Se="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(V||window.event).returnValue=Se,Se};return Object(U.useEffect)(function(){console.log("isFocus:",Wt),Wt?(window.addEventListener("beforeunload",G),w()):window.removeEventListener("beforeunload",G)},[Wt]),Object(U.useEffect)(function(){On(lt==null?void 0:lt.a_flag)},[lt==null?void 0:lt.a_flag]),Object(U.useEffect)(function(){return function(){clearInterval(f.current)}},[]),M.a.createElement("div",null,(Ft==null||((qe=Ft.exercise)===null||qe===void 0)?void 0:qe.user_exercise_status)===1?M.a.createElement("div",null,M.a.createElement("p",{className:"mt10 mb0"},"\u6211\u7684\u7B54\u6848\uFF1A"),M.a.createElement("div",{className:ae.a.simpleText},M.a.createElement(Je.a,{value:lt==null||((vt=lt.user_answer)===null||vt===void 0)?void 0:vt[0]}))):M.a.createElement("div",{className:lt.user_score&&(lt.user_score===lt.question_score?"c-green":"c-red")},Dn?M.a.createElement(Ye.a,{watch:!0,isFocus:!0,defaultValue:lt==null||((Ct=lt.user_answer)===null||Ct===void 0)?void 0:Ct[0],id:lt==null?void 0:lt.question_id,onChange:function(V){dn.current=V,Qt(!0)},onBlur:function(){Zt(dn.current),clearInterval(f.current),Qt(!1)}}):M.a.createElement("div",{onClick:function(){var V;if(!lt.repeat_answer&&(lt==null||((V=lt.user_answer)===null||V===void 0)?void 0:V.length)>0&&!lt.israp)return;X(!0)},className:ae.a.startAnswer},M.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54"))),Object(Ce.t)()&&(lt==null?void 0:lt.standard_answer)&&M.a.createElement("div",null,M.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),M.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},M.a.createElement(Je.a,{value:lt==null||((wt=lt.standard_answer)===null||wt===void 0)?void 0:wt[0]}))))},St=et,At=W("OaEy"),ht=W("2fM7"),xt=function(Re){var qe,vt,Ct,wt,lt=Re.item,Ft=Re.answerData,$t=Re.isEducation,Rt=Re.onBlur,Zt=Rt===void 0?function(){}:Rt,dn=Object(U.useRef)(""),Jt=Object(U.useState)(),Gt=Object(l.a)(Jt,2),fn=Gt[0],On=Gt[1],Pn=Object(U.useState)(!1),ft=Object(l.a)(Pn,2),Wt=ft[0],Qt=ft[1],mn=Object(U.useState)(!1),pn=Object(l.a)(mn,2),Dn=pn[0],X=pn[1],f=Object(U.useState)($t||!1),w=Object(l.a)(f,2),G=w[0],ee=w[1],V=Object(U.useState)(0),Se=Object(l.a)(V,2),st=Se[0],je=Se[1],Pt=Object(U.useRef)(lt.kp_content||""),ut=Object(U.useRef)(lt.kp_clazz),Vt=Object(U.useRef)(),qt=Object(U.useMemo)(function(){var Tn,wn;return(Tn=dn.current)===null||Tn===void 0||((wn=Tn.replace(/[\n|\r|\t]/g,""))===null||wn===void 0)?void 0:wn.length},[dn.current]),yn=function(){clearInterval(Vt.current),Vt.current=setInterval(function(){Dn&&Zt(dn.current,Pt.current,ut.current)},30*1e3)};return Object(U.useEffect)(function(){console.log("isFocus:",Dn),yn()},[Dn]),Object(U.useEffect)(function(){On(lt==null?void 0:lt.a_flag)},[lt==null?void 0:lt.a_flag]),Object(U.useEffect)(function(){return function(){clearInterval(Vt.current)}},[]),M.a.createElement("div",null,(Ft==null||((qe=Ft.exercise)===null||qe===void 0)?void 0:qe.user_exercise_status)===1?M.a.createElement("div",null,M.a.createElement("div",{className:"mt30"},M.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),M.a.createElement("br",null),M.a.createElement(x.a,{disabled:!0,className:"mt10",value:Pt.current,onChange:function(wn){Pt.current=wn.target.value,je(st+1)},onBlur:function(){Zt(dn.current,Pt.current,ut.current),X(!1)}})),M.a.createElement("div",{className:"mt30"},M.a.createElement("strong",null,"\u4F5C\u54C1\u7C7B\u578B\uFF1A"),M.a.createElement("br",null),M.a.createElement(ht.a,{disabled:!0,className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:ut.current,onChange:function(wn){ut.current=wn,je(st+1)},onBlur:function(){Zt(dn.current,Pt.current,ut.current),X(!1)}},M.a.createElement(ht.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),M.a.createElement(ht.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),M.a.createElement("p",{className:"mt10 mb0"},"\u4F5C\u54C1\u5185\u5BB9\uFF1A"),M.a.createElement("div",{className:ae.a.simpleText},M.a.createElement(Je.a,{value:lt==null||((vt=lt.user_answer)===null||vt===void 0)?void 0:vt[0]}))):M.a.createElement("div",null,M.a.createElement("div",{className:"mt30"},M.a.createElement("strong",null,"\u4F5C\u6587\u9898\u76EE\uFF1A"),M.a.createElement("br",null),M.a.createElement(x.a,{className:"mt10",maxLength:60,onBlur:function(){return Zt(dn.current,Pt.current,ut.current)},placeholder:"\u8BF7\u8F93\u5165\u4F5C\u6587\u9898\u76EE(\u6700\u591A60\u4E2A\u5B57)",value:Pt.current,onChange:function(wn){Pt.current=wn.target.value,je(st+1)}})),M.a.createElement("div",{className:"mt30"},M.a.createElement("strong",null,"\u4F5C\u6587\u7C7B\u578B\uFF1A"),M.a.createElement("br",null),M.a.createElement(ht.a,{className:"mt10 w100",placeholder:"\u8BF7\u9009\u62E9\u4F5C\u54C1\u7C7B\u578B",value:ut.current,onChange:function(wn){ut.current=wn,Zt(wn.current,Pt.current,ut.current),je(st+1)}},M.a.createElement(ht.a.Option,{key:1,value:"\u79D1\u666E"},"\u79D1\u666E"),M.a.createElement(ht.a.Option,{key:2,value:"\u79D1\u5E7B"},"\u79D1\u5E7B"))),M.a.createElement("div",{className:"mt30 mb20"},M.a.createElement("div",{className:lt.user_score&&(lt.user_score===lt.question_score?"c-green":"c-red")},M.a.createElement("strong",null,"\u4F5C\u6587\u5185\u5BB9\uFF1A"),M.a.createElement("br",null),M.a.createElement("div",{className:"mt10 relative"},M.a.createElement("span",{className:"c-blue",style:{position:Wt?"fixed":"absolute",top:Wt?61:4,left:10,zIndex:106}},"\u5DF2\u8F93\u5165",qt,"\u5B57"),G?M.a.createElement(Ye.a,{className:ae.a.simpleMd,disablePaste:!0,hidetoolBar:$t,height:$t?"60vh":150,isFocus:!0,defaultValue:lt==null||((Ct=lt.user_answer)===null||Ct===void 0)?void 0:Ct[0],id:lt==null?void 0:lt.question_id,onFullScreen:function(wn){return Qt(wn)},onChange:function(wn){dn.current=wn,X(!0),je(st+1)},onBlur:function(){Zt(dn.current,Pt.current,ut.current),X(!1)}}):M.a.createElement("div",{onClick:function(){return ee(!0)},className:ae.a.startAnswer},M.a.createElement("div",{className:"c-blue"},"\u70B9\u51FB\u5F00\u59CB\u4F5C\u7B54")))))),Object(Ce.t)()&&(lt==null?void 0:lt.standard_answer)&&M.a.createElement("div",null,M.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),M.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},M.a.createElement(Je.a,{value:lt==null||((wt=lt.standard_answer)===null||wt===void 0)?void 0:wt[0]}))))},Tt=xt,Ot=W("g9YV"),Oe=W("wCAj"),Te=W("5GOC"),rt=W("JsLm"),ot=W("ZW9T"),Ne=W("o5mm"),$e=W.n(Ne),xe=function(Re){var qe,vt,Ct,wt,lt=Re.item,Ft=Re.answerData,$t=Object(U.useState)([]),Rt=Object(l.a)($t,2),Zt=Rt[0],dn=Rt[1],Jt=Object(U.useState)([]),Gt=Object(l.a)(Jt,2),fn=Gt[0],On=Gt[1];Object(U.useEffect)(function(){var Qt;if(!(lt!=null&&(Qt=lt.shixun_details)!==null&&Qt!==void 0&&Qt.length))return;for(var mn=[],pn=[],Dn=0;Dn<(lt==null||((X=lt.shixun_details)===null||X===void 0)?void 0:X.length);Dn++){for(var X,f,w,G=0;G<(lt==null?void 0:lt.shixun_details[Dn].stage_list.length);G++){var ee,V,Se,st,je=lt==null?void 0:lt.shixun_details[Dn].stage_list[G];mn.push(Object(g.a)(Object(g.a)({},je),{operation:lt==null||((ee=lt.shixun_details)===null||ee===void 0||((V=ee[Dn])===null||V===void 0||((Se=V.shixun_detail)===null||Se===void 0||((st=Se[0])===null||st===void 0))))?void 0:st.game_identifier}))}if(lt!=null&&(f=lt.shixun_details)!==null&&f!==void 0&&(w=f[Dn])!==null&&w!==void 0&&w.shixun_detail){var Pt,ut,Vt;pn.push(lt==null||((Pt=lt.shixun_details)===null||Pt===void 0||((ut=Pt[Dn])===null||ut===void 0||((Vt=ut.shixun_detail)===null||Vt===void 0)))?void 0:Vt[0])}}On(pn),dn(mn)},[lt==null?void 0:lt.shixun_details]);var Pn=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",render:function(mn){return M.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:mn&&mn.length>25?mn:""},mn)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(mn,pn){return M.a.createElement("span",null,pn.evaluate_count?pn.evaluate_count:M.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"endTime",dataIndex:"endTime",align:"center",render:function(mn,pn){var Dn=!1;return pn.finished_time&&Ft!==null&&Ft!==void 0&&Ft.exercise&&Ft!==null&&Ft!==void 0&&Ft.exercise_answer_user&&((Ft==null?void 0:Ft.exercise.time)===-1?Dn=te()(Ft==null?void 0:Ft.exercise.end_time).isBefore(pn.finished_time):Dn=te()(Ft==null?void 0:Ft.exercise_answer_user.start_at).add(Ft==null?void 0:Ft.exercise.time,"m").isBefore(pn.finished_time)),M.a.createElement("span",null,pn.finished_time||M.a.createElement("span",{className:"c-grey-999"},"--"),M.a.createElement("span",{className:"c-orange-ff9 "},Dn?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(mn,pn){return M.a.createElement("span",null,pn.time_consuming||M.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(mn,pn){return M.a.createElement("span",null,pn.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u64CD\u4F5C",dataIndex:"operation",key:"operation",align:"center",render:function(mn,pn,Dn){return mn?M.a.createElement(rt.a,{affix:!1,className:"mt10"},M.a.createElement(rt.a.Link,{href:"#challenge_".concat(lt==null?void 0:lt.question_id).concat(Dn),title:M.a.createElement("span",{style:{color:"#0152d9"}},"\u67E5\u770B")})):M.a.createElement("span",{className:"c-grey-999"},"--")}}],ft=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(mn,pn){return M.a.createElement("span",null,pn.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(mn,pn){return M.a.createElement("span",null,pn.error_msg?pn.error_msg:"--")}}],Wt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return M.a.createElement("div",{className:"mt15 mb15"},M.a.createElement("div",null,lt==null||((qe=lt.shixun)===null||qe===void 0)?void 0:qe.map(function(Qt,mn){return M.a.createElement(B.a,{className:"font16",gutter:[0,20]},M.a.createElement(T.a,{flex:"1"},Qt.challenge_name," (",Qt.challenge_score,"\u5206)"),M.a.createElement(T.a,{flex:"100px",className:"tr"},!Qt.answer_status&&M.a.createElement("span",{className:"font12 tag-style-border border-orange c-orange "},"\u672A\u5B8C\u6210"),!!Qt.answer_status&&M.a.createElement("span",{className:"font12 tag-style-border border-green c-green "},"\u5DF2\u5B8C\u6210")))})),(Ft==null||((vt=Ft.exercise)===null||vt===void 0)?void 0:vt.student_commit_status)!==0||(Ft==null||((Ct=Ft.exercise)===null||Ct===void 0)?void 0:Ct.user_exercise_status)!==0?M.a.createElement(M.a.Fragment,null,!!(Zt!=null&&Zt.length)&&M.a.createElement("div",null,M.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),M.a.createElement(Oe.a,{columns:Pn,dataSource:Zt,pagination:!1})),!!(fn!=null&&fn.length)&&M.a.createElement("div",null,M.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),fn==null?void 0:fn.map(function(Qt,mn){return M.a.createElement("div",{id:"challenge_".concat(lt==null?void 0:lt.question_id).concat(mn),className:"mt5"},M.a.createElement("div",null,M.a.createElement("span",{className:"font16 mr15"}," \u7B2C",Qt.position,"\u5173"),M.a.createElement(K.a,{className:"current c-black font16",to:"/tasks/".concat(Qt.game_identifier)},Qt.name)),(Qt==null?void 0:Qt.st)===0&&Qt.passed_code&&M.a.createElement("aside",{className:$e.a.shixunWrp},M.a.createElement("h2",null,"\u7B2C\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",M.a.createElement("span",{className:"c-light-black"},Qt.path)),M.a.createElement(ot.b,{height:300,language:"python",theme:"default",value:Qt.passed_code,options:Wt})))}))):M.a.createElement(M.a.Fragment,null,Object(Ce.t)()&&M.a.createElement(Je.a,{className:"c-grey-999 mt20 mb20",value:lt==null?void 0:lt.question_title}),lt==null||((wt=lt.shixun)===null||wt===void 0)?void 0:wt.map(function(Qt,mn){return M.a.createElement("p",{className:"font16 c-grey-666 mb5",key:mn},M.a.createElement("span",{className:"mr20"},"\u7B2C",Qt==null?void 0:Qt.challenge_position,"\u5173 ",Qt==null?void 0:Qt.challenge_name),M.a.createElement("span",null,Qt==null?void 0:Qt.challenge_score,"\u5206"))})))},fe=xe,pe=W("J66h"),re=function(Re){var qe=Re.item,vt=Re.answerData,Ct=Object(U.useState)([]),wt=Object(l.a)(Ct,2),lt=wt[0],Ft=wt[1];Object(U.useEffect)(function(){var Zt;if((qe==null||((Zt=qe.evaluate_codes)===null||Zt===void 0)?void 0:Zt.length)>0){var dn;Ft(qe==null||((dn=qe.evaluate_codes)===null||dn===void 0)?void 0:dn.map(function(Jt,Gt){return{key:Gt+1,error_msg:Jt!=null&&Jt.error_msg?pe.Base64.decode(Jt==null?void 0:Jt.error_msg):""}}))}else Ft([{key:"--",error_msg:"--"}])},[qe==null?void 0:qe.evaluate_codes]);var $t=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(dn,Jt){return M.a.createElement("span",null,Jt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(dn,Jt){return M.a.createElement("span",null,Jt.error_msg?Jt.error_msg:"--")}}],Rt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return M.a.createElement(M.a.Fragment,null,M.a.createElement("div",{className:"mt15 mb15"},M.a.createElement(Je.a,{value:qe==null?void 0:qe.description})),(qe==null?void 0:qe.passed_code)&&M.a.createElement("aside",{className:$e.a.shixunWrp},M.a.createElement("h3",null,"\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),M.a.createElement(ot.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:qe!=null&&qe.passed_code?pe.Base64.decode(qe==null?void 0:qe.passed_code):"",options:Rt})))},ie=re,se=W("oBTY"),de=x.a.TextArea,Le=function(Re){var qe,vt,Ct=Re.item,wt=Re.answerData,lt=Re.onBlur,Ft=lt===void 0?function(){}:lt,$t=Object(U.useState)([]),Rt=Object(l.a)($t,2),Zt=Rt[0],dn=Rt[1];return Object(U.useEffect)(function(){for(var Jt=[],Gt=function(Pn){var ft,Wt=(Ct==null||((ft=Ct.user_answer)===null||ft===void 0)?void 0:ft.find(function(Qt){return Qt.choice_id===Pn+1}))||{choice_id:Pn+1,answer_text:""};Jt.push(Object(g.a)({},Wt))},fn=0;fn<(Ct==null?void 0:Ct.multi_count);fn++)Gt(fn);dn(Jt)},[Ct==null?void 0:Ct.user_answer]),M.a.createElement("div",null,Zt==null?void 0:Zt.map(function(Jt,Gt){var fn,On;return M.a.createElement("div",{className:"mt10"},M.a.createElement("span",null,"\u6211\u7684\u7B54\u6848\uFF08\u586B\u7A7A",Gt+1,"\uFF09:"),M.a.createElement("div",null,M.a.createElement(de,{autoSize:!0,rows:4,disabled:!Ct.repeat_answer&&(Ct==null||((fn=Ct.user_answer)===null||fn===void 0)?void 0:fn.length)>0&&!Ct.israp||(wt==null||((On=wt.exercise)===null||On===void 0)?void 0:On.user_exercise_status)===1,value:Jt==null?void 0:Jt.answer_text,onChange:function(ft){Zt[Gt].answer_text=ft.target.value,dn(Object(se.a)(Zt))},onBlur:function(ft){return Ft(Jt==null?void 0:Jt.answer_text,Gt+1,Zt)},className:"overflow_hidden ".concat(Ct.user_score&&(Ct.user_score===Ct.question_score?"c-green":"c-red"))})))}),!!(Ct!=null&&(qe=Ct.standard_answer)!==null&&qe!==void 0&&qe.length)&&M.a.createElement("div",null,Ct==null||((vt=Ct.standard_answer)===null||vt===void 0)?void 0:vt.map(function(Jt,Gt){return M.a.createElement("div",null,M.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Gt+1,"\uFF09:"),M.a.createElement("div",null,M.a.createElement(de,{autoSize:!0,disabled:!0,value:Jt==null?void 0:Jt.answer_text[0]})))})))},Ke=Le,dt=W("lzim"),_t=x.a.TextArea,Ht=function(Re){var qe=Re.data;return M.a.createElement("div",{className:"tc mt80"},M.a.createElement("img",{width:"486",src:dt.o})," ",M.a.createElement("br",null),qe.status===-1&&M.a.createElement("div",{className:"c-grey-999 mt60"},"\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),qe.status===-2&&M.a.createElement("div",{className:" c-grey-999 mt60"},"\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A",M.a.createElement("span",{className:"c-red"},qe.ip),"\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),M.a.createElement(A.a,{className:"mt40 pl20 pr20",type:"primary"},M.a.createElement("a",{href:"/"},"\u56DE\u5230\u9996\u9875")))},it=Ht,gt=W("m3rI"),Qe=W("LvDl"),Ze=m.a.Countdown,Fe=x.a.TextArea,oe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ve={0:"c-red-ee4",1:"c-green"},nt=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],He=function(Re){var qe,vt,Ct,wt,lt,Ft,$t,Rt,Zt,dn,Jt,Gt,fn,On,Pn,ft,Wt,Qt,mn,pn,Dn,X,f,w,G,ee,V,Se,st,je,Pt,ut,Vt,qt,yn,Tn,wn,kn,mr,Kr,Zn,tr,Sr,Rr,gr,br=Re.globalSetting,Ar=Re.loading,Tr=Re.user,Jr=Re.exercise,lr=Re.dispatch,nr=Re.location,Hr=Object(o.a)(Re,["globalSetting","loading","user","exercise","dispatch","location"]),cn=Object(H.i)(),Nr=Object(U.useState)({}),_n=Object(l.a)(Nr,2),ge=_n[0],Cn=_n[1],Sn=Object(U.useState)({}),jn=Object(l.a)(Sn,2),tn=jn[0],Xr=jn[1],Hn=Object(U.useState)({}),Wn=Object(l.a)(Hn,2),rr=Wn[0],Or=Wn[1],Br=Object(U.useState)(!1),ri=Object(l.a)(Br,2),Dr=ri[0],_r=ri[1],vr=Object(U.useState)(!0),Qr=Object(l.a)(vr,2),ir=Qr[0],Er=Qr[1],hi=Object(U.useState)(!1),Oi=Object(l.a)(hi,2),Di=Oi[0],ii=Oi[1],fi=Object(U.useState)(!1),Zr=Object(l.a)(fi,2),Xt=Zr[0],an=Zr[1],en=Object(U.useState)(),gn=Object(l.a)(en,2),vn=gn[0],An=gn[1],xn=Object(U.useState)(0),In=Object(l.a)(xn,2),qn=In[0],bn=In[1],qr=Object(U.useState)(""),Yt=Object(l.a)(qr,2),un=Yt[0],hn=Yt[1],Fn=Object(U.useState)("none"),Ur=Object(l.a)(Fn,2),ai=Ur[0],pi=Ur[1],ia=Object(U.useState)(""),aa=Object(l.a)(ia,2),Oa=aa[0],fo=aa[1],jo=Object(U.useState)({status:0}),po=Object(l.a)(jo,2),oa=po[0],sa=po[1],Wo=Object(U.useState)(!1),_i=Object(l.a)(Wo,2),$r=_i[0],Hi=_i[1],Da=Object(U.useState)(!1),_a=Object(l.a)(Da,2),zr=_a[0],oi=_a[1],La=Object(U.useState)(window.document.domain==="kepukehuan.educoder.net"),mo=Object(l.a)(La,2),Lr=mo[0],hs=mo[1],Ma=Object(U.useRef)(),zi=Object(U.useRef)(),si=Object(U.useRef)(),Fr=Object(U.useRef)(),Pa=Object(U.useRef)(),Gi=Object(U.useMemo)(function(){return new WebSocket("ws://localhost:8082")},[]),Ko=Object(U.useState)(0),go=Object(l.a)(Ko,2),Rn=go[0],mi=go[1],vo=Object(U.useState)(0),Li=Object(l.a)(vo,2),Ln=Li[0],gi=Li[1],ka=Object(U.useState)(!1),Vi=Object(l.a)(ka,2),yo=Vi[0],li=Vi[1],Gr=Object(U.useState)(!1),Ia=Object(l.a)(Gr,2),Mi=Ia[0],Na=Ia[1],bo=Object(U.useState)(),Ba=Object(l.a)(bo,2),la=Ba[0],Ua=Ba[1],Ho=Object(U.useState)(),Eo=Object(l.a)(Ho,2),ui=Eo[0],Pi=Eo[1];Object(U.useEffect)(function(){return document.body.setAttribute("data-custom","auto"),function(){document.body.removeAttribute("data-custom")}},[]),Object(U.useEffect)(function(){var Nt;return(Nt=Tr.userInfo)!==null&&Nt!==void 0&&Nt.user_id&&(Object(Ce.c)()?ei():Tr.userInfo.login&&xo()),window.addEventListener("message",ua),function(){window.removeEventListener("message",ua),nr.pathname.indexOf("/detail")>-1&&Object(Ve.b)()}},[cn.categoryId,Tr.userInfo.login]),Object(U.useEffect)(function(){return Lr&&lr({type:"globalSetting/headerFooterToggle",payload:!1}),window.addEventListener("beforeunload",vi),function(){clearTimeout(si.current),clearTimeout(Fr.current),window.removeEventListener("beforeunload",vi)}},[]),Object(U.useEffect)(function(){var Nt;ge!=null&&(Nt=ge.question_status)!==null&&Nt!==void 0&&Nt.every(function(ue){return!!ue.ques_status&&$r&&(tn==null?void 0:tn.used_screen_num)<(tn==null?void 0:tn.screen_num)})&&setTimeout(function(){var ue;(ue=zi.current)===null||ue===void 0||ue.handlePhoto()},1300)},[ge]),Object(U.useEffect)(function(){var Nt;if(clearTimeout(si.current),clearTimeout(Fr.current),ge!=null&&(Nt=ge.exercise)!==null&&Nt!==void 0&&Nt.left_time&&Object(Ce.t)()){var ue,at;if((ge==null||((ue=ge.exercise)===null||ue===void 0)?void 0:ue.left_time)>1800){var Be;Fr.current=setTimeout(function(){d.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:M.a.createElement(ye.a,null),okText:"\u77E5\u9053\u4E86"})},((ge==null||((Be=ge.exercise)===null||Be===void 0)?void 0:Be.left_time)-1800)*1e3)}if((ge==null||((at=ge.exercise)===null||at===void 0)?void 0:at.left_time)>900){var yt;si.current=setTimeout(function(){d.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:M.a.createElement(ye.a,null),okText:"\u77E5\u9053\u4E86"})},((ge==null||((yt=ge.exercise)===null||yt===void 0)?void 0:yt.left_time)-900)*1e3)}}},[ge==null||((qe=ge.exercise)===null||qe===void 0)?void 0:qe.left_time]);var vi=function(){var ue;(ue=Jr.exerciseUserInfo)!==null&&ue!==void 0&&ue.screen_open&&window.navigator.sendBeacon("".concat(gt.a.API_SERVER,"/api/exercises/").concat(cn.categoryId,"/commit_screen_at.json"),{})},ua=function(ue){ue.data==="backExercise"&&Fa()},Fa=function(){pi("none"),hn(""),ei()},xo=function(){var Nt=Object(D.a)(I.a.mark(function ue(){var at,Be,yt,pt,Ut,jt,Lt,on,Bt,Mt,rn;return I.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,lr({type:"exercise/getExerciseUserInfo",payload:Object(g.a)({},cn)});case 2:if(Be=ln.sent,Xr(Object(g.a)({},Be.data)),!((Be==null||((at=Be.data)===null||at===void 0)?void 0:at.ip_limit)!=="no")){ln.next=11;break}if(!((Be==null||((yt=Be.data)===null||yt===void 0)?void 0:yt.ip_limit)==="inner")){ln.next=9;break}return ln.next=8,Object(Pe.a)({ip_limit:Be==null||((pt=Be.data)===null||pt===void 0)?void 0:pt.ip_limit});case 8:jt=ln.sent;case 9:return ln.next=11,Object(we.q)({exerciseId:cn.categoryId,ip:jt,errmsgHide:!0,ip_limit:Be==null||((Ut=Be.data)===null||Ut===void 0)?void 0:Ut.ip_limit}).catch(function(Vn){sa(Vn)});case 11:if(!((Be==null?void 0:Be.status)==0)){ln.next=18;break}if(!((Be==null||((Lt=Be.data)===null||Lt===void 0)?void 0:Lt.used_screen_num)>(Be==null||((on=Be.data)===null||on===void 0)?void 0:on.screen_num)&&Be!==null&&Be!==void 0&&(Bt=Be.data)!==null&&Bt!==void 0&&Bt.screen_open)){ln.next=15;break}return Qi(),ln.abrupt("return",!1);case 15:ii(Be==null?void 0:Be.data.check_camera),Be!=null&&Be.data.check_camera||an(Be==null||((Mt=Be.data)===null||Mt===void 0)?void 0:Mt.screen_open),Be!=null&&(rn=Be.data)!==null&&rn!==void 0&&rn.check_camera||ei();case 18:case"end":return ln.stop()}},ue)}));return function(){return Nt.apply(this,arguments)}}(),ei=function(){var Nt=Object(D.a)(I.a.mark(function ue(){var at,Be,yt,pt,Ut,jt,Lt,on,Bt,Mt,rn,$n,ln,Vn,Vr,xi,Xn,Qn,ur,Yn,Ci,Ga,Bi,Va,Xa,Qa,Zi,fa,qi,Ya,$i,ea,pa,ma,ta,ga,Si,Ja;return I.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:if(_r(!0),yt=(at=Tr.userInfo)===null||at===void 0?void 0:at.user_id,!Object(Ce.c)()){Bn.next=10;break}return Bn.next=5,Object(Ge.F)({exerciseId:cn.categoryId,login:cn.login}).catch(function(){return _r(!1)});case 5:Be=Bn.sent,((pt=Be)===null||pt===void 0?void 0:pt.exercise)&&(Be.exercise.user_exercise_status=1),yt=(Ut=Be)===null||Ut===void 0||((jt=Ut.exercise_answer_user)===null||jt===void 0)?void 0:jt.user_id,Bn.next=30;break;case 10:if(!(nr!=null&&(Lt=nr.query)!==null&&Lt!==void 0&&Lt.check)){Bn.next=17;break}return Bn.next=13,Object(Ge.y)(Object(g.a)({},cn)).catch(function(){return _r(!1)});case 13:Be=Bn.sent,yt=(Qn=Be)===null||Qn===void 0||((ur=Qn.exercise)===null||ur===void 0)?void 0:ur.user_id,Bn.next=24;break;case 17:return Bn.next=19,Object(Ge.x)(Object(g.a)({},cn)).catch(function(){return _r(!1)});case 19:Be=Bn.sent,Be.status===-1&&Gn(),((Yn=Be)===null||Yn===void 0?void 0:Yn.exercise)&&(Be.exercise.user_exercise_status=0),((Ci=Be)===null||Ci===void 0?void 0:Ci.exercise)&&(Be.exercise.exercise_status=2),(Ga=Be)===null||Ga===void 0||((Bi=Ga.exercise_question_types)===null||Bi===void 0)||Bi.map(function(dr){if((dr==null?void 0:dr.question_type)<3){var Ai;dr==null||((Ai=dr.items)===null||Ai===void 0)||Ai.map(function(Ti){Ti.user_answer=Ti.question_choices.filter(function(ar){return ar.user_answer_boolean}).map(function(ar){return ar.choice_id})})}});case 24:if(!(!((on=Be)!==null&&on!==void 0&&(Bt=on.exercise)!==null&&Bt!==void 0&&Bt.can_start)&&(Mt=Be)!==null&&Mt!==void 0&&Mt.exercise)){Bn.next=27;break}return window.location.href="/classrooms/".concat(cn.coursesId,"/exercise/").concat(cn.categoryId,"/users/").concat(cn.login,"/check"),Bn.abrupt("return");case 27:if(((rn=Be.exercise)===null||rn===void 0?void 0:rn.commit_status)===0&&!Pa.current)try{Pa.current=!0,Gi.send(JSON.stringify({type:"toggleLockExit",data:!0})),Gi.send(JSON.stringify({type:"network-close",data:""}))}catch(dr){}($n=Be)!==null&&$n!==void 0&&(ln=$n.exercise)!==null&&ln!==void 0&&ln.left_time&&setTimeout(function(){fo(ae.a.red)},(((Va=Be)===null||Va===void 0||((Xa=Va.exercise)===null||Xa===void 0)?void 0:Xa.left_time)-300>0?((Qa=Be)===null||Qa===void 0||((Zi=Qa.exercise)===null||Zi===void 0)?void 0:Zi.left_time)-300:0)*1e3),((Vn=Be)===null||Vn===void 0||((Vr=Vn.exercise)===null||Vr===void 0)?void 0:Vr.take_photo)>=((xi=Be)===null||xi===void 0||((Xn=xi.exercise)===null||Xn===void 0)?void 0:Xn.photo_count);case 30:_r(!1),Be&&(((fa=Be)!==null&&fa!==void 0&&(qi=fa.exercise)!==null&&qi!==void 0&&qi.question_random||(Ya=Be)!==null&&Ya!==void 0&&($i=Ya.exercise)!==null&&$i!==void 0&&$i.choice_random)&&(Ja=1,Be.exercise.question_random=(ga=Be)===null||ga===void 0||((Si=ga.exercise_question_types)===null||Si===void 0)?void 0:Si.map(function(dr){var Ai,Ti,ar,Mn;return(Ai=Be)!==null&&Ai!==void 0&&(Ti=Ai.exercise)!==null&&Ti!==void 0&&Ti.choice_random&&((dr.question_type===0||dr.question_type===1)&&dr.items.map(function(cr){return cr.question_choices=Object(we.S)(cr.question_choices,yt),cr}),dr.question_type===7&&dr.items.forEach(function(cr){cr.sub_exercise_questions.forEach(function(ti){ti.question_choices=Object(we.S)(ti.question_choices,yt)})})),(ar=Be)!==null&&ar!==void 0&&(Mn=ar.exercise)!==null&&Mn!==void 0&&Mn.question_random&&(dr.items=Object(we.S)(dr.items,yt)),dr.items.map(function(cr){return cr.question_num=Ja,Ja++,cr}),dr})),Be.exercise_types=((ea=Be)===null||ea===void 0?void 0:ea.exercise_types)||((pa=Be)===null||pa===void 0||((ma=pa.exercise_scores)===null||ma===void 0)?void 0:ma.exercise_types),Be.question_status=Be.question_status||yi(((ta=Be)===null||ta===void 0?void 0:ta.exercise_question_types)||[]),Cn(Be));case 32:case"end":return Bn.stop()}},ue)}));return function(){return Nt.apply(this,arguments)}}(),yi=function(ue){var at=[];return ue.forEach(function(Be){at=at.concat(Be.items)}),at=at.map(function(Be){return{ques_status:Be==null?void 0:Be.ques_status,question_num:Be==null?void 0:Be.question_num,ques_id:Be==null?void 0:Be.question_id}}),at};Object(U.useEffect)(function(){var Nt,ue,at;((Nt=ge.exercise)===null||Nt===void 0?void 0:Nt.left_time)===0&&Qi(),((ue=ge.exercise)===null||ue===void 0?void 0:ue.left_time)&&An(Date.now()+(ge==null||((at=ge.exercise)===null||at===void 0)?void 0:at.left_time)*1e3)},[(vt=ge.exercise)===null||vt===void 0?void 0:vt.left_time]);var bi=function(){var ue;(ge==null||((ue=ge.exercise)===null||ue===void 0)?void 0:ue.exercise_status)===3?d.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},"\u622A\u6B62\u65F6\u95F4\u5DF2\u5230\uFF0C\u65E0\u6CD5\u6253\u56DE\u8BD5\u5377",M.a.createElement("br",null),"\u8BF7\u5728\u4FEE\u6539\u622A\u6B62\u65F6\u95F4\u540E\u518D\u64CD\u4F5C")}):d.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},"\u5B66\u751F\u5C06\u5F97\u5230\u4E00\u6B21\u91CD\u65B0\u7B54\u9898\u7684\u673A\u4F1A\uFF0C\u73B0\u6709\u7684\u7B54\u9898\u60C5\u51B5\u5C06\u88AB\u6E05\u7A7A",M.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u56DE\u9000TA\u7684\u8BD5\u5377\u7B54\u9898"),onOk:function(){var at=Object(D.a)(I.a.mark(function yt(){var pt,Ut;return I.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.next=2,Object(Ge.S)({categoryId:cn.categoryId,user_ids:[ge==null||((pt=ge.exercise_answer_user)===null||pt===void 0)?void 0:pt.user_id]});case 2:Ut=Lt.sent,Ut&&(y.b.info(Ut==null?void 0:Ut.message),Gn());case 4:case"end":return Lt.stop()}},yt)}));function Be(){return at.apply(this,arguments)}return Be}()})},Gn=function(){window.location.href=Object(we.p)()?"/":"/classrooms/".concat(cn.coursesId,"/exercise/").concat(cn.categoryId,"/detail")},Yr=function(){var Nt=Object(D.a)(I.a.mark(function ue(){var at;return I.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(Ge.k)(Object(g.a)({},cn));case 2:if(at=yt.sent,!(at!=null&&at.has_time)){yt.next=10;break}return An(Date.now()+(at==null?void 0:at.left_time)*1e3),ge.exercise.left_time=at==null?void 0:at.left_time,Cn(Object(g.a)({},ge)),yt.abrupt("return",!0);case 10:return di(),yt.abrupt("return",!1);case 12:case"end":return yt.stop()}},ue)}));return function(){return Nt.apply(this,arguments)}}(),di=function(){var Nt=Object(D.a)(I.a.mark(function ue(){var at,Be;return I.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return pt.next=2,Object(Ge.Z)({categoryId:cn.categoryId,commit_method:2});case 2:at=pt.sent,(at==null?void 0:at.status)===0&&(d.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:M.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",M.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var Ut=Object(D.a)(I.a.mark(function Lt(){return I.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:Gn();case 1:case"end":return Bt.stop()}},Lt)}));function jt(){return Ut.apply(this,arguments)}return jt}()}),y.b.info(at==null?void 0:at.message)),(at==null?void 0:at.status)===-3&&(Be=parseInt(at==null?void 0:at.message),ge.exercise.left_time=Be,Cn(Object(g.a)({},ge)));case 5:case"end":return pt.stop()}},ue)}));return function(){return Nt.apply(this,arguments)}}(),ki=function(){var Nt=Object(D.a)(I.a.mark(function ue(at){var Be;return I.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return pt.next=2,Object(tt.D)({id:at.shixun_identifier});case 2:Be=pt.sent,Be!=null&&Be.game_identifier&&(hn("/tasks/".concat(Be.game_identifier,"?type=exercises&exercisesId=").concat(cn.categoryId,"&coursesId=").concat(cn.coursesId,"&login=").concat(cn.login,"&questionId=").concat(at.question_id)),pi("block")),(Be==null?void 0:Be.status)===-3?Object(we.o)():(Be==null?void 0:Be.status)===2?zo(Be==null?void 0:Be.message,at.question_id):(Be==null?void 0:Be.status)===3&&ja(Be==null?void 0:Be.message);case 5:case"end":return pt.stop()}},ue)}));return function(at){return Nt.apply(this,arguments)}}(),zo=function Nt(ue,at){var Be;ue=(Be=ue)!==null&&Be!==void 0&&Be.includes(".json")?ue:"".concat(ue,".json"),d.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var yt=Object(D.a)(I.a.mark(function Ut(){var jt,Lt;return I.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return Bt.next=2,Object(Ge.T)({url:ue});case 2:if(jt=Bt.sent,jt){Bt.next=5;break}return Bt.abrupt("return");case 5:return y.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Bt.next=8,Object(tt.D)({id:jt.shixun_identifier});case 8:if(Lt=Bt.sent,!(Lt!=null&&Lt.game_identifier)){Bt.next=12;break}return ki({shixun_identifier:Lt==null?void 0:Lt.game_identifier,question_id:at}),Bt.abrupt("return");case 12:(Lt==null?void 0:Lt.status)===2?Nt(Lt==null?void 0:Lt.message,at):(Lt==null?void 0:Lt.status)===3&&ja(Lt==null?void 0:Lt.message);case 13:case"end":return Bt.stop()}},Ut)}));function pt(){return yt.apply(this,arguments)}return pt}()})},ja=function(ue){d.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",ue,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Xi=function(ue){ue.redo?d.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:M.a.createElement("div",{className:"tc font16"},"\u60A8\u4E4B\u524D\u5DF2\u7ECF\u6311\u6218\u8FC7\u8BE5\u5B9E\u8BAD\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u9700\u8981\u91CD\u65B0\u6311\u6218"),onOk:function(){var at=Object(D.a)(I.a.mark(function yt(){var pt,Ut,jt,Lt;return I.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return Bt.next=2,Object(Ge.T)({id:ue.myshixun_identifier,url:ue.url});case 2:pt=Bt.sent,pt&&(Ut=Object(Qe.cloneDeep)(ge==null?void 0:ge.exercise_question_types),jt=Ut==null?void 0:Ut.findIndex(function(Mt){return Mt.question_type===5}),Ut[jt].items.find(function(Mt){return Mt.question_id===ue.question_id}).redo=!1,Ut[jt].items.find(function(Mt){return Mt.question_id===ue.question_id}).shixun_identifier=pt.shixun_identifier,ge.exercise_question_types=Ut,Cn(ge),Lt=Object(g.a)(Object(g.a)({},ue),{},{shixun_identifier:pt.shixun_identifier}),ki(Lt));case 4:case"end":return Bt.stop()}},yt)}));function Be(){return at.apply(this,arguments)}return Be}()}):ki(ue)},Co=function(){var Nt=Object(D.a)(I.a.mark(function ue(at){var Be;return I.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(!at.hack_identifier){pt.next=5;break}return pt.next=3,Object(Ge.X)({id:at.hack_identifier});case 3:Be=pt.sent,(Be==null?void 0:Be.status)===0&&(hn("/myproblems/".concat(Be.identifier,"?type=exercises&exercisesId=").concat(cn.categoryId,"&coursesId=").concat(cn.coursesId,"&login=").concat(cn.login,"&questionId=").concat(at.question_id)),pi("block"));case 5:case"end":return pt.stop()}},ue)}));return function(at){return Nt.apply(this,arguments)}}(),Ei=function(){var Nt=Object(D.a)(I.a.mark(function ue(at,Be,yt,pt,Ut,jt){var Lt,on,Bt,Mt,rn;return I.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:if(oi(!0),Bt={questionId:at,exercise_choice_id:Be,answer_text:yt},!((tn==null?void 0:tn.ip_limit)==="inner"||tn.ip_bind)){ln.next=6;break}return ln.next=5,Object(Pe.a)({ip_limit:tn==null?void 0:tn.ip_limit});case 5:on=ln.sent;case 6:if(Ut&&(Bt.kp_content=Ut),Ut&&(Bt.kp_clazz=jt),at){ln.next=11;break}return console.error("handleSave no questionId params"),ln.abrupt("return");case 11:return Bt.ip=on,ln.next=14,Object(Ge.cb)(Bt);case 14:Mt=ln.sent,Mt!=null&&(Lt=Mt.alert)!==null&&Lt!==void 0&&Lt.length&&(Mt==null||((rn=Mt.alert)===null||rn===void 0)||rn.map(function(Vn){d.a.warn({title:"\u63D0\u793A",autoFocusButton:null,content:Vn})})),(Mt==null?void 0:Mt.status)===0?pt&&pt():(Mt==null?void 0:Mt.status)===-1?setTimeout(function(){Gn()},1e3):(Mt==null?void 0:Mt.status)===-2?sa(Mt):(Mt==null?void 0:Mt.status)===-3&&(Mt.status=-1,sa(Mt)),oi(!1);case 18:case"end":return ln.stop()}},ue)}));return function(at,Be,yt,pt,Ut,jt){return Nt.apply(this,arguments)}}(),da=function(){var Nt=Object(D.a)(I.a.mark(function ue(at){var Be,yt,pt;return I.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return jt.next=2,Yr();case 2:return jt.next=4,Object(Ge.k)(Object(g.a)({},cn));case 4:if(Be=jt.sent,!(Be.is_min_commit_time&&Be.used_time<Be.min_commit_time)){jt.next=8;break}return d.a.warning({title:"\u63D0\u793A",content:"\u5F53\u524D\u4F60\u5DF2\u7ECF\u8003\u8BD5".concat(Math.round(Be.used_time/60),"\u5206\u949F\uFF0C\u672A\u8FBE\u5230\u6700\u4F4E\u4EA4\u5377\u65F6\u957F\uFF1A").concat(Be.min_commit_time/60,"\u5206\u949F\uFF0C\u4E0D\u53EF\u63D0\u524D\u4EA4\u5377")}),jt.abrupt("return");case 8:return jt.next=10,Object(Ge.d)({id:cn.categoryId});case 10:if(yt=jt.sent,yt){jt.next=13;break}return jt.abrupt("return");case 13:yt.question_undo!==0||yt.oj_undo!==0?(pt="",yt.question_undo!==0&&yt.oj_undo!==0?pt="\u6709 ".concat(yt.question_undo," \u9898\u672A\u5B8C\u6210\uFF0C\u5305\u542B ").concat(yt.oj_undo," \u4E2A\u7F16\u7A0B\u9898"):yt.question_undo!==0&&yt.oj_undo===0?pt="\u6709 ".concat(yt.question_undo," \u9898\u672A\u5B8C\u6210"):yt.question_undo===0&&yt.oj_undo!==0&&(pt="\u6709 ".concat(yt.oj_undo," \u7F16\u7A0B\u9898\u672A\u5B8C\u6210")),d.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:at?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},pt,M.a.createElement("br",null),at?"\u5728".concat(te()(yt.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):vn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(we.Z)((vn-new Date().getTime())/1e3)," \uFF0C\u786E\u8BA4\u63D0\u524D\u4EA4\u5377\u5417\uFF1F"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var Lt=Object(D.a)(I.a.mark(function Bt(){return I.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:at?tn!=null&&tn.screen_open?y.b.success("\u4FDD\u5B58\u6210\u529F"):Gn():Qi();case 1:case"end":return rn.stop()}},Bt)}));function on(){return Lt.apply(this,arguments)}return on}()})):d.a.confirm({width:530,title:"\u63D0\u793A",centered:!0,okText:at?"\u77E5\u9053\u4E86":"\u786E\u8BA4\u4EA4\u5377",cancelText:"\u53D6\u6D88",content:M.a.createElement("div",{className:"tc font16"},at?"\u5728".concat(te()(yt.end_time).format("YYYY-MM-DD HH:mm"),"\u4E4B\u524D\uFF0C\u5141\u8BB8\u4FEE\u6539\u7B54\u9898"):vn?"\u4F60\u672C\u573A\u8003\u8BD5\u5269\u4F59\u65F6\u95F4\u8FD8\u6709".concat(Object(we.Z)((vn-new Date().getTime())/1e3)," \uFF0C\u786E\u8BA4\u63D0\u524D\u4EA4\u5377\u5417\uFF1F"):"\u63D0\u4EA4\u540E\u65E0\u6CD5\u518D\u4FEE\u6539\u7B54\u9898\uFF0C\u662F\u5426\u786E\u8BA4\u63D0\u4EA4\uFF1F"),onOk:function(){var Lt=Object(D.a)(I.a.mark(function Bt(){return I.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:at?tn!=null&&tn.screen_open?y.b.success("\u4FDD\u5B58\u6210\u529F"):Gn():Qi();case 1:case"end":return rn.stop()}},Bt)}));function on(){return Lt.apply(this,arguments)}return on}()});case 14:case"end":return jt.stop()}},ue)}));return function(at){return Nt.apply(this,arguments)}}(),So=function(ue){return M.a.createElement("div",null,M.a.createElement(h.a,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:ue}),M.a.createElement("div",{className:"c-grey-c tc mt10 mb20"},"\u6B63\u5728\u5224\u5206\u4E2D\u2026"))},Wa=function(){var ue=0,at=d.a.info({title:"\u4EA4\u5377\u4E2D",icon:null,className:"modal-footer-none",content:So(ue)}),Be=setInterval(function(){ue<=100?(ue+=2,at.update({content:So(ue)})):(at.destroy(),clearInterval(Be))},50)},Qi=function(){var Nt=Object(D.a)(I.a.mark(function ue(){var at;return I.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(Ge.Z)({categoryId:cn.categoryId,commit_method:1});case 2:return at=yt.sent,yt.next=5,lr({type:"exercise/setActionTabs",payload:Object(g.a)({},{removeEventListenerExitScreen:!0})});case 5:if((at==null?void 0:at.status)===0){Wa(),y.b.success(at==null?void 0:at.message),ii(!1);try{Gi.send(JSON.stringify({type:"toggleLockExit",data:!1})),Gi.send(JSON.stringify({type:"network-open",data:""}))}catch(pt){}setTimeout(function(){d.a.info({title:"\u4EA4\u5377\u6210\u529F\uFF01",okText:"\u786E\u5B9A",maskClosable:!1,keyboard:!1,onOk:function(){Object(Ve.b)(),Gn()}})},3e3)}case 6:case"end":return yt.stop()}},ue)}));return function(){return Nt.apply(this,arguments)}}(),Ao=function(){var Nt=Object(D.a)(I.a.mark(function ue(at,Be,yt,pt){return I.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:Ei(Be,at,null,function(){ge.question_status.find(function(Lt){return Lt.ques_id===Be}).ques_status=at?1:0,pt.user_answer=[],pt.user_answer.push(at),pt.repeat_answer||(pt.israp=!0),Cn(Object(g.a)({},ge))});case 1:case"end":return jt.stop()}},ue)}));return function(at,Be,yt,pt){return Nt.apply(this,arguments)}}(),Ka=function(){var Nt=Object(D.a)(I.a.mark(function ue(at,Be,yt,pt,Ut){return I.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:Ei(pt.question_id,at,null,function(){var on,Bt,Mt;pt.user_answer=[],pt.user_answer.push(at);var rn=Ut==null||((on=Ut.sub_exercise_questions)===null||on===void 0)?void 0:on.filter(function($n){var ln;return((ln=$n.user_answer)===null||ln===void 0?void 0:ln.length)===0});ge.question_status.find(function($n){return $n.ques_id===Be}).ques_status=(rn==null?void 0:rn.length)===(Ut==null||((Bt=Ut.sub_exercise_questions)===null||Bt===void 0)?void 0:Bt.length)?0:(rn==null?void 0:rn.length)>0&&(rn==null?void 0:rn.length)<(Ut==null||((Mt=Ut.sub_exercise_questions)===null||Mt===void 0)?void 0:Mt.length)?2:1,Cn(Object(g.a)({},ge))});case 1:case"end":return Lt.stop()}},ue)}));return function(at,Be,yt,pt,Ut){return Nt.apply(this,arguments)}}(),Ii=function(ue,at,Be){Ei(at,ue,null,function(){Be.user_answer=ue,Be.repeat_answer||(Be.israp=!0),ge.question_status.find(function(yt){return yt.ques_id===at}).ques_status=ue!=null&&ue.length?1:0,Cn(Object(g.a)({},ge))})},ca=function(ue,at,Be,yt,pt){if(!ue.replaceAll(" ","")){y.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}Ei(Be,at,ue,function(){ge.question_status.find(function(jt){return jt.ques_id===Be}).ques_status=yt.every(function(jt){return!!jt.answer_text})?1:ge.question_status.find(function(jt){return jt.ques_id===Be}).ques_status=yt.some(function(jt){return!!jt.answer_text})?2:0;var Ut={choice_id:at,answer_text:ue};pt.user_answer.filter(function(jt){return jt.choice_id!=at})?pt.user_answer.splice(at-1,1,Ut):pt.user_answer.push(Ut),pt.repeat_answer||(pt.israp=!0),Cn(Object(g.a)({},ge))})},To=function(ue,at,Be){if(!ue.replaceAll(" ","")){y.b.warning("\u56DE\u7B54\u4E0D\u80FD\u4E3A\u7A7A\u6216\u8005\u7EAF\u7A7A\u683C");return}Ei(at,null,ue,function(){ge.question_status.find(function(yt){return yt.ques_id===at}).ques_status=ue?1:0,Be.user_answer=[],Be.user_answer.push(ue),Be.repeat_answer||(Be.israp=!0),Cn(Object(g.a)({},ge))})},Yi=function(ue,at){var Be,yt,pt,Ut,jt,Lt,on;return M.a.createElement("div",null,M.a.createElement(p.a,{spinning:zr},M.a.createElement(i.a.Group,{disabled:(ge==null||((Be=ge.exercise)===null||Be===void 0)?void 0:Be.user_exercise_status)===1,defaultValue:ue==null||((yt=ue.user_answer)===null||yt===void 0)?void 0:yt[0],onChange:function(Mt){return Ao(Mt.target.value,ue==null?void 0:ue.question_id,at,ue)},className:ue.user_score&&"edu-radio-".concat(ue.user_score===ue.question_score?"green":"red")},ue==null||((pt=ue.question_choices)===null||pt===void 0)?void 0:pt.map(function(Bt,Mt){var rn,$n=ue.question_type==2,ln=$n?"":"".concat(oe[Mt],".");return M.a.createElement("div",{className:ae.a.answerWrap,key:Mt},M.a.createElement(i.a,{disabled:!ue.repeat_answer&&(ue==null||((rn=ue.user_answer)===null||rn===void 0)?void 0:rn.length)>0&&!ue.israp,value:Bt==null?void 0:Bt.choice_id},M.a.createElement("span",{className:"mr3"},ln),M.a.createElement(Je.a,{className:ae.a.renderHtml,value:Bt==null?void 0:Bt.choice_text})))}))),Object(Ce.t)()&&(ge==null||((Ut=ge.exercise)===null||Ut===void 0)?void 0:Ut.answer_open)&&((ge==null||((jt=ge.exercise)===null||jt===void 0)?void 0:jt.exercise_status)==3||(ge==null||((Lt=ge.exercise)===null||Lt===void 0)?void 0:Lt.user_exercise_status)==1)&&M.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",ue==null||((on=ue.standard_answer)===null||on===void 0)?void 0:on.map(function(Bt,Mt){return M.a.createElement("span",null,oe[Number(Bt)-1])})))},Go=function(ue,at,Be){var yt;return M.a.createElement("div",null,ue==null||((yt=ue.sub_exercise_questions)===null||yt===void 0)?void 0:yt.map(function(pt,Ut){var jt,Lt,on,Bt,Mt,rn,$n;return M.a.createElement("div",null,M.a.createElement("div",{style:{marginTop:20,userSelect:"none",alignItems:"center"}},M.a.createElement("span",{style:{flexShrink:0,fontSize:"14px",color:"#999"}},Be+1+"."+(Ut+1),"\uFF08\u5355\u9009\u9898 ",pt==null?void 0:pt.question_score,"\u5206\uFF09"),M.a.createElement("br",null),M.a.createElement(Je.a,{style:{marginLeft:27},value:pt==null?void 0:pt.question_title})),M.a.createElement(i.a.Group,{disabled:(ge==null||((jt=ge.exercise)===null||jt===void 0)?void 0:jt.user_exercise_status)===1,style:{marginLeft:27},defaultValue:pt==null||((Lt=pt.user_answer)===null||Lt===void 0)?void 0:Lt[0],onChange:function(Vn){return Ka(Vn.target.value,ue==null?void 0:ue.question_id,Ut,pt,ue)},className:pt.user_score&&"edu-radio-".concat(pt.user_score===pt.question_score?"green":"red")},pt==null||((on=pt.question_choices)===null||on===void 0)?void 0:on.map(function(ln,Vn){var Vr,xi=pt.question_type==2,Xn=xi?"":"".concat(oe[Vn],".");return M.a.createElement("div",{className:ae.a.answerWrap,key:Vn},M.a.createElement(i.a,{disabled:!pt.repeat_answer&&(pt==null||((Vr=pt.user_answer)===null||Vr===void 0)?void 0:Vr.length)>0,value:ln==null?void 0:ln.choice_id},M.a.createElement("span",{className:"mr3"},Xn),M.a.createElement(Je.a,{className:ae.a.renderHtml,value:ln==null?void 0:ln.choice_text})))})),Object(Ce.t)()&&(ge==null||((Bt=ge.exercise)===null||Bt===void 0)?void 0:Bt.answer_open)&&((ge==null||((Mt=ge.exercise)===null||Mt===void 0)?void 0:Mt.exercise_status)==3||(ge==null||((rn=ge.exercise)===null||rn===void 0)?void 0:rn.user_exercise_status)==1)&&M.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",pt==null||(($n=pt.standard_answer)===null||$n===void 0)?void 0:$n.map(function(ln,Vn){return M.a.createElement("span",null,oe[Number(ln)-1])})))}))},Vo=function(ue,at){var Be,yt,pt,Ut,jt;return M.a.createElement("div",null,M.a.createElement(p.a,{spinning:zr},M.a.createElement(O.a.Group,{disabled:(ge==null||((Be=ge.exercise)===null||Be===void 0)?void 0:Be.user_exercise_status)===1,defaultValue:ue==null?void 0:ue.user_answer,onChange:function(on){return Ii(on,ue==null?void 0:ue.question_id,ue)},className:ue.user_score&&"edu-checkbox-".concat(ue.user_score===ue.question_score?"green":"red")},ue==null||((yt=ue.question_choices)===null||yt===void 0)?void 0:yt.map(function(Lt,on){var Bt,Mt="".concat(oe[on],".");return M.a.createElement("div",{className:ae.a.answerWrap},M.a.createElement(O.a,{disabled:!ue.repeat_answer&&(ue==null||((Bt=ue.user_answer)===null||Bt===void 0)?void 0:Bt.length)>0&&!ue.israp,value:Lt==null?void 0:Lt.choice_id},M.a.createElement("span",{className:"mr3"},Mt),M.a.createElement(Je.a,{className:ae.a.renderHtml,value:Lt==null?void 0:Lt.choice_text})))}))),Object(Ce.t)()&&(ge==null||((pt=ge.exercise)===null||pt===void 0)?void 0:pt.answer_open)&&(ge==null||((Ut=ge.exercise)===null||Ut===void 0)?void 0:Ut.exercise_status)==3&&M.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A",ue==null||((jt=ue.standard_answer)===null||jt===void 0)?void 0:jt.map(function(Lt,on){return M.a.createElement("span",null,oe[Number(Lt)-1])})))},Xo=function(ue,at){return M.a.createElement(Ke,{item:ue,answerData:ge,onBlur:function(yt,pt,Ut){return ca(yt,pt,ue==null?void 0:ue.question_id,Ut,ue)}})},Ha=function(ue,at){return Lr?M.a.createElement(Tt,{item:ue,answerData:ge,onBlur:function(yt,pt,Ut){return Ei(ue==null?void 0:ue.question_id,null,yt,void 0,pt,Ut)},isEducation:Lr}):M.a.createElement(St,{item:ue,answerData:ge,onBlur:function(yt){return To(yt,ue==null?void 0:ue.question_id,ue)},isEducation:Lr})},za=function(ue,at){return M.a.createElement(fe,{item:ue,answerData:ge})},Ni=function(ue,at){return M.a.createElement(ie,{item:ue,answerData:ge})},jr=function(ue,at,Be){var yt,pt,Ut=ge==null||((yt=ge.exercise_question_types)===null||yt===void 0)?void 0:yt.find(function(jt){return jt.question_type===at});return M.a.createElement(M.a.Fragment,null,M.a.createElement("h1",{className:"font14 current",onClick:function(){rr[at]=!rr[at],Or(Object(g.a)({},rr))}},!rr[at]&&M.a.createElement(Ue.a,null),rr[at]&&M.a.createElement(Me.a,null),M.a.createElement("span",{className:"ml5 c-grey-666"},ue)),M.a.createElement("ul",{className:ae.a.answerSheet,key:at},!rr[at]&&(Ut==null||((pt=Ut.items)===null||pt===void 0)?void 0:pt.map(function(jt,Lt){if(jt.question_type===at){var on,Bt;return M.a.createElement("li",{onClick:function(){var rn;if(!Mi&&(ge==null||((rn=ge.exercise)===null||rn===void 0)?void 0:rn.user_exercise_status)===0&&Object(Ce.t)()){var $n,ln,Vn,Vr;if(!(($n=ge.exercise_question_types)!==null&&$n!==void 0&&(ln=$n[Rn])!==null&&ln!==void 0&&(Vn=ln.items)!==null&&Vn!==void 0&&(Vr=Vn[Ln])!==null&&Vr!==void 0&&Vr.repeat_answer)){li(!0),Ua(3),Pi({oneindex:Be,twoindex:Lt});return}}mi(Be),gi(Lt);var xi="Anchor_".concat(at,"_").concat(Lt),Xn=document.getElementById(xi);Xn&&setTimeout(function(){return Xn.scrollIntoView({block:"start",behavior:"smooth"})})},key:Lt,className:(ge==null||((on=ge.question_status)===null||on===void 0)?void 0:on.some(function(Mt){return Mt.ques_id===jt.question_id&&(Mt==null?void 0:Mt.ques_status)===1}))&&ae.a.active},Lt+1,(ge==null||((Bt=ge.question_status)===null||Bt===void 0)?void 0:Bt.some(function(Mt){return Mt.ques_id===jt.question_id&&(Mt==null?void 0:Mt.ques_status)===2}))&&M.a.createElement("div",{style:{height:3,background:"#0152d9",position:"absolute",width:26,bottom:0}}))}}))))},Qo=function(ue,at){var Be,yt,pt,Ut,jt,Lt,on,Bt,Mt=(ue==null?void 0:ue.question_type)==5?ue==null?void 0:ue.shixun_name:ue==null?void 0:ue.question_title;return M.a.createElement("div",{className:ae.a.questionItem,id:"Anchor_".concat(ue==null?void 0:ue.question_type,"_").concat(at)},M.a.createElement("div",{style:{display:"flex",marginTop:20,userSelect:"none"}},M.a.createElement("span",{style:{flexShrink:0},className:"font18"},at+1,"."),M.a.createElement(Je.a,{value:ue==null?void 0:ue.question_title}),M.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",ue==null?void 0:ue.question_score,"\u5206\uFF09",(ue==null?void 0:ue.question_type)===7?"\u5171".concat(ue==null||((Be=ue.sub_exercise_questions)===null||Be===void 0)?void 0:Be.length,"\u5C0F\u9898"):""," "),!(ue!=null&&ue.repeat_answer)&&M.a.createElement("span",{style:{color:"#FA6400 ",marginLeft:10,fontSize:16}},"\u6CE8\u610F\uFF1A\u8BE5\u9898\u4E0D\u5141\u8BB8\u91CD\u590D\u7B54\u9898"),!!(ue!=null&&(yt=ue.schools)!==null&&yt!==void 0&&yt.length)&&M.a.createElement(C.a,{title:"\u8BE5\u5B9E\u8BAD\u9898\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},M.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"}))),(ue==null?void 0:ue.question_type)==0&&Yi(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==2&&Yi(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==1&&Vo(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==3&&Xo(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==4&&Ha(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==5&&za(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==6&&Ni(ue,ue==null?void 0:ue.question_type),(ue==null?void 0:ue.question_type)==7&&Go(ue,ue==null?void 0:ue.question_type,at),!!(ue!=null&&(pt=ue.answer_comments)!==null&&pt!==void 0&&pt.length)&&M.a.createElement("div",{className:"mt30"},ue==null||((Ut=ue.answer_comments)===null||Ut===void 0)?void 0:Ut.map(function(rn,$n){var ln,Vn;return M.a.createElement("div",null,M.a.createElement(B.a,{align:"middle",gutter:[0,10]},M.a.createElement(T.a,{flex:"50px"},M.a.createElement("img",{src:gt.a.API_SERVER+"/images/"+((ln=rn.user)===null||ln===void 0?void 0:ln.image_url),width:"40",style:{borderRadius:40}})),M.a.createElement(T.a,{flex:"1"},rn.updated_at,M.a.createElement("br",null),(Vn=rn.user)===null||Vn===void 0?void 0:Vn.name),M.a.createElement(T.a,{className:"c-grey-c"},rn.shixun_chanllge_position&&M.a.createElement("span",null,"\u7B2C",rn.shixun_chanllge_position,"\u5173"),ue.question_type!==4&&M.a.createElement("span",null,"\u539F\u59CB\u5F97\u5206",rn.origin_score,"\u5206 \uFF0C")," \u4FEE\u6B63\u4E3A",rn.score,"\u5206")),rn.comment&&M.a.createElement(B.a,{align:"middle",gutter:[0,10]},M.a.createElement(T.a,{flex:"50px"}),M.a.createElement(T.a,{flex:"1"},M.a.createElement(Fe,{autoSize:!0,value:rn.comment,disabled:!0}))))})),M.a.createElement("div",{className:ae.a.itemType},M.a.createElement(B.a,null,M.a.createElement(T.a,{flex:"1"}),M.a.createElement(T.a,null,(ue==null?void 0:ue.question_type)<3&&(ue==null?void 0:ue.standard_answer_show)&&M.a.createElement("span",{className:"font16 ml20"},"\u6B63\u786E\u7B54\u6848\uFF1A",ue==null?void 0:ue.standard_answer_show),(Object(Ce.c)()||Object(Ce.t)()&&(ge==null||((jt=ge.exercise)===null||jt===void 0)?void 0:jt.user_exercise_status)>0&&(ge==null||((Lt=ge.exercise)===null||Lt===void 0)?void 0:Lt.open_score))&&M.a.createElement("span",{className:"font16 ml20"},(ue==null?void 0:ue.user_score)&&M.a.createElement("span",null,M.a.createElement("span",{className:ve[Number(ue==null?void 0:ue.answer_status)]||"c-orange-ff9"},ue==null?void 0:ue.user_score)," \u5206"),!(ue!=null&&ue.user_score)&&M.a.createElement("span",{className:"c-red"},"\u672A\u8BC4")),(ue==null?void 0:ue.question_type)==5&&(ge==null||((on=ge.exercise)===null||on===void 0)?void 0:on.user_exercise_status)===0&&(ue==null?void 0:ue.answer_status)!=3&&M.a.createElement(A.a,{type:"primary",className:"font16 ml20",onClick:function(){return Xi(ue)}},"\u8FDB\u5165\u7B54\u9898"),Object(Ce.t)()&&(ge==null||((Bt=ge.exercise)===null||Bt===void 0)?void 0:Bt.user_exercise_status)===0&&(ue==null?void 0:ue.question_type)==6&&M.a.createElement(A.a,{type:"primary",className:"font16 ml20",onClick:function(){return Co(ue)}},"\u8FDB\u5165\u7B54\u9898")))))},ha=function(ue,at){return M.a.createElement(U.Fragment,null,ue.question_type===0&&jr("\u5355\u9009\u9898",0,at),ue.question_type===1&&jr("\u591A\u9009\u9898",1,at),ue.question_type===2&&jr("\u5224\u65AD\u9898",2,at),ue.question_type===3&&jr("\u586B\u7A7A\u9898",3,at),ue.question_type===4&&jr("\u7B80\u7B54\u9898",4,at),ue.question_type===5&&jr("\u5B9E\u8BAD\u9898",5,at),ue.question_type===6&&jr("\u7F16\u7A0B\u9898",6,at),ue.question_type===7&&jr("\u7EC4\u5408\u9898",7,at))},wo=function(ue){var at=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Be=["","\u5341","\u767E","\u5343","\u4E07"];ue=parseInt(ue);var yt=function(Lt){for(var on=Lt.toString().split("").reverse(),Bt="",Mt=0;Mt<on.length;Mt++)Bt=(Mt==0&&on[Mt]==0||Mt>0&&on[Mt]==0&&on[Mt-1]==0?"":at[on[Mt]]+(on[Mt]==0?Be[0]:Be[Mt]))+Bt;return Bt},pt=Math.floor(ue/1e4),Ut=ue%1e4;return Ut.toString().length<4&&(Ut="0"+Ut),pt?yt(pt)+"\u4E07"+yt(Ut):yt(ue)},Ji=function(){var ue,at,Be,yt,pt,Ut,jt,Lt,on,Bt,Mt,rn;return M.a.createElement(U.Fragment,{key:Rn},M.a.createElement("div",{className:"pt20"},M.a.createElement("span",{className:"font16 c-light-primary"},wo(Rn+1),"\u3001",ge==null||((ue=ge.exercise_question_types)===null||ue===void 0||((at=ue[Rn])===null||at===void 0))?void 0:at.name),M.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",ge==null||((Be=ge.exercise_question_types)===null||Be===void 0||((yt=Be[Rn])===null||yt===void 0))?void 0:yt.count,"\u9898\uFF1B",(ge==null||((pt=ge.exercise_question_types)===null||pt===void 0||((Ut=pt[Rn])===null||Ut===void 0))?void 0:Ut.question_type)===7?"\u5305\u542B".concat(ge==null||((jt=ge.exercise_question_types)===null||jt===void 0||((Lt=jt[Rn])===null||Lt===void 0))?void 0:Lt.sub_questions_count,"\u5C0F\u9898"):""," \u5171",ge==null||((on=ge.exercise_question_types)===null||on===void 0||((Bt=on[Rn])===null||Bt===void 0))?void 0:Bt.score,"\u5206\uFF09")),M.a.createElement(U.Fragment,{key:Ln},Qo(ge==null||((Mt=ge.exercise_question_types)===null||Mt===void 0||((rn=Mt[Rn].items)===null||rn===void 0))?void 0:rn[Ln],Ln)))};return M.a.createElement(p.a,{size:"large",spinning:Dr},Xt&&(ge==null||((Ct=ge.exercise)===null||Ct===void 0)?void 0:Ct.user_exercise_status)===0&&M.a.createElement(me.a,{exerciseUserInfo:Jr.exerciseUserInfo,iframe:Ma}),M.a.createElement("iframe",{style:{display:ai},id:"iframeShixuns",className:ae.a.iframe,src:un,ref:Ma,frameBorder:"0"}),M.a.createElement("section",{className:"edu-container ".concat(Lr&&ae.a.wrpAnswer)},M.a.createElement("section",{className:"animated fadeIn ".concat(Lr&&ae.a.eduTitle)},M.a.createElement("aside",{className:"mt10"},Object(we.p)()&&M.a.createElement(Y.a,{separator:">"},M.a.createElement(Y.a.Item,null,M.a.createElement(K.a,{to:"/"},"\u8BD5\u5377")),M.a.createElement(Y.a.Item,null,(wt=Tr.userInfo)===null||wt===void 0?void 0:wt.real_name)),!Object(we.p)()&&br.showHeaderFooter&&M.a.createElement(Y.a,{separator:">"},M.a.createElement(Y.a.Item,null,M.a.createElement(K.a,{to:"/classrooms/".concat(cn.coursesId,"/exercise")},(lt=Tr.userInfo)===null||lt===void 0||((Ft=lt.course)===null||Ft===void 0)?void 0:Ft.course_name)),M.a.createElement(Y.a.Item,null,M.a.createElement(K.a,{to:"/classrooms/".concat(cn.coursesId,"/exercise")},"\u8BD5\u5377")),M.a.createElement(Y.a.Item,null,M.a.createElement(K.a,{to:"/classrooms/".concat(cn.coursesId,"/exercise/").concat(cn.categoryId,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),M.a.createElement(Y.a.Item,null,($t=Tr.userInfo)===null||$t===void 0?void 0:$t.real_name))),M.a.createElement("aside",{className:[ae.a.title,"mt10"].join(" ")},M.a.createElement(B.a,{style:{width:"100%"},align:"middle"},M.a.createElement(T.a,{style:{flex:"1"}},M.a.createElement("div",{className:ae.a.title},(br==null?void 0:br.showHeaderFooter)&&M.a.createElement(K.a,{to:Object(we.p)()?"/":"/classrooms/".concat(cn.coursesId,"/exercise/").concat(cn.categoryId,"/detail")},M.a.createElement(_e.a,{className:"font16 c-black"})),Object(we.z)(ge==null||((Rt=ge.exercise)===null||Rt===void 0)?void 0:Rt.exercise_status),M.a.createElement("strong",{className:"font24 ml5"},ge==null||((Zt=ge.exercise)===null||Zt===void 0)?void 0:Zt.exercise_name))),M.a.createElement(T.a,{style:{display:"flex"}},Object(Ce.c)()&&M.a.createElement(A.a,{type:"primary",onClick:bi},"\u6253\u56DE\u91CD\u505A"),M.a.createElement(T.a,null,((ge==null||((dn=ge.exercise)===null||dn===void 0)?void 0:dn.commit_status)==2||(ge==null||((Jt=ge.exercise)===null||Jt===void 0)?void 0:Jt.commit_status)==1)&&Object(Ce.c)()&&!Object(we.p)()&&M.a.createElement(A.a,{type:"primary",onClick:function(){return Z.d.push("/classrooms/".concat(cn.coursesId,"/exercise/").concat(cn.categoryId,"/export/").concat(cn.login))}},M.a.createElement(Ie.a,null),"\u5BFC\u51FA")),!(Object(Ce.c)()||Object(Ce.t)()&&(ge==null||((Gt=ge.exercise)===null||Gt===void 0)?void 0:Gt.user_exercise_status)==1)&&!!(ge!=null&&(fn=ge.exercise)!==null&&fn!==void 0&&fn.left_time)&&M.a.createElement("aside",{className:"".concat(ae.a.countDown," ").concat(Oa)},M.a.createElement("div",null,"\u5269\u4F59\u65F6\u95F4:",M.a.createElement(Ze,{value:vn,onFinish:Yr})),M.a.createElement(A.a,{className:"ml10",type:"primary",onClick:Yr,ghost:!0},M.a.createElement("span",{className:"iconfont icon-shuaxin2 mr5"}),"\u5237\u65B0")),Object(Ce.t)()&&(ge==null||((On=ge.exercise)===null||On===void 0)?void 0:On.user_exercise_status)===0&&M.a.createElement("aside",{className:Lr?ae.a.eduSubmit:""},M.a.createElement(A.a,{style:{width:"60px",height:"28px",marginLeft:10},type:"primary",onClick:function(){return da(!1)}},"\u4EA4\u5377")))))),oa.status===0&&M.a.createElement(B.a,{className:Lr?"mt70":"mt10"},M.a.createElement(T.a,{flex:ir?"316px":"16px",className:Lr?"mb100":""},M.a.createElement("section",{style:{position:"sticky",top:0,zIndex:1}},!Lr&&Di&&M.a.createElement(ke.a,{id:cn.categoryId,number:(ge==null||((Pn=ge.exercise)===null||Pn===void 0)?void 0:Pn.photo_count)-(ge==null||((ft=ge.exercise)===null||ft===void 0)?void 0:ft.take_photo),take_photo:ge==null||((Wt=ge.exercise)===null||Wt===void 0)?void 0:Wt.take_photo,ref:zi,time:(Qt=ge.exercise)===null||Qt===void 0?void 0:Qt.left_time,update:ei,supportCamera:function(ue){ue===2?(ei(),Hi(!0),an(tn==null?void 0:tn.screen_open)):ue===1&&setTimeout(function(){return Hr.history.push("/")},3e3)}}),M.a.createElement("div",{className:"relative",style:{minHeight:236}},Lr&&M.a.createElement("section",null,Di&&M.a.createElement("div",{className:ae.a.eduVideo},M.a.createElement(ke.a,{id:cn.categoryId,number:(ge==null||((mn=ge.exercise)===null||mn===void 0)?void 0:mn.photo_count)-(ge==null||((pn=ge.exercise)===null||pn===void 0)?void 0:pn.take_photo),take_photo:ge==null||((Dn=ge.exercise)===null||Dn===void 0)?void 0:Dn.take_photo,ref:zi,time:(X=ge.exercise)===null||X===void 0?void 0:X.left_time,update:ei,supportCamera:function(ue){ue===2?(ei(),Hi(!0),an(tn==null?void 0:tn.screen_open)):ue===1&&setTimeout(function(){return Hr.history.push("/")},3e3)}})),ir&&M.a.createElement(B.a,{className:ae.a.eduUsername,style:{background:"#fff",padding:"16px 20px"}},M.a.createElement(T.a,null,"\u59D3\u540D\uFF1A",(ge==null||((f=ge.exercise)===null||f===void 0)?void 0:f.user_name)||"- -"),M.a.createElement(T.a,null,M.a.createElement(z.a,{style:{margin:"0 25px"},type:"vertical"})),M.a.createElement(T.a,null,"\u5B66\u53F7\uFF1A",(ge==null||((w=ge.exercise)===null||w===void 0)?void 0:w.student_id)||"- -")),M.a.createElement("div",{className:ae.a.eduTip},M.a.createElement("div",{className:"c-grey-666 tc"},"\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u5982\u9047\u95EE\u9898\uFF0C\u8BF7\u62E8\u6253\u4EE5\u4E0B\u7535\u8BDD"),M.a.createElement("div",{className:"font16 tc blod"},"010-62781166"),M.a.createElement("div",{className:"font16 tc blod"},"010-62799826"),M.a.createElement("div",{className:"font16 tc blod"},"18910624893"),M.a.createElement("div",{className:"font16 tc blod"},"13366506792")),Object(Ce.t)()&&M.a.createElement(B.a,{className:ae.a.eduQrcode,align:"middle"},M.a.createElement(T.a,null,M.a.createElement(he.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(cn.categoryId,"&login=").concat(cn.login,"&cookie=").concat(Object(we.E)("_educoder_session"))})),M.a.createElement(T.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",M.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"))),!Lr&&M.a.createElement("section",null,ir&&M.a.createElement(T.a,{flex:"1",style:{background:"#fff",height:"90px",marginBottom:"10px",padding:"16px 20px"}},M.a.createElement("p",null,"\u59D3\u540D\uFF1A",(ge==null||((G=ge.exercise)===null||G===void 0)?void 0:G.user_name)||"- -"),M.a.createElement("p",null,"\u5B66\u53F7\uFF1A",(ge==null||((ee=ge.exercise)===null||ee===void 0)?void 0:ee.student_id)||"- -")),Object(Ce.t)()&&((V=ge.exercise)===null||V===void 0?void 0:V.user_exercise_status)===0&&((Se=ge.exercise)===null||Se===void 0?void 0:Se.open_phone_video_recording)&&M.a.createElement(B.a,{className:ae.a.eduQrcode,style:{marginTop:10},align:"middle"},M.a.createElement(T.a,null,M.a.createElement(he.a,{value:"https://".concat(document.domain,"/live-push.html?id=").concat(cn.categoryId,"&login=").concat(cn.login,"&cookie=").concat(Object(we.E)("_educoder_session"))})),M.a.createElement(T.a,{className:"ml15"},"\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B",M.a.createElement("br",null),"\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236")),ir&&M.a.createElement("aside",{className:"bg-white p16 mt10"},M.a.createElement(B.a,null,M.a.createElement(T.a,{span:8},M.a.createElement("span",{className:"font16 blod"},"\u7B54\u9898\u5361")),M.a.createElement(T.a,{span:16},Object(Ce.t)()&&M.a.createElement("div",{className:"tr",style:{display:"flex",alignItems:"center",justifyContent:"end"}},M.a.createElement("span",{className:ae.a.answerYes}),"\u5DF2\u7B54",M.a.createElement("span",{style:{width:13,height:13,display:"flex",flexDirection:"column-reverse"},className:"".concat(ae.a.answerNo," ml10")},M.a.createElement("div",{style:{height:"10%",background:"#0152d9"}})),"\u90E8\u5206\u7B54\u9898",M.a.createElement("span",{className:"".concat(ae.a.answerNo," ml10")}),"\u672A\u7B54"))),M.a.createElement("aside",{className:ae.a.answerInfo},M.a.createElement(B.a,null,Object(Ce.t)()&&M.a.createElement(M.a.Fragment,null,M.a.createElement(T.a,{span:12},"\u7B54\u9898\u8FDB\u5EA6"),M.a.createElement(T.a,{span:12,className:"tr c-blue"},ge==null||((st=ge.question_status)===null||st===void 0||((je=st.filter(function(Nt){return!!Nt.ques_status}))===null||je===void 0))?void 0:je.length," / ",ge==null||((Pt=ge.exercise_types)===null||Pt===void 0)?void 0:Pt.q_counts),M.a.createElement(T.a,{span:24},M.a.createElement(h.a,{trailColor:"#c3ced2",percent:(ge==null||((ut=ge.question_status)===null||ut===void 0||((Vt=ut.filter(function(Nt){return!!Nt.ques_status}))===null||Vt===void 0))?void 0:Vt.length)/(ge==null||((qt=ge.exercise_types)===null||qt===void 0)?void 0:qt.q_counts)*100,showInfo:!1}))),M.a.createElement(T.a,null,M.a.createElement("span",{className:"c-grey-333"},"\u5171 ",M.a.createElement("span",{className:"c-blue-4ca"},(ge==null||((yn=ge.exercise_types)===null||yn===void 0)?void 0:yn.q_counts)||(ge==null||((Tn=ge.exercise_scores)===null||Tn===void 0||((wn=Tn.exercise_types)===null||wn===void 0))?void 0:wn.q_counts))," \u9898\uFF1A"),M.a.createElement("span",{className:"c-grey-333"},"\u6EE1\u5206 ",M.a.createElement("span",{className:"c-blue-4ca"},(ge==null||((kn=ge.exercise_types)===null||kn===void 0)?void 0:kn.q_scores)||(ge==null||((mr=ge.exercise_scores)===null||mr===void 0||((Kr=mr.exercise_types)===null||Kr===void 0))?void 0:Kr.q_scores))," \u5206")))),M.a.createElement(B.a,null,M.a.createElement(T.a,{flex:"1"},M.a.createElement("aside",{className:ae.a.cardList},ge==null||((Zn=ge.exercise_question_types)===null||Zn===void 0)?void 0:Zn.map(function(Nt,ue){return M.a.createElement(U.Fragment,{key:Nt.question_type},ha(Nt,ue))}))))),M.a.createElement("div",{className:ae.a.fold,onClick:function(){return Er(!ir)}},ir&&M.a.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"}),!ir&&M.a.createElement("span",{className:"icon-youjiantou iconfont c-grey-c"})))))),M.a.createElement(T.a,{flex:"1"},M.a.createElement("section",{style:{minHeight:400,position:"relative"},className:[ae.a.bg,"pl30","pb30","mb50","ml20"].join(" ")},M.a.createElement("div",{style:{maxHeight:600,overflow:"hidden auto",paddingRight:30}},Ji()),M.a.createElement("div",{style:{marginTop:60,textAlign:"center",paddingRight:30}},(Rn!=0||Ln!=0)&&M.a.createElement(A.a,{className:"".concat(ae.a.submitButton," mr10"),type:"default",onClick:function(){var ue;if(!Mi&&(ge==null||((ue=ge.exercise)===null||ue===void 0)?void 0:ue.user_exercise_status)===0&&Object(Ce.t)()){var at,Be,yt,pt;if(!((at=ge.exercise_question_types)!==null&&at!==void 0&&(Be=at[Rn])!==null&&Be!==void 0&&(yt=Be.items)!==null&&yt!==void 0&&(pt=yt[Ln])!==null&&pt!==void 0&&pt.repeat_answer)){li(!0),Ua(1);return}}ge.exercise_question_types[Rn].items[Ln].israp=!1,Cn(Object(g.a)({},ge)),Ln===0?(Rn-=1,Ln=ge.exercise_question_types[Rn].items.length-1):Ln-=1,mi(Rn),gi(Ln)}},"\u4E0A\u4E00\u9898"),!(Rn===(ge==null||((tr=ge.exercise_question_types)===null||tr===void 0)?void 0:tr.length)-1&&Ln===(ge==null||((Sr=ge.exercise_question_types)===null||Sr===void 0||((Rr=Sr[Rn])===null||Rr===void 0||((gr=Rr.items)===null||gr===void 0)))?void 0:gr.length)-1)&&M.a.createElement(A.a,{className:ae.a.submitButton,type:"primary",onClick:function(){var ue;if(!Mi&&(ge==null||((ue=ge.exercise)===null||ue===void 0)?void 0:ue.user_exercise_status)===0&&Object(Ce.t)()){var at,Be,yt,pt;if(!((at=ge.exercise_question_types)!==null&&at!==void 0&&(Be=at[Rn])!==null&&Be!==void 0&&(yt=Be.items)!==null&&yt!==void 0&&(pt=yt[Ln])!==null&&pt!==void 0&&pt.repeat_answer)){li(!0),Ua(2);return}}ge.exercise_question_types[Rn].items[Ln].israp=!1,Cn(Object(g.a)({},ge)),ge.exercise_question_types[Rn].items.length-1===Ln?(Rn=Rn+1,Ln=0):Ln=Ln+1,mi(Rn),gi(Ln)}},"\u4E0B\u4E00\u9898"))))),oa.status!==0&&M.a.createElement(it,{data:oa}),M.a.createElement(d.a,{title:"\u6CE8\u610F",visible:yo,onCancel:function(){return li(!1)},footer:!1},M.a.createElement("div",null,M.a.createElement("p",{style:{marginBottom:0}},"\u79BB\u5F00\u8BE5\u9898\u540E\u4E0D\u5141\u8BB8\u518D\u6B21\u4FEE\u6539\u7B54\u6848\uFF0C\u786E\u8BA4\u79BB\u5F00\u5417\uFF1F"),M.a.createElement("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between"}},M.a.createElement(O.a,{checked:Mi,onChange:function(ue){Na(ue.target.checked)}},"\u4E0B\u6B21\u4E0D\u518D\u663E\u793A"),M.a.createElement("div",null,M.a.createElement(A.a,{onClick:function(){ge.exercise_question_types[Rn].items[Ln].israp?(ge.exercise_question_types[Rn].items[Ln].israp=!0,Cn(Object(g.a)({},ge))):ge.exercise_question_types[Rn].items[Ln].israp===""&&(ge.exercise_question_types[Rn].items[Ln].israp=!0,Cn(Object(g.a)({},ge))),li(!1)}},"\u6211\u518D\u60F3\u60F3"),M.a.createElement(A.a,{onClick:function(){ge.exercise_question_types[Rn].items[Ln].israp=!1,Cn(Object(g.a)({},ge)),la===1?(Ln===0?(Rn-=1,Ln=ge.exercise_question_types[Rn].items.length-1):Ln-=1,mi(Rn),gi(Ln)):la===2?(ge.exercise_question_types[Rn].items.length-1===Ln?(Rn=Rn+1,Ln=0):Ln=Ln+1,mi(Rn),gi(Ln)):(mi(ui.oneindex),gi(ui.twoindex)),li(!1)},type:"primary",style:{marginLeft:30}},"\u786E\u8BA4")))))))},bt=De.default=Object(Z.a)(function(mt){var Re=mt.loading,qe=mt.user,vt=mt.exercise,Ct=mt.globalSetting;return{globalSetting:Ct,user:qe,exercise:vt,loading:Re.effects}})(He)},NhNJ:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAAA+CAYAAACV4fZsAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQlYlOXavmeFAYZ9UHbEHcR918o09WipZWlZWXbaT1lWp5NlJ/P0V7ZYnXbbVytN0yxLzdxzyxXBHRFBlgEFhmWY9b/uBwcBUTymiPK91+U1yHzzzffe3/vd7/3cz/O+qFBPc7vdqvqOUd5XEFAQUBA4lwioVCr36c5XJynVRVbTpk2r89iUlBSF2M7lHVPOpSDQBBBITEysk5imTp160u/rIrGTSKc6aZGsPMRkNpvlWIvFIq9Wq1UhrCYwwJQuKgicTwS8vb2FqIxGo7yaTCZ5JbFVJ7Ha5FWDfDyk5SEskhWJiiQVExOjKi8vV1VUVMhnbDabQlzn844q51YQaAII6PV6ISovLy+3wWBwZ2RkuElmJDKSWHUCq05eVeRTm7TS0tLUJCyTyaS2WCz8WR0YGKhyOBzyrwlgqnRRQUBBoAEQ0Gq1bv4rLCwkabmMRqPLbDa7SGDx8fGuushLCKgu0goLC1Pn5eVpjEYjiUtjtVo1vr6+KqfTqXK5XPLaAH1SvkJBQEHgEkZAo9G41Wq1m6+lpaUkLqfRaHRaLBZXWFiYMy8vz1UXedUgrrFjx6qptDykpdVqtaV+8YbiyCET3FqvMW6Vpq0K8LuEcVS6piCgIHABEHADJSq3c4/KUTHHP2vJZ74laeUOh8NRnbxmz57t4qUxZKwiLvpaK1asUJvNZrW3tzc5S1sQNSS6IiDxG6hUSRegL8pXKggoCDRFBNzuZK+ilHEhmUsOk7ysV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bvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NvD2:function(ze,De,W){"use strict";W.d(De,"a",function(){return A});var q=W("Kwbf");function z(j,B){var L=new Set;return j.forEach(function(T){B.has(T)||L.add(T)}),L}function P(j){var B=j||{},L=B.disabled,T=B.disableCheckbox,v=B.checkable;return!!(L||T)||v===!1}function Y(j,B,L,T){for(var v=new Set(j),C=new Set,k=0;k<=L;k+=1){var O=B.get(k)||new Set;O.forEach(function(i){var u=i.key,h=i.node,R=i.children,y=R===void 0?[]:R;v.has(u)&&!T(h)&&y.filter(function(g){return!T(g.node)}).forEach(function(g){v.add(g.key)})})}for(var b=new Set,p=L;p>=0;p-=1){var c=B.get(p)||new Set;c.forEach(function(i){var u=i.parent,h=i.node;if(T(h)||!i.parent||b.has(i.parent.key))return;if(T(i.parent.node)){b.add(u.key);return}var R=!0,y=!1;(u.children||[]).filter(function(g){return!T(g.node)}).forEach(function(g){var D=g.key,S=v.has(D);R&&!S&&(R=!1),!y&&(S||C.has(D))&&(y=!0)}),R&&v.add(u.key),y&&C.add(u.key),b.add(u.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(z(C,v))}}function F(j,B,L,T,v){for(var C=new Set(j),k=new Set(B),O=0;O<=T;O+=1){var b=L.get(O)||new Set;b.forEach(function(u){var h=u.key,R=u.node,y=u.children,g=y===void 0?[]:y;!C.has(h)&&!k.has(h)&&!v(R)&&g.filter(function(D){return!v(D.node)}).forEach(function(D){C.delete(D.key)})})}k=new Set;for(var p=new Set,c=T;c>=0;c-=1){var i=L.get(c)||new Set;i.forEach(function(u){var h=u.parent,R=u.node;if(v(R)||!u.parent||p.has(u.parent.key))return;if(v(u.parent.node)){p.add(h.key);return}var y=!0,g=!1;(h.children||[]).filter(function(D){return!v(D.node)}).forEach(function(D){var S=D.key,d=C.has(S);y&&!d&&(y=!1),!g&&(d||k.has(S))&&(g=!0)}),y||C.delete(h.key),g&&k.add(h.key),p.add(h.key)})}return{checkedKeys:Array.from(C),halfCheckedKeys:Array.from(z(k,C))}}function A(j,B,L,T){var v=[],C;T?C=T:C=P;var k=new Set(j.filter(function(c){var i=!!L[c];return i||v.push(c),i})),O=new Map,b=0;Object.keys(L).forEach(function(c){var i=L[c],u=i.level,h=O.get(u);h||(h=new Set,O.set(u,h)),h.add(i),b=Math.max(b,u)}),Object(q.a)(!v.length,"Tree missing follow keys: ".concat(v.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var p;return B===!0?p=Y(k,O,b,C):p=F(k,B.halfCheckedKeys,O,b,C),p}},OLES:function(ze,De,W){"use strict";var q=W("U8pU"),z=W("VTBJ"),P=W("Ff2n"),Y=W("q1tI"),F=W("uciX"),A=W("7ixt"),j=function(k){var O=k.overlay,b=k.prefixCls,p=k.id,c=k.overlayInnerStyle;return Y.createElement("div",{className:"".concat(b,"-inner"),id:p,role:"tooltip",style:c},typeof O=="function"?O():O)},B=j,L=function(k,O){var b=k.overlayClassName,p=k.trigger,c=p===void 0?["hover"]:p,i=k.mouseEnterDelay,u=i===void 0?0:i,h=k.mouseLeaveDelay,R=h===void 0?.1:h,y=k.overlayStyle,g=k.prefixCls,D=g===void 0?"rc-tooltip":g,S=k.children,d=k.onVisibleChange,l=k.afterVisibleChange,o=k.transitionName,a=k.animation,x=k.placement,E=x===void 0?"right":x,m=k.align,_=m===void 0?{}:m,I=k.destroyTooltipOnHide,U=I===void 0?!1:I,M=k.defaultVisible,H=k.getTooltipContainer,K=k.overlayInnerStyle,Z=Object(P.a)(k,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),le=Object(Y.useRef)(null);Object(Y.useImperativeHandle)(O,function(){return le.current});var he=Object(z.a)({},Z);"visible"in k&&(he.popupVisible=k.visible);var ye=function(){var ke=k.arrowContent,me=ke===void 0?null:ke,ce=k.overlay,te=k.id;return[Y.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},me),Y.createElement(B,{key:"content",prefixCls:D,id:te,overlay:ce,overlayInnerStyle:K})]},Ue=!1,Me=!1;if(typeof U=="boolean")Ue=U;else if(U&&Object(q.a)(U)==="object"){var _e=U.keepParent;Ue=_e===!0,Me=_e===!1}return Y.createElement(F.a,Object.assign({popupClassName:b,prefixCls:D,popup:ye,action:c,builtinPlacements:A.a,popupPlacement:E,ref:le,popupAlign:_,getPopupContainer:H,onPopupVisibleChange:d,afterPopupVisibleChange:l,popupTransitionName:o,popupAnimation:a,defaultPopupVisible:M,destroyPopupOnHide:Ue,autoDestroy:Me,mouseLeaveDelay:R,popupStyle:y,mouseEnterDelay:u},he),S)},T=Object(Y.forwardRef)(L),v=De.a=T},OZM5:function(ze,De,W){"use strict";W.d(De,"b",function(){return T}),W.d(De,"a",function(){return v}),W.d(De,"k",function(){return C}),W.d(De,"h",function(){return k}),W.d(De,"i",function(){return O}),W.d(De,"g",function(){return b}),W.d(De,"c",function(){return p}),W.d(De,"d",function(){return c}),W.d(De,"j",function(){return h}),W.d(De,"e",function(){return R}),W.d(De,"f",function(){return y});var q=W("KQm4"),z=W("U8pU"),P=W("Ff2n"),Y=W("q1tI"),F=W.n(Y),A=W("Kwbf"),j=W("WaYH"),B=.25,L=2;function T(g,D){var S=g.slice(),d=S.indexOf(D);return d>=0&&S.splice(d,1),S}function v(g,D){var S=g.slice();return S.indexOf(D)===-1&&S.push(D),S}function C(g){return g.split("-")}function k(g,D){return"".concat(g,"-").concat(D)}function O(g){return g&&g.type&&g.type.isTreeNode}function b(g,D){var S=[g],d=D[g];function l(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(a){var x=a.key,E=a.children;S.push(x),l(E)})}return l(d.children),S}function p(g,D){var S=g.clientY,d=D.selectHandle.getBoundingClientRect(),l=d.top,o=d.bottom,a=d.height,x=Math.max(a*B,L);return S<=l+x?-1:S>=o-x?1:0}function c(g,D){if(!g)return;var S=D.multiple;return S?g.slice():g.length?[g[0]]:g}var i=function(D){return D};function u(g,D){if(!g)return[];var S=D||{},d=S.processProps,l=d===void 0?i:d,o=Array.isArray(g)?g:[g];return o.map(function(a){var x=a.children,E=Object(P.a)(a,["children"]),m=u(x,D);return F.a.createElement(j.a,Object.assign({},l(E)),m)})}function h(g){if(!g)return null;var D;if(Array.isArray(g))D={checkedKeys:g,halfCheckedKeys:void 0};else if(Object(z.a)(g)==="object")D={checkedKeys:g.checked||void 0,halfCheckedKeys:g.halfChecked||void 0};else return Object(A.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function R(g,D){var S=new Set;function d(l){if(S.has(l))return;var o=D[l];if(!o)return;S.add(l);var a=o.parent,x=o.node;if(x.disabled)return;a&&d(a.key)}return(g||[]).forEach(function(l){d(l)}),Object(q.a)(S)}function y(g){var D={};return Object.keys(g).forEach(function(S){(S.startsWith("data-")||S.startsWith("aria-"))&&(D[S]=g[S])}),D}},Ohmc:function(ze,De,W){ze.exports=W.p+"static/certificate.fc32dc1b.jpg"},Ot1p:function(ze,De,W){"use strict";var q=W("2qtc"),z=W("kLXV"),P=W("rAM+"),Y=W("miYZ"),F=W("tsqr"),A=W("9og8"),j=W("tJVT"),B=W("jrin"),L=W("WmNS"),T=W.n(L),v=W("q1tI"),C=W.n(v),k=W("VrN/"),O=W.n(k),b=W("bdgK"),p=W("p77/"),c=W("Bd2K"),i=W("ELLl"),u=W("19Vz"),h=W("lZu9"),R=W("+NIl"),y=W("kSUc"),g=W("9Bee"),D=function(it){var gt=it.value,Qe=gt===void 0?"":gt,Ze=it.className,Fe=it.showTextOnly,oe=it.showLines,ve=it.style,nt=ve===void 0?{}:ve,He=Object(v.useMemo)(function(){return""},[Qe]);return C.a.createElement(C.a.Fragment,null,C.a.createElement("div",{dangerouslySetInnerHTML:{__html:He}}))},S=W("Q9mQ"),d=W("diRs"),l=W("0Owb"),o=W("dejd"),a=W("C+DQ"),x=W("D1Df"),E=W.n(x),m=W("1vsH"),_=W("m3rI"),I=[{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 U(it){var gt=it.onActionCallback,Qe=it.title,Ze=it.icon,Fe=it.actionName,oe=it.className,ve=oe===void 0?"":oe,nt=it.children;function He(){gt(Fe)}return C.a.createElement("a",{title:Qe,className:ve,onClick:He},C.a.createElement("i",{className:"md-iconfont ".concat(Ze)}),nt)}var M=function(it){var gt=it.watch,Qe=it.showNullButton,Ze=it.onActionCallback,Fe=it.fullScreen,oe=it.insertTemp,ve=it.hidetoolBar,nt=it.uuid,He=it.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(m.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(m.E)("_educoder_session"),"&key=").concat(nt,"&api=").concat(encodeURIComponent(_.a.PROXY_SERVER)));var bt=[].concat(I,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return C.a.createElement("ul",{className:"markdown-toolbar-container"},!ve&&bt.map(function(mt,Re){return C.a.createElement("li",{key:Re},mt.actionName?C.a.createElement(U,Object(l.a)({},mt,{onActionCallback:Ze})):C.a.createElement("span",{className:"v-line"}))}),Qe?C.a.createElement("li",null,C.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ze},C.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,oe&&C.a.createElement("li",null,C.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(oe),onActionCallback:Ze},C.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),C.a.createElement("li",null,C.a.createElement(d.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:C.a.createElement("div",null,C.a.createElement(E.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(m.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(m.E)("_educoder_session"),"&key=").concat(nt,"&api=").concat(encodeURIComponent(_.a.PROXY_SERVER))}))},C.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return He(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),C.a.createElement("li",{className:"btn-full-screen"},C.a.createElement(U,{icon:"".concat(Fe?"icon-shrink":"icon-enlarge"),title:Fe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ze})))},H=W("M8RZ"),K=W("+L6B"),Z=W("2/Rp"),le=W("y8nQ"),he=W("Vl3Y"),ye=W("5NDa"),Ue=W("5rEg"),Me={labelCol:{span:4},wrapperCol:{span:20}},_e=function(it){var gt=it.callback,Qe=it.onCancel;function Ze(Fe){gt(Fe)}return C.a.createElement(he.a,Object(l.a)({},Me,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ze}),C.a.createElement(he.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},C.a.createElement(Ue.a,null)),C.a.createElement(he.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},C.a.createElement(Ue.a,null)),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(Z.a,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))},Ie=W("7ahc"),ke=W("k1fw"),me=W("HmJG"),ce=W("BjJ7"),te=he.a.useForm,be={width:280,marginRight:10},ae={labelCol:{span:5},wrapperCol:{span:19}},we=function(it){var gt=it.callback,Qe=it.onCancel,Ze=te(),Fe=Object(j.a)(Ze,1),oe=Fe[0],ve=Object(v.useRef)();function nt(mt){gt(Object(ke.a)(Object(ke.a)({},mt),{},{name:ve.current}))}function He(mt,Re){oe.setFieldsValue({src:"/api/attachments/".concat(mt.id,"?type=").concat(mt.content_type),type:Re.type})}function bt(mt){var Re=mt.target.files[0];ve.current=Re.name,Ce(Re,He)}return C.a.createElement(he.a,Object(l.a)({form:oe},ae,{className:"upload-image-panel",onFinish:nt}),C.a.createElement(he.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},C.a.createElement("div",{className:"flex-container"},C.a.createElement(he.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},C.a.createElement(Ue.a,{style:be})),C.a.createElement(Pe,{onFileChange:bt}))),C.a.createElement(he.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},C.a.createElement(Ue.a,{style:{width:264}})),C.a.createElement(he.a.Item,{style:{textAlign:"right"}},C.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(Z.a,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))};function Pe(it){var gt=it.onFileChange;return C.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",C.a.createElement("input",{type:"file",onChange:gt}))}function Ce(it,gt){if(!it)throw new String("\u6CA1\u6709\u6587\u4EF6");var Qe=new FormData;Qe.append("editormd-image-file",it),Qe.append("file_param_name","editormd-image-file"),Qe.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(Fe){gt(JSON.parse(Fe.target.responseText),it)},!1),Ze.addEventListener("error",function(Fe){console.error(Fe)},!1),Ze.open("POST","".concat(ce.a,"/api/attachments.json")),Ze.send(Qe)}var Ve=W("giR+"),Ge=W("fyUT"),tt=W("7Kak"),Je=W("9yH6"),Ye=Je.a.Group,et={margin:"0 8px"},St=function(it){var gt=it.callback,Qe=it.onCancel;function Ze(Fe){gt(Fe)}return C.a.createElement(he.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ze},C.a.createElement("div",{className:"flex-container"},C.a.createElement("span",{style:et},"\u5355\u5143\u683C\u6570\uFF1A"),C.a.createElement("span",{style:et},"\u884C\u6570"),C.a.createElement(he.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},C.a.createElement(Ge.a,null)),C.a.createElement("span",{style:et},"\u5217\u6570"),C.a.createElement(he.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},C.a.createElement(Ge.a,null))),C.a.createElement("div",{className:"flex-container",style:{marginTop:12}},C.a.createElement("span",{style:et},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),C.a.createElement(he.a.Item,{name:"align"},C.a.createElement(Ye,null,C.a.createElement(Je.a,{value:"default"},C.a.createElement("i",{className:"fa fa-align-justify"})),C.a.createElement(Je.a,{value:"left"},C.a.createElement("i",{className:"fa fa-align-left"})),C.a.createElement(Je.a,{value:"center"},C.a.createElement("i",{className:"fa fa-align-center"})),C.a.createElement(Je.a,{value:"right"},C.a.createElement("i",{className:"fa fa-align-right"}))))),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(Z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(Z.a,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))},At=W("ErOA"),ht=W("7Cbv"),xt="link",Tt="upload-image",Ot="code-block",Oe="add-table",Te="------------",rt={default:Te,left:":".concat(Te),center:":".concat(Te,":"),right:"".concat(Te,":")},ot=W("9VGf"),Ne,$e;function xe(){}var fe=0,pe=1e4,re="\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 se(it){return/^\d+$/.test(it)?"".concat(it,"px"):it}var de=navigator.platform.toUpperCase().indexOf("MAC")>=0,Le=de?"Cmd":"Ctrl",Ke=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],dt=(Ne={},Object(B.a)(Ne,Le+"-B","bold"),Object(B.a)(Ne,Le+"-I","italic"),Ne),_t=($e={},Object(B.a)($e,xt,"\u6DFB\u52A0\u94FE\u63A5"),Object(B.a)($e,Ot,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(B.a)($e,Tt,"\u6DFB\u52A0\u6587\u4EF6"),Object(B.a)($e,Oe,"\u6DFB\u52A0\u8868\u683C"),$e),Ht=De.a=function(it){var gt=it.defaultValue,Qe=gt===void 0?"":gt,Ze=it.onChange,Fe=it.width,oe=Fe===void 0?"100%":Fe,ve=it.height,nt=ve===void 0?400:ve,He=it.miniToolbar,bt=He===void 0?!1:He,mt=it.isFocus,Re=mt===void 0?!1:mt,qe=it.watch,vt=it.insertTemp,Ct=it.mode,wt=Ct===void 0?"markdown":Ct,lt=it.id,Ft=lt===void 0?"markdown-editor-id":lt,$t=it.showResizeBar,Rt=$t===void 0?!1:$t,Zt=it.noStorage,dn=Zt===void 0?!1:Zt,Jt=it.showNullButton,Gt=Jt===void 0?!1:Jt,fn=it.hidetoolBar,On=fn===void 0?!1:fn,Pn=it.fullScreen,ft=Pn===void 0?!1:Pn,Wt=it.onBlur,Qt=it.onCMBeforeChange,mn=it.onFullScreen,pn=it.className,Dn=pn===void 0?"":pn,X=it.disablePaste,f=X===void 0?!1:X,w=it.placeholder,G=w===void 0?"":w,ee=it.values,V=ee===void 0?"":ee,Se=Object(v.useState)(null),st=Object(j.a)(Se,2),je=st[0],Pt=st[1],ut=Object(v.useState)(Qe),Vt=Object(j.a)(ut,2),qt=Vt[0],yn=Vt[1],Tn=Object(v.useState)(qe),wn=Object(j.a)(Tn,2),kn=wn[0],mr=wn[1],Kr=Object(v.useState)(ft),Zn=Object(j.a)(Kr,2),tr=Zn[0],Sr=Zn[1],Rr=Object(v.useState)(""),gr=Object(j.a)(Rr,2),br=gr[0],Ar=gr[1],Tr=Object(v.useState)(0),Jr=Object(j.a)(Tr,2),lr=Jr[0],nr=Jr[1],Hr=Object(v.useState)(nt),cn=Object(j.a)(Hr,2),Nr=cn[0],_n=cn[1],ge=Object(v.useState)(!1),Cn=Object(j.a)(ge,2),Sn=Cn[0],jn=Cn[1],tn=Object(v.useRef)(Object(ht.a)()),Xr=Object(v.useRef)(!1),Hn=Object(v.useRef)(),Wn=Object(v.useRef)(),rr=Object(v.useRef)(),Or=Object(v.useRef)(),Br=Object(v.useRef)(),ri=function(){var Xt=Object(A.a)(T.a.mark(function an(){var en,gn;return T.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(At.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:gn=An.sent,gn!=null&&(en=gn.attachments)!==null&&en!==void 0&&en.length&&(console.log("cm:",je,Wn),gn.attachments.map(function(xn){xn.content_type.indexOf("image")>-1?je.replaceSelection("![,](/api/attachments/".concat(xn.id,"?type=").concat(xn.content_type,")")):xn.content_type.indexOf("video")>-1?je.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):xn.content_type.indexOf("pdf")>-1?je.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(xn.id,"?type=").concat(xn.content_type,'&disposition=inline" target="_blank">').concat(xn.name,"</a>")):je.replaceSelection("[".concat(xn.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(xn.id,"?type=").concat(xn.content_type,")"))}));case 4:case"end":return An.stop()}},an)}));return function(){return Xt.apply(this,arguments)}}();Object(v.useEffect)(function(){yn(V),je==null||je.setValue(V)},[V]),Object(v.useEffect)(function(){mn==null||mn(tr)},[tr]),Object(v.useEffect)(function(){if(Wn.current){var Xt=O.a.fromTextArea(Wn.current,{mode:wt,lineNumbers:!bt,lineWrapping:!0,value:Qe,autoCloseTags:!0,autoCloseBrackets:!0});Re&&Xt.focus();function an(en,gn){if(f){gn.preventDefault();return}var vn=gn.clipboardData;if(vn){var An=vn.types.toString(),xn=vn.items;if(An==="Files"||vn.types.indexOf("Files")>-1){if(gn.preventDefault(),wt=="stex")return;try{var In,qn=xn[1];((In=xn[0])===null||In===void 0?void 0:In.kind)==="file"&&(qn=xn[0]);var bn=qn.getAsFile(),qr=bn.name.split(".").pop();Ce(bn,function(Yt){if(Yt.id){var un,hn,Fn;(bn==null||((un=bn.type)===null||un===void 0)?void 0:un.indexOf("image"))>-1?Xt.replaceSelection("![,](/api/attachments/".concat(Yt.id,"?type=").concat(Yt.content_type,")")):(bn==null||((hn=bn.type)===null||hn===void 0)?void 0:hn.indexOf("video"))>-1?Xt.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,'"></video>')):(bn==null||((Fn=bn.type)===null||Fn===void 0)?void 0:Fn.indexOf("pdf"))>-1?Xt.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,"?type=").concat(bn.type,'&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Ke.includes(qr)?Xt.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,'?type=office&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Xt.replaceSelection("[".concat(bn.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,"?type=").concat(Yt.content_type,")"))}else(Yt==null?void 0:Yt.status)===401&&(document.location.href="/user/login")})}catch(Yt){F.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Xt.on("paste",an),Xt.on("dragleave",function(en,gn){rr.current.classList.remove("mouse-hover-md")}),Xt.on("dragover",function(en,gn){rr.current.classList.add("mouse-hover-md")}),Xt.on("drop",function(en,gn){rr.current.classList.add("mouse-hover-md");var vn;if(vn=gn.dataTransfer.files,vn.length>0){gn.preventDefault(),gn.stopPropagation();for(var An=function(qn){var bn=vn[qn],qr=bn.name.split(".").pop();Ce(bn,function(Yt){if(Yt.id){var un,hn,Fn;(bn==null||((un=bn.type)===null||un===void 0)?void 0:un.indexOf("image"))>-1?Xt.replaceSelection("![,](/api/attachments/".concat(Yt.id,"?type=").concat(Yt.content_type,")")):(bn==null||((hn=bn.type)===null||hn===void 0)?void 0:hn.indexOf("video"))>-1?Xt.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,'"></video>')):(bn==null||((Fn=bn.type)===null||Fn===void 0)?void 0:Fn.indexOf("pdf"))>-1?Xt.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,"?type=").concat(bn.type,'&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Ke.includes(qr)?Xt.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,'?type=office&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Xt.replaceSelection("[".concat(bn.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Yt.id,"?type=").concat(Yt.content_type,")"))}else(Yt==null?void 0:Yt.status)===401&&(document.location.href="/user/login")})},xn=0;xn<vn.length;xn++)An(xn)}}),Pt(Xt),function(){Xt.off("paste",an)}}},[]);var Dr=Object(v.useCallback)(function(){if(rr.current)try{}catch(Xt){console.log(Xt,"---- to set md editor body height")}},[Nr,rr,tr]);Object(v.useEffect)(function(){function Xt(){var en=new b.default(function(gn){var vn=Object(P.a)(gn),An;try{for(vn.s();!(An=vn.n()).done;){var xn=An.value;(xn.target.offsetHeight>0||xn.target.offsetWidth>0)&&(Dr(),je.setSize("100%","100%"),je.refresh())}}catch(In){vn.e(In)}finally{vn.f()}});return en.observe(Wn.current.parentElement),en}if(je){var an=Xt();return function(){an.unobserve(Wn.current.parentElement)}}},[je,Dr]),Object(v.useEffect)(function(){if(je){for(var Xt=[],an=function(){var xn=gn[en];vn=Object(j.a)(xn,2);var In=vn[0],qn=vn[1],bn=Object(B.a)({},In,function(){_r(qn)});Xt.push(bn),je.addKeyMap(bn)},en=0,gn=Object.entries(dt);en<gn.length;en++){var vn;an()}return Hn.current=setInterval(function(){Xr.current&&ri()},4e3),function(){clearInterval(Hn.current);var An=Object(P.a)(Xt),xn;try{for(An.s();!(xn=An.n()).done;){var In=xn.value;je.removeKeyMap(In)}}catch(qn){An.e(qn)}finally{An.f()}}}},[je]),Object(v.useEffect)(function(){ft!==tr&&Sr(ft)},[ft]),Object(ot.a)(function(){if(!dn&&lr>0){var Xt=new Date().getTime(),an=window.sessionStorage.getItem(Ft);Xt>=lr+pe&&(!an||an!==qt)&&(window.sessionStorage.setItem(Ft,qt),jn(!0))}},pe),Object(v.useEffect)(function(){mr(qe)},[je,qe]),Object(v.useEffect)(function(){je&&(Re&&je.focus())},[je,Re]),Object(v.useEffect)(function(){if(kn&&je){var Xt=je.getScrollerElement();function an(en){var gn=en.target;if(Br.current){var vn=gn.scrollTop/gn.scrollHeight;Br.current.scrollTop=Br.current.scrollHeight*vn}}return Xt.addEventListener("scroll",an),function(){Xt.removeEventListener("scroll",an)}}},[je,kn]),Object(v.useEffect)(function(){if(je&&Qt){function Xt(an,en){Qt(an,en)}return je.on("beforeChange",Xt),function(){je.off("beforeChange",Xt)}}},[je,Qt]),Object(v.useEffect)(function(){if(je&&Wt){function Xt(){Wt(je.getValue())}return je.on("blur",Xt),function(){je.off("blur",Xt)}}},[je,Wt]),Object(v.useEffect)(function(){if(je){function Xt(an){var en=an.getValue();yn(en),nr(new Date().getTime()),an.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ze&&Ze(en)}return je.on("change",Xt),function(){je.off("change",Xt)}}},[je,Ze]),Object(v.useEffect)(function(){je&&(Qe==null?(je.setValue(""),yn("")):Qe!==je.getValue()&&(je.setValue(Qe),yn(Qe),je.setCursor(je.lineCount(),0)))},[je,Qe]);var _r=Object(v.useCallback)(function(Xt){var an=je.getCursor(),en=je.getSelection(),gn=en.split(`
`);switch(Xt){case"bold":return je.replaceSelection("**"+en+"**"),en===""&&je.setCursor(an.line,an.ch+2),je.focus();case"italic":return je.replaceSelection("*"+en+"*"),en===""&&je.setCursor(an.line,an.ch+1),je.focus();case"code":return je.replaceSelection("`"+en+"`"),en===""&&je.setCursor(an.line,an.ch+1),je.focus();case"inline-latex":return je.replaceSelection("`$$"+en+"$$`"),en===""&&je.setCursor(an.line,an.ch+3),je.focus();case"latex":return je.replaceSelection("```latex\n"+en+"\n```"),je.setCursor(an.line+1,en.length+1),je.focus();case"line-break":return je.replaceSelection(`<br/>
`),je.focus();case"list-ul":return en===""?je.replaceSelection("- "+en):je.replaceSelection(gn.map(function(vn){return vn===""?"":"- ".concat(vn)}).join(`
`)),je.focus();case"list-ol":return en===""?je.replaceSelection("1. "+en):je.replaceSelection(gn.map(function(vn,An){return vn===""?"":"".concat(An+1,". ").concat(vn)}).join(`
`)),je.focus();case"add-null-ch":return en===""&&je.setCursor(an.line,an.ch+1),je.replaceSelection(re),je.focus();case"inster-template-1":return en===""&&je.setCursor(an.line,an.ch),je.replaceSelection(ie),je.focus();case"eraser":return je.setValue(""),je.focus();case"trigger-watch":return mr(!kn),je.focus();case"trigger-full-screen":return Sr(!tr),je.focus();case xt:Ar(xt);return;case Ot:Ar(Ot);return;case Tt:Ar(Tt);return;case Oe:Ar(Oe);return;default:throw new Error}},[je,kn,tr]),vr=Object(v.useCallback)(function(Xt){Ar("");switch(br){case xt:var an=Xt.title,en=Xt.link;return je.replaceSelection("[".concat(an,"](").concat(en,")")),je.focus();case Ot:var gn=Xt.language,vn=Xt.content;return je.replaceSelection(["```"+gn,vn,"```"].join(`
`)),je.focus();case Tt:var An=Xt.src,xn=Xt.alt,In=Xt.name;return An.indexOf("type=image")>-1?je.replaceSelection("![ ".concat(xn||""," ]( ").concat(An,' "').concat(xn||"",'" )')):An.indexOf("type=application/pdf")>-1?je.replaceSelection('<a href="'.concat(An,'&disposition=inline" target="_blank">').concat(In,"</a>")):je.replaceSelection('<a href="'.concat(An,'" target="_blank">').concat(In,"</a>")),je.focus();case Oe:for(var qn=Xt.row,bn=Xt.col,qr=Xt.align,Yt=`
`,un=0;un<qn;un++){for(var hn=[],Fn=[],Ur=0;Ur<bn;Ur++)un===1&&Fn.push(rt[qr]),hn.push(" ");un===1&&(Yt+="| ".concat(Fn.join(" | "),` |
`)),Yt+="| ".concat(hn.join(bn===1?"":" | "),` |
`)}return je.replaceSelection(Yt+`
`),je.focus();default:throw new Error}},[je,br]),Qr=Object(v.useMemo)(function(){switch(br){case xt:return C.a.createElement(_e,{callback:vr,onCancel:ir});case Ot:return C.a.createElement(Ie.b,{callback:vr,onCancel:ir});case Tt:return C.a.createElement(we,{callback:vr,onCancel:ir});case Oe:return C.a.createElement(St,{callback:vr,onCancel:ir});default:return null}},[br]);function ir(){Ar("")}Object(v.useEffect)(function(){if(Or.current){var Xt=Or.current,an=!1,en=0;function gn(xn){an=!0,en=xn.pageY}function vn(){an=!1}function An(xn){if(an){var In=xn.pageY-en;In<0&&(In=0),In>300&&(In=300);var qn=nt+In+"px";_n(qn)}}return Xt.addEventListener("mousedown",gn),document.addEventListener("mousemove",An),document.addEventListener("mouseup",vn),function(){Xt.removeEventListener("mousedown",gn),document.removeEventListener("mousemove",An),document.removeEventListener("mouseup",vn)}}},[je,Or]),Object(v.useEffect)(function(){_n(nt)},[nt]);var Er=se(oe),hi=se(Nr),Oi={width:Er,height:hi},Di=Object(v.useMemo)(function(){if(lr){var Xt=new Date(lr),an=Xt.getHours(),en=Xt.getMinutes(),gn=Xt.getSeconds();return an=an<10?"0"+an:an,en=en<10?"0"+en:en,gn=gn<10?"0"+gn:gn,"".concat(an,":").concat(en,":").concat(gn)}return 0},[lr]);function ii(){window.sessionStorage.removeItem(Ft),jn(!1),nr(0)}function fi(){jn(!1),nr(0),je.setValue(window.sessionStorage.getItem(Ft))}function Zr(Xt,an){var en=je.getValue();en=en.replace(Xt,an),yn(en),je==null||je.setValue(en)}return C.a.createElement(v.Fragment,null,C.a.createElement("div",{className:"markdown-editor-wrapper",ref:rr},C.a.createElement("div",{className:"markdown-editor-container ".concat(Dn," ").concat(kn?"on-preview":""," ").concat(bt?"mini":""," ").concat(tr?"full-screen":""),style:Oi},C.a.createElement(M,{insertTemp:vt,watch:kn,fullScreen:tr,showNullButton:Gt,onActionCallback:_r,hidetoolBar:On,uuid:tn.current,setOpenPhones:function(){Xr.current=!0}}),C.a.createElement("div",{className:"markdown-editor-body"},C.a.createElement("div",{className:"codemirror-container"},C.a.createElement("textarea",{ref:Wn,placeholder:G})),kn?C.a.createElement("div",{ref:Br,className:"preview-container"},wt==="stex"&&C.a.createElement(D,{value:qt}),wt!=="stex"&&C.a.createElement(g.a,{edit:!0,value:qt,replaces:Zr})):null))),Rt?C.a.createElement("a",{ref:Or,className:"editor-resize"}):null,C.a.createElement(H.a,null,_t[br]?C.a.createElement(z.a,{centered:!0,title:_t[br],visible:!0,onCancel:ir,footer:null},Qr):null))}},RMFE:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIE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g0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},"SA+Z":function(ze,De,W){var q=W("wTVA"),z=W("EbDI"),P=W("ZhPi"),Y=W("wkBT");function F(A){return q(A)||z(A)||P(A)||Y()}ze.exports=F,ze.exports.__esModule=!0,ze.exports.default=ze.exports},SJMd:function(ze,De){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var W,q,z,P=!1,Y,F;window.PR_SHOULD_USE_CONTINUATION=!0;var A,j;(function(){var B=window,L=["break,continue,do,else,for,if,return,while"],T=[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"],v=[T,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],C=[v,"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"],k=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],O=[v,"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"],b="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",p=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],c="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",i=[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"],u=[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"],h=[L,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[C,O,k,p,c,i,u,h],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,g="str",D="kwd",S="com",d="typ",l="lit",o="pun",a="pln",x="tag",E="dec",m="src",_="atn",I="atv",U="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(Ce){for(var Ve=0,Ge=!1,tt=!1,Je=0,Ye=Ce.length;Je<Ye;++Je){var et=Ce[Je];if(et.ignoreCase)tt=!0;else if(/[a-z]/i.test(et.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ge=!0,tt=!1;break}}var St={b:8,t:9,n:10,v:11,f:12,r:13};function At(Oe){var Te=Oe.charCodeAt(0);if(Te!==92)return Te;var rt=Oe.charAt(1);return Te=St[rt],Te||("0"<=rt&&rt<="7"?parseInt(Oe.substring(1),8):rt==="u"||rt==="x"?parseInt(Oe.substring(2),16):Oe.charCodeAt(1))}function ht(Oe){if(Oe<32)return(Oe<16?"\\x0":"\\x")+Oe.toString(16);var Te=String.fromCharCode(Oe);return Te==="\\"||Te==="-"||Te==="]"||Te==="^"?"\\"+Te:Te}function xt(Oe){var Te=Oe.substring(1,Oe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),rt=[],ot=Te[0]==="^",Ne=["["];ot&&Ne.push("^");for(var $e=ot?1:0,xe=Te.length;$e<xe;++$e){var fe=Te[$e];if(/\\[bdsw]/i.test(fe))Ne.push(fe);else{var pe=At(fe),re;$e+2<xe&&Te[$e+1]==="-"?(re=At(Te[$e+2]),$e+=2):re=pe,rt.push([pe,re]),re<65||pe>122||(re<65||pe>90||rt.push([Math.max(65,pe)|32,Math.min(re,90)|32]),re<97||pe>122||rt.push([Math.max(97,pe)&~32,Math.min(re,122)&~32]))}}rt.sort(function(Le,Ke){return Le[0]-Ke[0]||Ke[1]-Le[1]});for(var ie=[],se=[],$e=0;$e<rt.length;++$e){var de=rt[$e];de[0]<=se[1]+1?se[1]=Math.max(se[1],de[1]):ie.push(se=de)}for(var $e=0;$e<ie.length;++$e){var de=ie[$e];Ne.push(ht(de[0])),de[1]>de[0]&&(de[1]+1>de[0]&&Ne.push("-"),Ne.push(ht(de[1])))}return Ne.push("]"),Ne.join("")}function Tt(Oe){for(var Te=Oe.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")),rt=Te.length,ot=[],Ne=0,$e=0;Ne<rt;++Ne){var xe=Te[Ne];if(xe==="(")++$e;else if(xe.charAt(0)==="\\"){var fe=+xe.substring(1);fe&&(fe<=$e?ot[fe]=-1:Te[Ne]=ht(fe))}}for(var Ne=1;Ne<ot.length;++Ne)ot[Ne]===-1&&(ot[Ne]=++Ve);for(var Ne=0,$e=0;Ne<rt;++Ne){var xe=Te[Ne];if(xe==="(")++$e,ot[$e]||(Te[Ne]="(?:");else if(xe.charAt(0)==="\\"){var fe=+xe.substring(1);fe&&fe<=$e&&(Te[Ne]="\\"+ot[fe])}}for(var Ne=0;Ne<rt;++Ne)Te[Ne]==="^"&&Te[Ne+1]!=="^"&&(Te[Ne]="");if(Oe.ignoreCase&&Ge)for(var Ne=0;Ne<rt;++Ne){var xe=Te[Ne],pe=xe.charAt(0);xe.length>=2&&pe==="["?Te[Ne]=xt(xe):pe!=="\\"&&(Te[Ne]=xe.replace(/[a-zA-Z]/g,function(se){var de=se.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return Te.join("")}for(var Ot=[],Je=0,Ye=Ce.length;Je<Ye;++Je){var et=Ce[Je];if(et.global||et.multiline)throw new Error(""+et);Ot.push("(?:"+Tt(et)+")")}return new RegExp(Ot.join("|"),tt?"gi":"g")}function K(Ce,Ve){var Ge=/(?:^|\s)nocode(?:\s|$)/,tt=[],Je=0,Ye=[],et=0;function St(At){var ht=At.nodeType;if(ht==1){if(Ge.test(At.className))return;for(var xt=At.firstChild;xt;xt=xt.nextSibling)St(xt);var Tt=At.nodeName.toLowerCase();(Tt==="br"||Tt==="li")&&(tt[et]=`
`,Ye[et<<1]=Je++,Ye[et++<<1|1]=At)}else if(ht==3||ht==4){var Ot=At.nodeValue;Ot.length&&(Ve?Ot=Ot.replace(/\r\n?/g,`
`):Ot=Ot.replace(/[ \t\r\n]+/g," "),tt[et]=Ot,Ye[et<<1]=Je,Je+=Ot.length,Ye[et++<<1|1]=At)}}return St(Ce),{sourceCode:tt.join("").replace(/\n$/,""),spans:Ye}}function Z(Ce,Ve,Ge,tt,Je){if(!Ge)return;var Ye={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:Ge,spans:null,basePos:Ve,decorations:null};tt(Ye),Je.push.apply(Je,Ye.decorations)}var le=/\S/;function he(Ce){for(var Ve=void 0,Ge=Ce.firstChild;Ge;Ge=Ge.nextSibling){var tt=Ge.nodeType;Ve=tt===1?Ve?Ce:Ge:tt===3&&le.test(Ge.nodeValue)?Ce:Ve}return Ve===Ce?void 0:Ve}function ye(Ce,Ve){var Ge={},tt;(function(){for(var et=Ce.concat(Ve),St=[],At={},ht=0,xt=et.length;ht<xt;++ht){var Tt=et[ht],Ot=Tt[3];if(Ot)for(var Oe=Ot.length;--Oe>=0;)Ge[Ot.charAt(Oe)]=Tt;var Te=Tt[1],rt=""+Te;At.hasOwnProperty(rt)||(St.push(Te),At[rt]=null)}St.push(/[\0-\uffff]/),tt=H(St)})();var Je=Ve.length,Ye=function(et){for(var St=et.sourceCode,At=et.basePos,ht=et.sourceNode,xt=[At,a],Tt=0,Ot=St.match(tt)||[],Oe={},Te=0,rt=Ot.length;Te<rt;++Te){var ot=Ot[Te],Ne=Oe[ot],$e=void 0,xe;if(typeof Ne=="string")xe=!1;else{var fe=Ge[ot.charAt(0)];if(fe)$e=ot.match(fe[1]),Ne=fe[0];else{for(var pe=0;pe<Je;++pe)if(fe=Ve[pe],$e=ot.match(fe[1]),$e){Ne=fe[0];break}$e||(Ne=a)}xe=Ne.length>=5&&Ne.substring(0,5)==="lang-",xe&&!($e&&typeof $e[1]=="string")&&(xe=!1,Ne=m),xe||(Oe[ot]=Ne)}var re=Tt;if(Tt+=ot.length,!xe)xt.push(At+re,Ne);else{var ie=$e[1],se=ot.indexOf(ie),de=se+ie.length;$e[2]&&(de=ot.length-$e[2].length,se=de-ie.length);var Le=Ne.substring(5);Z(ht,At+re,ot.substring(0,se),Ye,xt),Z(ht,At+re+se,ie,ce(Le,ie),xt),Z(ht,At+re+de,ot.substring(de),Ye,xt)}}et.decorations=xt};return Ye}function Ue(Ce){var Ve=[],Ge=[];Ce.tripleQuotedStrings?Ve.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?Ve.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ve.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Ge.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var tt=Ce.hashComments;tt&&(Ce.cStyleComments?(tt>1?Ve.push([S,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ve.push([S,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ge.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ve.push([S,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Ge.push([S,/^\/\/[^\r\n]*/,null]),Ge.push([S,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Je=Ce.regexLiterals;if(Je){var Ye=Je>1?"":`
\r`,et=Ye?".":"[\\S\\s]",St="/(?=[^/*"+Ye+"])(?:[^/\\x5B\\x5C"+Ye+"]|\\x5C"+et+"|\\x5B(?:[^\\x5C\\x5D"+Ye+"]|\\x5C"+et+")*(?:\\x5D|$))+/";Ge.push(["lang-regex",RegExp("^"+M+"("+St+")")])}var At=Ce.types;At&&Ge.push([d,At]);var ht=(""+Ce.keywords).replace(/^ | $/g,"");ht.length&&Ge.push([D,new RegExp("^(?:"+ht.replace(/[\s,]+/g,"|")+")\\b"),null]),Ve.push([a,/^\s+/,null,` \r
\xA0`]);var xt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(xt+="(?!s*/)"),Ge.push([l,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[l,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[o,new RegExp(xt),null]),ye(Ve,Ge)}var Me=Ue({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function _e(Ce,Ve,Ge){for(var tt=/(?:^|\s)nocode(?:\s|$)/,Je=/\r\n?|\n/,Ye=Ce.ownerDocument,et=Ye.createElement("li");Ce.firstChild;)et.appendChild(Ce.firstChild);var St=[et];function At(Te){var rt=Te.nodeType;if(rt==1&&!tt.test(Te.className))if(Te.nodeName==="br")ht(Te),Te.parentNode&&Te.parentNode.removeChild(Te);else for(var ot=Te.firstChild;ot;ot=ot.nextSibling)At(ot);else if((rt==3||rt==4)&&Ge){var Ne=Te.nodeValue,$e=Ne.match(Je);if($e){var xe=Ne.substring(0,$e.index);Te.nodeValue=xe;var fe=Ne.substring($e.index+$e[0].length);if(fe){var pe=Te.parentNode;pe.insertBefore(Ye.createTextNode(fe),Te.nextSibling)}ht(Te),xe||Te.parentNode.removeChild(Te)}}}function ht(Te){for(;!Te.nextSibling;)if(Te=Te.parentNode,!Te)return;function rt($e,xe){var fe=xe?$e.cloneNode(!1):$e,pe=$e.parentNode;if(pe){var re=rt(pe,1),ie=$e.nextSibling;re.appendChild(fe);for(var se=ie;se;se=ie)ie=se.nextSibling,re.appendChild(se)}return fe}for(var ot=rt(Te.nextSibling,0),Ne;(Ne=ot.parentNode)&&Ne.nodeType===1;)ot=Ne;St.push(ot)}for(var xt=0;xt<St.length;++xt)At(St[xt]);Ve===(Ve|0)&&St[0].setAttribute("value",Ve);var Tt=Ye.createElement("ol");Tt.className="linenums";for(var Ot=Math.max(0,Ve-1|0)||0,xt=0,Oe=St.length;xt<Oe;++xt)et=St[xt],et.className="L"+(xt+Ot)%10,et.firstChild||et.appendChild(Ye.createTextNode("\xA0")),Tt.appendChild(et);Ce.appendChild(Tt)}function Ie(Ce){var Ve=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ve=Ve&&+Ve[1]<=8;var Ge=/\n/g,tt=Ce.sourceCode,Je=tt.length,Ye=0,et=Ce.spans,St=et.length,At=0,ht=Ce.decorations,xt=ht.length,Tt=0;ht[xt]=Je;var Ot,Oe;for(Oe=Ot=0;Oe<xt;)ht[Oe]!==ht[Oe+2]?(ht[Ot++]=ht[Oe++],ht[Ot++]=ht[Oe++]):Oe+=2;for(xt=Ot,Oe=Ot=0;Oe<xt;){for(var Te=ht[Oe],rt=ht[Oe+1],ot=Oe+2;ot+2<=xt&&ht[ot+1]===rt;)ot+=2;ht[Ot++]=Te,ht[Ot++]=rt,Oe=ot}xt=ht.length=Ot;var Ne=Ce.sourceNode,$e="";Ne&&($e=Ne.style.display,Ne.style.display="none");try{for(var xe=null;At<St;){var fe=et[At],pe=et[At+2]||Je,re=ht[Tt+2]||Je,ot=Math.min(pe,re),ie=et[At+1],se;if(ie.nodeType!==1&&(se=tt.substring(Ye,ot))){Ve&&(se=se.replace(Ge,"\r")),ie.nodeValue=se;var de=ie.ownerDocument,Le=de.createElement("span");Le.className=ht[Tt+1];var Ke=ie.parentNode;Ke.replaceChild(Le,ie),Le.appendChild(ie),Ye<pe&&(et[At+1]=ie=de.createTextNode(tt.substring(ot,pe)),Ke.insertBefore(ie,Le.nextSibling))}Ye=ot,Ye>=pe&&(At+=2),Ye>=re&&(Tt+=2)}}finally{Ne&&(Ne.style.display=$e)}}var ke={};function me(Ce,Ve){for(var Ge=Ve.length;--Ge>=0;){var tt=Ve[Ge];ke.hasOwnProperty(tt)?B.console&&console.warn("cannot override language handler %s",tt):ke[tt]=Ce}}function ce(Ce,Ve){return Ce&&ke.hasOwnProperty(Ce)||(Ce=/^\s*</.test(Ve)?"default-markup":"default-code"),ke[Ce]}me(Me,["default-code"]),me(ye([],[[a,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[S,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),me(ye([[a,/^[\s]+/,null,` \r
`],[I,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[x,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[_,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),me(ye([],[[I,/^[\s\S]+/]]),["uq.val"]),me(Ue({keywords:C,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),me(Ue({keywords:"null,true,false"}),["json"]),me(Ue({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),me(Ue({keywords:k,cStyleComments:!0}),["java"]),me(Ue({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),me(Ue({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),me(Ue({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),me(Ue({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),me(Ue({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),me(Ue({keywords:b,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),me(ye([],[[g,/^[\s\S]+/]]),["regex"]);function te(Ce){var Ve=Ce.langExtension;try{var Ge=K(Ce.sourceNode,Ce.pre),tt=Ge.sourceCode;Ce.sourceCode=tt,Ce.spans=Ge.spans,Ce.basePos=0,ce(Ve,tt)(Ce),Ie(Ce)}catch(Je){B.console&&console.log(Je&&Je.stack||Je)}}function be(Ce,Ve,Ge){var tt=Ge||!1,Je=Ve||null,Ye=document.createElement("div");Ye.innerHTML="<pre>"+Ce+"</pre>",Ye=Ye.firstChild,tt&&_e(Ye,tt,!0);var et={langExtension:Je,numberLines:tt,sourceNode:Ye,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(et),Ye.innerHTML}function ae(Ce,Ve){var Ge=Ve||document.body,tt=Ge.ownerDocument||document;function Je(fe){return Ge.getElementsByTagName(fe)}for(var Ye=[Je("pre"),Je("code"),Je("xmp")],et=[],St=0;St<Ye.length;++St)for(var At=0,ht=Ye[St].length;At<ht;++At)et.push(Ye[St][At]);Ye=null;var xt=Date;xt.now||(xt={now:function(){return+new Date}});var Tt=0,Ot=/\blang(?:uage)?-([\w.]+)(?!\S)/,Oe=/\bprettyprint\b/,Te=/\bprettyprinted\b/,rt=/pre|xmp/i,ot=/^code$/i,Ne=/^(?:pre|code|xmp)$/i,$e={};function xe(){for(var fe=B.PR_SHOULD_USE_CONTINUATION?xt.now()+250:Infinity;Tt<et.length&&xt.now()<fe;Tt++){for(var pe=et[Tt],re=$e,ie=pe;ie=ie.previousSibling;){var se=ie.nodeType,de=(se===7||se===8)&&ie.nodeValue;if(de?!/^\??prettify\b/.test(de):se!==3||/\S/.test(ie.nodeValue))break;if(de){re={},de.replace(/\b(\w+)=([\w:.%+-]+)/g,function(nt,He,bt){re[He]=bt});break}}var Le=pe.className;if((re!==$e||Oe.test(Le))&&!Te.test(Le)){for(var Ke=!1,dt=pe.parentNode;dt;dt=dt.parentNode){var _t=dt.tagName;if(Ne.test(_t)&&dt.className&&Oe.test(dt.className)){Ke=!0;break}}if(!Ke){pe.className+=" prettyprinted";var Ht=re.lang;if(!Ht){Ht=Le.match(Ot);var it;!Ht&&(it=he(pe))&&ot.test(it.tagName)&&(Ht=it.className.match(Ot)),Ht&&(Ht=Ht[1])}var gt;if(rt.test(pe.tagName))gt=1;else{var Qe=pe.currentStyle,Ze=tt.defaultView,Fe=Qe?Qe.whiteSpace:Ze&&Ze.getComputedStyle?Ze.getComputedStyle(pe,null).getPropertyValue("white-space"):0;gt=Fe&&Fe.substring(0,3)==="pre"}var oe=re.linenums;(oe=oe==="true"||+oe)||(oe=Le.match(/\blinenums\b(?::(\d+))?/),oe=oe?oe[1]&&oe[1].length?+oe[1]:!0:!1),oe&&_e(pe,oe,gt);var ve={langExtension:Ht,sourceNode:pe,numberLines:oe,pre:gt,sourceCode:null,basePos:null,spans:null,decorations:null};te(ve)}}}Tt<et.length?B.setTimeout(xe,250):typeof Ce=="function"&&Ce()}xe()}var we=B.PR={createSimpleLexer:ye,registerLangHandler:me,sourceDecorator:Ue,PR_ATTRIB_NAME:_,PR_ATTRIB_VALUE:I,PR_COMMENT:S,PR_DECLARATION:E,PR_KEYWORD:D,PR_LITERAL:l,PR_NOCODE:U,PR_PLAIN:a,PR_PUNCTUATION:o,PR_SOURCE:m,PR_STRING:g,PR_TAG:x,PR_TYPE:d,prettyPrintOne:P?B.prettyPrintOne=be:A=be,prettyPrint:j=P?B.prettyPrint=ae:j=ae},Pe=B.define;typeof Pe=="function"&&Pe.amd&&Pe("google-code-prettify",[],function(){return we})})()},SMhR:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjR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G22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(ze,De,W){ze.exports=W.p+"static/lockclose.365036e8.svg"},V5fa:function(ze,De,W){ze.exports={flex_box_center:"flex_box_center___1_S53",flex_space_between:"flex_space_between___1jn1m",flex_box_vertical_center:"flex_box_vertical_center___3ENQs",flex_box_center_end:"flex_box_center_end___1RjJf",flex_box_column:"flex_box_column___3-6wq",bg:"bg___3wGkV",title:"title___1QMPU",questionIcons:"questionIcons___2kqHA",green:"green___3sUty",orange:"orange___1IwUK",greenTip:"greenTip___2LD-4",redTip:"redTip___Ua25P",orangeTip:"orangeTip___1P_qu",pollDesc:"pollDesc___12pG2",answered:"answered___12rTH",unanswer:"unanswer___2WW2x",anchor:"anchor___K9-2U",answerFlag:"answerFlag___3jqRB",flagActive:"flagActive___38hkf",flagHalf:"flagHalf___1rgyT",answerStudentFlag:"answerStudentFlag___2zRLo",answerStudentActive:"answerStudentActive___2T-mu",questionItem:"questionItem___LqD7i",itemType:"itemType___1pbUF",itemFlag:"itemFlag___3xnGm",answerWrap:"answerWrap___13WPD",answerSubjective:"answerSubjective___BuIEZ",otherInput:"otherInput___3j4KI",submitButton:"submitButton___3lR03",randomFlag:"randomFlag___HVH41",answerTrue:"answerTrue___3EG1E",answerFalse:"answerFalse___zj_y6",answerHalf:"answerHalf___27vGH",renderHtml:"renderHtml___1U3SR",simpleText:"simpleText___1ljHF",answerYes:"answerYes___nDZ92",answerNo:"answerNo___1DhaR",answerInfo:"answerInfo___150u3",answerSheet:"answerSheet___1m3xL",active:"active___I4C3w",countDown:"countDown___1gxag",red:"red___1J5W8",fold:"fold___1XoX9",cardList:"cardList___vfXeA",iframe:"iframe___3x_Cy",eduTip:"eduTip___384XZ",eduQrcode:"eduQrcode___26eCP",eduVideo:"eduVideo___2-PAX",eduUsername:"eduUsername___1ctLk",startAnswer:"startAnswer___2XcIR",eduSubmit:"eduSubmit___2k1g8",eduTitle:"eduTitle___1o443",wrpAnswer:"wrpAnswer___2zPBL",simpleMd:"simpleMd___G5mJD"}},"VrN/":function(ze,De,W){(function(q,z){ze.exports=z()})(this,function(){"use strict";var q=navigator.userAgent,z=navigator.platform,P=/gecko\/\d/i.test(q),Y=/MSIE \d/.test(q),F=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q),A=/Edge\/(\d+)/.exec(q),j=Y||F||A,B=j&&(Y?document.documentMode||6:+(A||F)[1]),L=!A&&/WebKit\//.test(q),T=L&&/Qt\/\d+\.\d+/.test(q),v=!A&&/Chrome\//.test(q),C=/Opera\//.test(q),k=/Apple Computer/.test(navigator.vendor),O=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(q),b=/PhantomJS/.test(q),p=!A&&/AppleWebKit/.test(q)&&/Mobile\/\w+/.test(q),c=/Android/.test(q),i=p||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(q),u=p||/Mac/.test(z),h=/\bCrOS\b/.test(q),R=/win/i.test(z),y=C&&q.match(/Version\/(\d*\.\d*)/);y&&(y=Number(y[1])),y&&y>=15&&(C=!1,L=!0);var g=u&&(T||C&&(y==null||y<12.11)),D=P||j&&B>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var d=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var s=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(s?n[1]+s:"")}};function l(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function o(e,t){return l(e).appendChild(t)}function a(e,t,r,n){var s=document.createElement(e);if(r&&(s.className=r),n&&(s.style.cssText=n),typeof t=="string")s.appendChild(document.createTextNode(t));else if(t)for(var N=0;N<t.length;++N)s.appendChild(t[N]);return s}function x(e,t,r,n){var s=a(e,t,r,n);return s.setAttribute("role","presentation"),s}var E;document.createRange?E=function(e,t,r,n){var s=document.createRange();return s.setEnd(n||e,r),s.setStart(e,t),s}:E=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(s){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function _(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function I(e,t){var r=e.className;S(t).test(r)||(e.className+=(r?" ":"")+t)}function U(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!S(r[n]).test(t)&&(t+=" "+r[n]);return t}var M=function(e){e.select()};p?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:j&&(M=function(e){try{e.select()}catch(t){}});function H(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function K(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Z(e,t,r,n,s){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var N=n||0,Q=s||0;;){var J=e.indexOf(" ",N);if(J<0||J>=t)return Q+(t-N);Q+=J-N,Q+=r-Q%r,N=J+1}}var le=function(){this.id=null,this.f=null,this.time=0,this.handler=H(this.onTimeout,this)};le.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},le.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function he(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ye=50,Ue={toString:function(){return"CodeMirror.Pass"}},Me={scroll:!1},_e={origin:"*mouse"},Ie={origin:"+move"};function ke(e,t,r){for(var n=0,s=0;;){var N=e.indexOf(" ",n);N==-1&&(N=e.length);var Q=N-n;if(N==e.length||s+Q>=t)return n+Math.min(Q,t-s);if(s+=N-n,s+=r-s%r,n=N+1,s>=t)return n}}var me=[""];function ce(e){for(;me.length<=e;)me.push(te(me)+" ");return me[e]}function te(e){return e[e.length-1]}function be(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ae(e,t,r){for(var n=0,s=r(t);n<e.length&&r(e[n])<=s;)n++;e.splice(n,0,t)}function we(){}function Pe(e,t){var r;return Object.create?r=Object.create(e):(we.prototype=e,r=new we),t&&K(t,r),r}var Ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ve(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ce.test(e))}function Ge(e,t){return t?t.source.indexOf("\\w")>-1&&Ve(e)?!0:t.test(e):Ve(e)}function tt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Je=/[\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 Ye(e){return e.charCodeAt(0)>=768&&Je.test(e)}function et(e,t,r){for(;(r<0?t>0:t<e.length)&&Ye(e.charAt(t));)t+=r;return t}function St(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var s=(t+r)/2,N=n<0?Math.ceil(s):Math.floor(s);if(N==t)return e(N)?t:r;e(N)?r=N:t=N+n}}function At(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var s=!1,N=0;N<e.length;++N){var Q=e[N];(Q.from<r&&Q.to>t||t==r&&Q.to==t)&&(n(Math.max(Q.from,t),Math.min(Q.to,r),Q.level==1?"rtl":"ltr",N),s=!0)}s||n(t,r,"ltr")}var ht=null;function xt(e,t,r){var n;ht=null;for(var s=0;s<e.length;++s){var N=e[s];if(N.from<t&&N.to>t)return s;N.to==t&&(N.from!=N.to&&r=="before"?n=s:ht=s),N.from==t&&(N.from!=N.to&&r!="before"?n=s:ht=s)}return n!=null?n:ht}var Tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(ne){return ne<=247?e.charAt(ne):1424<=ne&&ne<=1524?"R":1536<=ne&&ne<=1785?t.charAt(ne-1536):1774<=ne&&ne<=2220?"r":8192<=ne&&ne<=8203?"w":ne==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,s=/[stwN]/,N=/[LRr]/,Q=/[Lb1n]/,J=/[1n]/;function $(ne,Ee,Ae){this.level=ne,this.from=Ee,this.to=Ae}return function(ne,Ee){var Ae=Ee=="ltr"?"L":"R";if(ne.length==0||Ee=="ltr"&&!n.test(ne))return!1;for(var Xe=ne.length,We=[],ct=0;ct<Xe;++ct)We.push(r(ne.charCodeAt(ct)));for(var Et=0,Dt=Ae;Et<Xe;++Et){var kt=We[Et];kt=="m"?We[Et]=Dt:Dt=kt}for(var Kt=0,It=Ae;Kt<Xe;++Kt){var zt=We[Kt];zt=="1"&&It=="r"?We[Kt]="n":N.test(zt)&&(It=zt,zt=="r"&&(We[Kt]="R"))}for(var sn=1,nn=We[0];sn<Xe-1;++sn){var En=We[sn];En=="+"&&nn=="1"&&We[sn+1]=="1"?We[sn]="1":En==","&&nn==We[sn+1]&&(nn=="1"||nn=="n")&&(We[sn]=nn),nn=En}for(var Un=0;Un<Xe;++Un){var fr=We[Un];if(fr==",")We[Un]="N";else if(fr=="%"){var zn=void 0;for(zn=Un+1;zn<Xe&&We[zn]=="%";++zn);for(var Wr=Un&&We[Un-1]=="!"||zn<Xe&&We[zn]=="1"?"1":"N",Pr=Un;Pr<zn;++Pr)We[Pr]=Wr;Un=zn-1}}for(var or=0,kr=Ae;or<Xe;++or){var yr=We[or];kr=="L"&&yr=="1"?We[or]="L":N.test(yr)&&(kr=yr)}for(var hr=0;hr<Xe;++hr)if(s.test(We[hr])){var sr=void 0;for(sr=hr+1;sr<Xe&&s.test(We[sr]);++sr);for(var Jn=(hr?We[hr-1]:Ae)=="L",Ir=(sr<Xe?We[sr]:Ae)=="L",wa=Jn==Ir?Jn?"L":"R":Ae,Ki=hr;Ki<sr;++Ki)We[Ki]=wa;hr=sr-1}for(var Cr=[],ci,pr=0;pr<Xe;)if(Q.test(We[pr])){var ds=pr;for(++pr;pr<Xe&&Q.test(We[pr]);++pr);Cr.push(new $(0,ds,pr))}else{var Ri=pr,na=Cr.length,ra=Ee=="rtl"?1:0;for(++pr;pr<Xe&&We[pr]!="L";++pr);for(var wr=Ri;wr<pr;)if(J.test(We[wr])){Ri<wr&&(Cr.splice(na,0,new $(1,Ri,wr)),na+=ra);var Ra=wr;for(++wr;wr<pr&&J.test(We[wr]);++wr);Cr.splice(na,0,new $(2,Ra,wr)),na+=ra,Ri=wr}else++wr;Ri<pr&&Cr.splice(na,0,new $(1,Ri,pr))}return Ee=="ltr"&&(Cr[0].level==1&&(ci=ne.match(/^\s+/))&&(Cr[0].from=ci[0].length,Cr.unshift(new $(0,0,ci[0].length))),te(Cr).level==1&&(ci=ne.match(/\s+$/))&&(te(Cr).to-=ci[0].length,Cr.push(new $(0,Xe-ci[0].length,Xe)))),Ee=="rtl"?Cr.reverse():Cr}}();function Ot(e,t){var r=e.order;return r==null&&(r=e.order=Tt(e.text,t)),r}var Oe=[],Te=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Oe).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Oe}function ot(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,s=n&&n[t];if(s){var N=he(s,r);N>-1&&(n[t]=s.slice(0,N).concat(s.slice(N+1)))}}}function Ne(e,t){var r=rt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),s=0;s<r.length;++s)r[s].apply(null,n)}function $e(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ne(e,r||t.type,e,t),se(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)he(r,t[n])==-1&&r.push(t[n])}function fe(e,t){return rt(e,t).length>0}function pe(e){e.prototype.on=function(t,r){Te(this,t,r)},e.prototype.off=function(t,r){ot(this,t,r)}}function re(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ie(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function se(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function de(e){re(e),ie(e)}function Le(e){return e.target||e.srcElement}function Ke(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),u&&e.ctrlKey&&t==1&&(t=3),t}var dt=function(){if(j&&B<9)return!1;var e=a("div");return"draggable"in e||"dragDrop"in e}(),_t;function Ht(e){if(_t==null){var t=a("span","\u200B");o(e,a("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(_t=t.offsetWidth<=1&&t.offsetHeight>2&&!(j&&B<8))}var r=_t?a("span","\u200B"):a("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var it;function gt(e){if(it!=null)return it;var t=o(e,document.createTextNode("A\u062EA")),r=E(t,0,1).getBoundingClientRect(),n=E(t,1,2).getBoundingClientRect();return l(e),!r||r.left==r.right?!1:it=n.right-r.right<3}var Qe=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var s=e.indexOf(`
`,t);s==-1&&(s=e.length);var N=e.slice(t,e.charAt(s-1)=="\r"?s-1:s),Q=N.indexOf("\r");Q!=-1?(r.push(N.slice(0,Q)),t+=Q+1):(r.push(N),t=s+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ze=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Fe=function(){var e=a("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),oe=null;function ve(e){if(oe!=null)return oe;var t=o(e,a("span","x")),r=t.getBoundingClientRect(),n=E(t,0,1).getBoundingClientRect();return oe=Math.abs(r.left-n.left)>1}var nt={},He={};function bt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),nt[e]=t}function mt(e,t){He[e]=t}function Re(e){if(typeof e=="string"&&He.hasOwnProperty(e))e=He[e];else if(e&&typeof e.name=="string"&&He.hasOwnProperty(e.name)){var t=He[e.name];typeof t=="string"&&(t={name:t}),e=Pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function qe(e,t){t=Re(t);var r=nt[t.name];if(!r)return qe(e,"text/plain");var n=r(e,t);if(vt.hasOwnProperty(t.name)){var s=vt[t.name];for(var N in s){if(!s.hasOwnProperty(N))continue;n.hasOwnProperty(N)&&(n["_"+N]=n[N]),n[N]=s[N]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var Q in t.modeProps)n[Q]=t.modeProps[Q];return n}var vt={};function Ct(e,t){var r=vt.hasOwnProperty(e)?vt[e]:vt[e]={};K(t,r)}function wt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var s=t[n];s instanceof Array&&(s=s.concat([])),r[n]=s}return r}function lt(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ft(e,t,r){return e.startState?e.startState(t,r):!0}var $t=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};$t.prototype.eol=function(){return this.pos>=this.string.length},$t.prototype.sol=function(){return this.pos==this.lineStart},$t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},$t.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},$t.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},$t.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$t.prototype.skipToEnd=function(){this.pos=this.string.length},$t.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$t.prototype.backUp=function(e){this.pos-=e},$t.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},$t.prototype.indentation=function(){return Z(this.string,null,this.tabSize)-(this.lineStart?Z(this.string,this.lineStart,this.tabSize):0)},$t.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(Q){return r?Q.toLowerCase():Q},s=this.string.substr(this.pos,e.length);if(n(s)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var N=this.string.slice(this.pos).match(e);return N&&N.index>0?null:(N&&t!==!1&&(this.pos+=N[0].length),N)}},$t.prototype.current=function(){return this.string.slice(this.start,this.pos)},$t.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$t.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$t.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Rt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var s=r.children[n],N=s.chunkSize();if(t<N){r=s;break}t-=N}return r.lines[t]}function Zt(e,t,r){var n=[],s=t.line;return e.iter(t.line,r.line+1,function(N){var Q=N.text;s==r.line&&(Q=Q.slice(0,r.ch)),s==t.line&&(Q=Q.slice(t.ch)),n.push(Q),++s}),n}function dn(e,t,r){var n=[];return e.iter(t,r,function(s){n.push(s.text)}),n}function Jt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Gt(e){if(e.parent==null)return null;for(var t=e.parent,r=he(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var s=0;!(n.children[s]==t);++s)r+=n.children[s].chunkSize();return r+t.first}function fn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var s=e.children[n],N=s.height;if(t<N){e=s;continue e}t-=N,r+=s.chunkSize()}return r}while(!e.lines);for(var Q=0;Q<e.lines.length;++Q){var J=e.lines[Q],$=J.height;if(t<$)break;t-=$}return r+Q}function On(e,t){return t>=e.first&&t<e.first+e.size}function Pn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ft(e,t,r){if(r===void 0&&(r=null),!(this instanceof ft))return new ft(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Wt(e,t){return e.line-t.line||e.ch-t.ch}function Qt(e,t){return e.sticky==t.sticky&&Wt(e,t)==0}function mn(e){return ft(e.line,e.ch)}function pn(e,t){return Wt(e,t)<0?t:e}function Dn(e,t){return Wt(e,t)<0?e:t}function X(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function f(e,t){if(t.line<e.first)return ft(e.first,0);var r=e.first+e.size-1;return t.line>r?ft(r,Rt(e,r).text.length):w(t,Rt(e,t.line).text.length)}function w(e,t){var r=e.ch;return r==null||r>t?ft(e.line,t):r<0?ft(e.line,0):e}function G(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=f(e,t[n]);return r}var ee=function(e,t){this.state=e,this.lookAhead=t},V=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};V.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},V.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},V.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},V.fromSaved=function(e,t,r){return t instanceof ee?new V(e,wt(e.mode,t.state),r,t.lookAhead):new V(e,wt(e.mode,t),r)},V.prototype.save=function(e){var t=e!==!1?wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ee(t,this.maxLookAhead):t};function Se(e,t,r,n){var s=[e.state.modeGen],N={};wn(e,t.text,e.doc.mode,r,function(ne,Ee){return s.push(ne,Ee)},N,n);for(var Q=r.state,J=function(ne){r.baseTokens=s;var Ee=e.state.overlays[ne],Ae=1,Xe=0;r.state=!0,wn(e,t.text,Ee.mode,r,function(We,ct){for(var Et=Ae;Xe<We;){var Dt=s[Ae];Dt>We&&s.splice(Ae,1,We,s[Ae+1],Dt),Ae+=2,Xe=Math.min(We,Dt)}if(!ct)return;if(Ee.opaque)s.splice(Et,Ae-Et,We,"overlay "+ct),Ae=Et+2;else for(;Et<Ae;Et+=2){var kt=s[Et+1];s[Et+1]=(kt?kt+" ":"")+"overlay "+ct}},N),r.state=Q,r.baseTokens=null,r.baseTokenPos=1},$=0;$<e.state.overlays.length;++$)J($);return{styles:s,classes:N.bgClass||N.textClass?N:null}}function st(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=je(e,Gt(t)),s=t.text.length>e.options.maxHighlightLength&&wt(e.doc.mode,n.state),N=Se(e,t,n);s&&(n.state=s),t.stateAfter=n.save(!s),t.styles=N.styles,N.classes?t.styleClasses=N.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function je(e,t,r){var n=e.doc,s=e.display;if(!n.mode.startState)return new V(n,!0,t);var N=kn(e,t,r),Q=N>n.first&&Rt(n,N-1).stateAfter,J=Q?V.fromSaved(n,Q,N):new V(n,Ft(n.mode),N);return n.iter(N,t,function($){Pt(e,$.text,J);var ne=J.line;$.stateAfter=ne==t-1||ne%5==0||ne>=s.viewFrom&&ne<s.viewTo?J.save():null,J.nextLine()}),r&&(n.modeFrontier=J.line),J}function Pt(e,t,r,n){var s=e.doc.mode,N=new $t(t,e.options.tabSize,r);for(N.start=N.pos=n||0,t==""&&ut(s,r.state);!N.eol();)Vt(s,N,r.state),N.start=N.pos}function ut(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=lt(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function Vt(e,t,r,n){for(var s=0;s<10;s++){n&&(n[0]=lt(e,r).mode);var N=e.token(t,r);if(t.pos>t.start)return N}throw new Error("Mode "+e.name+" failed to advance stream.")}var qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yn(e,t,r,n){var s=e.doc,N=s.mode,Q;t=f(s,t);var J=Rt(s,t.line),$=je(e,t.line,r),ne=new $t(J.text,e.options.tabSize,$),Ee;for(n&&(Ee=[]);(n||ne.pos<t.ch)&&!ne.eol();)ne.start=ne.pos,Q=Vt(N,ne,$.state),n&&Ee.push(new qt(ne,Q,wt(s.mode,$.state)));return n?Ee:new qt(ne,Q,$.state)}function Tn(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function wn(e,t,r,n,s,N,Q){var J=r.flattenSpans;J==null&&(J=e.options.flattenSpans);var $=0,ne=null,Ee=new $t(t,e.options.tabSize,n),Ae,Xe=e.options.addModeClass&&[null];for(t==""&&Tn(ut(r,n.state),N);!Ee.eol();){if(Ee.pos>e.options.maxHighlightLength?(J=!1,Q&&Pt(e,t,n,Ee.pos),Ee.pos=t.length,Ae=null):Ae=Tn(Vt(r,Ee,n.state,Xe),N),Xe){var We=Xe[0].name;We&&(Ae="m-"+(Ae?We+" "+Ae:We))}if(!J||ne!=Ae){for(;$<Ee.start;)$=Math.min(Ee.start,$+5e3),s($,ne);ne=Ae}Ee.start=Ee.pos}for(;$<Ee.pos;){var ct=Math.min(Ee.pos,$+5e3);s(ct,ne),$=ct}}function kn(e,t,r){for(var n,s,N=e.doc,Q=r?-1:t-(e.doc.mode.innerMode?1e3:100),J=t;J>Q;--J){if(J<=N.first)return N.first;var $=Rt(N,J-1),ne=$.stateAfter;if(ne&&(!r||J+(ne instanceof ee?ne.lookAhead:0)<=N.modeFrontier))return J;var Ee=Z($.text,null,e.options.tabSize);(s==null||n>Ee)&&(s=J-1,n=Ee)}return s}function mr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var s=Rt(e,n).stateAfter;if(s&&(!(s instanceof ee)||n+s.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Kr=!1,Zn=!1;function tr(){Kr=!0}function Sr(){Zn=!0}function Rr(e,t,r){this.marker=e,this.from=t,this.to=r}function gr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function br(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ar(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Tr(e,t,r){var n;if(e)for(var s=0;s<e.length;++s){var N=e[s],Q=N.marker,J=N.from==null||(Q.inclusiveLeft?N.from<=t:N.from<t);if(J||N.from==t&&Q.type=="bookmark"&&(!r||!N.marker.insertLeft)){var $=N.to==null||(Q.inclusiveRight?N.to>=t:N.to>t);(n||(n=[])).push(new Rr(Q,N.from,$?null:N.to))}}return n}function Jr(e,t,r){var n;if(e)for(var s=0;s<e.length;++s){var N=e[s],Q=N.marker,J=N.to==null||(Q.inclusiveRight?N.to>=t:N.to>t);if(J||N.from==t&&Q.type=="bookmark"&&(!r||N.marker.insertLeft)){var $=N.from==null||(Q.inclusiveLeft?N.from<=t:N.from<t);(n||(n=[])).push(new Rr(Q,$?null:N.from-t,N.to==null?null:N.to-t))}}return n}function lr(e,t){if(t.full)return null;var r=On(e,t.from.line)&&Rt(e,t.from.line).markedSpans,n=On(e,t.to.line)&&Rt(e,t.to.line).markedSpans;if(!r&&!n)return null;var s=t.from.ch,N=t.to.ch,Q=Wt(t.from,t.to)==0,J=Tr(r,s,Q),$=Jr(n,N,Q),ne=t.text.length==1,Ee=te(t.text).length+(ne?s:0);if(J)for(var Ae=0;Ae<J.length;++Ae){var Xe=J[Ae];if(Xe.to==null){var We=gr($,Xe.marker);We?ne&&(Xe.to=We.to==null?null:We.to+Ee):Xe.to=s}}if($)for(var ct=0;ct<$.length;++ct){var Et=$[ct];if(Et.to!=null&&(Et.to+=Ee),Et.from==null){var Dt=gr(J,Et.marker);Dt||(Et.from=Ee,ne&&(J||(J=[])).push(Et))}else Et.from+=Ee,ne&&(J||(J=[])).push(Et)}J&&(J=nr(J)),$&&$!=J&&($=nr($));var kt=[J];if(!ne){var Kt=t.text.length-2,It;if(Kt>0&&J)for(var zt=0;zt<J.length;++zt)J[zt].to==null&&(It||(It=[])).push(new Rr(J[zt].marker,null,null));for(var sn=0;sn<Kt;++sn)kt.push(It);kt.push($)}return kt}function nr(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Hr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(We){if(We.markedSpans)for(var ct=0;ct<We.markedSpans.length;++ct){var Et=We.markedSpans[ct].marker;Et.readOnly&&(!n||he(n,Et)==-1)&&(n||(n=[])).push(Et)}}),!n)return null;for(var s=[{from:t,to:r}],N=0;N<n.length;++N)for(var Q=n[N],J=Q.find(0),$=0;$<s.length;++$){var ne=s[$];if(Wt(ne.to,J.from)<0||Wt(ne.from,J.to)>0)continue;var Ee=[$,1],Ae=Wt(ne.from,J.from),Xe=Wt(ne.to,J.to);(Ae<0||!Q.inclusiveLeft&&!Ae)&&Ee.push({from:ne.from,to:J.from}),(Xe>0||!Q.inclusiveRight&&!Xe)&&Ee.push({from:J.to,to:ne.to}),s.splice.apply(s,Ee),$+=Ee.length-3}return s}function cn(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function Nr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function _n(e){return e.inclusiveLeft?-1:0}function ge(e){return e.inclusiveRight?1:0}function Cn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),s=t.find(),N=Wt(n.from,s.from)||_n(e)-_n(t);if(N)return-N;var Q=Wt(n.to,s.to)||ge(e)-ge(t);return Q||t.id-e.id}function Sn(e,t){var r=Zn&&e.markedSpans,n;if(r)for(var s=void 0,N=0;N<r.length;++N)s=r[N],s.marker.collapsed&&(t?s.from:s.to)==null&&(!n||Cn(n,s.marker)<0)&&(n=s.marker);return n}function jn(e){return Sn(e,!0)}function tn(e){return Sn(e,!1)}function Xr(e,t){var r=Zn&&e.markedSpans,n;if(r)for(var s=0;s<r.length;++s){var N=r[s];N.marker.collapsed&&(N.from==null||N.from<t)&&(N.to==null||N.to>t)&&(!n||Cn(n,N.marker)<0)&&(n=N.marker)}return n}function Hn(e,t,r,n,s){var N=Rt(e,t),Q=Zn&&N.markedSpans;if(Q)for(var J=0;J<Q.length;++J){var $=Q[J];if(!$.marker.collapsed)continue;var ne=$.marker.find(0),Ee=Wt(ne.from,r)||_n($.marker)-_n(s),Ae=Wt(ne.to,n)||ge($.marker)-ge(s);if(Ee>=0&&Ae<=0||Ee<=0&&Ae>=0)continue;if(Ee<=0&&($.marker.inclusiveRight&&s.inclusiveLeft?Wt(ne.to,r)>=0:Wt(ne.to,r)>0)||Ee>=0&&($.marker.inclusiveRight&&s.inclusiveLeft?Wt(ne.from,n)<=0:Wt(ne.from,n)<0))return!0}}function Wn(e){for(var t;t=jn(e);)e=t.find(-1,!0).line;return e}function rr(e){for(var t;t=tn(e);)e=t.find(1,!0).line;return e}function Or(e){for(var t,r;t=tn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Br(e,t){var r=Rt(e,t),n=Wn(r);return r==n?t:Gt(n)}function ri(e,t){if(t>e.lastLine())return t;var r=Rt(e,t),n;if(!Dr(e,r))return t;for(;n=tn(r);)r=n.find(1,!0).line;return Gt(r)+1}function Dr(e,t){var r=Zn&&t.markedSpans;if(r)for(var n=void 0,s=0;s<r.length;++s){if(n=r[s],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&_r(e,t,n))return!0}}function _r(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return _r(e,n.line,gr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var s=void 0,N=0;N<t.markedSpans.length;++N)if(s=t.markedSpans[N],s.marker.collapsed&&!s.marker.widgetNode&&s.from==r.to&&(s.to==null||s.to!=r.from)&&(s.marker.inclusiveLeft||r.marker.inclusiveRight)&&_r(e,t,s))return!0}function vr(e){e=Wn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var s=r.lines[n];if(s==e)break;t+=s.height}for(var N=r.parent;N;r=N,N=r.parent)for(var Q=0;Q<N.children.length;++Q){var J=N.children[Q];if(J==r)break;t+=J.height}return t}function Qr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=jn(n);){var s=r.find(0,!0);n=s.from.line,t+=s.from.ch-s.to.ch}for(n=e;r=tn(n);){var N=r.find(0,!0);t-=n.text.length-N.from.ch,n=N.to.line,t+=n.text.length-N.to.ch}return t}function ir(e){var t=e.display,r=e.doc;t.maxLine=Rt(r,r.first),t.maxLineLength=Qr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var s=Qr(n);s>t.maxLineLength&&(t.maxLineLength=s,t.maxLine=n)})}var Er=function(e,t,r){this.text=e,Nr(this,t),this.height=r?r(this):1};Er.prototype.lineNo=function(){return Gt(this)},pe(Er);function hi(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),cn(e),Nr(e,r);var s=n?n(e):1;s!=e.height&&Jt(e,s)}function Oi(e){e.parent=null,cn(e)}var Di={},ii={};function fi(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ii:Di;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zr(e,t){var r=x("span",null,null,L?"padding-right: .1px":null),n={pre:x("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var s=0;s<=(t.rest?t.rest.length:0);s++){var N=s?t.rest[s-1]:t.line,Q=void 0;n.pos=0,n.addToken=an,gt(e.display.measure)&&(Q=Ot(N,e.doc.direction))&&(n.addToken=gn(n.addToken,Q)),n.map=[];var J=t!=e.display.externalMeasured&&Gt(N);An(N,n,st(e,N,J)),N.styleClasses&&(N.styleClasses.bgClass&&(n.bgClass=U(N.styleClasses.bgClass,n.bgClass||"")),N.styleClasses.textClass&&(n.textClass=U(N.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ht(e.display.measure))),s==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(L){var $=n.content.lastChild;(/\bcm-tab\b/.test($.className)||$.querySelector&&$.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ne(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=U(n.pre.className,n.textClass||"")),n}function Xt(e){var t=a("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function an(e,t,r,n,s,N,Q){if(!t)return;var J=e.splitSpaces?en(t,e.trailingSpace):t,$=e.cm.state.specialChars,ne=!1,Ee;if(!$.test(t))e.col+=t.length,Ee=document.createTextNode(J),e.map.push(e.pos,e.pos+t.length,Ee),j&&B<9&&(ne=!0),e.pos+=t.length;else{Ee=document.createDocumentFragment();for(var Ae=0;;){$.lastIndex=Ae;var Xe=$.exec(t),We=Xe?Xe.index-Ae:t.length-Ae;if(We){var ct=document.createTextNode(J.slice(Ae,Ae+We));j&&B<9?Ee.appendChild(a("span",[ct])):Ee.appendChild(ct),e.map.push(e.pos,e.pos+We,ct),e.col+=We,e.pos+=We}if(!Xe)break;Ae+=We+1;var Et=void 0;if(Xe[0]==" "){var Dt=e.cm.options.tabSize,kt=Dt-e.col%Dt;Et=Ee.appendChild(a("span",ce(kt),"cm-tab")),Et.setAttribute("role","presentation"),Et.setAttribute("cm-text"," "),e.col+=kt}else Xe[0]=="\r"||Xe[0]==`
`?(Et=Ee.appendChild(a("span",Xe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Et.setAttribute("cm-text",Xe[0]),e.col+=1):(Et=e.cm.options.specialCharPlaceholder(Xe[0]),Et.setAttribute("cm-text",Xe[0]),j&&B<9?Ee.appendChild(a("span",[Et])):Ee.appendChild(Et),e.col+=1);e.map.push(e.pos,e.pos+1,Et),e.pos++}}if(e.trailingSpace=J.charCodeAt(t.length-1)==32,r||n||s||ne||N||Q){var Kt=r||"";n&&(Kt+=n),s&&(Kt+=s);var It=a("span",[Ee],Kt,N);if(Q)for(var zt in Q)Q.hasOwnProperty(zt)&&zt!="style"&&zt!="class"&&It.setAttribute(zt,Q[zt]);return e.content.appendChild(It)}e.content.appendChild(Ee)}function en(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",s=0;s<e.length;s++){var N=e.charAt(s);N==" "&&r&&(s==e.length-1||e.charCodeAt(s+1)==32)&&(N="\xA0"),n+=N,r=N==" "}return n}function gn(e,t){return function(r,n,s,N,Q,J,$){s=s?s+" cm-force-border":"cm-force-border";for(var ne=r.pos,Ee=ne+n.length;;){for(var Ae=void 0,Xe=0;Xe<t.length&&!(Ae=t[Xe],Ae.to>ne&&Ae.from<=ne);Xe++);if(Ae.to>=Ee)return e(r,n,s,N,Q,J,$);e(r,n.slice(0,Ae.to-ne),s,N,null,J,$),N=null,n=n.slice(Ae.to-ne),ne=Ae.to}}}function vn(e,t,r,n){var s=!n&&r.widgetNode;s&&e.map.push(e.pos,e.pos+t,s),!n&&e.cm.display.input.needsContentAttribute&&(s||(s=e.content.appendChild(document.createElement("span"))),s.setAttribute("cm-marker",r.id)),s&&(e.cm.display.input.setUneditable(s),e.content.appendChild(s)),e.pos+=t,e.trailingSpace=!1}function An(e,t,r){var n=e.markedSpans,s=e.text,N=0;if(!n){for(var Q=1;Q<r.length;Q+=2)t.addToken(t,s.slice(N,N=r[Q]),fi(r[Q+1],t.cm.options));return}for(var J=s.length,$=0,ne=1,Ee="",Ae,Xe,We=0,ct,Et,Dt,kt,Kt;;){if(We==$){ct=Et=Dt=Xe="",Kt=null,kt=null,We=Infinity;for(var It=[],zt=void 0,sn=0;sn<n.length;++sn){var nn=n[sn],En=nn.marker;if(En.type=="bookmark"&&nn.from==$&&En.widgetNode)It.push(En);else if(nn.from<=$&&(nn.to==null||nn.to>$||En.collapsed&&nn.to==$&&nn.from==$)){if(nn.to!=null&&nn.to!=$&&We>nn.to&&(We=nn.to,Et=""),En.className&&(ct+=" "+En.className),En.css&&(Xe=(Xe?Xe+";":"")+En.css),En.startStyle&&nn.from==$&&(Dt+=" "+En.startStyle),En.endStyle&&nn.to==We&&(zt||(zt=[])).push(En.endStyle,nn.to),En.title&&((Kt||(Kt={})).title=En.title),En.attributes)for(var Un in En.attributes)(Kt||(Kt={}))[Un]=En.attributes[Un];En.collapsed&&(!kt||Cn(kt.marker,En)<0)&&(kt=nn)}else nn.from>$&&We>nn.from&&(We=nn.from)}if(zt)for(var fr=0;fr<zt.length;fr+=2)zt[fr+1]==We&&(Et+=" "+zt[fr]);if(!kt||kt.from==$)for(var zn=0;zn<It.length;++zn)vn(t,0,It[zn]);if(kt&&(kt.from||0)==$){if(vn(t,(kt.to==null?J+1:kt.to)-$,kt.marker,kt.from==null),kt.to==null)return;kt.to==$&&(kt=!1)}}if($>=J)break;for(var Wr=Math.min(J,We);;){if(Ee){var Pr=$+Ee.length;if(!kt){var or=Pr>Wr?Ee.slice(0,Wr-$):Ee;t.addToken(t,or,Ae?Ae+ct:ct,Dt,$+or.length==We?Et:"",Xe,Kt)}if(Pr>=Wr){Ee=Ee.slice(Wr-$),$=Wr;break}$=Pr,Dt=""}Ee=s.slice(N,N=r[ne++]),Ae=fi(r[ne++],t.cm.options)}}}function xn(e,t,r){this.line=t,this.rest=Or(t),this.size=this.rest?Gt(te(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Dr(e,t)}function In(e,t,r){for(var n=[],s,N=t;N<r;N=s){var Q=new xn(e.doc,Rt(e.doc,N),N);s=N+Q.size,n.push(Q)}return n}var qn=null;function bn(e){qn?qn.ops.push(e):e.ownsGroup=qn={ops:[e],delayedCallbacks:[]}}function qr(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var s=e.ops[n];if(s.cursorActivityHandlers)for(;s.cursorActivityCalled<s.cursorActivityHandlers.length;)s.cursorActivityHandlers[s.cursorActivityCalled++].call(null,s.cm)}}while(r<t.length)}function Yt(e,t){var r=e.ownsGroup;if(!r)return;try{qr(r)}finally{qn=null,t(r)}}var un=null;function hn(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),s;qn?s=qn.delayedCallbacks:un?s=un:(s=un=[],setTimeout(Fn,0));for(var N=function(J){s.push(function(){return r[J].apply(null,n)})},Q=0;Q<r.length;++Q)N(Q)}function Fn(){var e=un;un=null;for(var t=0;t<e.length;++t)e[t]()}function Ur(e,t,r,n){for(var s=0;s<t.changes.length;s++){var N=t.changes[s];N=="text"?aa(e,t):N=="gutter"?fo(e,t,r,n):N=="class"?Oa(e,t):N=="widget"&&jo(e,t,n)}t.changes=null}function ai(e){return e.node==e.text&&(e.node=a("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),j&&B<8&&(e.node.style.zIndex=2)),e.node}function pi(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ai(t);t.background=n.insertBefore(a("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function ia(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zr(e,t)}function aa(e,t){var r=t.text.className,n=ia(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Oa(e,t)):r&&(t.text.className=r)}function Oa(e,t){pi(e,t),t.line.wrapClass?ai(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function fo(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var s=ai(t);t.gutterBackground=a("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),s.insertBefore(t.gutterBackground,t.text)}var N=t.line.gutterMarkers;if(e.options.lineNumbers||N){var Q=ai(t),J=t.gutter=a("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(J),Q.insertBefore(J,t.text),t.line.gutterClass&&(J.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!N||!N["CodeMirror-linenumbers"])&&(t.lineNumber=J.appendChild(a("div",Pn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),N)for(var $=0;$<e.display.gutterSpecs.length;++$){var ne=e.display.gutterSpecs[$].className,Ee=N.hasOwnProperty(ne)&&N[ne];Ee&&J.appendChild(a("div",[Ee],"CodeMirror-gutter-elt","left: "+n.gutterLeft[ne]+"px; width: "+n.gutterWidth[ne]+"px"))}}}function jo(e,t,r){t.alignable&&(t.alignable=null);for(var n=S("CodeMirror-linewidget"),s=t.node.firstChild,N=void 0;s;s=N)N=s.nextSibling,n.test(s.className)&&t.node.removeChild(s);oa(e,t,r)}function po(e,t,r,n){var s=ia(e,t);return t.text=t.node=s.pre,s.bgClass&&(t.bgClass=s.bgClass),s.textClass&&(t.textClass=s.textClass),Oa(e,t),fo(e,t,r,n),oa(e,t,n),t.node}function oa(e,t,r){if(sa(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)sa(e,t.rest[n],t,r,!1)}function sa(e,t,r,n,s){if(!t.widgets)return;for(var N=ai(r),Q=0,J=t.widgets;Q<J.length;++Q){var $=J[Q],ne=a("div",[$.node],"CodeMirror-linewidget"+($.className?" "+$.className:""));$.handleMouseEvents||ne.setAttribute("cm-ignore-events","true"),Wo($,ne,r,n),e.display.input.setUneditable(ne),s&&$.above?N.insertBefore(ne,r.gutter||r.text):N.appendChild(ne),hn($,"redraw")}}function Wo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var s=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(s-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=s+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function _i(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!m(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),o(t.display.measure,a("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=Le(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Hi(e){return e.lineSpace.offsetTop}function Da(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=o(e.measure,a("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function zr(e){return ye-e.display.nativeBarWidth}function oi(e){return e.display.scroller.clientWidth-zr(e)-e.display.barWidth}function La(e){return e.display.scroller.clientHeight-zr(e)-e.display.barHeight}function mo(e,t,r){var n=e.options.lineWrapping,s=n&&oi(e);if(!t.measure.heights||n&&t.measure.width!=s){var N=t.measure.heights=[];if(n){t.measure.width=s;for(var Q=t.text.firstChild.getClientRects(),J=0;J<Q.length-1;J++){var $=Q[J],ne=Q[J+1];Math.abs($.bottom-ne.bottom)>2&&N.push(($.bottom+ne.top)/2-r.top)}}N.push(r.bottom-r.top)}}function Lr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var s=0;s<e.rest.length;s++)if(Gt(e.rest[s])>r)return{map:e.measure.maps[s],cache:e.measure.caches[s],before:!0}}function hs(e,t){t=Wn(t);var r=Gt(t),n=e.display.externalMeasured=new xn(e.doc,t,r);n.lineN=r;var s=n.built=Zr(e,n);return n.text=s.pre,o(e.display.lineMeasure,s.pre),n}function Ma(e,t,r,n){return Fr(e,si(e,t),r,n)}function zi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[bi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function si(e,t){var r=Gt(t),n=zi(e,r);n&&!n.text?n=null:n&&n.changes&&(Ur(e,n,r,ua(e)),e.curOp.forceUpdate=!0),n||(n=hs(e,t));var s=Lr(n,t,r);return{line:t,view:n,rect:null,map:s.map,cache:s.cache,before:s.before,hasHeights:!1}}function Fr(e,t,r,n,s){t.before&&(r=-1);var N=r+(n||""),Q;return t.cache.hasOwnProperty(N)?Q=t.cache[N]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(mo(e,t.view,t.rect),t.hasHeights=!0),Q=go(e,t,r,n),Q.bogus||(t.cache[N]=Q)),{left:Q.left,right:Q.right,top:s?Q.rtop:Q.top,bottom:s?Q.rbottom:Q.bottom}}var Pa={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,s,N,Q,J,$,ne=0;ne<e.length;ne+=3)if(J=e[ne],$=e[ne+1],t<J?(s=0,N=1,Q="left"):t<$?(s=t-J,N=s+1):(ne==e.length-3||t==$&&e[ne+3]>t)&&(N=$-J,s=N-1,t>=$&&(Q="right")),s!=null){if(n=e[ne+2],J==$&&r==(n.insertLeft?"left":"right")&&(Q=r),r=="left"&&s==0)for(;ne&&e[ne-2]==e[ne-3]&&e[ne-1].insertLeft;)n=e[(ne-=3)+2],Q="left";if(r=="right"&&s==$-J)for(;ne<e.length-3&&e[ne+3]==e[ne+4]&&!e[ne+5].insertLeft;)n=e[(ne+=3)+2],Q="right";break}return{node:n,start:s,end:N,collapse:Q,coverStart:J,coverEnd:$}}function Ko(e,t){var r=Pa;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var s=e.length-1;s>=0&&!((r=e[s]).left!=r.right);s--);return r}function go(e,t,r,n){var s=Gi(t.map,r,n),N=s.node,Q=s.start,J=s.end,$=s.collapse,ne;if(N.nodeType==3){for(var Ee=0;Ee<4;Ee++){for(;Q&&Ye(t.line.text.charAt(s.coverStart+Q));)--Q;for(;s.coverStart+J<s.coverEnd&&Ye(t.line.text.charAt(s.coverStart+J));)++J;if(j&&B<9&&Q==0&&J==s.coverEnd-s.coverStart?ne=N.parentNode.getBoundingClientRect():ne=Ko(E(N,Q,J).getClientRects(),n),ne.left||ne.right||Q==0)break;J=Q,Q=Q-1,$="right"}j&&B<11&&(ne=Rn(e.display.measure,ne))}else{Q>0&&($=n="right");var Ae;e.options.lineWrapping&&(Ae=N.getClientRects()).length>1?ne=Ae[n=="right"?Ae.length-1:0]:ne=N.getBoundingClientRect()}if(j&&B<9&&!Q&&(!ne||!ne.left&&!ne.right)){var Xe=N.parentNode.getClientRects()[0];Xe?ne={left:Xe.left,right:Xe.left+vi(e.display),top:Xe.top,bottom:Xe.bottom}:ne=Pa}for(var We=ne.top-t.rect.top,ct=ne.bottom-t.rect.top,Et=(We+ct)/2,Dt=t.view.measure.heights,kt=0;kt<Dt.length-1&&!(Et<Dt[kt]);kt++);var Kt=kt?Dt[kt-1]:0,It=Dt[kt],zt={left:($=="right"?ne.right:ne.left)-t.rect.left,right:($=="left"?ne.left:ne.right)-t.rect.left,top:Kt,bottom:It};return!ne.left&&!ne.right&&(zt.bogus=!0),e.options.singleCursorHeightPerLine||(zt.rtop=We,zt.rbottom=ct),zt}function Rn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ve(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function mi(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function vo(e){e.display.externalMeasure=null,l(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)mi(e.display.view[t])}function Li(e){vo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ln(){return v&&c?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gi(){return v&&c?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ka(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=_i(e.widgets[r]));return t}function Vi(e,t,r,n,s){if(!s){var N=ka(t);r.top+=N,r.bottom+=N}if(n=="line")return r;n||(n="local");var Q=vr(t);if(n=="local"?Q+=Hi(e.display):Q-=e.display.viewOffset,n=="page"||n=="window"){var J=e.display.lineSpace.getBoundingClientRect();Q+=J.top+(n=="window"?0:gi());var $=J.left+(n=="window"?0:Ln());r.left+=$,r.right+=$}return r.top+=Q,r.bottom+=Q,r}function yo(e,t,r){if(r=="div")return t;var n=t.left,s=t.top;if(r=="page")n-=Ln(),s-=gi();else if(r=="local"||!r){var N=e.display.sizer.getBoundingClientRect();n+=N.left,s+=N.top}var Q=e.display.lineSpace.getBoundingClientRect();return{left:n-Q.left,top:s-Q.top}}function li(e,t,r,n,s){return n||(n=Rt(e.doc,t.line)),Vi(e,n,Ma(e,n,t.ch,s),r)}function Gr(e,t,r,n,s,N){n=n||Rt(e.doc,t.line),s||(s=si(e,n));function Q(ct,Et){var Dt=Fr(e,s,ct,Et?"right":"left",N);return Et?Dt.left=Dt.right:Dt.right=Dt.left,Vi(e,n,Dt,r)}var J=Ot(n,e.doc.direction),$=t.ch,ne=t.sticky;if($>=n.text.length?($=n.text.length,ne="before"):$<=0&&($=0,ne="after"),!J)return Q(ne=="before"?$-1:$,ne=="before");function Ee(ct,Et,Dt){var kt=J[Et],Kt=kt.level==1;return Q(Dt?ct-1:ct,Kt!=Dt)}var Ae=xt(J,$,ne),Xe=ht,We=Ee($,Ae,ne=="before");return Xe!=null&&(We.other=Ee($,Xe,ne!="before")),We}function Ia(e,t){var r=0;t=f(e.doc,t),e.options.lineWrapping||(r=vi(e.display)*t.ch);var n=Rt(e.doc,t.line),s=vr(n)+Hi(e.display);return{left:r,right:r,top:s,bottom:s+n.height}}function Mi(e,t,r,n,s){var N=ft(e,t,r);return N.xRel=s,n&&(N.outside=n),N}function Na(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Mi(n.first,0,null,-1,-1);var s=fn(n,r),N=n.first+n.size-1;if(s>N)return Mi(n.first+n.size-1,Rt(n,N).text.length,null,1,1);t<0&&(t=0);for(var Q=Rt(n,s);;){var J=Ua(e,Q,s,t,r),$=Xr(Q,J.ch+(J.xRel>0||J.outside>0?1:0));if(!$)return J;var ne=$.find(1);if(ne.line==s)return ne;Q=Rt(n,s=ne.line)}}function bo(e,t,r,n){n-=ka(t);var s=t.text.length,N=St(function(Q){return Fr(e,r,Q-1).bottom<=n},s,0);return s=St(function(Q){return Fr(e,r,Q).top>n},N,s),{begin:N,end:s}}function Ba(e,t,r,n){r||(r=si(e,t));var s=Vi(e,t,Fr(e,r,n),"line").top;return bo(e,t,r,s)}function la(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Ua(e,t,r,n,s){s-=vr(t);var N=si(e,t),Q=ka(t),J=0,$=t.text.length,ne=!0,Ee=Ot(t,e.doc.direction);if(Ee){var Ae=(e.options.lineWrapping?Eo:Ho)(e,t,r,N,Ee,n,s);ne=Ae.level!=1,J=ne?Ae.from:Ae.to-1,$=ne?Ae.to:Ae.from-1}var Xe=null,We=null,ct=St(function(sn){var nn=Fr(e,N,sn);return nn.top+=Q,nn.bottom+=Q,la(nn,n,s,!1)?(nn.top<=s&&nn.left<=n&&(Xe=sn,We=nn),!0):!1},J,$),Et,Dt,kt=!1;if(We){var Kt=n-We.left<We.right-n,It=Kt==ne;ct=Xe+(It?0:1),Dt=It?"after":"before",Et=Kt?We.left:We.right}else{!ne&&(ct==$||ct==J)&&ct++,Dt=ct==0?"after":ct==t.text.length?"before":Fr(e,N,ct-(ne?1:0)).bottom+Q<=s==ne?"after":"before";var zt=Gr(e,ft(r,ct,Dt),"line",t,N);Et=zt.left,kt=s<zt.top?-1:s>=zt.bottom?1:0}return ct=et(t.text,ct,1),Mi(r,ct,Dt,kt,n-Et)}function Ho(e,t,r,n,s,N,Q){var J=St(function(Ae){var Xe=s[Ae],We=Xe.level!=1;return la(Gr(e,ft(r,We?Xe.to:Xe.from,We?"before":"after"),"line",t,n),N,Q,!0)},0,s.length-1),$=s[J];if(J>0){var ne=$.level!=1,Ee=Gr(e,ft(r,ne?$.from:$.to,ne?"after":"before"),"line",t,n);la(Ee,N,Q,!0)&&Ee.top>Q&&($=s[J-1])}return $}function Eo(e,t,r,n,s,N,Q){var J=bo(e,t,n,Q),$=J.begin,ne=J.end;/\s/.test(t.text.charAt(ne-1))&&ne--;for(var Ee=null,Ae=null,Xe=0;Xe<s.length;Xe++){var We=s[Xe];if(We.from>=ne||We.to<=$)continue;var ct=We.level!=1,Et=Fr(e,n,ct?Math.min(ne,We.to)-1:Math.max($,We.from)).right,Dt=Et<N?N-Et+1e9:Et-N;(!Ee||Ae>Dt)&&(Ee=We,Ae=Dt)}return Ee||(Ee=s[s.length-1]),Ee.from<$&&(Ee={from:$,to:Ee.to,level:Ee.level}),Ee.to>ne&&(Ee={from:Ee.from,to:ne,level:Ee.level}),Ee}var ui;function Pi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ui==null){ui=a("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ui.appendChild(document.createTextNode("x")),ui.appendChild(a("br"));ui.appendChild(document.createTextNode("x"))}o(e.measure,ui);var r=ui.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),l(e.measure),r||1}function vi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=a("span","xxxxxxxxxx"),r=a("pre",[t],"CodeMirror-line-like");o(e.measure,r);var n=t.getBoundingClientRect(),s=(n.right-n.left)/10;return s>2&&(e.cachedCharWidth=s),s||10}function ua(e){for(var t=e.display,r={},n={},s=t.gutters.clientLeft,N=t.gutters.firstChild,Q=0;N;N=N.nextSibling,++Q){var J=e.display.gutterSpecs[Q].className;r[J]=N.offsetLeft+N.clientLeft+s,n[J]=N.clientWidth}return{fixedPos:Fa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Fa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function xo(e){var t=Pi(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/vi(e.display)-3);return function(s){if(Dr(e.doc,s))return 0;var N=0;if(s.widgets)for(var Q=0;Q<s.widgets.length;Q++)s.widgets[Q].height&&(N+=s.widgets[Q].height);return r?N+(Math.ceil(s.text.length/n)||1)*t:N+t}}function ei(e){var t=e.doc,r=xo(e);t.iter(function(n){var s=r(n);s!=n.height&&Jt(n,s)})}function yi(e,t,r,n){var s=e.display;if(!r&&Le(t).getAttribute("cm-not-content")=="true")return null;var N,Q,J=s.lineSpace.getBoundingClientRect();try{N=t.clientX-J.left,Q=t.clientY-J.top}catch(Ae){return null}var $=Na(e,N,Q),ne;if(n&&$.xRel>0&&(ne=Rt(e.doc,$.line).text).length==$.ch){var Ee=Z(ne,ne.length,e.options.tabSize)-ne.length;$=ft($.line,Math.max(0,Math.round((N-_a(e.display).left)/vi(e.display))-Ee))}return $}function bi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Gn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var s=e.display;if(n&&r<s.viewTo&&(s.updateLineNumbers==null||s.updateLineNumbers>t)&&(s.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=s.viewTo)Zn&&Br(e.doc,t)<s.viewTo&&di(e);else if(r<=s.viewFrom)Zn&&ri(e.doc,r+n)>s.viewFrom?di(e):(s.viewFrom+=n,s.viewTo+=n);else if(t<=s.viewFrom&&r>=s.viewTo)di(e);else if(t<=s.viewFrom){var N=ki(e,r,r+n,1);N?(s.view=s.view.slice(N.index),s.viewFrom=N.lineN,s.viewTo+=n):di(e)}else if(r>=s.viewTo){var Q=ki(e,t,t,-1);Q?(s.view=s.view.slice(0,Q.index),s.viewTo=Q.lineN):di(e)}else{var J=ki(e,t,t,-1),$=ki(e,r,r+n,1);J&&$?(s.view=s.view.slice(0,J.index).concat(In(e,J.lineN,$.lineN)).concat(s.view.slice($.index)),s.viewTo+=n):di(e)}var ne=s.externalMeasured;ne&&(r<ne.lineN?ne.lineN+=n:t<ne.lineN+ne.size&&(s.externalMeasured=null))}function Yr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,s=e.display.externalMeasured;if(s&&t>=s.lineN&&t<s.lineN+s.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var N=n.view[bi(e,t)];if(N.node==null)return;var Q=N.changes||(N.changes=[]);he(Q,r)==-1&&Q.push(r)}function di(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ki(e,t,r,n){var s=bi(e,t),N,Q=e.display.view;if(!Zn||r==e.doc.first+e.doc.size)return{index:s,lineN:r};for(var J=e.display.viewFrom,$=0;$<s;$++)J+=Q[$].size;if(J!=t){if(n>0){if(s==Q.length-1)return null;N=J+Q[s].size-t,s++}else N=J-t;t+=N,r+=N}for(;Br(e.doc,r)!=r;){if(s==(n<0?0:Q.length-1))return null;r+=n*Q[s-(n<0?1:0)].size,s+=n}return{index:s,lineN:r}}function zo(e,t,r){var n=e.display,s=n.view;s.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=In(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=In(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(bi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(In(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,bi(e,r)))),n.viewTo=r}function ja(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var s=t[n];!s.hidden&&(!s.node||s.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Co(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},s=n.cursors=document.createDocumentFragment(),N=n.selection=document.createDocumentFragment(),Q=0;Q<r.sel.ranges.length;Q++){if(!t&&Q==r.sel.primIndex)continue;var J=r.sel.ranges[Q];if(J.from().line>=e.display.viewTo||J.to().line<e.display.viewFrom)continue;var $=J.empty();($||e.options.showCursorWhenSelecting)&&Ei(e,J.head,s),$||So(e,J,N)}return n}function Ei(e,t,r){var n=Gr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),s=r.appendChild(a("div","\xA0","CodeMirror-cursor"));if(s.style.left=n.left+"px",s.style.top=n.top+"px",s.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var N=r.appendChild(a("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));N.style.display="",N.style.left=n.other.left+"px",N.style.top=n.other.top+"px",N.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function da(e,t){return e.top-t.top||e.left-t.left}function So(e,t,r){var n=e.display,s=e.doc,N=document.createDocumentFragment(),Q=_a(e.display),J=Q.left,$=Math.max(n.sizerWidth,oi(e)-n.sizer.offsetLeft)-Q.right,ne=s.direction=="ltr";function Ee(It,zt,sn,nn){zt<0&&(zt=0),zt=Math.round(zt),nn=Math.round(nn),N.appendChild(a("div",null,"CodeMirror-selected","position: absolute; left: "+It+`px;
top: `+zt+"px; width: "+(sn==null?$-It:sn)+`px;
height: `+(nn-zt)+"px"))}function Ae(It,zt,sn){var nn=Rt(s,It),En=nn.text.length,Un,fr;function zn(or,kr){return li(e,ft(It,or),"div",nn,kr)}function Wr(or,kr,yr){var hr=Ba(e,nn,null,or),sr=kr=="ltr"==(yr=="after")?"left":"right",Jn=yr=="after"?hr.begin:hr.end-(/\s/.test(nn.text.charAt(hr.end-1))?2:1);return zn(Jn,sr)[sr]}var Pr=Ot(nn,s.direction);return At(Pr,zt||0,sn==null?En:sn,function(or,kr,yr,hr){var sr=yr=="ltr",Jn=zn(or,sr?"left":"right"),Ir=zn(kr-1,sr?"right":"left"),wa=zt==null&&or==0,Ki=sn==null&&kr==En,Cr=hr==0,ci=!Pr||hr==Pr.length-1;if(Ir.top-Jn.top<=3){var pr=(ne?wa:Ki)&&Cr,ds=(ne?Ki:wa)&&ci,Ri=pr?J:(sr?Jn:Ir).left,na=ds?$:(sr?Ir:Jn).right;Ee(Ri,Jn.top,na-Ri,Jn.bottom)}else{var ra,wr,Ra,cs;sr?(ra=ne&&wa&&Cr?J:Jn.left,wr=ne?$:Wr(or,yr,"before"),Ra=ne?J:Wr(kr,yr,"after"),cs=ne&&Ki&&ci?$:Ir.right):(ra=ne?Wr(or,yr,"before"):J,wr=!ne&&wa&&Cr?$:Jn.right,Ra=!ne&&Ki&&ci?J:Ir.left,cs=ne?Wr(kr,yr,"after"):$),Ee(ra,Jn.top,wr-ra,Jn.bottom),Jn.bottom<Ir.top&&Ee(J,Jn.bottom,null,Ir.top),Ee(Ra,Ir.top,cs-Ra,Ir.bottom)}(!Un||da(Jn,Un)<0)&&(Un=Jn),da(Ir,Un)<0&&(Un=Ir),(!fr||da(Jn,fr)<0)&&(fr=Jn),da(Ir,fr)<0&&(fr=Ir)}),{start:Un,end:fr}}var Xe=t.from(),We=t.to();if(Xe.line==We.line)Ae(Xe.line,Xe.ch,We.ch);else{var ct=Rt(s,Xe.line),Et=Rt(s,We.line),Dt=Wn(ct)==Wn(Et),kt=Ae(Xe.line,Xe.ch,Dt?ct.text.length+1:null).end,Kt=Ae(We.line,Dt?0:null,We.ch).start;Dt&&(kt.top<Kt.top-2?(Ee(kt.right,kt.top,null,kt.bottom),Ee(J,Kt.top,Kt.left,Kt.bottom)):Ee(kt.right,kt.top,Kt.left-kt.right,kt.bottom)),kt.bottom<Kt.top&&Ee(J,kt.bottom,null,Kt.top)}r.appendChild(N)}function Wa(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Qi(e){e.state.focused||(e.display.input.focus(),Ka(e))}function Ao(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Ka(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ne(e,"focus",e,t),e.state.focused=!0,I(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()),Wa(e)}function Ii(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ne(e,"blur",e,t),e.state.focused=!1,d(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ca(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var s=t.view[n],N=e.options.lineWrapping,Q=void 0,J=0;if(s.hidden)continue;if(j&&B<8){var $=s.node.offsetTop+s.node.offsetHeight;Q=$-r,r=$}else{var ne=s.node.getBoundingClientRect();Q=ne.bottom-ne.top,!N&&s.text.firstChild&&(J=s.text.firstChild.getBoundingClientRect().right-ne.left-1)}var Ee=s.line.height-Q;if((Ee>.005||Ee<-.005)&&(Jt(s.line,Q),To(s.line),s.rest))for(var Ae=0;Ae<s.rest.length;Ae++)To(s.rest[Ae]);if(J>e.display.sizerWidth){var Xe=Math.ceil(J/vi(e.display));Xe>e.display.maxLineLength&&(e.display.maxLineLength=Xe,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}function To(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Yi(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Hi(e));var s=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,N=fn(t,n),Q=fn(t,s);if(r&&r.ensure){var J=r.ensure.from.line,$=r.ensure.to.line;J<N?(N=J,Q=fn(t,vr(Rt(t,J))+e.wrapper.clientHeight)):Math.min($,t.lastLine())>=Q&&(N=fn(t,vr(Rt(t,$))-e.wrapper.clientHeight),Q=$)}return{from:N,to:Math.max(Q,N+1)}}function Go(e,t){if($e(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),s=null;if(t.top+n.top<0?s=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(s=!1),s!=null&&!b){var N=a("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Hi(e.display))+`px;
height: `+(t.bottom-t.top+zr(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(N),N.scrollIntoView(s),e.display.lineSpace.removeChild(N)}}function Vo(e,t,r,n){n==null&&(n=0);var s;!e.options.lineWrapping&&t==r&&(t=t.ch?ft(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?ft(t.line,t.ch+1,"before"):t);for(var N=0;N<5;N++){var Q=!1,J=Gr(e,t),$=!r||r==t?J:Gr(e,r);s={left:Math.min(J.left,$.left),top:Math.min(J.top,$.top)-n,right:Math.max(J.left,$.left),bottom:Math.max(J.bottom,$.bottom)+n};var ne=Ha(e,s),Ee=e.doc.scrollTop,Ae=e.doc.scrollLeft;if(ne.scrollTop!=null&&(Ji(e,ne.scrollTop),Math.abs(e.doc.scrollTop-Ee)>1&&(Q=!0)),ne.scrollLeft!=null&&(ue(e,ne.scrollLeft),Math.abs(e.doc.scrollLeft-Ae)>1&&(Q=!0)),!Q)break}return s}function Xo(e,t){var r=Ha(e,t);r.scrollTop!=null&&Ji(e,r.scrollTop),r.scrollLeft!=null&&ue(e,r.scrollLeft)}function Ha(e,t){var r=e.display,n=Pi(e.display);t.top<0&&(t.top=0);var s=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,N=La(e),Q={};t.bottom-t.top>N&&(t.bottom=t.top+N);var J=e.doc.height+Da(r),$=t.top<n,ne=t.bottom>J-n;if(t.top<s)Q.scrollTop=$?0:t.top;else if(t.bottom>s+N){var Ee=Math.min(t.top,(ne?J:t.bottom)-N);Ee!=s&&(Q.scrollTop=Ee)}var Ae=e.options.fixedGutter?0:r.gutters.offsetWidth,Xe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-Ae,We=oi(e)-r.gutters.offsetWidth,ct=t.right-t.left>We;return ct&&(t.right=t.left+We),t.left<10?Q.scrollLeft=0:t.left<Xe?Q.scrollLeft=Math.max(0,t.left+Ae-(ct?0:10)):t.right>We+Xe-3&&(Q.scrollLeft=t.right+(ct?0:10)-We),Q}function za(e,t){if(t==null)return;ha(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ni(e){ha(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jr(e,t,r){(t!=null||r!=null)&&ha(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Qo(e,t){ha(e),e.curOp.scrollToPos=t}function ha(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Ia(e,t.from),n=Ia(e,t.to);wo(e,r,n,t.margin)}}function wo(e,t,r,n){var s=Ha(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});jr(e,s.scrollLeft,s.scrollTop)}function Ji(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;P||qi(e,{top:t}),Nt(e,t,!0),P&&qi(e),Ci(e,100)}function Nt(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function ue(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,pa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function at(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+zr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Be=function(e,t,r){this.cm=r;var n=this.vert=a("div",[a("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),s=this.horiz=a("div",[a("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=s.tabIndex=-1,e(n),e(s),Te(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Te(s,"scroll",function(){s.clientWidth&&t(s.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,j&&B<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Be.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var s=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+s)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var N=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+N)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Be.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Be.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Be.prototype.zeroWidthHack=function(){var e=u&&!O?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new le,this.disableVert=new le},Be.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var s=e.getBoundingClientRect(),N=r=="vert"?document.elementFromPoint(s.right-1,(s.top+s.bottom)/2):document.elementFromPoint((s.right+s.left)/2,s.bottom-1);N!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Be.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var yt=function(){};yt.prototype.update=function(){return{bottom:0,right:0}},yt.prototype.setScrollLeft=function(){},yt.prototype.setScrollTop=function(){},yt.prototype.clear=function(){};function pt(e,t){t||(t=at(e));var r=e.display.barWidth,n=e.display.barHeight;Ut(e,t);for(var s=0;s<4&&r!=e.display.barWidth||n!=e.display.barHeight;s++)r!=e.display.barWidth&&e.options.lineWrapping&&ca(e),Ut(e,at(e)),r=e.display.barWidth,n=e.display.barHeight}function Ut(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var jt={native:Be,null:yt};function Lt(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&d(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new jt[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Te(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?ue(e,t):Ji(e,t)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var on=0;function Bt(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:++on},bn(e.curOp)}function Mt(e){var t=e.curOp;t&&Yt(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;rn(r)})}function rn(e){for(var t=e.ops,r=0;r<t.length;r++)$n(t[r]);for(var n=0;n<t.length;n++)ln(t[n]);for(var s=0;s<t.length;s++)Vn(t[s]);for(var N=0;N<t.length;N++)Vr(t[N]);for(var Q=0;Q<t.length;Q++)xi(t[Q])}function $n(e){var t=e.cm,r=t.display;Va(t),e.updateMaxLine&&ir(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ln(e){e.updatedDisplay=e.mustUpdate&&Zi(e.cm,e.update)}function Vn(e){var t=e.cm,r=t.display;e.updatedDisplay&&ca(t),e.barMeasure=at(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ma(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+zr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-oi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Vr(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ue(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==_();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&pt(t,e.barMeasure),e.updatedDisplay&&ea(t,e.barMeasure),e.selectionChanged&&Wa(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Qi(e.cm)}function xi(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&fa(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Nt(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ue(t,e.scrollLeft,!0,!0),e.scrollToPos){var s=Vo(t,f(n,e.scrollToPos.from),f(n,e.scrollToPos.to),e.scrollToPos.margin);Go(t,s)}var N=e.maybeHiddenMarkers,Q=e.maybeUnhiddenMarkers;if(N)for(var J=0;J<N.length;++J)N[J].lines.length||Ne(N[J],"hide");if(Q)for(var $=0;$<Q.length;++$)Q[$].lines.length&&Ne(Q[$],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ne(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Xn(e,t){if(e.curOp)return t();Bt(e);try{return t()}finally{Mt(e)}}function Qn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Bt(e);try{return t.apply(e,arguments)}finally{Mt(e)}}}function ur(e){return function(){if(this.curOp)return e.apply(this,arguments);Bt(this);try{return e.apply(this,arguments)}finally{Mt(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Bt(t);try{return e.apply(this,arguments)}finally{Mt(t)}}}function Ci(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,H(Ga,e))}function Ga(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=je(e,t.highlightFrontier),s=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(N){if(n.line>=e.display.viewFrom){var Q=N.styles,J=N.text.length>e.options.maxHighlightLength?wt(t.mode,n.state):null,$=Se(e,N,n,!0);J&&(n.state=J),N.styles=$.styles;var ne=N.styleClasses,Ee=$.classes;Ee?N.styleClasses=Ee:ne&&(N.styleClasses=null);for(var Ae=!Q||Q.length!=N.styles.length||ne!=Ee&&(!ne||!Ee||ne.bgClass!=Ee.bgClass||ne.textClass!=Ee.textClass),Xe=0;!Ae&&Xe<Q.length;++Xe)Ae=Q[Xe]!=N.styles[Xe];Ae&&s.push(n.line),N.stateAfter=n.save(),n.nextLine()}else N.text.length<=e.options.maxHighlightLength&&Pt(e,N.text,n),N.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ci(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),s.length&&Xn(e,function(){for(var N=0;N<s.length;N++)Yr(e,s[N],"text")})}var Bi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Yi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=oi(e),this.force=r,this.dims=ua(e),this.events=[]};Bi.prototype.signal=function(e,t){fe(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ne.apply(null,this.events[e])};function Va(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=zr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=zr(e)+"px",t.scrollbarsClipped=!0)}function Xa(e){if(e.hasFocus())return null;var t=_();if(!t||!m(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&m(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Qa(e){if(!e||!e.activeElt||e.activeElt==_())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&m(document.body,e.anchorNode)&&m(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Zi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return di(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&ja(e)==0)return!1;ma(e)&&(di(e),t.dims=ua(e));var s=n.first+n.size,N=Math.max(t.visible.from-e.options.viewportMargin,n.first),Q=Math.min(s,t.visible.to+e.options.viewportMargin);r.viewFrom<N&&N-r.viewFrom<20&&(N=Math.max(n.first,r.viewFrom)),r.viewTo>Q&&r.viewTo-Q<20&&(Q=Math.min(s,r.viewTo)),Zn&&(N=Br(e.doc,N),Q=ri(e.doc,Q));var J=N!=r.viewFrom||Q!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;zo(e,N,Q),r.viewOffset=vr(Rt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var $=ja(e);if(!J&&$==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var ne=Xa(e);return $>4&&(r.lineDiv.style.display="none"),Ya(e,r.updateLineNumbers,t.dims),$>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Qa(ne),l(r.cursorDiv),l(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,J&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ci(e,400)),r.updateLineNumbers=null,!0}function fa(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==oi(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Da(e.display)-La(e),r.top)}),t.visible=Yi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Yi(e.display,e.doc,r));if(!Zi(e,t))break;ca(e);var s=at(e);Xi(e),pt(e,s),ea(e,s),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qi(e,t){var r=new Bi(e,t);if(Zi(e,r)){ca(e),fa(e,r);var n=at(e);Xi(e),pt(e,n),ea(e,n),r.finish()}}function Ya(e,t,r){var n=e.display,s=e.options.lineNumbers,N=n.lineDiv,Q=N.firstChild;function J(ct){var Et=ct.nextSibling;return L&&u&&e.display.currentWheelTarget==ct?ct.style.display="none":ct.parentNode.removeChild(ct),Et}for(var $=n.view,ne=n.viewFrom,Ee=0;Ee<$.length;Ee++){var Ae=$[Ee];if(!Ae.hidden)if(!Ae.node||Ae.node.parentNode!=N){var Xe=po(e,Ae,ne,r);N.insertBefore(Xe,Q)}else{for(;Q!=Ae.node;)Q=J(Q);var We=s&&t!=null&&t<=ne&&Ae.lineNumber;Ae.changes&&(he(Ae.changes,"gutter")>-1&&(We=!1),Ur(e,Ae,ne,r)),We&&(l(Ae.lineNumber),Ae.lineNumber.appendChild(document.createTextNode(Pn(e.options,ne)))),Q=Ae.node.nextSibling}ne+=Ae.size}for(;Q;)Q=J(Q)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ea(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+zr(e)+"px"}function pa(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Fa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,s=t.gutters.offsetWidth,N=n+"px",Q=0;Q<r.length;Q++)if(!r[Q].hidden){e.options.fixedGutter&&(r[Q].gutter&&(r[Q].gutter.style.left=N),r[Q].gutterBackground&&(r[Q].gutterBackground.style.left=N));var J=r[Q].alignable;if(J)for(var $=0;$<J.length;$++)J[$].style.left=N}e.options.fixedGutter&&(t.gutters.style.left=n+s+"px")}function ma(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Pn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var s=n.measure.appendChild(a("div",[a("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),N=s.firstChild.offsetWidth,Q=s.offsetWidth-N;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(N,n.lineGutter.offsetWidth-Q)+1,n.lineNumWidth=n.lineNumInnerWidth+Q,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",$i(e.display),!0}return!1}function ta(e,t){for(var r=[],n=!1,s=0;s<e.length;s++){var N=e[s],Q=null;if(typeof N!="string"&&(Q=N.style,N=N.className),N=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:N,style:Q})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function ga(e){var t=e.gutters,r=e.gutterSpecs;l(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var s=r[n],N=s.className,Q=s.style,J=t.appendChild(a("div",null,"CodeMirror-gutter "+N));Q&&(J.style.cssText=Q),N=="CodeMirror-linenumbers"&&(e.lineGutter=J,J.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",$i(e)}function Si(e){ga(e.display),Gn(e),pa(e)}function Ja(e,t,r,n){var s=this;this.input=r,s.scrollbarFiller=a("div",null,"CodeMirror-scrollbar-filler"),s.scrollbarFiller.setAttribute("cm-not-content","true"),s.gutterFiller=a("div",null,"CodeMirror-gutter-filler"),s.gutterFiller.setAttribute("cm-not-content","true"),s.lineDiv=x("div",null,"CodeMirror-code"),s.selectionDiv=a("div",null,null,"position: relative; z-index: 1"),s.cursorDiv=a("div",null,"CodeMirror-cursors"),s.measure=a("div",null,"CodeMirror-measure"),s.lineMeasure=a("div",null,"CodeMirror-measure"),s.lineSpace=x("div",[s.measure,s.lineMeasure,s.selectionDiv,s.cursorDiv,s.lineDiv],null,"position: relative; outline: none");var N=x("div",[s.lineSpace],"CodeMirror-lines");s.mover=a("div",[N],null,"position: relative"),s.sizer=a("div",[s.mover],"CodeMirror-sizer"),s.sizerWidth=null,s.heightForcer=a("div",null,null,"position: absolute; height: "+ye+"px; width: 1px;"),s.gutters=a("div",null,"CodeMirror-gutters"),s.lineGutter=null,s.scroller=a("div",[s.sizer,s.heightForcer,s.gutters],"CodeMirror-scroll"),s.scroller.setAttribute("tabIndex","-1"),s.wrapper=a("div",[s.scrollbarFiller,s.gutterFiller,s.scroller],"CodeMirror"),j&&B<8&&(s.gutters.style.zIndex=-1,s.scroller.style.paddingRight=0),!L&&!(P&&i)&&(s.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(s.wrapper):e(s.wrapper)),s.viewFrom=s.viewTo=t.first,s.reportedViewFrom=s.reportedViewTo=t.first,s.view=[],s.renderedView=null,s.externalMeasured=null,s.viewOffset=0,s.lastWrapHeight=s.lastWrapWidth=0,s.updateLineNumbers=null,s.nativeBarWidth=s.barHeight=s.barWidth=0,s.scrollbarsClipped=!1,s.lineNumWidth=s.lineNumInnerWidth=s.lineNumChars=null,s.alignWidgets=!1,s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=null,s.maxLine=null,s.maxLineLength=0,s.maxLineChanged=!1,s.wheelDX=s.wheelDY=s.wheelStartX=s.wheelStartY=null,s.shift=!1,s.selForContextMenu=null,s.activeTouch=null,s.gutterSpecs=ta(n.gutters,n.lineNumbers),ga(s),r.init(s)}var Za=0,Bn=null;j?Bn=-.53:P?Bn=15:v?Bn=-.7:k&&(Bn=-1/3);function dr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function Ai(e){var t=dr(e);return t.x*=Bn,t.y*=Bn,t}function Ti(e,t){var r=dr(t),n=r.x,s=r.y,N=e.display,Q=N.scroller,J=Q.scrollWidth>Q.clientWidth,$=Q.scrollHeight>Q.clientHeight;if(!(n&&J||s&&$))return;if(s&&u&&L){e:for(var ne=t.target,Ee=N.view;ne!=Q;ne=ne.parentNode)for(var Ae=0;Ae<Ee.length;Ae++)if(Ee[Ae].node==ne){e.display.currentWheelTarget=ne;break e}}if(n&&!P&&!C&&Bn!=null){s&&$&&Ji(e,Math.max(0,Q.scrollTop+s*Bn)),ue(e,Math.max(0,Q.scrollLeft+n*Bn)),(!s||s&&$)&&re(t),N.wheelStartX=null;return}if(s&&Bn!=null){var Xe=s*Bn,We=e.doc.scrollTop,ct=We+N.wrapper.clientHeight;Xe<0?We=Math.max(0,We+Xe-50):ct=Math.min(e.doc.height,ct+Xe+50),qi(e,{top:We,bottom:ct})}Za<20&&(N.wheelStartX==null?(N.wheelStartX=Q.scrollLeft,N.wheelStartY=Q.scrollTop,N.wheelDX=n,N.wheelDY=s,setTimeout(function(){if(N.wheelStartX==null)return;var Et=Q.scrollLeft-N.wheelStartX,Dt=Q.scrollTop-N.wheelStartY,kt=Dt&&N.wheelDY&&Dt/N.wheelDY||Et&&N.wheelDX&&Et/N.wheelDX;if(N.wheelStartX=N.wheelStartY=null,!kt)return;Bn=(Bn*Za+kt)/(Za+1),++Za},200)):(N.wheelDX+=n,N.wheelDY+=s))}var ar=function(e,t){this.ranges=e,this.primIndex=t};ar.prototype.primary=function(){return this.ranges[this.primIndex]},ar.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Qt(r.anchor,n.anchor)||!Qt(r.head,n.head))return!1}return!0},ar.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Mn(mn(this.ranges[t].anchor),mn(this.ranges[t].head));return new ar(e,this.primIndex)},ar.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ar.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Wt(t,n.from())>=0&&Wt(e,n.to())<=0)return r}return-1};var Mn=function(e,t){this.anchor=e,this.head=t};Mn.prototype.from=function(){return Dn(this.anchor,this.head)},Mn.prototype.to=function(){return pn(this.anchor,this.head)},Mn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cr(e,t,r){var n=e&&e.options.selectionsMayTouch,s=t[r];t.sort(function(Xe,We){return Wt(Xe.from(),We.from())}),r=he(t,s);for(var N=1;N<t.length;N++){var Q=t[N],J=t[N-1],$=Wt(J.to(),Q.from());if(n&&!Q.empty()?$>0:$>=0){var ne=Dn(J.from(),Q.from()),Ee=pn(J.to(),Q.to()),Ae=J.empty()?Q.from()==Q.head:J.from()==J.head;N<=r&&--r,t.splice(--N,2,new Mn(Ae?Ee:ne,Ae?ne:Ee))}}return new ar(t,r)}function ti(e,t){return new ar([new Mn(e,t||e)],0)}function Ui(e){return e.text?ft(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function fs(e,t){if(Wt(e,t.from)<0)return e;if(Wt(e,t.to)<=0)return Ui(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ui(t).ch-t.to.ch),ft(r,n)}function Yo(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var s=e.sel.ranges[n];r.push(new Mn(fs(s.anchor,t),fs(s.head,t)))}return cr(e.cm,r,e.sel.primIndex)}function ps(e,t,r){return e.line==t.line?ft(r.line,e.ch-t.ch+r.ch):ft(r.line+(e.line-t.line),e.ch)}function hl(e,t,r){for(var n=[],s=ft(e.first,0),N=s,Q=0;Q<t.length;Q++){var J=t[Q],$=ps(J.from,s,N),ne=ps(Ui(J),s,N);if(s=J.to,N=ne,r=="around"){var Ee=e.sel.ranges[Q],Ae=Wt(Ee.head,Ee.anchor)<0;n[Q]=new Mn(Ae?ne:$,Ae?$:ne)}else n[Q]=new Mn($,$)}return new ar(n,e.sel.primIndex)}function Jo(e){e.doc.mode=qe(e.options,e.doc.modeOption),qa(e)}function qa(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ci(e,100),e.state.modeGen++,e.curOp&&Gn(e)}function ms(e,t){return t.from.ch==0&&t.to.ch==0&&te(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Zo(e,t,r,n){function s(Kt){return r?r[Kt]:null}function N(Kt,It,zt){hi(Kt,It,zt,n),hn(Kt,"change",Kt,t)}function Q(Kt,It){for(var zt=[],sn=Kt;sn<It;++sn)zt.push(new Er(ne[sn],s(sn),n));return zt}var J=t.from,$=t.to,ne=t.text,Ee=Rt(e,J.line),Ae=Rt(e,$.line),Xe=te(ne),We=s(ne.length-1),ct=$.line-J.line;if(t.full)e.insert(0,Q(0,ne.length)),e.remove(ne.length,e.size-ne.length);else if(ms(e,t)){var Et=Q(0,ne.length-1);N(Ae,Ae.text,We),ct&&e.remove(J.line,ct),Et.length&&e.insert(J.line,Et)}else if(Ee==Ae)if(ne.length==1)N(Ee,Ee.text.slice(0,J.ch)+Xe+Ee.text.slice($.ch),We);else{var Dt=Q(1,ne.length-1);Dt.push(new Er(Xe+Ee.text.slice($.ch),We,n)),N(Ee,Ee.text.slice(0,J.ch)+ne[0],s(0)),e.insert(J.line+1,Dt)}else if(ne.length==1)N(Ee,Ee.text.slice(0,J.ch)+ne[0]+Ae.text.slice($.ch),s(0)),e.remove(J.line+1,ct);else{N(Ee,Ee.text.slice(0,J.ch)+ne[0],s(0)),N(Ae,Xe+Ae.text.slice($.ch),We);var kt=Q(1,ne.length-1);ct>1&&e.remove(J.line+1,ct-1),e.insert(J.line+1,kt)}hn(e,"change",e,t)}function Fi(e,t,r){function n(s,N,Q){if(s.linked)for(var J=0;J<s.linked.length;++J){var $=s.linked[J];if($.doc==N)continue;var ne=Q&&$.sharedHist;if(r&&!ne)continue;t($.doc,ne),n($.doc,s,ne)}}n(e,null,!0)}function gs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ei(e),Jo(e),vs(e),e.options.lineWrapping||ir(e),e.options.mode=t.modeOption,Gn(e)}function vs(e){(e.doc.direction=="rtl"?I:d)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Xn(e,function(){vs(e),Gn(e)})}function Ro(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function qo(e,t){var r={from:mn(t.from),to:Ui(t),text:Zt(e,t.from,t.to)};return Es(e,r,t.from.line,t.to.line+1),Fi(e,function(n){return Es(n,r,t.from.line,t.to.line+1)},!0),r}function ys(e){for(;e.length;){var t=te(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return ys(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function bs(e,t,r,n){var s=e.history;s.undone.length=0;var N=+new Date,Q,J;if((s.lastOp==n||s.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&s.lastModTime>N-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(Q=pl(s,s.lastOp==n)))J=te(Q.changes),Wt(t.from,t.to)==0&&Wt(t.from,J.to)==0?J.to=Ui(t):Q.changes.push(qo(e,t));else{var $=te(s.done);for((!$||!$.ranges)&&Oo(e.sel,s.done),Q={changes:[qo(e,t)],generation:s.generation},s.done.push(Q);s.done.length>s.undoDepth;)s.done.shift(),s.done[0].ranges||s.done.shift()}s.done.push(r),s.generation=++s.maxGeneration,s.lastModTime=s.lastSelTime=N,s.lastOp=s.lastSelOp=n,s.lastOrigin=s.lastSelOrigin=t.origin,J||Ne(e,"historyAdded")}function ml(e,t,r,n){var s=t.charAt(0);return s=="*"||s=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var s=e.history,N=n&&n.origin;r==s.lastSelOp||N&&s.lastSelOrigin==N&&(s.lastModTime==s.lastSelTime&&s.lastOrigin==N||ml(e,N,te(s.done),t))?s.done[s.done.length-1]=t:Oo(t,s.done),s.lastSelTime=+new Date,s.lastSelOrigin=N,s.lastSelOp=r,n&&n.clearRedo!==!1&&ys(s.undone)}function Oo(e,t){var r=te(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Es(e,t,r,n){var s=t["spans_"+e.id],N=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(Q){Q.markedSpans&&((s||(s=t["spans_"+e.id]={}))[N]=Q.markedSpans),++N})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function yl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],s=0;s<t.text.length;++s)n.push(vl(r[s]));return n}function xs(e,t){var r=yl(e,t),n=lr(e,t);if(!r)return n;if(!n)return r;for(var s=0;s<r.length;++s){var N=r[s],Q=n[s];if(N&&Q){e:for(var J=0;J<Q.length;++J){for(var $=Q[J],ne=0;ne<N.length;++ne)if(N[ne].marker==$.marker)continue e;N.push($)}}else Q&&(r[s]=Q)}return r}function va(e,t,r){for(var n=[],s=0;s<e.length;++s){var N=e[s];if(N.ranges){n.push(r?ar.prototype.deepCopy.call(N):N);continue}var Q=N.changes,J=[];n.push({changes:J});for(var $=0;$<Q.length;++$){var ne=Q[$],Ee=void 0;if(J.push({from:ne.from,to:ne.to,text:ne.text}),t)for(var Ae in ne)(Ee=Ae.match(/^spans_(\d+)$/))&&(he(t,Number(Ee[1]))>-1&&(te(J)[Ae]=ne[Ae],delete ne[Ae]))}}return n}function $o(e,t,r,n){if(n){var s=e.anchor;if(r){var N=Wt(t,s)<0;N!=Wt(r,s)<0?(s=t,t=r):N!=Wt(t,r)<0&&(t=r)}return new Mn(s,t)}else return new Mn(r||t,t)}function Do(e,t,r,n,s){s==null&&(s=e.cm&&(e.cm.display.shift||e.extend)),xr(e,new ar([$o(e.sel.primary(),t,r,s)],0),n)}function Cs(e,t,r){for(var n=[],s=e.cm&&(e.cm.display.shift||e.extend),N=0;N<e.sel.ranges.length;N++)n[N]=$o(e.sel.ranges[N],t[N],null,s);var Q=cr(e.cm,n,e.sel.primIndex);xr(e,Q,r)}function es(e,t,r,n){var s=e.sel.ranges.slice(0);s[t]=r,xr(e,cr(e.cm,s,e.sel.primIndex),n)}function Ss(e,t,r,n){xr(e,ti(t,r),n)}function bl(e,t,r){var n={ranges:t.ranges,update:function(s){this.ranges=[];for(var N=0;N<s.length;N++)this.ranges[N]=new Mn(f(e,s[N].anchor),f(e,s[N].head))},origin:r&&r.origin};return Ne(e,"beforeSelectionChange",e,n),e.cm&&Ne(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?cr(e.cm,n.ranges,n.ranges.length-1):t}function As(e,t,r){var n=e.history.done,s=te(n);s&&s.ranges?(n[n.length-1]=t,_o(e,t,r)):xr(e,t,r)}function xr(e,t,r){_o(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function _o(e,t,r){(fe(e,"beforeSelectionChange")||e.cm&&fe(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,r));var n=r&&r.bias||(Wt(t.primary().head,e.sel.primary().head)<0?-1:1);Ts(e,Rs(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Ni(e.cm)}function Ts(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),hn(e,"cursorActivity",e)}function ws(e){Ts(e,Rs(e,e.sel,null,!1))}function Rs(e,t,r,n){for(var s,N=0;N<t.ranges.length;N++){var Q=t.ranges[N],J=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[N],$=Lo(e,Q.anchor,J&&J.anchor,r,n),ne=Lo(e,Q.head,J&&J.head,r,n);(s||$!=Q.anchor||ne!=Q.head)&&(s||(s=t.ranges.slice(0,N)),s[N]=new Mn($,ne))}return s?cr(e.cm,s,t.primIndex):t}function ya(e,t,r,n,s){var N=Rt(e,t.line);if(N.markedSpans)for(var Q=0;Q<N.markedSpans.length;++Q){var J=N.markedSpans[Q],$=J.marker,ne="selectLeft"in $?!$.selectLeft:$.inclusiveLeft,Ee="selectRight"in $?!$.selectRight:$.inclusiveRight;if((J.from==null||(ne?J.from<=t.ch:J.from<t.ch))&&(J.to==null||(Ee?J.to>=t.ch:J.to>t.ch))){if(s&&(Ne($,"beforeCursorEnter"),$.explicitlyCleared))if(N.markedSpans){--Q;continue}else break;if(!$.atomic)continue;if(r){var Ae=$.find(n<0?1:-1),Xe=void 0;if((n<0?Ee:ne)&&(Ae=Os(e,Ae,-n,Ae&&Ae.line==t.line?N:null)),Ae&&Ae.line==t.line&&(Xe=Wt(Ae,r))&&(n<0?Xe<0:Xe>0))return ya(e,Ae,t,n,s)}var We=$.find(n<0?-1:1);return(n<0?ne:Ee)&&(We=Os(e,We,n,We.line==t.line?N:null)),We?ya(e,We,t,n,s):null}}return t}function Lo(e,t,r,n,s){var N=n||1,Q=ya(e,t,r,N,s)||!s&&ya(e,t,r,N,!0)||ya(e,t,r,-N,s)||!s&&ya(e,t,r,-N,!0);return Q||(e.cantEdit=!0,ft(e.first,0))}function Os(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?f(e,ft(t.line-1)):null:r>0&&t.ch==(n||Rt(e,t.line)).text.length?t.line<e.first+e.size-1?ft(t.line+1,0):null:new ft(t.line,t.ch+r)}function Ds(e){e.setSelection(ft(e.firstLine(),0),ft(e.lastLine()),Me)}function _s(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(s,N,Q,J){s&&(n.from=f(e,s)),N&&(n.to=f(e,N)),Q&&(n.text=Q),J!==void 0&&(n.origin=J)}),Ne(e,"beforeChange",e,n),e.cm&&Ne(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function ba(e,t,r){if(e.cm){if(!e.cm.curOp)return Qn(e.cm,ba)(e,t,r);if(e.cm.state.suppressEdits)return}if((fe(e,"beforeChange")||e.cm&&fe(e.cm,"beforeChange"))&&(t=_s(e,t,!0),!t))return;var n=Kr&&!r&&Hr(e,t.from,t.to);if(n)for(var s=n.length-1;s>=0;--s)Ls(e,{from:n[s].from,to:n[s].to,text:s?[""]:t.text,origin:t.origin});else Ls(e,t)}function Ls(e,t){if(t.text.length==1&&t.text[0]==""&&Wt(t.from,t.to)==0)return;var r=Yo(e,t);bs(e,t,r,e.cm?e.cm.curOp.id:NaN),$a(e,t,r,lr(e,t));var n=[];Fi(e,function(s,N){!N&&he(n,s.history)==-1&&(Is(s.history,t),n.push(s.history)),$a(s,t,null,lr(s,t))})}function Mo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var s=e.history,N,Q=e.sel,J=t=="undo"?s.done:s.undone,$=t=="undo"?s.undone:s.done,ne=0;ne<J.length&&!(N=J[ne],r?N.ranges&&!N.equals(e.sel):!N.ranges);ne++);if(ne==J.length)return;for(s.lastOrigin=s.lastSelOrigin=null;;)if(N=J.pop(),N.ranges){if(Oo(N,$),r&&!N.equals(e.sel)){xr(e,N,{clearRedo:!1});return}Q=N}else if(n){J.push(N);return}else break;var Ee=[];Oo(Q,$),$.push({changes:Ee,generation:s.generation}),s.generation=N.generation||++s.maxGeneration;for(var Ae=fe(e,"beforeChange")||e.cm&&fe(e.cm,"beforeChange"),Xe=function(Et){var Dt=N.changes[Et];if(Dt.origin=t,Ae&&!_s(e,Dt,!1))return J.length=0,{};Ee.push(qo(e,Dt));var kt=Et?Yo(e,Dt):te(J);$a(e,Dt,kt,xs(e,Dt)),!Et&&e.cm&&e.cm.scrollIntoView({from:Dt.from,to:Ui(Dt)});var Kt=[];Fi(e,function(It,zt){!zt&&he(Kt,It.history)==-1&&(Is(It.history,Dt),Kt.push(It.history)),$a(It,Dt,null,xs(It,Dt))})},We=N.changes.length-1;We>=0;--We){var ct=Xe(We);if(ct)return ct.v}}function Ms(e,t){if(t==0)return;if(e.first+=t,e.sel=new ar(be(e.sel.ranges,function(s){return new Mn(ft(s.anchor.line+t,s.anchor.ch),ft(s.head.line+t,s.head.ch))}),e.sel.primIndex),e.cm){Gn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Yr(e.cm,n,"gutter")}}function $a(e,t,r,n){if(e.cm&&!e.cm.curOp)return Qn(e.cm,$a)(e,t,r,n);if(t.to.line<e.first){Ms(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var s=t.text.length-1-(e.first-t.from.line);Ms(e,s),t={from:ft(e.first,0),to:ft(t.to.line+s,t.to.ch),text:[te(t.text)],origin:t.origin}}var N=e.lastLine();t.to.line>N&&(t={from:t.from,to:ft(N,Rt(e,N).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zt(e,t.from,t.to),r||(r=Yo(e,t)),e.cm?El(e.cm,t,n):Zo(e,t,n),_o(e,r,Me),e.cantEdit&&Lo(e,ft(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,r){var n=e.doc,s=e.display,N=t.from,Q=t.to,J=!1,$=N.line;e.options.lineWrapping||($=Gt(Wn(Rt(n,N.line))),n.iter($,Q.line+1,function(We){if(We==s.maxLine)return J=!0,!0})),n.sel.contains(t.from,t.to)>-1&&xe(e),Zo(n,t,r,xo(e)),e.options.lineWrapping||(n.iter($,N.line+t.text.length,function(We){var ct=Qr(We);ct>s.maxLineLength&&(s.maxLine=We,s.maxLineLength=ct,s.maxLineChanged=!0,J=!1)}),J&&(e.curOp.updateMaxLine=!0)),mr(n,N.line),Ci(e,400);var ne=t.text.length-(Q.line-N.line)-1;t.full?Gn(e):N.line==Q.line&&t.text.length==1&&!ms(e.doc,t)?Yr(e,N.line,"text"):Gn(e,N.line,Q.line+1,ne);var Ee=fe(e,"changes"),Ae=fe(e,"change");if(Ae||Ee){var Xe={from:N,to:Q,text:t.text,removed:t.removed,origin:t.origin};Ae&&hn(e,"change",e,Xe),Ee&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Xe)}e.display.selForContextMenu=null}function Ea(e,t,r,n,s){var N;n||(n=r),Wt(n,r)<0&&(N=[n,r],r=N[0],n=N[1]),typeof t=="string"&&(t=e.splitLines(t)),ba(e,{from:r,to:n,text:t,origin:s})}function Ps(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ks(e,t,r,n){for(var s=0;s<e.length;++s){var N=e[s],Q=!0;if(N.ranges){N.copied||(N=e[s]=N.deepCopy(),N.copied=!0);for(var J=0;J<N.ranges.length;J++)Ps(N.ranges[J].anchor,t,r,n),Ps(N.ranges[J].head,t,r,n);continue}for(var $=0;$<N.changes.length;++$){var ne=N.changes[$];if(r<ne.from.line)ne.from=ft(ne.from.line+n,ne.from.ch),ne.to=ft(ne.to.line+n,ne.to.ch);else if(t<=ne.to.line){Q=!1;break}}Q||(e.splice(0,s+1),s=0)}}function Is(e,t){var r=t.from.line,n=t.to.line,s=t.text.length-(n-r)-1;ks(e.done,r,n,s),ks(e.undone,r,n,s)}function eo(e,t,r,n){var s=t,N=t;return typeof t=="number"?N=Rt(e,X(e,t)):s=Gt(t),s==null?null:(n(N,s)&&e.cm&&Yr(e.cm,s,r),N)}function to(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}to.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var s=this.lines[r];this.height-=s.height,Oi(s),hn(s,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function no(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var s=e[n];t+=s.chunkSize(),r+=s.height,s.parent=this}this.size=t,this.height=r,this.parent=null}no.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],s=n.chunkSize();if(e<s){var N=Math.min(t,s-e),Q=n.height;if(n.removeInner(e,N),this.height-=Q-n.height,s==N&&(this.children.splice(r--,1),n.parent=null),(t-=N)==0)break;e=0}else e-=s}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof to))){var J=[];this.collapse(J),this.children=[new to(J)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var s=this.children[n],N=s.chunkSize();if(e<=N){if(s.insertInner(e,t,r),s.lines&&s.lines.length>50){for(var Q=s.lines.length%25+25,J=Q;J<s.lines.length;){var $=new to(s.lines.slice(J,J+=25));s.height-=$.height,this.children.splice(++n,0,$),$.parent=this}s.lines=s.lines.slice(0,Q),this.maybeSpill()}break}e-=N}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new no(t);if(e.parent){e.size-=r.size,e.height-=r.height;var s=he(e.parent.children,e);e.parent.children.splice(s+1,0,r)}else{var n=new no(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var s=this.children[n],N=s.chunkSize();if(e<N){var Q=Math.min(t,N-e);if(s.iterN(e,Q,r))return!0;if((t-=Q)==0)break;e=0}else e-=N}}};var ro=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ro.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Gt(r);if(n==null||!t)return;for(var s=0;s<t.length;++s)t[s]==this&&t.splice(s--,1);t.length||(r.widgets=null);var N=_i(this);Jt(r,Math.max(0,r.height-N)),e&&(Xn(e,function(){Ns(e,r,-N),Yr(e,n,"widget")}),hn(e,"lineWidgetCleared",e,this,n))},ro.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var s=_i(this)-t;if(!s)return;Dr(this.doc,n)||Jt(n,n.height+s),r&&Xn(r,function(){r.curOp.forceUpdate=!0,Ns(r,n,s),hn(r,"lineWidgetChanged",r,e,Gt(n))})},pe(ro);function Ns(e,t,r){vr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&za(e,r)}function xl(e,t,r,n){var s=new ro(e,r,n),N=e.cm;return N&&s.noHScroll&&(N.display.alignWidgets=!0),eo(e,t,"widget",function(Q){var J=Q.widgets||(Q.widgets=[]);if(s.insertAt==null?J.push(s):J.splice(Math.min(J.length-1,Math.max(0,s.insertAt)),0,s),s.line=Q,N&&!Dr(e,Q)){var $=vr(Q)<e.scrollTop;Jt(Q,Q.height+_i(s)),$&&za(N,s.height),N.curOp.forceUpdate=!0}return!0}),N&&hn(N,"lineWidgetAdded",N,s,typeof t=="number"?t:Gt(t)),s}var Bs=0,ji=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Bs};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Bt(e),fe(this,"clear")){var r=this.find();r&&hn(this,"clear",r.from,r.to)}for(var n=null,s=null,N=0;N<this.lines.length;++N){var Q=this.lines[N],J=gr(Q.markedSpans,this);e&&!this.collapsed?Yr(e,Gt(Q),"text"):e&&(J.to!=null&&(s=Gt(Q)),J.from!=null&&(n=Gt(Q))),Q.markedSpans=br(Q.markedSpans,J),J.from==null&&this.collapsed&&!Dr(this.doc,Q)&&e&&Jt(Q,Pi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var $=0;$<this.lines.length;++$){var ne=Wn(this.lines[$]),Ee=Qr(ne);Ee>e.display.maxLineLength&&(e.display.maxLine=ne,e.display.maxLineLength=Ee,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Gn(e,n,s+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ws(e.doc)),e&&hn(e,"markerCleared",e,this,n,s),t&&Mt(e),this.parent&&this.parent.clear()},ji.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,s=0;s<this.lines.length;++s){var N=this.lines[s],Q=gr(N.markedSpans,this);if(Q.from!=null&&(r=ft(t?N:Gt(N),Q.from),e==-1))return r;if(Q.to!=null&&(n=ft(t?N:Gt(N),Q.to),e==1))return n}return r&&{from:r,to:n}},ji.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;Xn(n,function(){var s=t.line,N=Gt(t.line),Q=zi(n,N);if(Q&&(mi(Q),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Dr(r.doc,s)&&r.height!=null){var J=r.height;r.height=null;var $=_i(r)-J;$&&Jt(s,s.height+$)}hn(n,"markerChanged",n,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||he(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(he(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},pe(ji);function xa(e,t,r,n,s){if(n&&n.shared)return Cl(e,t,r,n,s);if(e.cm&&!e.cm.curOp)return Qn(e.cm,xa)(e,t,r,n,s);var N=new ji(e,s),Q=Wt(t,r);if(n&&K(n,N,!1),Q>0||Q==0&&N.clearWhenEmpty!==!1)return N;if(N.replacedWith&&(N.collapsed=!0,N.widgetNode=x("span",[N.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||N.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(N.widgetNode.insertLeft=!0)),N.collapsed){if(Hn(e,t.line,t,r,N)||t.line!=r.line&&Hn(e,r.line,t,r,N))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sr()}N.addToHistory&&bs(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var J=t.line,$=e.cm,ne;if(e.iter(J,r.line+1,function(Ae){$&&N.collapsed&&!$.options.lineWrapping&&Wn(Ae)==$.display.maxLine&&(ne=!0),N.collapsed&&J!=t.line&&Jt(Ae,0),Ar(Ae,new Rr(N,J==t.line?t.ch:null,J==r.line?r.ch:null)),++J}),N.collapsed&&e.iter(t.line,r.line+1,function(Ae){Dr(e,Ae)&&Jt(Ae,0)}),N.clearOnEnter&&Te(N,"beforeCursorEnter",function(){return N.clear()}),N.readOnly&&(tr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),N.collapsed&&(N.id=++Bs,N.atomic=!0),$){if(ne&&($.curOp.updateMaxLine=!0),N.collapsed)Gn($,t.line,r.line+1);else if(N.className||N.startStyle||N.endStyle||N.css||N.attributes||N.title)for(var Ee=t.line;Ee<=r.line;Ee++)Yr($,Ee,"text");N.atomic&&ws($.doc),hn($,"markerAdded",$,N)}return N}var io=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};io.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();hn(this,"clear")},io.prototype.find=function(e,t){return this.primary.find(e,t)},pe(io);function Cl(e,t,r,n,s){n=K(n),n.shared=!1;var N=[xa(e,t,r,n,s)],Q=N[0],J=n.widgetNode;return Fi(e,function($){J&&(n.widgetNode=J.cloneNode(!0)),N.push(xa($,f($,t),f($,r),n,s));for(var ne=0;ne<$.linked.length;++ne)if($.linked[ne].isParent)return;Q=te(N)}),new io(N,Q)}function Us(e){return e.findMarks(ft(e.first,0),e.clipPos(ft(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var r=0;r<t.length;r++){var n=t[r],s=n.find(),N=e.clipPos(s.from),Q=e.clipPos(s.to);if(Wt(N,Q)){var J=xa(e,N,Q,n.primary,n.primary.type);n.markers.push(J),J.parent=n}}}function Al(e){for(var t=function(n){var s=e[n],N=[s.primary.doc];Fi(s.primary.doc,function($){return N.push($)});for(var Q=0;Q<s.markers.length;Q++){var J=s.markers[Q];he(N,J.doc)==-1&&(J.parent=null,s.markers.splice(Q--,1))}},r=0;r<e.length;r++)t(r)}var Tl=0,Mr=function(e,t,r,n,s){if(!(this instanceof Mr))return new Mr(e,t,r,n,s);r==null&&(r=0),no.call(this,[new to([new Er("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var N=ft(r,0);this.sel=ti(N),this.history=new Ro(null),this.id=++Tl,this.modeOption=t,this.lineSep=n,this.direction=s=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Zo(this,{from:N,to:N,text:e}),xr(this,ti(N),Me)};Mr.prototype=Pe(no.prototype,{constructor:Mr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=dn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=ft(this.first,0),r=this.first+this.size-1;ba(this,{from:t,to:ft(r,Rt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&jr(this.cm,0,0),xr(this,ti(t),Me)}),replaceRange:function(e,t,r,n){t=f(this,t),r=r?f(this,r):t,Ea(this,e,t,r,n)},getRange:function(e,t,r){var n=Zt(this,f(this,e),f(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(On(this,e))return Rt(this,e)},getLineNumber:function(e){return Gt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Rt(this,e)),Wn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return f(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ss(this,f(this,typeof e=="number"?ft(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ss(this,f(this,e),f(this,t||e),r)}),extendSelection:Yn(function(e,t,r){Do(this,f(this,e),t&&f(this,t),r)}),extendSelections:Yn(function(e,t){Cs(this,G(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=be(this.sel.ranges,e);Cs(this,G(this,r),t)}),setSelections:Yn(function(e,t,r){if(!e.length)return;for(var n=[],s=0;s<e.length;s++)n[s]=new Mn(f(this,e[s].anchor),f(this,e[s].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),xr(this,cr(this.cm,n,t),r)}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Mn(f(this,e),f(this,t||e))),xr(this,cr(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var s=Zt(this,t[n].from(),t[n].to());r=r?r.concat(s):s}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var s=Zt(this,r[n].from(),r[n].to());e!==!1&&(s=s.join(e||this.lineSeparator())),t[n]=s}return t},replaceSelection:function(e,t,r){for(var n=[],s=0;s<this.sel.ranges.length;s++)n[s]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],s=this.sel,N=0;N<s.ranges.length;N++){var Q=s.ranges[N];n[N]={from:Q.from(),to:Q.to(),text:this.splitLines(e[N]),origin:r}}for(var J=t&&t!="end"&&hl(this,n,t),$=n.length-1;$>=0;$--)ba(this,n[$]);J?As(this,J):this.cm&&Ni(this.cm)}),undo:Yn(function(){Mo(this,"undo")}),redo:Yn(function(){Mo(this,"redo")}),undoSelection:Yn(function(){Mo(this,"undo",!0)}),redoSelection:Yn(function(){Mo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var s=0;s<e.undone.length;s++)e.undone[s].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),Fi(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:va(this.history.done),undone:va(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=va(e.done.slice(0),null,!0),t.undone=va(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return eo(this,e,"gutter",function(n){var s=n.gutterMarkers||(n.gutterMarkers={});return s[t]=r,!r&&tt(s)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&eo(t,r,"gutter",function(){return r.gutterMarkers[e]=null,tt(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!On(this,e))return null;if(t=e,e=Rt(this,e),!e)return null}else if(t=Gt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return eo(this,e,t=="gutter"?"gutter":"class",function(n){var s=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[s])n[s]=r;else{if(S(r).test(n[s]))return!1;n[s]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return eo(this,e,t=="gutter"?"gutter":"class",function(n){var s=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",N=n[s];if(N)if(r==null)n[s]=null;else{var Q=N.match(S(r));if(!Q)return!1;var J=Q.index+Q[0].length;n[s]=N.slice(0,Q.index)+(!Q.index||J==N.length?"":" ")+N.slice(J)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return xl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xa(this,f(this,e),f(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=f(this,e),xa(this,e,e,r,"bookmark")},findMarksAt:function(e){e=f(this,e);var t=[],r=Rt(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var s=r[n];(s.from==null||s.from<=e.ch)&&(s.to==null||s.to>=e.ch)&&t.push(s.marker.parent||s.marker)}return t},findMarks:function(e,t,r){e=f(this,e),t=f(this,t);var n=[],s=e.line;return this.iter(e.line,t.line+1,function(N){var Q=N.markedSpans;if(Q)for(var J=0;J<Q.length;J++){var $=Q[J];!($.to!=null&&s==e.line&&e.ch>=$.to||$.from==null&&s!=e.line||$.from!=null&&s==t.line&&$.from>=t.ch)&&(!r||r($.marker))&&n.push($.marker.parent||$.marker)}++s}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(s){var N=s.text.length+n;if(N>e)return t=e,!0;e-=N,++r}),f(this,ft(r,t))},indexFromPos:function(e){e=f(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new Mr(dn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new Mr(dn(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(n,Us(this)),n},unlinkDoc:function(e){if(e instanceof Kn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Al(Us(this));break}if(e.history==this.history){var n=[e.id];Fi(e,function(s){return n.push(s.id)},!0),e.history=new Ro(null),e.history.done=va(this.history.done,n),e.history.undone=va(this.history.undone,n)}},iterLinkedDocs:function(e){Fi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Qe(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),Mr.prototype.eachLine=Mr.prototype.iter;var Fs=0;function wl(e){var t=this;if(js(t),$e(t,e)||$r(t.display,e))return;re(e),j&&(Fs=+new Date);var r=yi(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var s=n.length,N=Array(s),Q=0,J=function(){++Q==s&&Qn(t,function(){r=f(t.doc,r);var We={from:r,to:r,text:t.doc.splitLines(N.filter(function(ct){return ct!=null}).join(t.doc.lineSeparator())),origin:"paste"};ba(t.doc,We),As(t.doc,ti(f(t.doc,r),f(t.doc,Ui(We))))})()},$=function(We,ct){if(t.options.allowDropFileTypes&&he(t.options.allowDropFileTypes,We.type)==-1){J();return}var Et=new FileReader;Et.onerror=function(){return J()},Et.onload=function(){var Dt=Et.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Dt)){J();return}N[ct]=Dt,J()},Et.readAsText(We)},ne=0;ne<n.length;ne++)$(n[ne],ne);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ee=e.dataTransfer.getData("Text");if(Ee){var Ae;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ae=t.listSelections()),_o(t.doc,ti(r,r)),Ae)for(var Xe=0;Xe<Ae.length;++Xe)Ea(t.doc,"",Ae[Xe].anchor,Ae[Xe].head,"drag");t.replaceSelection(Ee,"around","paste"),t.display.input.focus()}}catch(We){}}}function Rl(e,t){if(j&&(!e.state.draggingText||+new Date-Fs<100)){de(t);return}if($e(e,t)||$r(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!k){var r=a("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",C&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),C&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=yi(e,t);if(!r)return;var n=document.createDocumentFragment();Ei(e,r,n),e.display.dragCursor||(e.display.dragCursor=a("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),o(e.display.dragCursor,n)}function js(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var s=t[n].CodeMirror;s&&r.push(s)}r.length&&r[0].operation(function(){for(var N=0;N<r.length;N++)e(r[N])})}var Ks=!1;function Dl(){if(Ks)return;_l(),Ks=!0}function _l(){var e;Te(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Te(window,"blur",function(){return Ws(Ii)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Wi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ao=0;ao<10;ao++)Wi[ao+48]=Wi[ao+96]=String(ao);for(var Po=65;Po<=90;Po++)Wi[Po]=String.fromCharCode(Po);for(var oo=1;oo<=12;oo++)Wi[oo+111]=Wi[oo+63235]="F"+oo;var wi={};wi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},wi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},wi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},wi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},wi.default=u?wi.macDefault:wi.pcDefault;function Ml(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,s,N,Q=0;Q<t.length-1;Q++){var J=t[Q];if(/^(cmd|meta|m)$/i.test(J))N=!0;else if(/^a(lt)?$/i.test(J))r=!0;else if(/^(c|ctrl|control)$/i.test(J))n=!0;else if(/^s(hift)?$/i.test(J))s=!0;else throw new Error("Unrecognized modifier name: "+J)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),N&&(e="Cmd-"+e),s&&(e="Shift-"+e),e}function Pl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var s=be(r.split(" "),Ml),N=0;N<s.length;N++){var Q=void 0,J=void 0;N==s.length-1?(J=s.join(" "),Q=n):(J=s.slice(0,N+1).join(" "),Q="...");var $=t[J];if(!$)t[J]=Q;else if($!=Q)throw new Error("Inconsistent bindings for "+J)}delete e[r]}for(var ne in t)e[ne]=t[ne];return e}function Ca(e,t,r,n){t=ko(t);var s=t.call?t.call(e,n):t[e];if(s===!1)return"nothing";if(s==="...")return"multi";if(s!=null&&r(s))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ca(e,t.fallthrough,r,n);for(var N=0;N<t.fallthrough.length;N++){var Q=Ca(e,t.fallthrough[N],r,n);if(Q)return Q}}}function Hs(e){var t=typeof e=="string"?e:Wi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function zs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(g?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(g?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Gs(e,t){if(C&&e.keyCode==34&&e.char)return!1;var r=Wi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),zs(r,e,t))}function ko(e){return typeof e=="string"?wi[e]:e}function Sa(e,t){for(var r=e.doc.sel.ranges,n=[],s=0;s<r.length;s++){for(var N=t(r[s]);n.length&&Wt(N.from,te(n).to)<=0;){var Q=n.pop();if(Wt(Q.from,N.from)<0){N.from=Q.from;break}}n.push(N)}Xn(e,function(){for(var J=n.length-1;J>=0;J--)Ea(e.doc,"",n[J].from,n[J].to,"+delete");Ni(e)})}function ts(e,t,r){var n=et(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ns(e,t,r){var n=ts(e,t.ch,r);return n==null?null:new ft(t.line,n,r<0?"after":"before")}function rs(e,t,r,n,s){if(e){t.doc.direction=="rtl"&&(s=-s);var N=Ot(r,t.doc.direction);if(N){var Q=s<0?te(N):N[0],J=s<0==(Q.level==1),$=J?"after":"before",ne;if(Q.level>0||t.doc.direction=="rtl"){var Ee=si(t,r);ne=s<0?r.text.length-1:0;var Ae=Fr(t,Ee,ne).top;ne=St(function(Xe){return Fr(t,Ee,Xe).top==Ae},s<0==(Q.level==1)?Q.from:Q.to-1,ne),$=="before"&&(ne=ts(r,ne,1))}else ne=s<0?Q.to:Q.from;return new ft(n,ne,$)}}return new ft(n,s<0?r.text.length:0,s<0?"before":"after")}function kl(e,t,r,n){var s=Ot(t,e.doc.direction);if(!s)return ns(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var N=xt(s,r.ch,r.sticky),Q=s[N];if(e.doc.direction=="ltr"&&Q.level%2==0&&(n>0?Q.to>r.ch:Q.from<r.ch))return ns(t,r,n);var J=function(kt,Kt){return ts(t,kt instanceof ft?kt.ch:kt,Kt)},$,ne=function(kt){return e.options.lineWrapping?($=$||si(e,t),Ba(e,t,$,kt)):{begin:0,end:t.text.length}},Ee=ne(r.sticky=="before"?J(r,-1):r.ch);if(e.doc.direction=="rtl"||Q.level==1){var Ae=Q.level==1==n<0,Xe=J(r,Ae?1:-1);if(Xe!=null&&(Ae?Xe<=Q.to&&Xe<=Ee.end:Xe>=Q.from&&Xe>=Ee.begin)){var We=Ae?"before":"after";return new ft(r.line,Xe,We)}}var ct=function(kt,Kt,It){for(var zt=function(Un,fr){return fr?new ft(r.line,J(Un,1),"before"):new ft(r.line,Un,"after")};kt>=0&&kt<s.length;kt+=Kt){var sn=s[kt],nn=Kt>0==(sn.level!=1),En=nn?It.begin:J(It.end,-1);if(sn.from<=En&&En<sn.to)return zt(En,nn);if(En=nn?sn.from:J(sn.to,-1),It.begin<=En&&En<It.end)return zt(En,nn)}},Et=ct(N+n,n,Ee);if(Et)return Et;var Dt=n>0?Ee.end:J(Ee.begin,-1);return Dt!=null&&!(n>0&&Dt==t.text.length)&&(Et=ct(n>0?0:s.length-1,n,ne(Dt)),Et)?Et:null}var so={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Me)},killLine:function(e){return Sa(e,function(t){if(t.empty()){var r=Rt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ft(t.head.line+1,0)}:{from:t.head,to:ft(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Sa(e,function(t){return{from:ft(t.from().line,0),to:f(e.doc,ft(t.to().line+1,0))}})},delLineLeft:function(e){return Sa(e,function(t){return{from:ft(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Sa(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Sa(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ft(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ft(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Xs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Il(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ie)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ie)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Xs(e,t.head):n},Ie)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,s=0;s<r.length;s++){var N=r[s].from(),Q=Z(e.getLine(N.line),N.ch,n);t.push(ce(n-Q%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Xn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var s=t[n].head,N=Rt(e.doc,s.line).text;if(N){if(s.ch==N.length&&(s=new ft(s.line,s.ch-1)),s.ch>0)s=new ft(s.line,s.ch+1),e.replaceRange(N.charAt(s.ch-1)+N.charAt(s.ch-2),ft(s.line,s.ch-2),s,"+transpose");else if(s.line>e.doc.first){var Q=Rt(e.doc,s.line-1).text;Q&&(s=new ft(s.line,1),e.replaceRange(N.charAt(0)+e.doc.lineSeparator()+Q.charAt(Q.length-1),ft(s.line-1,Q.length-1),s,"+transpose"))}}r.push(new Mn(s,s))}e.setSelections(r)})},newlineAndIndent:function(e){return Xn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ni(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,t){var r=Rt(e.doc,t),n=Wn(r);return n!=r&&(t=Gt(n)),rs(!0,e,n,t,1)}function Il(e,t){var r=Rt(e.doc,t),n=rr(r);return n!=r&&(t=Gt(n)),rs(!0,e,r,t,-1)}function Xs(e,t){var r=Vs(e,t.line),n=Rt(e.doc,r.line),s=Ot(n,e.doc.direction);if(!s||s[0].level==0){var N=Math.max(r.ch,n.text.search(/\S/)),Q=t.line==r.line&&t.ch<=N&&t.ch;return ft(r.line,Q?0:N,r.sticky)}return r}function Io(e,t,r){if(typeof t=="string"&&(t=so[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),s=t(e)!=Ue}finally{e.display.shift=n,e.state.suppressEdits=!1}return s}function Nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var s=Ca(t,e.state.keyMaps[n],r,e);if(s)return s}return e.options.extraKeys&&Ca(t,e.options.extraKeys,r,e)||Ca(t,e.options.keyMap,r,e)}var Bl=new le;function lo(e,t,r,n){var s=e.state.keySeq;if(s){if(Hs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Bl.set(50,function(){e.state.keySeq==s&&(e.state.keySeq=null,e.display.input.reset())}),Qs(e,s+" "+t,r,n))return!0}return Qs(e,t,r,n)}function Qs(e,t,r,n){var s=Nl(e,t,n);return s=="multi"&&(e.state.keySeq=t),s=="handled"&&hn(e,"keyHandled",e,t,r),(s=="handled"||s=="multi")&&(re(r),Wa(e)),!!s}function Ys(e,t){var r=Gs(t,!0);return r?t.shiftKey&&!e.state.keySeq?lo(e,"Shift-"+r,t,function(n){return Io(e,n,!0)})||lo(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Io(e,n)}):lo(e,r,t,function(n){return Io(e,n)}):!1}function Ul(e,t,r){return lo(e,"'"+r+"'",t,function(n){return Io(e,n,!0)})}var is=null;function Js(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=_(),$e(t,e))return;j&&B<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Ys(t,e);C&&(is=n?r:null,!n&&r==88&&!Fe&&(u?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!u&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;I(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(d(t,"CodeMirror-crosshair"),ot(document,"keyup",r),ot(document,"mouseover",r))}Te(document,"keyup",r),Te(document,"mouseover",r)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),$e(this,e)}function qs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if($r(t.display,e)||$e(t,e)||e.ctrlKey&&!e.altKey||u&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(C&&r==is){is=null,re(e);return}if(C&&(!e.which||e.which<10)&&Ys(t,e))return;var s=String.fromCharCode(n==null?r:n);if(s=="\b")return;if(Ul(t,e,s))return;t.display.input.onKeyPress(e)}var jl=400,as=function(e,t,r){this.time=e,this.pos=t,this.button=r};as.prototype.compare=function(e,t,r){return this.time+jl>e&&Wt(t,this.pos)==0&&r==this.button};var uo,co;function Wl(e,t){var r=+new Date;return co&&co.compare(r,e,t)?(uo=co=null,"triple"):uo&&uo.compare(r,e,t)?(co=new as(r,e,t),uo=null,"double"):(uo=new as(r,e,t),co=null,"single")}function $s(e){var t=this,r=t.display;if($e(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){L||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(os(t,e))return;var n=yi(t,e),s=Ke(e),N=n?Wl(n,s):"single";if(window.focus(),s==1&&t.state.selectingText&&t.state.selectingText(e),n&&Kl(t,s,n,N,e))return;s==1?n?zl(t,n,N,e):Le(e)==r.scroller&&re(e):s==2?(n&&Do(t.doc,n),setTimeout(function(){return r.input.focus()},20)):s==3&&(D?t.display.input.onContextMenu(e):Ao(t))}function Kl(e,t,r,n,s){var N="Click";return n=="double"?N="Double"+N:n=="triple"&&(N="Triple"+N),N=(t==1?"Left":t==2?"Middle":"Right")+N,lo(e,zs(N,s),s,function(Q){if(typeof Q=="string"&&(Q=so[Q]),!Q)return!1;var J=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),J=Q(e,r)!=Ue}finally{e.state.suppressEdits=!1}return J})}function Hl(e,t,r){var n=e.getOption("configureMouse"),s=n?n(e,t,r):{};if(s.unit==null){var N=h?r.shiftKey&&r.metaKey:r.altKey;s.unit=N?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(s.extend==null||e.doc.extend)&&(s.extend=e.doc.extend||r.shiftKey),s.addNew==null&&(s.addNew=u?r.metaKey:r.ctrlKey),s.moveOnDrag==null&&(s.moveOnDrag=!(u?r.altKey:r.ctrlKey)),s}function zl(e,t,r,n){j?setTimeout(H(Qi,e),0):e.curOp.focus=_();var s=Hl(e,r,n),N=e.doc.sel,Q;e.options.dragDrop&&dt&&!e.isReadOnly()&&r=="single"&&(Q=N.contains(t))>-1&&(Wt((Q=N.ranges[Q]).from(),t)<0||t.xRel>0)&&(Wt(Q.to(),t)>0||t.xRel<0)?Gl(e,n,t,s):Vl(e,n,t,s)}function Gl(e,t,r,n){var s=e.display,N=!1,Q=Qn(e,function(ne){L&&(s.scroller.draggable=!1),e.state.draggingText=!1,ot(s.wrapper.ownerDocument,"mouseup",Q),ot(s.wrapper.ownerDocument,"mousemove",J),ot(s.scroller,"dragstart",$),ot(s.scroller,"drop",Q),N||(re(ne),n.addNew||Do(e.doc,r,null,null,n.extend),L&&!k||j&&B==9?setTimeout(function(){s.wrapper.ownerDocument.body.focus({preventScroll:!0}),s.input.focus()},20):s.input.focus())}),J=function(ne){N=N||Math.abs(t.clientX-ne.clientX)+Math.abs(t.clientY-ne.clientY)>=10},$=function(){return N=!0};L&&(s.scroller.draggable=!0),e.state.draggingText=Q,Q.copy=!n.moveOnDrag,s.scroller.dragDrop&&s.scroller.dragDrop(),Te(s.wrapper.ownerDocument,"mouseup",Q),Te(s.wrapper.ownerDocument,"mousemove",J),Te(s.scroller,"dragstart",$),Te(s.scroller,"drop",Q),Ao(e),setTimeout(function(){return s.input.focus()},20)}function el(e,t,r){if(r=="char")return new Mn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Mn(ft(t.line,0),f(e.doc,ft(t.line+1,0)));var n=r(e,t);return new Mn(n.from,n.to)}function Vl(e,t,r,n){var s=e.display,N=e.doc;re(t);var Q,J,$=N.sel,ne=$.ranges;if(n.addNew&&!n.extend?(J=N.sel.contains(r),J>-1?Q=ne[J]:Q=new Mn(r,r)):(Q=N.sel.primary(),J=N.sel.primIndex),n.unit=="rectangle")n.addNew||(Q=new Mn(r,r)),r=yi(e,t,!0,!0),J=-1;else{var Ee=el(e,r,n.unit);n.extend?Q=$o(Q,Ee.anchor,Ee.head,n.extend):Q=Ee}n.addNew?J==-1?(J=ne.length,xr(N,cr(e,ne.concat([Q]),J),{scroll:!1,origin:"*mouse"})):ne.length>1&&ne[J].empty()&&n.unit=="char"&&!n.extend?(xr(N,cr(e,ne.slice(0,J).concat(ne.slice(J+1)),0),{scroll:!1,origin:"*mouse"}),$=N.sel):es(N,J,Q,_e):(J=0,xr(N,new ar([Q],0),_e),$=N.sel);var Ae=r;function Xe(It){if(Wt(Ae,It)==0)return;if(Ae=It,n.unit=="rectangle"){for(var zt=[],sn=e.options.tabSize,nn=Z(Rt(N,r.line).text,r.ch,sn),En=Z(Rt(N,It.line).text,It.ch,sn),Un=Math.min(nn,En),fr=Math.max(nn,En),zn=Math.min(r.line,It.line),Wr=Math.min(e.lastLine(),Math.max(r.line,It.line));zn<=Wr;zn++){var Pr=Rt(N,zn).text,or=ke(Pr,Un,sn);Un==fr?zt.push(new Mn(ft(zn,or),ft(zn,or))):Pr.length>or&&zt.push(new Mn(ft(zn,or),ft(zn,ke(Pr,fr,sn))))}zt.length||zt.push(new Mn(r,r)),xr(N,cr(e,$.ranges.slice(0,J).concat(zt),J),{origin:"*mouse",scroll:!1}),e.scrollIntoView(It)}else{var kr=Q,yr=el(e,It,n.unit),hr=kr.anchor,sr;Wt(yr.anchor,hr)>0?(sr=yr.head,hr=Dn(kr.from(),yr.anchor)):(sr=yr.anchor,hr=pn(kr.to(),yr.head));var Jn=$.ranges.slice(0);Jn[J]=Xl(e,new Mn(f(N,hr),sr)),xr(N,cr(e,Jn,J),_e)}}var We=s.wrapper.getBoundingClientRect(),ct=0;function Et(It){var zt=++ct,sn=yi(e,It,!0,n.unit=="rectangle");if(!sn)return;if(Wt(sn,Ae)!=0){e.curOp.focus=_(),Xe(sn);var nn=Yi(s,N);(sn.line>=nn.to||sn.line<nn.from)&&setTimeout(Qn(e,function(){ct==zt&&Et(It)}),150)}else{var En=It.clientY<We.top?-20:It.clientY>We.bottom?20:0;En&&setTimeout(Qn(e,function(){if(ct!=zt)return;s.scroller.scrollTop+=En,Et(It)}),50)}}function Dt(It){e.state.selectingText=!1,ct=Infinity,It&&(re(It),s.input.focus()),ot(s.wrapper.ownerDocument,"mousemove",kt),ot(s.wrapper.ownerDocument,"mouseup",Kt),N.history.lastSelOrigin=null}var kt=Qn(e,function(It){It.buttons===0||!Ke(It)?Dt(It):Et(It)}),Kt=Qn(e,Dt);e.state.selectingText=Kt,Te(s.wrapper.ownerDocument,"mousemove",kt),Te(s.wrapper.ownerDocument,"mouseup",Kt)}function Xl(e,t){var r=t.anchor,n=t.head,s=Rt(e.doc,r.line);if(Wt(r,n)==0&&r.sticky==n.sticky)return t;var N=Ot(s);if(!N)return t;var Q=xt(N,r.ch,r.sticky),J=N[Q];if(J.from!=r.ch&&J.to!=r.ch)return t;var $=Q+(J.from==r.ch==(J.level!=1)?0:1);if($==0||$==N.length)return t;var ne;if(n.line!=r.line)ne=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ee=xt(N,n.ch,n.sticky),Ae=Ee-Q||(n.ch-r.ch)*(J.level==1?-1:1);Ee==$-1||Ee==$?ne=Ae<0:ne=Ae>0}var Xe=N[$+(ne?-1:0)],We=ne==(Xe.level==1),ct=We?Xe.from:Xe.to,Et=We?"after":"before";return r.ch==ct&&r.sticky==Et?t:new Mn(new ft(r.line,ct,Et),n)}function tl(e,t,r,n){var s,N;if(t.touches)s=t.touches[0].clientX,N=t.touches[0].clientY;else try{s=t.clientX,N=t.clientY}catch(Xe){return!1}if(s>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&re(t);var Q=e.display,J=Q.lineDiv.getBoundingClientRect();if(N>J.bottom||!fe(e,r))return se(t);N-=J.top-Q.viewOffset;for(var $=0;$<e.display.gutterSpecs.length;++$){var ne=Q.gutters.childNodes[$];if(ne&&ne.getBoundingClientRect().right>=s){var Ee=fn(e.doc,N),Ae=e.display.gutterSpecs[$];return Ne(e,r,e,Ee,Ae.className,t),se(t)}}}function os(e,t){return tl(e,t,"gutterClick",!0)}function nl(e,t){if($r(e.display,t)||Ql(e,t))return;if($e(e,t,"contextmenu"))return;D||e.display.input.onContextMenu(t)}function Ql(e,t){return fe(e,"gutterContextMenu")?tl(e,t,"gutterContextMenu",!1):!1}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Li(e)}var Aa={toString:function(){return"CodeMirror.Init"}},il={},No={};function Yl(e){var t=e.optionHandlers;function r(n,s,N,Q){e.defaults[n]=s,N&&(t[n]=Q?function(J,$,ne){ne!=Aa&&N(J,$,ne)}:N)}e.defineOption=r,e.Init=Aa,r("value","",function(n,s){return n.setValue(s)},!0),r("mode",null,function(n,s){n.doc.modeOption=s,Jo(n)},!0),r("indentUnit",2,Jo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){qa(n),Li(n),Gn(n)},!0),r("lineSeparator",null,function(n,s){if(n.doc.lineSep=s,!s)return;var N=[],Q=n.doc.first;n.doc.iter(function($){for(var ne=0;;){var Ee=$.text.indexOf(s,ne);if(Ee==-1)break;ne=Ee+s.length,N.push(ft(Q,Ee))}Q++});for(var J=N.length-1;J>=0;J--)Ea(n.doc,s,N[J],ft(N[J].line,N[J].ch+s.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,s,N){n.state.specialChars=new RegExp(s.source+(s.test(" ")?"":"| "),"g"),N!=Aa&&n.refresh()}),r("specialCharPlaceholder",Xt,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",i?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,s){return n.getInputField().spellcheck=s},!0),r("autocorrect",!1,function(n,s){return n.getInputField().autocorrect=s},!0),r("autocapitalize",!1,function(n,s){return n.getInputField().autocapitalize=s},!0),r("rtlMoveVisually",!R),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){rl(n),Si(n)},!0),r("keyMap","default",function(n,s,N){var Q=ko(s),J=N!=Aa&&ko(N);J&&J.detach&&J.detach(n,Q),Q.attach&&Q.attach(n,J||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,s){n.display.gutterSpecs=ta(s,n.options.lineNumbers),Si(n)},!0),r("fixedGutter",!0,function(n,s){n.display.gutters.style.left=s?Fa(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return pt(n)},!0),r("scrollbarStyle","native",function(n){Lt(n),pt(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,s){n.display.gutterSpecs=ta(n.options.gutters,s),Si(n)},!0),r("firstLineNumber",1,Si,!0),r("lineNumberFormatter",function(n){return n},Si,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,s){s=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(s)}),r("screenReaderLabel",null,function(n,s){s=s===""?null:s,n.display.input.screenReaderLabelChanged(s)}),r("disableInput",!1,function(n,s){s||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,qa,!0),r("addModeClass",!1,qa,!0),r("pollInterval",100),r("undoDepth",200,function(n,s){return n.doc.history.undoDepth=s}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,qa,!0),r("moveInputWithCursor",!0,function(n,s){s||n.display.input.resetPosition()}),r("tabindex",null,function(n,s){return n.display.input.getField().tabIndex=s||""}),r("autofocus",null),r("direction","ltr",function(n,s){return n.doc.setDirection(s)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Aa;if(!t!=!n){var s=e.display.dragFunctions,N=t?Te:ot;N(e.display.scroller,"dragstart",s.start),N(e.display.scroller,"dragenter",s.enter),N(e.display.scroller,"dragover",s.over),N(e.display.scroller,"dragleave",s.leave),N(e.display.scroller,"drop",s.drop)}}function Zl(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(d(e.display.wrapper,"CodeMirror-wrap"),ir(e)),ei(e),Gn(e),Li(e),setTimeout(function(){return pt(e)},100)}function Kn(e,t){var r=this;if(!(this instanceof Kn))return new Kn(e,t);this.options=t=t?K(t):{},K(il,t,!1);var n=t.value;typeof n=="string"?n=new Mr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var s=new Kn.inputStyles[t.inputStyle](this),N=this.display=new Ja(e,n,s,t);N.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Lt(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 le,keySeq:null,specialChars:null},t.autofocus&&!i&&N.input.focus(),j&&B<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Dl(),Bt(this),this.curOp.forceUpdate=!0,gs(this,n),t.autofocus&&!i||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ka(r)},20):Ii(this);for(var Q in No)No.hasOwnProperty(Q)&&No[Q](this,t[Q],Aa);ma(this),t.finishInit&&t.finishInit(this);for(var J=0;J<ss.length;++J)ss[J](this);Mt(this),L&&t.lineWrapping&&getComputedStyle(N.lineDiv).textRendering=="optimizelegibility"&&(N.lineDiv.style.textRendering="auto")}Kn.defaults=il,Kn.optionHandlers=No;function ql(e){var t=e.display;Te(t.scroller,"mousedown",Qn(e,$s)),j&&B<11?Te(t.scroller,"dblclick",Qn(e,function($){if($e(e,$))return;var ne=yi(e,$);if(!ne||os(e,$)||$r(e.display,$))return;re($);var Ee=e.findWordAt(ne);Do(e.doc,Ee.anchor,Ee.head)})):Te(t.scroller,"dblclick",function($){return $e(e,$)||re($)}),Te(t.scroller,"contextmenu",function($){return nl(e,$)}),Te(t.input.getField(),"contextmenu",function($){t.scroller.contains($.target)||nl(e,$)});var r,n={end:0};function s(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function N($){if($.touches.length!=1)return!1;var ne=$.touches[0];return ne.radiusX<=1&&ne.radiusY<=1}function Q($,ne){if(ne.left==null)return!0;var Ee=ne.left-$.left,Ae=ne.top-$.top;return Ee*Ee+Ae*Ae>20*20}Te(t.scroller,"touchstart",function($){if(!$e(e,$)&&!N($)&&!os(e,$)){t.input.ensurePolled(),clearTimeout(r);var ne=+new Date;t.activeTouch={start:ne,moved:!1,prev:ne-n.end<=300?n:null},$.touches.length==1&&(t.activeTouch.left=$.touches[0].pageX,t.activeTouch.top=$.touches[0].pageY)}}),Te(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Te(t.scroller,"touchend",function($){var ne=t.activeTouch;if(ne&&!$r(t,$)&&ne.left!=null&&!ne.moved&&new Date-ne.start<300){var Ee=e.coordsChar(t.activeTouch,"page"),Ae;!ne.prev||Q(ne,ne.prev)?Ae=new Mn(Ee,Ee):!ne.prev.prev||Q(ne,ne.prev.prev)?Ae=e.findWordAt(Ee):Ae=new Mn(ft(Ee.line,0),f(e.doc,ft(Ee.line+1,0))),e.setSelection(Ae.anchor,Ae.head),e.focus(),re($)}s()}),Te(t.scroller,"touchcancel",s),Te(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Ji(e,t.scroller.scrollTop),ue(e,t.scroller.scrollLeft,!0),Ne(e,"scroll",e))}),Te(t.scroller,"mousewheel",function($){return Ti(e,$)}),Te(t.scroller,"DOMMouseScroll",function($){return Ti(e,$)}),Te(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function($){$e(e,$)||de($)},over:function($){$e(e,$)||(Ol(e,$),de($))},start:function($){return Rl(e,$)},drop:Qn(e,wl),leave:function($){$e(e,$)||js(e)}};var J=t.input.getField();Te(J,"keyup",function($){return Zs.call(e,$)}),Te(J,"keydown",Qn(e,Js)),Te(J,"keypress",Qn(e,qs)),Te(J,"focus",function($){return Ka(e,$)}),Te(J,"blur",function($){return Ii(e,$)})}var ss=[];Kn.defineInitHook=function(e){return ss.push(e)};function ho(e,t,r,n){var s=e.doc,N;r==null&&(r="add"),r=="smart"&&(s.mode.indent?N=je(e,t).state:r="prev");var Q=e.options.tabSize,J=Rt(s,t),$=Z(J.text,null,Q);J.stateAfter&&(J.stateAfter=null);var ne=J.text.match(/^\s*/)[0],Ee;if(!n&&!/\S/.test(J.text))Ee=0,r="not";else if(r=="smart"&&(Ee=s.mode.indent(N,J.text.slice(ne.length),J.text),Ee==Ue||Ee>150)){if(!n)return;r="prev"}r=="prev"?t>s.first?Ee=Z(Rt(s,t-1).text,null,Q):Ee=0:r=="add"?Ee=$+e.options.indentUnit:r=="subtract"?Ee=$-e.options.indentUnit:typeof r=="number"&&(Ee=$+r),Ee=Math.max(0,Ee);var Ae="",Xe=0;if(e.options.indentWithTabs)for(var We=Math.floor(Ee/Q);We;--We)Xe+=Q,Ae+=" ";if(Xe<Ee&&(Ae+=ce(Ee-Xe)),Ae!=ne)return Ea(s,Ae,ft(t,0),ft(t,ne.length),"+input"),J.stateAfter=null,!0;for(var ct=0;ct<s.sel.ranges.length;ct++){var Et=s.sel.ranges[ct];if(Et.head.line==t&&Et.head.ch<ne.length){var Dt=ft(t,ne.length);es(s,ct,new Mn(Dt,Dt));break}}}var ni=null;function Bo(e){ni=e}function ls(e,t,r,n,s){var N=e.doc;e.display.shift=!1,n||(n=N.sel);var Q=+new Date-200,J=s=="paste"||e.state.pasteIncoming>Q,$=Qe(t),ne=null;if(J&&n.ranges.length>1)if(ni&&ni.text.join(`
`)==t){if(n.ranges.length%ni.text.length==0){ne=[];for(var Ee=0;Ee<ni.text.length;Ee++)ne.push(N.splitLines(ni.text[Ee]))}}else $.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(ne=be($,function(kt){return[kt]}));for(var Ae=e.curOp.updateInput,Xe=n.ranges.length-1;Xe>=0;Xe--){var We=n.ranges[Xe],ct=We.from(),Et=We.to();We.empty()&&(r&&r>0?ct=ft(ct.line,ct.ch-r):e.state.overwrite&&!J?Et=ft(Et.line,Math.min(Rt(N,Et.line).text.length,Et.ch+te($).length)):J&&ni&&ni.lineWise&&ni.text.join(`
`)==$.join(`
`)&&(ct=Et=ft(ct.line,0)));var Dt={from:ct,to:Et,text:ne?ne[Xe%ne.length]:$,origin:s||(J?"paste":e.state.cutIncoming>Q?"cut":"+input")};ba(e.doc,Dt),hn(e,"inputRead",e,Dt)}t&&!J&&ol(e,t),Ni(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ae),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Xn(t,function(){return ls(t,r,0,null,"paste")}),!0}function ol(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var s=r.ranges[n];if(s.head.ch>100||n&&r.ranges[n-1].head.line==s.head.line)continue;var N=e.getModeAt(s.head),Q=!1;if(N.electricChars){for(var J=0;J<N.electricChars.length;J++)if(t.indexOf(N.electricChars.charAt(J))>-1){Q=ho(e,s.head.line,"smart");break}}else N.electricInput&&(N.electricInput.test(Rt(e.doc,s.head.line).text.slice(0,s.head.ch))&&(Q=ho(e,s.head.line,"smart")));Q&&hn(e,"electricInput",e,s.head.line)}}function sl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var s=e.doc.sel.ranges[n].head.line,N={anchor:ft(s,0),head:ft(s+1,0)};r.push(N),t.push(e.getRange(N.anchor,N.head))}return{text:t,ranges:r}}function ll(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ul(){var e=a("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=a("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return L?e.style.width="1000px":e.setAttribute("wrap","off"),p&&(e.style.border="1px solid black"),ll(e),t}function $l(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,s){var N=this.options,Q=N[n];if(N[n]==s&&n!="mode")return;N[n]=s,t.hasOwnProperty(n)&&Qn(this,t[n])(this,s,Q),Ne(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,s){this.state.keyMaps[s?"push":"unshift"](ko(n))},removeKeyMap:function(n){for(var s=this.state.keyMaps,N=0;N<s.length;++N)if(s[N]==n||s[N].name==n)return s.splice(N,1),!0},addOverlay:ur(function(n,s){var N=n.token?n:e.getMode(this.options,n);if(N.startState)throw new Error("Overlays may not be stateful.");ae(this.state.overlays,{mode:N,modeSpec:n,opaque:s&&s.opaque,priority:s&&s.priority||0},function(Q){return Q.priority}),this.state.modeGen++,Gn(this)}),removeOverlay:ur(function(n){for(var s=this.state.overlays,N=0;N<s.length;++N){var Q=s[N].modeSpec;if(Q==n||typeof n=="string"&&Q.name==n){s.splice(N,1),this.state.modeGen++,Gn(this);return}}}),indentLine:ur(function(n,s,N){typeof s!="string"&&typeof s!="number"&&(s==null?s=this.options.smartIndent?"smart":"prev":s=s?"add":"subtract"),On(this.doc,n)&&ho(this,n,s,N)}),indentSelection:ur(function(n){for(var s=this.doc.sel.ranges,N=-1,Q=0;Q<s.length;Q++){var J=s[Q];if(J.empty())J.head.line>N&&(ho(this,J.head.line,n,!0),N=J.head.line,Q==this.doc.sel.primIndex&&Ni(this));else{var $=J.from(),ne=J.to(),Ee=Math.max(N,$.line);N=Math.min(this.lastLine(),ne.line-(ne.ch?0:1))+1;for(var Ae=Ee;Ae<N;++Ae)ho(this,Ae,n);var Xe=this.doc.sel.ranges;$.ch==0&&s.length==Xe.length&&Xe[Q].from().ch>0&&es(this.doc,Q,new Mn($,Xe[Q].to()),Me)}}}),getTokenAt:function(n,s){return yn(this,n,s)},getLineTokens:function(n,s){return yn(this,ft(n),s,!0)},getTokenTypeAt:function(n){n=f(this.doc,n);var s=st(this,Rt(this.doc,n.line)),N=0,Q=(s.length-1)/2,J=n.ch,$;if(J==0)$=s[2];else for(;;){var ne=N+Q>>1;if((ne?s[ne*2-1]:0)>=J)Q=ne;else if(s[ne*2+1]<J)N=ne+1;else{$=s[ne*2+2];break}}var Ee=$?$.indexOf("overlay "):-1;return Ee<0?$:Ee==0?null:$.slice(0,Ee-1)},getModeAt:function(n){var s=this.doc.mode;return s.innerMode?e.innerMode(s,this.getTokenAt(n).state).mode:s},getHelper:function(n,s){return this.getHelpers(n,s)[0]},getHelpers:function(n,s){var N=[];if(!r.hasOwnProperty(s))return N;var Q=r[s],J=this.getModeAt(n);if(typeof J[s]=="string")Q[J[s]]&&N.push(Q[J[s]]);else if(J[s])for(var $=0;$<J[s].length;$++){var ne=Q[J[s][$]];ne&&N.push(ne)}else J.helperType&&Q[J.helperType]?N.push(Q[J.helperType]):Q[J.name]&&N.push(Q[J.name]);for(var Ee=0;Ee<Q._global.length;Ee++){var Ae=Q._global[Ee];Ae.pred(J,this)&&he(N,Ae.val)==-1&&N.push(Ae.val)}return N},getStateAfter:function(n,s){var N=this.doc;return n=X(N,n==null?N.first+N.size-1:n),je(this,n+1,s).state},cursorCoords:function(n,s){var N,Q=this.doc.sel.primary();return n==null?N=Q.head:typeof n=="object"?N=f(this.doc,n):N=n?Q.from():Q.to(),Gr(this,N,s||"page")},charCoords:function(n,s){return li(this,f(this.doc,n),s||"page")},coordsChar:function(n,s){return n=yo(this,n,s||"page"),Na(this,n.left,n.top)},lineAtHeight:function(n,s){return n=yo(this,{top:n,left:0},s||"page").top,fn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,s,N){var Q=!1,J;if(typeof n=="number"){var $=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>$&&(n=$,Q=!0),J=Rt(this.doc,n)}else J=n;return Vi(this,J,{top:0,left:0},s||"page",N||Q).top+(Q?this.doc.height-vr(J):0)},defaultTextHeight:function(){return Pi(this.display)},defaultCharWidth:function(){return vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,s,N,Q,J){var $=this.display;n=Gr(this,f(this.doc,n));var ne=n.bottom,Ee=n.left;if(s.style.position="absolute",s.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(s),$.sizer.appendChild(s),Q=="over")ne=n.top;else if(Q=="above"||Q=="near"){var Ae=Math.max($.wrapper.clientHeight,this.doc.height),Xe=Math.max($.sizer.clientWidth,$.lineSpace.clientWidth);(Q=="above"||n.bottom+s.offsetHeight>Ae)&&n.top>s.offsetHeight?ne=n.top-s.offsetHeight:n.bottom+s.offsetHeight<=Ae&&(ne=n.bottom),Ee+s.offsetWidth>Xe&&(Ee=Xe-s.offsetWidth)}s.style.top=ne+"px",s.style.left=s.style.right="",J=="right"?(Ee=$.sizer.clientWidth-s.offsetWidth,s.style.right="0px"):(J=="left"?Ee=0:J=="middle"&&(Ee=($.sizer.clientWidth-s.offsetWidth)/2),s.style.left=Ee+"px"),N&&Xo(this,{left:Ee,top:ne,right:Ee+s.offsetWidth,bottom:ne+s.offsetHeight})},triggerOnKeyDown:ur(Js),triggerOnKeyPress:ur(qs),triggerOnKeyUp:Zs,triggerOnMouseDown:ur($s),execCommand:function(n){if(so.hasOwnProperty(n))return so[n].call(null,this)},triggerElectric:ur(function(n){ol(this,n)}),findPosH:function(n,s,N,Q){var J=1;s<0&&(J=-1,s=-s);for(var $=f(this.doc,n),ne=0;ne<s&&!($=us(this.doc,$,J,N,Q),$.hitSide);++ne);return $},moveH:ur(function(n,s){var N=this;this.extendSelectionsBy(function(Q){return N.display.shift||N.doc.extend||Q.empty()?us(N.doc,Q.head,n,s,N.options.rtlMoveVisually):n<0?Q.from():Q.to()},Ie)}),deleteH:ur(function(n,s){var N=this.doc.sel,Q=this.doc;N.somethingSelected()?Q.replaceSelection("",null,"+delete"):Sa(this,function(J){var $=us(Q,J.head,n,s,!1);return n<0?{from:$,to:J.head}:{from:J.head,to:$}})}),findPosV:function(n,s,N,Q){var J=1,$=Q;s<0&&(J=-1,s=-s);for(var ne=f(this.doc,n),Ee=0;Ee<s;++Ee){var Ae=Gr(this,ne,"div");if($==null?$=Ae.left:Ae.left=$,ne=dl(this,Ae,J,N),ne.hitSide)break}return ne},moveV:ur(function(n,s){var N=this,Q=this.doc,J=[],$=!this.display.shift&&!Q.extend&&Q.sel.somethingSelected();if(Q.extendSelectionsBy(function(Ee){if($)return n<0?Ee.from():Ee.to();var Ae=Gr(N,Ee.head,"div");Ee.goalColumn!=null&&(Ae.left=Ee.goalColumn),J.push(Ae.left);var Xe=dl(N,Ae,n,s);return s=="page"&&Ee==Q.sel.primary()&&za(N,li(N,Xe,"div").top-Ae.top),Xe},Ie),J.length)for(var ne=0;ne<Q.sel.ranges.length;ne++)Q.sel.ranges[ne].goalColumn=J[ne]}),findWordAt:function(n){var s=this.doc,N=Rt(s,n.line).text,Q=n.ch,J=n.ch;if(N){var $=this.getHelper(n,"wordChars");(n.sticky=="before"||J==N.length)&&Q?--Q:++J;for(var ne=N.charAt(Q),Ee=Ge(ne,$)?function(Ae){return Ge(Ae,$)}:/\s/.test(ne)?function(Ae){return/\s/.test(Ae)}:function(Ae){return!/\s/.test(Ae)&&!Ge(Ae)};Q>0&&Ee(N.charAt(Q-1));)--Q;for(;J<N.length&&Ee(N.charAt(J));)++J}return new Mn(ft(n.line,Q),ft(n.line,J))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):d(this.display.cursorDiv,"CodeMirror-overwrite"),Ne(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==_()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ur(function(n,s){jr(this,n,s)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-zr(this)-this.display.barHeight,width:n.scrollWidth-zr(this)-this.display.barWidth,clientHeight:La(this),clientWidth:oi(this)}},scrollIntoView:ur(function(n,s){n==null?(n={from:this.doc.sel.primary().head,to:null},s==null&&(s=this.options.cursorScrollMargin)):typeof n=="number"?n={from:ft(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=s||0,n.from.line!=null?Qo(this,n):wo(this,n.from,n.to,n.margin)}),setSize:ur(function(n,s){var N=this,Q=function($){return typeof $=="number"||/^\d+$/.test(String($))?$+"px":$};n!=null&&(this.display.wrapper.style.width=Q(n)),s!=null&&(this.display.wrapper.style.height=Q(s)),this.options.lineWrapping&&vo(this);var J=this.display.viewFrom;this.doc.iter(J,this.display.viewTo,function($){if($.widgets){for(var ne=0;ne<$.widgets.length;ne++)if($.widgets[ne].noHScroll){Yr(N,J,"widget");break}}++J}),this.curOp.forceUpdate=!0,Ne(this,"refresh",this)}),operation:function(n){return Xn(this,n)},startOperation:function(){return Bt(this)},endOperation:function(){return Mt(this)},refresh:ur(function(){var n=this.display.cachedTextHeight;Gn(this),this.curOp.forceUpdate=!0,Li(this),jr(this,this.doc.scrollLeft,this.doc.scrollTop),$i(this.display),(n==null||Math.abs(n-Pi(this.display))>.5||this.options.lineWrapping)&&ei(this),Ne(this,"refresh",this)}),swapDoc:ur(function(n){var s=this.doc;return s.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,n),Li(this),this.display.input.reset(),jr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,hn(this,"swapDoc",this,s),s}),phrase:function(n){var s=this.options.phrases;return s&&Object.prototype.hasOwnProperty.call(s,n)?s[n]:n},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}},pe(e),e.registerHelper=function(n,s,N){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][s]=N},e.registerGlobalHelper=function(n,s,N,Q){e.registerHelper(n,s,Q),r[n]._global.push({pred:N,val:Q})}}function us(e,t,r,n,s){var N=t,Q=r,J=Rt(e,t.line),$=s&&e.direction=="rtl"?-r:r;function ne(){var Kt=t.line+$;return Kt<e.first||Kt>=e.first+e.size?!1:(t=new ft(Kt,t.ch,t.sticky),J=Rt(e,Kt))}function Ee(Kt){var It;if(n=="codepoint"){var zt=J.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(zt)?It=null:It=new ft(t.line,Math.max(0,Math.min(J.text.length,t.ch+r*(zt>=55296&&zt<56320?2:1))),-r)}else s?It=kl(e.cm,J,t,r):It=ns(J,t,r);if(It==null)if(!Kt&&ne())t=rs(s,e.cm,J,t.line,$);else return!1;else t=It;return!0}if(n=="char"||n=="codepoint")Ee();else if(n=="column")Ee(!0);else if(n=="word"||n=="group")for(var Ae=null,Xe=n=="group",We=e.cm&&e.cm.getHelper(t,"wordChars"),ct=!0;!(r<0&&!Ee(!ct));ct=!1){var Et=J.text.charAt(t.ch)||`
`,Dt=Ge(Et,We)?"w":Xe&&Et==`
`?"n":!Xe||/\s/.test(Et)?null:"p";if(Xe&&!ct&&!Dt&&(Dt="s"),Ae&&Ae!=Dt){r<0&&(r=1,Ee(),t.sticky="after");break}if(Dt&&(Ae=Dt),r>0&&!Ee(!ct))break}var kt=Lo(e,t,N,Q,!0);return Qt(N,kt)&&(kt.hitSide=!0),kt}function dl(e,t,r,n){var s=e.doc,N=t.left,Q;if(n=="page"){var J=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$=Math.max(J-.5*Pi(e.display),3);Q=(r>0?t.bottom:t.top)+r*$}else n=="line"&&(Q=r>0?t.bottom+3:t.top-3);for(var ne;!(ne=Na(e,N,Q),!ne.outside);){if(r<0?Q<=0:Q>=s.height){ne.hitSide=!0;break}Q+=r*5}return ne}var Nn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Nn.prototype.init=function(e){var t=this,r=this,n=r.cm,s=r.div=e.lineDiv;ll(s,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function N(J){for(var $=J.target;$;$=$.parentNode){if($==s)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($.className))break}return!1}Te(s,"paste",function(J){if(!N(J)||$e(n,J)||al(J,n))return;B<=11&&setTimeout(Qn(n,function(){return t.updateFromDOM()}),20)}),Te(s,"compositionstart",function(J){t.composing={data:J.data,done:!1}}),Te(s,"compositionupdate",function(J){t.composing||(t.composing={data:J.data,done:!1})}),Te(s,"compositionend",function(J){t.composing&&(J.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Te(s,"touchstart",function(){return r.forceCompositionEnd()}),Te(s,"input",function(){t.composing||t.readFromDOMSoon()});function Q(J){if(!N(J)||$e(n,J))return;if(n.somethingSelected())Bo({lineWise:!1,text:n.getSelections()}),J.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var $=sl(n);Bo({lineWise:!0,text:$.text}),J.type=="cut"&&n.operation(function(){n.setSelections($.ranges,0,Me),n.replaceSelection("",null,"cut")})}else return;if(J.clipboardData){J.clipboardData.clearData();var ne=ni.text.join(`
`);if(J.clipboardData.setData("Text",ne),J.clipboardData.getData("Text")==ne){J.preventDefault();return}}var Ee=ul(),Ae=Ee.firstChild;n.display.lineSpace.insertBefore(Ee,n.display.lineSpace.firstChild),Ae.value=ni.text.join(`
`);var Xe=document.activeElement;M(Ae),setTimeout(function(){n.display.lineSpace.removeChild(Ee),Xe.focus(),Xe==s&&r.showPrimarySelection()},50)}Te(s,"copy",Q),Te(s,"cut",Q)},Nn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Nn.prototype.prepareSelection=function(){var e=Co(this.cm,!1);return e.focus=document.activeElement==this.div,e},Nn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Nn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Nn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),s=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||s.line<t.display.viewFrom){e.removeAllRanges();return}var N=Uo(t,e.anchorNode,e.anchorOffset),Q=Uo(t,e.focusNode,e.focusOffset);if(N&&!N.bad&&Q&&!Q.bad&&Wt(Dn(N,Q),n)==0&&Wt(pn(N,Q),s)==0)return;var J=t.display.view,$=n.line>=t.display.viewFrom&&cl(t,n)||{node:J[0].measure.map[2],offset:0},ne=s.line<t.display.viewTo&&cl(t,s);if(!ne){var Ee=J[J.length-1].measure,Ae=Ee.maps?Ee.maps[Ee.maps.length-1]:Ee.map;ne={node:Ae[Ae.length-1],offset:Ae[Ae.length-2]-Ae[Ae.length-3]}}if(!$||!ne){e.removeAllRanges();return}var Xe=e.rangeCount&&e.getRangeAt(0),We;try{We=E($.node,$.offset,ne.offset,ne.node)}catch(ct){}We&&(!P&&t.state.focused?(e.collapse($.node,$.offset),We.collapsed||(e.removeAllRanges(),e.addRange(We))):(e.removeAllRanges(),e.addRange(We)),Xe&&e.anchorNode==null?e.addRange(Xe):P&&this.startGracePeriod()),this.rememberSelection()},Nn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Nn.prototype.showMultipleSelections=function(e){o(this.cm.display.cursorDiv,e.cursors),o(this.cm.display.selectionDiv,e.selection)},Nn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Nn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},Nn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Nn.prototype.blur=function(){this.div.blur()},Nn.prototype.getField=function(){return this.div},Nn.prototype.supportsTouch=function(){return!0},Nn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Xn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Nn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Nn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(c&&v&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=Uo(t,e.anchorNode,e.anchorOffset),n=Uo(t,e.focusNode,e.focusOffset);r&&n&&Xn(t,function(){xr(t.doc,ti(r,n),Me),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Nn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),s=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=ft(n.line-1,Rt(e.doc,n.line-1).length)),s.ch==Rt(e.doc,s.line).text.length&&s.line<e.lastLine()&&(s=ft(s.line+1,0)),n.line<t.viewFrom||s.line>t.viewTo-1)return!1;var N,Q,J;n.line==t.viewFrom||(N=bi(e,n.line))==0?(Q=Gt(t.view[0].line),J=t.view[0].node):(Q=Gt(t.view[N].line),J=t.view[N-1].node.nextSibling);var $=bi(e,s.line),ne,Ee;if($==t.view.length-1?(ne=t.viewTo-1,Ee=t.lineDiv.lastChild):(ne=Gt(t.view[$+1].line)-1,Ee=t.view[$+1].node.previousSibling),!J)return!1;for(var Ae=e.doc.splitLines(tu(e,J,Ee,Q,ne)),Xe=Zt(e.doc,ft(Q,0),ft(ne,Rt(e.doc,ne).text.length));Ae.length>1&&Xe.length>1;)if(te(Ae)==te(Xe))Ae.pop(),Xe.pop(),ne--;else if(Ae[0]==Xe[0])Ae.shift(),Xe.shift(),Q++;else break;for(var We=0,ct=0,Et=Ae[0],Dt=Xe[0],kt=Math.min(Et.length,Dt.length);We<kt&&Et.charCodeAt(We)==Dt.charCodeAt(We);)++We;for(var Kt=te(Ae),It=te(Xe),zt=Math.min(Kt.length-(Ae.length==1?We:0),It.length-(Xe.length==1?We:0));ct<zt&&Kt.charCodeAt(Kt.length-ct-1)==It.charCodeAt(It.length-ct-1);)++ct;if(Ae.length==1&&Xe.length==1&&Q==n.line)for(;We&&We>n.ch&&Kt.charCodeAt(Kt.length-ct-1)==It.charCodeAt(It.length-ct-1);)We--,ct++;Ae[Ae.length-1]=Kt.slice(0,Kt.length-ct).replace(/^\u200b+/,""),Ae[0]=Ae[0].slice(We).replace(/\u200b+$/,"");var sn=ft(Q,We),nn=ft(ne,Xe.length?te(Xe).length-ct:0);if(Ae.length>1||Ae[0]||Wt(sn,nn))return Ea(e.doc,Ae,sn,nn,"+input"),!0},Nn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Nn.prototype.reset=function(){this.forceCompositionEnd()},Nn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Nn.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)},Nn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Xn(this.cm,function(){return Gn(e.cm)})},Nn.prototype.setUneditable=function(e){e.contentEditable="false"},Nn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Qn(this.cm,ls)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Nn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Nn.prototype.onContextMenu=function(){},Nn.prototype.resetPosition=function(){},Nn.prototype.needsContentAttribute=!0;function cl(e,t){var r=zi(e,t.line);if(!r||r.hidden)return null;var n=Rt(e.doc,t.line),s=Lr(r,n,t.line),N=Ot(n,e.doc.direction),Q="left";if(N){var J=xt(N,t.ch);Q=J%2?"right":"left"}var $=Gi(s.map,t.ch,Q);return $.offset=$.collapse=="right"?$.end:$.start,$}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Ta(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,s){var N="",Q=!1,J=e.doc.lineSeparator(),$=!1;function ne(We){return function(ct){return ct.id==We}}function Ee(){Q&&(N+=J,$&&(N+=J),Q=$=!1)}function Ae(We){We&&(Ee(),N+=We)}function Xe(We){if(We.nodeType==1){var ct=We.getAttribute("cm-text");if(ct){Ae(ct);return}var Et=We.getAttribute("cm-marker"),Dt;if(Et){var kt=e.findMarks(ft(n,0),ft(s+1,0),ne(+Et));kt.length&&(Dt=kt[0].find(0))&&Ae(Zt(e.doc,Dt.from,Dt.to).join(J));return}if(We.getAttribute("contenteditable")=="false")return;var Kt=/^(pre|div|p|li|table|br)$/i.test(We.nodeName);if(!/^br$/i.test(We.nodeName)&&We.textContent.length==0)return;Kt&&Ee();for(var It=0;It<We.childNodes.length;It++)Xe(We.childNodes[It]);/^(pre|p)$/i.test(We.nodeName)&&($=!0),Kt&&(Q=!0)}else We.nodeType==3&&Ae(We.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Xe(t),t==r);)t=t.nextSibling,$=!1;return N}function Uo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Ta(e.clipPos(ft(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var s=0;s<e.display.view.length;s++){var N=e.display.view[s];if(N.node==n)return nu(N,t,r)}}function nu(e,t,r){var n=e.text.firstChild,s=!1;if(!t||!m(n,t))return Ta(ft(Gt(e.line),0),!0);if(t==n&&(s=!0,t=n.childNodes[r],r=0,!t)){var N=e.rest?te(e.rest):e.line;return Ta(ft(Gt(N),N.text.length),s)}var Q=t.nodeType==3?t:null,J=t;for(!Q&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(Q=t.firstChild,r&&(r=Q.nodeValue.length));J.parentNode!=n;)J=J.parentNode;var $=e.measure,ne=$.maps;function Ee(Dt,kt,Kt){for(var It=-1;It<(ne?ne.length:0);It++)for(var zt=It<0?$.map:ne[It],sn=0;sn<zt.length;sn+=3){var nn=zt[sn+2];if(nn==Dt||nn==kt){var En=Gt(It<0?e.line:e.rest[It]),Un=zt[sn]+Kt;return(Kt<0||nn!=Dt)&&(Un=zt[sn+(Kt?1:0)]),ft(En,Un)}}}var Ae=Ee(Q,J,r);if(Ae)return Ta(Ae,s);for(var Xe=J.nextSibling,We=Q?Q.nodeValue.length-r:0;Xe;Xe=Xe.nextSibling){if(Ae=Ee(Xe,Xe.firstChild,0),Ae)return Ta(ft(Ae.line,Ae.ch-We),s);We+=Xe.textContent.length}for(var ct=J.previousSibling,Et=r;ct;ct=ct.previousSibling){if(Ae=Ee(ct,ct.firstChild,-1),Ae)return Ta(ft(Ae.line,Ae.ch+Et),s);Et+=ct.textContent.length}}var er=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new le,this.hasSelection=!1,this.composing=null};er.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var s=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),p&&(s.style.width="0px"),Te(s,"input",function(){j&&B>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Te(s,"paste",function(Q){if($e(n,Q)||al(Q,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function N(Q){if($e(n,Q))return;if(n.somethingSelected())Bo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var J=sl(n);Bo({lineWise:!0,text:J.text}),Q.type=="cut"?n.setSelections(J.ranges,null,Me):(r.prevInput="",s.value=J.text.join(`
`),M(s))}else return;Q.type=="cut"&&(n.state.cutIncoming=+new Date)}Te(s,"cut",N),Te(s,"copy",N),Te(e.scroller,"paste",function(Q){if($r(e,Q)||$e(n,Q))return;if(!s.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var J=new Event("paste");J.clipboardData=Q.clipboardData,s.dispatchEvent(J)}),Te(e.lineSpace,"selectstart",function(Q){$r(e,Q)||re(Q)}),Te(s,"compositionstart",function(){var Q=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:Q,range:n.markText(Q,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Te(s,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},er.prototype.createField=function(e){this.wrapper=ul(),this.textarea=this.wrapper.firstChild},er.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},er.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Co(e);if(e.options.moveInputWithCursor){var s=Gr(e,r.sel.primary().head,"div"),N=t.wrapper.getBoundingClientRect(),Q=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,s.top+Q.top-N.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,s.left+Q.left-N.left))}return n},er.prototype.showSelection=function(e){var t=this.cm,r=t.display;o(r.cursorDiv,e.cursors),o(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},er.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&M(this.textarea),j&&B>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",j&&B>=9&&(this.hasSelection=null))},er.prototype.getField=function(){return this.textarea},er.prototype.supportsTouch=function(){return!1},er.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!i||_()!=this.textarea))try{this.textarea.focus()}catch(e){}},er.prototype.blur=function(){this.textarea.blur()},er.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},er.prototype.receivedFocus=function(){this.slowPoll()},er.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()})},er.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},er.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ze(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var s=r.value;if(s==n&&!t.somethingSelected())return!1;if(j&&B>=9&&this.hasSelection===s||u&&/[\uf700-\uf7ff]/.test(s))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var N=s.charCodeAt(0);if(N==8203&&!n&&(n="\u200B"),N==8666)return this.reset(),this.cm.execCommand("undo")}for(var Q=0,J=Math.min(n.length,s.length);Q<J&&n.charCodeAt(Q)==s.charCodeAt(Q);)++Q;return Xn(t,function(){ls(t,s.slice(Q),n.length-Q,null,e.composing?"*compose":null),s.length>1e3||s.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=s,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},er.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},er.prototype.onKeyPress=function(){j&&B>=9&&(this.hasSelection=null),this.fastPoll()},er.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,s=t.textarea;t.contextMenuPending&&t.contextMenuPending();var N=yi(r,e),Q=n.scroller.scrollTop;if(!N||C)return;var J=r.options.resetSelectionOnContextMenu;J&&r.doc.sel.contains(N)==-1&&Qn(r,xr)(r.doc,ti(N),Me);var $=s.style.cssText,ne=t.wrapper.style.cssText,Ee=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",s.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ee.top-5)+"px; left: "+(e.clientX-Ee.left-5)+`px;
z-index: 1000; background: `+(j?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ae;L&&(Ae=window.scrollY),n.input.focus(),L&&window.scrollTo(null,Ae),n.input.reset(),r.somethingSelected()||(s.value=t.prevInput=" "),t.contextMenuPending=We,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Xe(){if(s.selectionStart!=null){var Et=r.somethingSelected(),Dt="\u200B"+(Et?s.value:"");s.value="\u21DA",s.value=Dt,t.prevInput=Et?"":"\u200B",s.selectionStart=1,s.selectionEnd=Dt.length,n.selForContextMenu=r.doc.sel}}function We(){if(t.contextMenuPending!=We)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ne,s.style.cssText=$,j&&B<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=Q),s.selectionStart!=null){(!j||j&&B<9)&&Xe();var Et=0,Dt=function(){n.selForContextMenu==r.doc.sel&&s.selectionStart==0&&s.selectionEnd>0&&t.prevInput=="\u200B"?Qn(r,Ds)(r):Et++<10?n.detectingSelectAll=setTimeout(Dt,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Dt,200)}}if(j&&B>=9&&Xe(),D){de(e);var ct=function(){ot(window,"mouseup",ct),setTimeout(We,20)};Te(window,"mouseup",ct)}else setTimeout(We,50)},er.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},er.prototype.setUneditable=function(){},er.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?K(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=_();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=J.getValue()}var s;if(e.form&&(Te(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var N=e.form;s=N.submit;try{var Q=N.submit=function(){n(),N.submit=s,N.submit(),N.submit=Q}}catch($){}}t.finishInit=function($){$.save=n,$.getTextArea=function(){return e},$.toTextArea=function(){$.toTextArea=isNaN,n(),e.parentNode.removeChild($.getWrapperElement()),e.style.display="",e.form&&(ot(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=s))}},e.style.display="none";var J=Kn(function($){return e.parentNode.insertBefore($,e.nextSibling)},t);return J}function iu(e){e.off=ot,e.on=Te,e.wheelEventPixels=Ai,e.Doc=Mr,e.splitLines=Qe,e.countColumn=Z,e.findColumn=ke,e.isWordChar=Ve,e.Pass=Ue,e.signal=Ne,e.Line=Er,e.changeEnd=Ui,e.scrollbarModel=jt,e.Pos=ft,e.cmpPos=Wt,e.modes=nt,e.mimeModes=He,e.resolveMode=Re,e.getMode=qe,e.modeExtensions=vt,e.extendMode=Ct,e.copyState=wt,e.startState=Ft,e.innerMode=lt,e.commands=so,e.keyMap=wi,e.keyName=Gs,e.isModifierKey=Hs,e.lookupKey=Ca,e.normalizeKeyMap=Pl,e.StringStream=$t,e.SharedTextMarker=io,e.TextMarker=ji,e.LineWidget=ro,e.e_preventDefault=re,e.e_stopPropagation=ie,e.e_stop=de,e.addClass=I,e.contains=m,e.rmClass=d,e.keyNames=Wi}Yl(Kn),$l(Kn);var au="iter insert remove copy getEditor constructor".split(" ");for(var Fo in Mr.prototype)Mr.prototype.hasOwnProperty(Fo)&&he(au,Fo)<0&&(Kn.prototype[Fo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mr.prototype[Fo]));return pe(Mr),Kn.inputStyles={textarea:er,contenteditable:Nn},Kn.defineMode=function(e){!Kn.defaults.mode&&e!="null"&&(Kn.defaults.mode=e),bt.apply(this,arguments)},Kn.defineMIME=mt,Kn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Kn.defineMIME("text/plain","null"),Kn.defineExtension=function(e,t){Kn.prototype[e]=t},Kn.defineDocExtension=function(e,t){Mr.prototype[e]=t},Kn.fromTextArea=ru,iu(Kn),Kn.version="5.58.2",Kn})},W6BS:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZv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="},WaYH:function(ze,De,W){"use strict";var q=W("rePB"),z=W("Ff2n"),P=W("VTBJ"),Y=W("1OyB"),F=W("vuIU"),A=W("JX7q"),j=W("Ji7U"),B=W("LK+K"),L=W("q1tI"),T=W("TSYQ"),v=W.n(T),C=W("sboe"),k=W("OZM5"),O=function(D){var S=D.prefixCls,d=D.level,l=D.isStart,o=D.isEnd;if(!d)return null;for(var a="".concat(S,"-indent-unit"),x=[],E=0;E<d;E+=1){var m;x.push(L.createElement("span",{key:E,className:v()(a,(m={},Object(q.a)(m,"".concat(a,"-start"),l[E+1]),Object(q.a)(m,"".concat(a,"-end"),o[E+1]),Object(q.a)(m,"".concat(a,"-end-first-level"),!E&&o[0]),m))}))}return L.createElement("span",{"aria-hidden":"true",className:"".concat(S,"-indent")},x)},b=O,p=W("815F"),c="open",i="close",u="---",h=function(g){Object(j.a)(S,g);var D=Object(B.a)(S);function S(){var d;return Object(Y.a)(this,S),d=D.apply(this,arguments),d.state={dragNodeHighlight:!1},d.onSelectorClick=function(l){var o=d.props.context.onNodeClick;o(l,Object(p.b)(d.props)),d.isSelectable()?d.onSelect(l):d.onCheck(l)},d.onSelectorDoubleClick=function(l){var o=d.props.context.onNodeDoubleClick;o(l,Object(p.b)(d.props))},d.onSelect=function(l){if(d.isDisabled())return;var o=d.props.context.onNodeSelect;l.preventDefault(),o(l,Object(p.b)(d.props))},d.onCheck=function(l){if(d.isDisabled())return;var o=d.props,a=o.disableCheckbox,x=o.checked,E=d.props.context.onNodeCheck;if(!d.isCheckable()||a)return;l.preventDefault();var m=!x;E(l,Object(p.b)(d.props),m)},d.onMouseEnter=function(l){var o=d.props.context.onNodeMouseEnter;o(l,Object(p.b)(d.props))},d.onMouseLeave=function(l){var o=d.props.context.onNodeMouseLeave;o(l,Object(p.b)(d.props))},d.onContextMenu=function(l){var o=d.props.context.onNodeContextMenu;o(l,Object(p.b)(d.props))},d.onDragStart=function(l){var o=d.props.context.onNodeDragStart;l.stopPropagation(),d.setState({dragNodeHighlight:!0}),o(l,Object(A.a)(d));try{l.dataTransfer.setData("text/plain","")}catch(a){}},d.onDragEnter=function(l){var o=d.props.context.onNodeDragEnter;l.preventDefault(),l.stopPropagation(),o(l,Object(A.a)(d))},d.onDragOver=function(l){var o=d.props.context.onNodeDragOver;l.preventDefault(),l.stopPropagation(),o(l,Object(A.a)(d))},d.onDragLeave=function(l){var o=d.props.context.onNodeDragLeave;l.stopPropagation(),o(l,Object(A.a)(d))},d.onDragEnd=function(l){var o=d.props.context.onNodeDragEnd;l.stopPropagation(),d.setState({dragNodeHighlight:!1}),o(l,Object(A.a)(d))},d.onDrop=function(l){var o=d.props.context.onNodeDrop;l.preventDefault(),l.stopPropagation(),d.setState({dragNodeHighlight:!1}),o(l,Object(A.a)(d))},d.onExpand=function(l){var o=d.props.context.onNodeExpand;o(l,Object(p.b)(d.props))},d.setSelectHandle=function(l){d.selectHandle=l},d.getNodeState=function(){var l=d.props.expanded;return d.isLeaf()?null:l?c:i},d.hasChildren=function(){var l=d.props.eventKey,o=d.props.context.keyEntities,a=o[l]||{},x=a.children;return!!(x||[]).length},d.isLeaf=function(){var l=d.props,o=l.isLeaf,a=l.loaded,x=d.props.context.loadData,E=d.hasChildren();return o===!1?!1:o||!x&&!E||x&&a&&!E},d.isDisabled=function(){var l=d.props.disabled,o=d.props.context.disabled;return!!(o||l)},d.isCheckable=function(){var l=d.props.checkable,o=d.props.context.checkable;return!o||l===!1?!1:o},d.syncLoadData=function(l){var o=l.expanded,a=l.loading,x=l.loaded,E=d.props.context,m=E.loadData,_=E.onNodeLoad;if(a)return;m&&o&&!d.isLeaf()&&(!d.hasChildren()&&!x&&_(Object(p.b)(d.props)))},d.renderSwitcher=function(){var l=d.props,o=l.expanded,a=l.switcherIcon,x=d.props.context,E=x.prefixCls,m=x.switcherIcon,_=a||m;if(d.isLeaf())return L.createElement("span",{className:v()("".concat(E,"-switcher"),"".concat(E,"-switcher-noop"))},typeof _=="function"?_(Object(P.a)(Object(P.a)({},d.props),{},{isLeaf:!0})):_);var I=v()("".concat(E,"-switcher"),"".concat(E,"-switcher_").concat(o?c:i));return L.createElement("span",{onClick:d.onExpand,className:I},typeof _=="function"?_(Object(P.a)(Object(P.a)({},d.props),{},{isLeaf:!1})):_)},d.renderCheckbox=function(){var l=d.props,o=l.checked,a=l.halfChecked,x=l.disableCheckbox,E=d.props.context.prefixCls,m=d.isDisabled(),_=d.isCheckable();if(!_)return null;var I=typeof _!="boolean"?_:null;return L.createElement("span",{className:v()("".concat(E,"-checkbox"),o&&"".concat(E,"-checkbox-checked"),!o&&a&&"".concat(E,"-checkbox-indeterminate"),(m||x)&&"".concat(E,"-checkbox-disabled")),onClick:d.onCheck},I)},d.renderIcon=function(){var l=d.props.loading,o=d.props.context.prefixCls;return L.createElement("span",{className:v()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(d.getNodeState()||"docu"),l&&"".concat(o,"-icon_loading"))})},d.renderSelector=function(){var l=d.state.dragNodeHighlight,o=d.props,a=o.title,x=o.selected,E=o.icon,m=o.loading,_=o.data,I=d.props.context,U=I.prefixCls,M=I.showIcon,H=I.icon,K=I.draggable,Z=I.loadData,le=I.titleRender,he=d.isDisabled(),ye="".concat(U,"-node-content-wrapper"),Ue;if(M){var Me=E||H;Ue=Me?L.createElement("span",{className:v()("".concat(U,"-iconEle"),"".concat(U,"-icon__customize"))},typeof Me=="function"?Me(d.props):Me):d.renderIcon()}else Z&&m&&(Ue=d.renderIcon());var _e;typeof a=="function"?_e=a(_):le?_e=le(_):_e=a;var Ie=L.createElement("span",{className:"".concat(U,"-title")},_e);return L.createElement("span",{ref:d.setSelectHandle,title:typeof a=="string"?a:"",className:v()("".concat(ye),"".concat(ye,"-").concat(d.getNodeState()||"normal"),!he&&(x||l)&&"".concat(U,"-node-selected"),!he&&K&&"draggable"),draggable:!he&&K||void 0,"aria-grabbed":!he&&K||void 0,onMouseEnter:d.onMouseEnter,onMouseLeave:d.onMouseLeave,onContextMenu:d.onContextMenu,onClick:d.onSelectorClick,onDoubleClick:d.onSelectorDoubleClick,onDragStart:K?d.onDragStart:void 0},Ue,Ie)},d}return Object(F.a)(S,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var l=this.props.selectable,o=this.props.context.selectable;return typeof l=="boolean"?l:o}},{key:"render",value:function(){var l,o=this.props,a=o.eventKey,x=o.className,E=o.style,m=o.dragOver,_=o.dragOverGapTop,I=o.dragOverGapBottom,U=o.isLeaf,M=o.isStart,H=o.isEnd,K=o.expanded,Z=o.selected,le=o.checked,he=o.halfChecked,ye=o.loading,Ue=o.domRef,Me=o.active,_e=o.onMouseMove,Ie=Object(z.a)(o,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ke=this.props.context,me=ke.prefixCls,ce=ke.filterTreeNode,te=ke.draggable,be=ke.keyEntities,ae=this.isDisabled(),we=Object(k.f)(Ie),Pe=be[a]||{},Ce=Pe.level,Ve=H[H.length-1];return L.createElement("div",Object.assign({ref:Ue,className:v()(x,"".concat(me,"-treenode"),(l={},Object(q.a)(l,"".concat(me,"-treenode-disabled"),ae),Object(q.a)(l,"".concat(me,"-treenode-switcher-").concat(K?"open":"close"),!U),Object(q.a)(l,"".concat(me,"-treenode-checkbox-checked"),le),Object(q.a)(l,"".concat(me,"-treenode-checkbox-indeterminate"),he),Object(q.a)(l,"".concat(me,"-treenode-selected"),Z),Object(q.a)(l,"".concat(me,"-treenode-loading"),ye),Object(q.a)(l,"".concat(me,"-treenode-active"),Me),Object(q.a)(l,"".concat(me,"-treenode-leaf-last"),Ve),Object(q.a)(l,"drag-over",!ae&&m),Object(q.a)(l,"drag-over-gap-top",!ae&&_),Object(q.a)(l,"drag-over-gap-bottom",!ae&&I),Object(q.a)(l,"filter-node",ce&&ce(Object(p.b)(this.props))),l)),style:E,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:_e},we),L.createElement(b,{prefixCls:me,level:Ce,isStart:M,isEnd:H}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),S}(L.Component),R=function(D){return L.createElement(C.a.Consumer,null,function(S){return L.createElement(h,Object.assign({},D,{context:S}))})};R.displayName="TreeNode",R.defaultProps={title:u},R.isTreeNode=1;var y=De.a=R},Xsq0:function(ze,De,W){ze.exports=W.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(ze,De,W){"use strict";W.r(De),W.d(De,"ResizableTextArea",function(){return he});var q=W("wx14"),z=W("1OyB"),P=W("vuIU"),Y=W("Ji7U"),F=W("LK+K"),A=W("q1tI"),j=W("VTBJ"),B=W("rePB"),L=W("Zm9Q"),T=W("Kwbf"),v=W("c+Xe"),C=W("m+aA"),k=W("bdgK"),O=new Map;function b(Me){Me.forEach(function(_e){var Ie,ke=_e.target;(Ie=O.get(ke))===null||Ie===void 0||Ie.forEach(function(me){return me(ke)})})}var p=new k.default(b),c=null,i=null;function u(Me,_e){O.has(Me)||(O.set(Me,new Set),p.observe(Me)),O.get(Me).add(_e)}function h(Me,_e){O.has(Me)&&(O.get(Me).delete(_e),O.get(Me).size||(p.unobserve(Me),O.delete(Me)))}var R=function(Me){Object(Y.a)(Ie,Me);var _e=Object(F.a)(Ie);function Ie(){return Object(z.a)(this,Ie),_e.apply(this,arguments)}return Object(P.a)(Ie,[{key:"render",value:function(){return this.props.children}}]),Ie}(A.Component),y=A.createContext(null);function g(Me){var _e=Me.children,Ie=Me.onBatchResize,ke=A.useRef(0),me=A.useRef([]),ce=A.useContext(y),te=A.useCallback(function(be,ae,we){ke.current+=1;var Pe=ke.current;me.current.push({size:be,element:ae,data:we}),Promise.resolve().then(function(){Pe===ke.current&&(Ie==null||Ie(me.current),me.current=[])}),ce==null||ce(be,ae,we)},[Ie,ce]);return A.createElement(y.Provider,{value:te},_e)}function D(Me){var _e=Me.children,Ie=Me.disabled,ke=A.useRef(null),me=A.useRef(null),ce=A.useContext(y),te=A.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=A.isValidElement(_e)&&Object(v.c)(_e),ae=be?_e.ref:null,we=A.useMemo(function(){return Object(v.a)(ae,ke)},[ae,ke]),Pe=A.useRef(Me);Pe.current=Me;var Ce=A.useCallback(function(Ve){var Ge=Pe.current,tt=Ge.onResize,Je=Ge.data,Ye=Ve.getBoundingClientRect(),et=Ye.width,St=Ye.height,At=Ve.offsetWidth,ht=Ve.offsetHeight,xt=Math.floor(et),Tt=Math.floor(St);if(te.current.width!==xt||te.current.height!==Tt||te.current.offsetWidth!==At||te.current.offsetHeight!==ht){var Ot={width:xt,height:Tt,offsetWidth:At,offsetHeight:ht};te.current=Ot;var Oe=At===Math.round(et)?et:At,Te=ht===Math.round(St)?St:ht,rt=Object(j.a)(Object(j.a)({},Ot),{},{offsetWidth:Oe,offsetHeight:Te});ce==null||ce(rt,Ve,Je),tt&&Promise.resolve().then(function(){tt(rt,Ve)})}},[]);return A.useEffect(function(){var Ve=Object(C.a)(ke.current)||Object(C.a)(me.current);return Ve&&!Ie&&u(Ve,Ce),function(){return h(Ve,Ce)}},[ke.current,Ie]),A.createElement(R,{ref:me},be?A.cloneElement(_e,{ref:we}):_e)}var S="rc-observer-key";function d(Me){var _e=Me.children,Ie=Object(L.a)(_e);return Ie.map(function(ke,me){var ce=(ke==null?void 0:ke.key)||"".concat(S,"-").concat(me);return A.createElement(D,Object(q.a)({},Me,{key:ce}),ke)})}d.Collection=g;var l=d,o=W("bT9E"),a=W("TSYQ"),x=W.n(a),E=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,m=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],_={},I;function U(Me){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=Me.getAttribute("id")||Me.getAttribute("data-reactid")||Me.getAttribute("name");if(_e&&_[Ie])return _[Ie];var ke=window.getComputedStyle(Me),me=ke.getPropertyValue("box-sizing")||ke.getPropertyValue("-moz-box-sizing")||ke.getPropertyValue("-webkit-box-sizing"),ce=parseFloat(ke.getPropertyValue("padding-bottom"))+parseFloat(ke.getPropertyValue("padding-top")),te=parseFloat(ke.getPropertyValue("border-bottom-width"))+parseFloat(ke.getPropertyValue("border-top-width")),be=m.map(function(we){return"".concat(we,":").concat(ke.getPropertyValue(we))}).join(";"),ae={sizingStyle:be,paddingSize:ce,borderSize:te,boxSizing:me};return _e&&Ie&&(_[Ie]=ae),ae}function M(Me){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;I||(I=document.createElement("textarea"),I.setAttribute("tab-index","-1"),I.setAttribute("aria-hidden","true"),document.body.appendChild(I)),Me.getAttribute("wrap")?I.setAttribute("wrap",Me.getAttribute("wrap")):I.removeAttribute("wrap");var me=U(Me,_e),ce=me.paddingSize,te=me.borderSize,be=me.boxSizing,ae=me.sizingStyle;I.setAttribute("style","".concat(ae,";").concat(E)),I.value=Me.value||Me.placeholder||"";var we=Number.MIN_SAFE_INTEGER,Pe=Number.MAX_SAFE_INTEGER,Ce=I.scrollHeight,Ve;if(be==="border-box"?Ce+=te:be==="content-box"&&(Ce-=ce),Ie!==null||ke!==null){I.value=" ";var Ge=I.scrollHeight-ce;Ie!==null&&(we=Ge*Ie,be==="border-box"&&(we=we+ce+te),Ce=Math.max(we,Ce)),ke!==null&&(Pe=Ge*ke,be==="border-box"&&(Pe=Pe+ce+te),Ve=Ce>Pe?"":"hidden",Ce=Math.min(Pe,Ce))}return{height:Ce,minHeight:we,maxHeight:Pe,overflowY:Ve,resize:"none"}}var H=W("Gytx"),K=W.n(H),Z;(function(Me){Me[Me.NONE=0]="NONE",Me[Me.RESIZING=1]="RESIZING",Me[Me.RESIZED=2]="RESIZED"})(Z||(Z={}));var le=function(Me){Object(Y.a)(Ie,Me);var _e=Object(F.a)(Ie);function Ie(ke){var me;return Object(z.a)(this,Ie),me=_e.call(this,ke),me.nextFrameActionId=void 0,me.resizeFrameId=void 0,me.textArea=void 0,me.saveTextArea=function(ce){me.textArea=ce},me.handleResize=function(ce){var te=me.state.resizeStatus,be=me.props,ae=be.autoSize,we=be.onResize;if(te!==Z.NONE)return;typeof we=="function"&&we(ce),ae&&me.resizeOnNextFrame()},me.resizeOnNextFrame=function(){cancelAnimationFrame(me.nextFrameActionId),me.nextFrameActionId=requestAnimationFrame(me.resizeTextarea)},me.resizeTextarea=function(){var ce=me.props.autoSize;if(!ce||!me.textArea)return;var te=ce.minRows,be=ce.maxRows,ae=M(me.textArea,!1,te,be);me.setState({textareaStyles:ae,resizeStatus:Z.RESIZING},function(){cancelAnimationFrame(me.resizeFrameId),me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Z.RESIZED},function(){me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Z.NONE}),me.fixFirefoxAutoScroll()})})})})},me.renderTextArea=function(){var ce=me.props,te=ce.prefixCls,be=te===void 0?"rc-textarea":te,ae=ce.autoSize,we=ce.onResize,Pe=ce.className,Ce=ce.disabled,Ve=me.state,Ge=Ve.textareaStyles,tt=Ve.resizeStatus,Je=Object(o.a)(me.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ye=x()(be,Pe,Object(B.a)({},"".concat(be,"-disabled"),Ce));"value"in Je&&(Je.value=Je.value||"");var et=Object(j.a)(Object(j.a)(Object(j.a)({},me.props.style),Ge),tt===Z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return A.createElement(l,{onResize:me.handleResize,disabled:!(ae||we)},A.createElement("textarea",Object(q.a)({},Je,{className:Ye,style:et,ref:me.saveTextArea})))},me.state={textareaStyles:{},resizeStatus:Z.NONE},me}return Object(P.a)(Ie,[{key:"componentDidUpdate",value:function(me){(me.value!==this.props.value||!K()(me.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 me=this.textArea.selectionStart,ce=this.textArea.selectionEnd;this.textArea.setSelectionRange(me,ce)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ie}(A.Component),he=le,ye=function(Me){Object(Y.a)(Ie,Me);var _e=Object(F.a)(Ie);function Ie(ke){var me;Object(z.a)(this,Ie),me=_e.call(this,ke),me.resizableTextArea=void 0,me.focus=function(){me.resizableTextArea.textArea.focus()},me.saveTextArea=function(te){me.resizableTextArea=te},me.handleChange=function(te){var be=me.props.onChange;me.setValue(te.target.value,function(){me.resizableTextArea.resizeTextarea()}),be&&be(te)},me.handleKeyDown=function(te){var be=me.props,ae=be.onPressEnter,we=be.onKeyDown;te.keyCode===13&&ae&&ae(te),we&&we(te)};var ce=typeof ke.value=="undefined"||ke.value===null?ke.defaultValue:ke.value;return me.state={value:ce},me}return Object(P.a)(Ie,[{key:"setValue",value:function(me,ce){"value"in this.props||this.setState({value:me},ce)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return A.createElement(he,Object(q.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(me){return"value"in me?{value:me.value}:null}}]),Ie}(A.Component),Ue=De.default=ye},ZW9T:function(ze,De,W){"use strict";W.d(De,"a",function(){return R});var q=W("k1fw"),z=W("miYZ"),P=W("tsqr"),Y=W("rAM+"),F=W("tJVT"),A=W("PpiC"),j=W("q1tI"),B=W.n(j),L=W("bdgK");function T(y,g,D,S,d){var l=g.getWordUntilPosition(D),o={startLineNumber:D.lineNumber,endLineNumber:D.lineNumber,startColumn:l.startColumn,endColumn:l.endColumn},a=S.map(function(x){return{label:x,kind:y.languages.CompletionItemKind.Keyword,insertText:x,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o}});return d.map(function(x){a.push(Object(q.a)(Object(q.a)({},x),{},{range:o}))}),a}var v=function(y){var g={label:"ifelse",kind:y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},D=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(o,a){var x=T(y,o,a,D,[g]);return{suggestions:x}}});var S=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(o,a){var x=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],E=T(y,o,a,S,x);return{suggestions:E}}});var d=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(o,a){var x=[g,{label:"main",kind:y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],E=T(y,o,a,d,x);return{suggestions:E}}})},C="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",k=W("LvDl");function O(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function b(){}var p=!1,c={"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 i(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=y;if(Array.isArray(y)){for(var D=0;D<y.length;D++){var S=c[y[D]];if(S)return S}return g[0]}return c[g]||g}var u=null,h=De.b=function(y){var g=y.width,D=g===void 0?"100%":g,S=y.height,d=S===void 0?"100%":S,l=y.value,o=y.language,a=o===void 0?"javascript":o,x=y.style,E=x===void 0?{}:x,m=y.options,_=m===void 0?{}:m,I=y.overrideServices,U=I===void 0?{}:I,M=y.theme,H=M===void 0?"vs-dark":M,K=y.onEditBlur,Z=y.onSave,le=y.autoHeight,he=le===void 0?!1:le,ye=y.forbidCopy,Ue=ye===void 0?!1:ye,Me=y.onChange,_e=Me===void 0?b:Me,Ie=y.editorDidMount,ke=Ie===void 0?b:Ie,me=y.onFocus,ce=me===void 0?b:me,te=y.filename,be=te===void 0?"educoder.txt":te,ae=Object(A.a)(y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),we=Object(j.useRef)(),Pe=Object(j.useRef)({}),Ce=Object(j.useRef)(),Ve=Object(j.useRef)(!1),Ge=Object(j.useRef)(),tt=Object(j.useState)(!1),Je=Object(F.a)(tt,2),Ye=Je[0],et=Je[1];function St(){var se;return we.current&&(se=new L.default(function(de){var Le=Object(Y.a)(de),Ke;try{for(Le.s();!(Ke=Le.n()).done;){var dt=Ke.value;(dt.target.offsetHeight>0||dt.target.offsetWidth>0)&&Pe.current.instance.layout()}}catch(_t){Le.e(_t)}finally{Le.f()}}),se.observe(we.current)),se}function At(){P.b.warn(decodeURIComponent(C))}var ht=function(){var de=Pe.current.instance;if(l!=null&&de&&Ye){var Le=de.getModel();Le&&l!==Le.getValue()&&(p=!0,Le.setValue(l),de.layout(),p=!1)}};Object(j.useEffect)(function(){Ce.current&&clearTimeout(Ce.current),Ce.current=setTimeout(function(){ht()},500)},[l,Ye,Pe.current]);function xt(){var se=Pe.current.instance;if(se){var de=se.getSelection(),Le=Pe.current.pastePos||{},Ke=new u.Range(Le.startLineNumber||de.endLineNumber,Le.startColumn||de.endColumn,Le.endLineNumber||de.endLineNumber,Le.endColumn||de.endColumn);setTimeout(function(){se.executeEdits("",[{range:Ke,text:""}])},300)}}function Tt(se){(window.navigator.platform.match("Mac")?se.metaKey:se.ctrlKey)&&se.keyCode==83&&(se.preventDefault(),Z())}var Ot=function(){if(he&&Pe.current.instance){var de=Pe.current.instance.getContentHeight();re(de<d?d:de)}else re(d)};function Oe(se){var de=document.createEvent("MouseEvents");de.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),se.dispatchEvent(de)}function Te(se,de){var Le=window.URL||window.webkitURL||window,Ke=new Blob([de]),dt=document.createElementNS("http://www.w3.org/1999/xhtml","a");dt.href=Le.createObjectURL(Ke),dt.download=se,Oe(dt)}Object(j.useEffect)(function(){Ot()},[Ot]),Object(j.useEffect)(function(){we.current&&!Ye&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(se){try{u=se,Pe.current.instance=u.editor.create(we.current,{value:l,language:i(a),theme:H,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},U);var de=Pe.current.instance;if(ke(de,u),setTimeout(function(){Ot(),Pe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Te(be||"educoder.txt",de.getValue())}})},500),Pe.current.subscription=de.onDidChangeModelContent(function(Ke){Ve.current?clearTimeout(Ge.current):(Ot(),_e(de.getValue(),Ke)),Ge.current=setTimeout(function(){Ve.current=!1},500)}),window.Monaco||v(u),Ue&&(de.addCommand(u.KeyMod.CtrlCmd|u.KeyMod.Shift|u.KeyCode.KEY_V,function(){return At(),null}),de.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_C,function(){return At(),null})),window.Monaco=u,K&&de.onDidBlurEditorWidget(function(){K(de.getValue())}),ce&&de.onDidFocusEditorText(function(){ce(de.getValue())}),Ue){de.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_V,function(){return At(),null}),de.onDidPaste(function(Ke){Pe.current.pastePos=Ke});try{window.addEventListener("paste",xt)}catch(Ke){}}var Le=St();return et(!0),function(){var Ke=Pe.current.instance;Ke.dispose();var dt=Ke.getModel();dt&&dt.dispose(),Pe.current.subscription&&Pe.current.subscription.dispose(),Ue&&window.removeEventListener("paste",xt),Le.unobserve(we.current)}}catch(Ke){}})},[]),Object(j.useEffect)(function(){var se=Pe.current.instance;if(se&&Ye)return document.addEventListener("keydown",Tt,!1),function(){document.removeEventListener("keydown",Tt)}},[Z,Ye]),Object(j.useEffect)(function(){var se=Pe.current.instance;if(se&&Ye){var de=i(a);u.editor.setModelLanguage(se.getModel(),de),console.log("language:",a,se.getModel(),de)}},[a,Ye]),Object(j.useEffect)(function(){var se=Pe.current.instance;se&&Ye&&u.editor.setTheme(H)},[H,Ye]),Object(j.useEffect)(function(){var se=Pe.current.instance;se&&Ye&&(se.updateOptions(Object(q.a)({},_)),setTimeout(function(){se.getModel().updateOptions(Object(q.a)({},_))},200))},[JSON.stringify(_),Ye]),Object(j.useEffect)(function(){var se=Pe.current.instance;se&&Ye&&se.layout()},[D,d,Ye]);var rt=Object(j.useState)(O(D)),ot=Object(F.a)(rt,2),Ne=ot[0],$e=ot[1],xe=Object(j.useState)(O(d)),fe=Object(F.a)(xe,2),pe=fe[0],re=fe[1],ie=Object(q.a)(Object(q.a)({},E),{},{width:Ne,height:pe});return B.a.createElement("div",{className:"my-monaco-editor",ref:we,style:ie})};function R(y){var g=y.width,D=g===void 0?"100%":g,S=y.height,d=S===void 0?"100%":S,l=y.original,o=y.modified,a=y.language,x=y.options,E=x===void 0?{}:x,m=Object(j.useRef)(),_=Object(j.useState)(null),I=Object(F.a)(_,2),U=I[0],M=I[1];function H(he){var ye;return m.current&&(ye=new L.default(function(Ue){var Me=Object(Y.a)(Ue),_e;try{for(Me.s();!(_e=Me.n()).done;){var Ie=_e.value;(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&he.layout()}}catch(ke){Me.e(ke)}finally{Me.f()}}),ye.observe(m.current)),ye}Object(j.useEffect)(function(){m.current&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(he){u=he;var ye=u.editor.createDiffEditor(m.current,Object(q.a)(Object(q.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},E),{},{wordWrap:!0}));M(ye);var Ue=H(ye);return function(){ye.dispose();var Me=ye.getModel();Me&&Me.dispose(),Ue.unobserve(m.current)}})},[]),Object(j.useEffect)(function(){U&&U.setModel({original:u.editor.createModel(l,a),modified:u.editor.createModel(o,a)})},[l,o,a,U]);var K=O(D),Z=O(d),le={width:K,height:Z};return B.a.createElement("div",{className:"my-diff-editor",ref:m,style:le})}},ZpRC:function(ze,De,W){"use strict";function q(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function z(v,C){return(!C||v!=="hidden")&&v!=="visible"&&v!=="clip"}function P(v,C){if(v.clientHeight<v.scrollHeight||v.clientWidth<v.scrollWidth){var k=getComputedStyle(v,null);return z(k.overflowY,C)||z(k.overflowX,C)||function(O){var b=function(p){if(!p.ownerDocument||!p.ownerDocument.defaultView)return null;try{return p.ownerDocument.defaultView.frameElement}catch(c){return null}}(O);return!!b&&(b.clientHeight<O.scrollHeight||b.clientWidth<O.scrollWidth)}(v)}return!1}function Y(v,C,k,O,b,p,c,i){return p<v&&c>C||p>v&&c<C?0:p<=v&&i<=k||c>=C&&i>=k?p-v-O:c>C&&i<k||p<v&&i>k?c-C+b:0}var F=function(v,C){var k=window,O=C.scrollMode,b=C.block,p=C.inline,c=C.boundary,i=C.skipOverflowHiddenElements,u=typeof c=="function"?c:function(Ge){return Ge!==c};if(!q(v))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,R=[],y=v;q(y)&&u(y);){if((y=y.parentElement)===h){R.push(y);break}y!=null&&y===document.body&&P(y)&&!P(document.documentElement)||y!=null&&P(y,i)&&R.push(y)}for(var g=k.visualViewport?k.visualViewport.width:innerWidth,D=k.visualViewport?k.visualViewport.height:innerHeight,S=window.scrollX||pageXOffset,d=window.scrollY||pageYOffset,l=v.getBoundingClientRect(),o=l.height,a=l.width,x=l.top,E=l.right,m=l.bottom,_=l.left,I=b==="start"||b==="nearest"?x:b==="end"?m:x+o/2,U=p==="center"?_+a/2:p==="end"?E:_,M=[],H=0;H<R.length;H++){var K=R[H],Z=K.getBoundingClientRect(),le=Z.height,he=Z.width,ye=Z.top,Ue=Z.right,Me=Z.bottom,_e=Z.left;if(O==="if-needed"&&x>=0&&_>=0&&m<=D&&E<=g&&x>=ye&&m<=Me&&_>=_e&&E<=Ue)return M;var Ie=getComputedStyle(K),ke=parseInt(Ie.borderLeftWidth,10),me=parseInt(Ie.borderTopWidth,10),ce=parseInt(Ie.borderRightWidth,10),te=parseInt(Ie.borderBottomWidth,10),be=0,ae=0,we="offsetWidth"in K?K.offsetWidth-K.clientWidth-ke-ce:0,Pe="offsetHeight"in K?K.offsetHeight-K.clientHeight-me-te:0;if(h===K)be=b==="start"?I:b==="end"?I-D:b==="nearest"?Y(d,d+D,D,me,te,d+I,d+I+o,o):I-D/2,ae=p==="start"?U:p==="center"?U-g/2:p==="end"?U-g:Y(S,S+g,g,ke,ce,S+U,S+U+a,a),be=Math.max(0,be+d),ae=Math.max(0,ae+S);else{be=b==="start"?I-ye-me:b==="end"?I-Me+te+Pe:b==="nearest"?Y(ye,Me,le,me,te+Pe,I,I+o,o):I-(ye+le/2)+Pe/2,ae=p==="start"?U-_e-ke:p==="center"?U-(_e+he/2)+we/2:p==="end"?U-Ue+ce+we:Y(_e,Ue,he,ke,ce+we,U,U+a,a);var Ce=K.scrollLeft,Ve=K.scrollTop;I+=Ve-(be=Math.max(0,Math.min(Ve+be,K.scrollHeight-le+Pe))),U+=Ce-(ae=Math.max(0,Math.min(Ce+ae,K.scrollWidth-he+we)))}M.push({el:K,top:be,left:ae})}return M};function A(v){return v===Object(v)&&Object.keys(v).length!==0}function j(v,C){C===void 0&&(C="auto");var k="scrollBehavior"in document.body.style;v.forEach(function(O){var b=O.el,p=O.top,c=O.left;b.scroll&&k?b.scroll({top:p,left:c,behavior:C}):(b.scrollTop=p,b.scrollLeft=c)})}function B(v){return v===!1?{block:"end",inline:"nearest"}:A(v)?v:{block:"start",inline:"nearest"}}function L(v,C){var k=!v.ownerDocument.documentElement.contains(v);if(A(C)&&typeof C.behavior=="function")return C.behavior(k?[]:F(v,C));if(k)return;var O=B(C);return j(F(v,O),O.behavior)}var T=De.a=L},Zss7:function(ze,De,W){var q;(function(z){var P=/^\s+/,Y=/\s+$/,F=0,A=z.round,j=z.min,B=z.max,L=z.random;function T(te,be){if(te=te||"",be=be||{},te instanceof T)return te;if(!(this instanceof T))return new T(te,be);var ae=v(te);this._originalInput=te,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=A(100*this._a)/100,this._format=be.format||ae.format,this._gradientType=be.gradientType,this._r<1&&(this._r=A(this._r)),this._g<1&&(this._g=A(this._g)),this._b<1&&(this._b=A(this._b)),this._ok=ae.ok,this._tc_id=F++}T.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),be,ae,we,Pe,Ce,Ve;return be=te.r/255,ae=te.g/255,we=te.b/255,be<=.03928?Pe=be/12.92:Pe=z.pow((be+.055)/1.055,2.4),ae<=.03928?Ce=ae/12.92:Ce=z.pow((ae+.055)/1.055,2.4),we<=.03928?Ve=we/12.92:Ve=z.pow((we+.055)/1.055,2.4),.2126*Pe+.7152*Ce+.0722*Ve},setAlpha:function(te){return this._a=M(te),this._roundA=A(100*this._a)/100,this},toHsv:function(){var te=b(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=b(this._r,this._g,this._b),be=A(te.h*360),ae=A(te.s*100),we=A(te.v*100);return this._a==1?"hsv("+be+", "+ae+"%, "+we+"%)":"hsva("+be+", "+ae+"%, "+we+"%, "+this._roundA+")"},toHsl:function(){var te=k(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=k(this._r,this._g,this._b),be=A(te.h*360),ae=A(te.s*100),we=A(te.l*100);return this._a==1?"hsl("+be+", "+ae+"%, "+we+"%)":"hsla("+be+", "+ae+"%, "+we+"%, "+this._roundA+")"},toHex:function(te){return c(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return i(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:A(this._r),g:A(this._g),b:A(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+A(this._r)+", "+A(this._g)+", "+A(this._b)+")":"rgba("+A(this._r)+", "+A(this._g)+", "+A(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:A(H(this._r,255)*100)+"%",g:A(H(this._g,255)*100)+"%",b:A(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+A(H(this._r,255)*100)+"%, "+A(H(this._g,255)*100)+"%, "+A(H(this._b,255)*100)+"%)":"rgba("+A(H(this._r,255)*100)+"%, "+A(H(this._g,255)*100)+"%, "+A(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var be="#"+u(this._r,this._g,this._b,this._a),ae=be,we=this._gradientType?"GradientType = 1, ":"";if(te){var Pe=T(te);ae="#"+u(Pe._r,Pe._g,Pe._b,Pe._a)}return"progid:DXImageTransform.Microsoft.gradient("+we+"startColorstr="+be+",endColorstr="+ae+")"},toString:function(te){var be=!!te;te=te||this._format;var ae=!1,we=this._a<1&&this._a>=0,Pe=!be&&we&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return Pe?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(ae=this.toRgbString()),te==="prgb"&&(ae=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(ae=this.toHexString()),te==="hex3"&&(ae=this.toHexString(!0)),te==="hex4"&&(ae=this.toHex8String(!0)),te==="hex8"&&(ae=this.toHex8String()),te==="name"&&(ae=this.toName()),te==="hsl"&&(ae=this.toHslString()),te==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return T(this.toString())},_applyModification:function(te,be){var ae=te.apply(null,[this].concat([].slice.call(be)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(R,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(te,be){return te.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(l,arguments)},monochromatic:function(){return this._applyCombination(m,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(o,arguments)},tetrad:function(){return this._applyCombination(a,arguments)}},T.fromRatio=function(te,be){if(typeof te=="object"){var ae={};for(var we in te)te.hasOwnProperty(we)&&(we==="a"?ae[we]=te[we]:ae[we]=Ue(te[we]));te=ae}return T(te,be)};function v(te){var be={r:0,g:0,b:0},ae=1,we=null,Pe=null,Ce=null,Ve=!1,Ge=!1;return typeof te=="string"&&(te=me(te)),typeof te=="object"&&(ke(te.r)&&ke(te.g)&&ke(te.b)?(be=C(te.r,te.g,te.b),Ve=!0,Ge=String(te.r).substr(-1)==="%"?"prgb":"rgb"):ke(te.h)&&ke(te.s)&&ke(te.v)?(we=Ue(te.s),Pe=Ue(te.v),be=p(te.h,we,Pe),Ve=!0,Ge="hsv"):ke(te.h)&&ke(te.s)&&ke(te.l)&&(we=Ue(te.s),Ce=Ue(te.l),be=O(te.h,we,Ce),Ve=!0,Ge="hsl"),te.hasOwnProperty("a")&&(ae=te.a)),ae=M(ae),{ok:Ve,format:te.format||Ge,r:j(255,B(be.r,0)),g:j(255,B(be.g,0)),b:j(255,B(be.b,0)),a:ae}}function C(te,be,ae){return{r:H(te,255)*255,g:H(be,255)*255,b:H(ae,255)*255}}function k(te,be,ae){te=H(te,255),be=H(be,255),ae=H(ae,255);var we=B(te,be,ae),Pe=j(te,be,ae),Ce,Ve,Ge=(we+Pe)/2;if(we==Pe)Ce=Ve=0;else{var tt=we-Pe;Ve=Ge>.5?tt/(2-we-Pe):tt/(we+Pe);switch(we){case te:Ce=(be-ae)/tt+(be<ae?6:0);break;case be:Ce=(ae-te)/tt+2;break;case ae:Ce=(te-be)/tt+4;break}Ce/=6}return{h:Ce,s:Ve,l:Ge}}function O(te,be,ae){var we,Pe,Ce;te=H(te,360),be=H(be,100),ae=H(ae,100);function Ve(Je,Ye,et){return et<0&&(et+=1),et>1&&(et-=1),et<1/6?Je+(Ye-Je)*6*et:et<1/2?Ye:et<2/3?Je+(Ye-Je)*(2/3-et)*6:Je}if(be===0)we=Pe=Ce=ae;else{var Ge=ae<.5?ae*(1+be):ae+be-ae*be,tt=2*ae-Ge;we=Ve(tt,Ge,te+1/3),Pe=Ve(tt,Ge,te),Ce=Ve(tt,Ge,te-1/3)}return{r:we*255,g:Pe*255,b:Ce*255}}function b(te,be,ae){te=H(te,255),be=H(be,255),ae=H(ae,255);var we=B(te,be,ae),Pe=j(te,be,ae),Ce,Ve,Ge=we,tt=we-Pe;if(Ve=we===0?0:tt/we,we==Pe)Ce=0;else{switch(we){case te:Ce=(be-ae)/tt+(be<ae?6:0);break;case be:Ce=(ae-te)/tt+2;break;case ae:Ce=(te-be)/tt+4;break}Ce/=6}return{h:Ce,s:Ve,v:Ge}}function p(te,be,ae){te=H(te,360)*6,be=H(be,100),ae=H(ae,100);var we=z.floor(te),Pe=te-we,Ce=ae*(1-be),Ve=ae*(1-Pe*be),Ge=ae*(1-(1-Pe)*be),tt=we%6,Je=[ae,Ve,Ce,Ce,Ge,ae][tt],Ye=[Ge,ae,ae,Ve,Ce,Ce][tt],et=[Ce,Ce,Ge,ae,ae,Ve][tt];return{r:Je*255,g:Ye*255,b:et*255}}function c(te,be,ae,we){var Pe=[ye(A(te).toString(16)),ye(A(be).toString(16)),ye(A(ae).toString(16))];return we&&Pe[0].charAt(0)==Pe[0].charAt(1)&&Pe[1].charAt(0)==Pe[1].charAt(1)&&Pe[2].charAt(0)==Pe[2].charAt(1)?Pe[0].charAt(0)+Pe[1].charAt(0)+Pe[2].charAt(0):Pe.join("")}function i(te,be,ae,we,Pe){var Ce=[ye(A(te).toString(16)),ye(A(be).toString(16)),ye(A(ae).toString(16)),ye(Me(we))];return Pe&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)&&Ce[3].charAt(0)==Ce[3].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0)+Ce[3].charAt(0):Ce.join("")}function u(te,be,ae,we){var Pe=[ye(Me(we)),ye(A(te).toString(16)),ye(A(be).toString(16)),ye(A(ae).toString(16))];return Pe.join("")}T.equals=function(te,be){return!te||!be?!1:T(te).toRgbString()==T(be).toRgbString()},T.random=function(){return T.fromRatio({r:L(),g:L(),b:L()})};function h(te,be){be=be===0?0:be||10;var ae=T(te).toHsl();return ae.s-=be/100,ae.s=K(ae.s),T(ae)}function R(te,be){be=be===0?0:be||10;var ae=T(te).toHsl();return ae.s+=be/100,ae.s=K(ae.s),T(ae)}function y(te){return T(te).desaturate(100)}function g(te,be){be=be===0?0:be||10;var ae=T(te).toHsl();return ae.l+=be/100,ae.l=K(ae.l),T(ae)}function D(te,be){be=be===0?0:be||10;var ae=T(te).toRgb();return ae.r=B(0,j(255,ae.r-A(255*-(be/100)))),ae.g=B(0,j(255,ae.g-A(255*-(be/100)))),ae.b=B(0,j(255,ae.b-A(255*-(be/100)))),T(ae)}function S(te,be){be=be===0?0:be||10;var ae=T(te).toHsl();return ae.l-=be/100,ae.l=K(ae.l),T(ae)}function d(te,be){var ae=T(te).toHsl(),we=(ae.h+be)%360;return ae.h=we<0?360+we:we,T(ae)}function l(te){var be=T(te).toHsl();return be.h=(be.h+180)%360,T(be)}function o(te){var be=T(te).toHsl(),ae=be.h;return[T(te),T({h:(ae+120)%360,s:be.s,l:be.l}),T({h:(ae+240)%360,s:be.s,l:be.l})]}function a(te){var be=T(te).toHsl(),ae=be.h;return[T(te),T({h:(ae+90)%360,s:be.s,l:be.l}),T({h:(ae+180)%360,s:be.s,l:be.l}),T({h:(ae+270)%360,s:be.s,l:be.l})]}function x(te){var be=T(te).toHsl(),ae=be.h;return[T(te),T({h:(ae+72)%360,s:be.s,l:be.l}),T({h:(ae+216)%360,s:be.s,l:be.l})]}function E(te,be,ae){be=be||6,ae=ae||30;var we=T(te).toHsl(),Pe=360/ae,Ce=[T(te)];for(we.h=(we.h-(Pe*be>>1)+720)%360;--be;)we.h=(we.h+Pe)%360,Ce.push(T(we));return Ce}function m(te,be){be=be||6;for(var ae=T(te).toHsv(),we=ae.h,Pe=ae.s,Ce=ae.v,Ve=[],Ge=1/be;be--;)Ve.push(T({h:we,s:Pe,v:Ce})),Ce=(Ce+Ge)%1;return Ve}T.mix=function(te,be,ae){ae=ae===0?0:ae||50;var we=T(te).toRgb(),Pe=T(be).toRgb(),Ce=ae/100,Ve={r:(Pe.r-we.r)*Ce+we.r,g:(Pe.g-we.g)*Ce+we.g,b:(Pe.b-we.b)*Ce+we.b,a:(Pe.a-we.a)*Ce+we.a};return T(Ve)},T.readability=function(te,be){var ae=T(te),we=T(be);return(z.max(ae.getLuminance(),we.getLuminance())+.05)/(z.min(ae.getLuminance(),we.getLuminance())+.05)},T.isReadable=function(te,be,ae){var we=T.readability(te,be),Pe,Ce;Ce=!1,Pe=ce(ae);switch(Pe.level+Pe.size){case"AAsmall":case"AAAlarge":Ce=we>=4.5;break;case"AAlarge":Ce=we>=3;break;case"AAAsmall":Ce=we>=7;break}return Ce},T.mostReadable=function(te,be,ae){var we=null,Pe=0,Ce,Ve,Ge,tt;ae=ae||{},Ve=ae.includeFallbackColors,Ge=ae.level,tt=ae.size;for(var Je=0;Je<be.length;Je++)Ce=T.readability(te,be[Je]),Ce>Pe&&(Pe=Ce,we=T(be[Je]));return T.isReadable(te,we,{level:Ge,size:tt})||!Ve?we:(ae.includeFallbackColors=!1,T.mostReadable(te,["#fff","#000"],ae))};var _=T.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=T.hexNames=U(_);function U(te){var be={};for(var ae in te)te.hasOwnProperty(ae)&&(be[te[ae]]=ae);return be}function M(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function H(te,be){le(te)&&(te="100%");var ae=he(te);return te=j(be,B(0,parseFloat(te))),ae&&(te=parseInt(te*be,10)/100),z.abs(te-be)<1e-6?1:te%be/parseFloat(be)}function K(te){return j(1,B(0,te))}function Z(te){return parseInt(te,16)}function le(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function he(te){return typeof te=="string"&&te.indexOf("%")!=-1}function ye(te){return te.length==1?"0"+te:""+te}function Ue(te){return te<=1&&(te=te*100+"%"),te}function Me(te){return z.round(parseFloat(te)*255).toString(16)}function _e(te){return Z(te)/255}var Ie=function(){var te="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+be+")|(?:"+te+")",we="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",Pe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+we),rgba:new RegExp("rgba"+Pe),hsl:new RegExp("hsl"+we),hsla:new RegExp("hsla"+Pe),hsv:new RegExp("hsv"+we),hsva:new RegExp("hsva"+Pe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ke(te){return!!Ie.CSS_UNIT.exec(te)}function me(te){te=te.replace(P,"").replace(Y,"").toLowerCase();var be=!1;if(_[te])te=_[te],be=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=Ie.rgb.exec(te))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=Ie.rgba.exec(te))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=Ie.hsl.exec(te))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=Ie.hsla.exec(te))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=Ie.hsv.exec(te))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=Ie.hsva.exec(te))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=Ie.hex8.exec(te))?{r:Z(ae[1]),g:Z(ae[2]),b:Z(ae[3]),a:_e(ae[4]),format:be?"name":"hex8"}:(ae=Ie.hex6.exec(te))?{r:Z(ae[1]),g:Z(ae[2]),b:Z(ae[3]),format:be?"name":"hex"}:(ae=Ie.hex4.exec(te))?{r:Z(ae[1]+""+ae[1]),g:Z(ae[2]+""+ae[2]),b:Z(ae[3]+""+ae[3]),a:_e(ae[4]+""+ae[4]),format:be?"name":"hex8"}:(ae=Ie.hex3.exec(te))?{r:Z(ae[1]+""+ae[1]),g:Z(ae[2]+""+ae[2]),b:Z(ae[3]+""+ae[3]),format:be?"name":"hex"}:!1}function ce(te){var be,ae;return te=te||{level:"AA",size:"small"},be=(te.level||"AA").toUpperCase(),ae=(te.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:be,size:ae}}ze.exports?ze.exports=T:!(q=function(){return T}.call(De,W,De,ze),q!==void 0&&(ze.exports=q))})(Math)},aRTE:function(ze,De){ze.exports={L:1,M:0,Q:3,H:2}},bPs0:function(ze,De,W){"use strict";W.d(De,"b",function(){return h});var q=W("k1fw"),z=W("9og8"),P=W("2qtc"),Y=W("kLXV"),F=W("tJVT"),A=W("PpiC"),j=W("aHsQ"),B=W("sGsY"),L=W("WmNS"),T=W.n(L),v=W("q1tI"),C=W.n(v),k=W("bntm"),O=W("V0Rq"),b=W("wd/R"),p=W.n(b),c=W("Ty5D"),i=W("9kvl"),u=B.a.Countdown,h=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],R=function(g){var D=g.globalSetting,S=g.loading,d=g.user,l=g.exercise,o=g.dispatch,a=Object(A.a)(g,["globalSetting","loading","user","exercise","dispatch"]),x=Object(v.useState)({}),E=Object(F.a)(x,2),m=E[0],_=E[1],I=Y.a.useModal(),U=Object(F.a)(I,2),M=U[0],H=U[1],K=Object(v.useRef)(),Z=Object(v.useRef)(null),le=Object(v.useRef)(null),he=Object(v.useState)(!0),ye=Object(F.a)(he,2),Ue=ye[0],Me=ye[1],_e=Object(c.h)().query,Ie=Object(c.i)();Object(v.useEffect)(function(){var Ge,tt,Je,Ye,et;if(clearTimeout(Z.current),document.addEventListener(Object(k.c)(),Ve,!1),window.addEventListener("blur",Pe,!1),(Ge=l.exerciseUserInfo)!==null&&Ge!==void 0&&Ge.screen_open&&Object(k.a)()&&(o({type:"globalSetting/headerFooterToggle",payload:!1}),Me(!1)),(tt=l.exerciseUserInfo)!==null&&tt!==void 0&&tt.screen_at&&p()().diff(p()((Je=l.exerciseUserInfo)===null||Je===void 0?void 0:Je.screen_at),"seconds")>0)ke();else if((Ye=l.exerciseUserInfo)!==null&&Ye!==void 0&&Ye.screen_open&&!Object(k.a)()){var St=document.domain==="kepukehuan.educoder.net"?30:l.exerciseUserInfo.screen_sec+10+1;K.current=Y.a.info({icon:null,content:C.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",C.a.createElement("br",null),"\u5207\u6362\u9875\u9762 ",l.exerciseUserInfo.screen_num-l.exerciseUserInfo.used_screen_num," \u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",C.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:C.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",C.a.createElement("span",{style:{display:"inline-block"}},C.a.createElement(u,{onFinish:function(){var ht;ke(),(ht=K.current)===null||ht===void 0||ht.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+St*1e3})),"S\uFF09"),onOk:function(){var ht;(ht=K.current)===null||ht===void 0||ht.destroy(),Me(!1),Object(k.d)(document.body),document.getElementById("root").addEventListener("click",me,!1)}})}return(et=l.exerciseUserInfo)!==null&&et!==void 0&&et.screen_open&&!Object(k.a)()||document.getElementById("root").addEventListener("click",me,!1),function(){document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(k.c)(),Ve,!1),window.removeEventListener("blur",Pe,!1),clearTimeout(Z.current)}},[]),Object(v.useEffect)(function(){setTimeout(function(){l.actionTabs.removeEventListenerExitScreen&&(clearTimeout(Z.current),document.getElementById("root").removeEventListener("click",me,!1),document.removeEventListener(Object(k.c)(),Ve,!1))},500),ce()},[l.actionTabs]),Object(v.useEffect)(function(){setTimeout(function(){l.exerciseUserInfo.used_screen_num>l.exerciseUserInfo.screen_num?ae():!Ue},500)},[l.exerciseUserInfo]);var ke=function(){var Ge=Object(z.a)(T.a.mark(function tt(){var Je;return T.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.next=2,Ce();case 2:Je=et.sent,setTimeout(function(){var St,At;(St=K.current)===null||St===void 0||St.destroy(),K.current=Y.a.info({okText:C.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:C.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",C.a.createElement("span",{className:"c-red"},Je.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",C.a.createElement("span",{className:"c-red"},(At=l.exerciseUserInfo)===null||At===void 0?void 0:At.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var ht=Object(z.a)(T.a.mark(function Tt(){return T.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:Object(k.d)(document.body);case 1:case"end":return Oe.stop()}},Tt)}));function xt(){return ht.apply(this,arguments)}return xt}()})},1e3);case 4:case"end":return et.stop()}},tt)}));return function(){return Ge.apply(this,arguments)}}(),me=function(tt){!Object(k.a)()&&tt.target.nodeName!=="A"&&tt.target.nodeName!=="BUTTON"&&tt.target.innerHTML!=="\u786E \u5B9A"&&(Object(k.d)(document.body),console.log("documentClick.full"))},ce=function(){var Ge=Object(z.a)(T.a.mark(function tt(){return T.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.abrupt("return",new Promise(function(){var et=Object(z.a)(T.a.mark(function St(At){var ht;return T.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,o({type:"exercise/getExerciseUserInfo",payload:Object(q.a)({},Ie)});case 2:return ht=Tt.sent,At(ht==null?void 0:ht.data),Tt.abrupt("return",ht==null?void 0:ht.data);case 5:case"end":return Tt.stop()}},St)}));return function(St){return et.apply(this,arguments)}}()));case 1:case"end":return Ye.stop()}},tt)}));return function(){return Ge.apply(this,arguments)}}(),te=function(){var Ge=Object(z.a)(T.a.mark(function tt(Je){var Ye,et,St;return T.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:(Ye=K.current)===null||Ye===void 0||((et=Ye.destroyAll)===null||et===void 0)||et.call(Ye),K.current=Y.a.info({maskClosable:!1,keyboard:!1,okText:C.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",C.a.createElement("span",{style:{display:"inline-block"}},C.a.createElement(u,{onFinish:Ce,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(l.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:C.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",C.a.createElement("span",{className:"c-red"},Je),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",C.a.createElement("span",{className:"c-red"},(St=l.exerciseUserInfo)===null||St===void 0?void 0:St.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",C.a.createElement("span",{className:"c-red"},l.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",C.a.createElement("br",null),C.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var xt=Object(z.a)(T.a.mark(function Ot(){return T.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:clearTimeout(le.current),Object(k.d)(document.body),K.current.destroy();case 3:case"end":return Te.stop()}},Ot)}));function Tt(){return xt.apply(this,arguments)}return Tt}()}),le.current=setTimeout(function(){var xt;K.current.update({okText:C.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:C.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",C.a.createElement("span",{className:"c-red"},Je+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",C.a.createElement("span",{className:"c-red"},(xt=l.exerciseUserInfo)===null||xt===void 0?void 0:xt.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(l.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return ht.stop()}},tt)}));return function(Je){return Ge.apply(this,arguments)}}(),be=function(){location.href="/classrooms/".concat(Ie.coursesId,"/exercise/").concat(Ie.categoryId,"/detail")},ae=function(){var Ge=Object(z.a)(T.a.mark(function tt(){var Je,Ye,et;return T.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return(Je=K.current)===null||Je===void 0||((Ye=Je.destroyAll)===null||Ye===void 0)||Ye.call(Je),At.next=3,Object(O.Z)({categoryId:Ie.categoryId,commit_method:1});case 3:et=At.sent,et&&we();case 5:case"end":return At.stop()}},tt)}));return function(){return Ge.apply(this,arguments)}}(),we=function(){var tt,Je;document.removeEventListener(Object(k.c)(),Ve,!1),Object(k.b)(),(tt=K.current)===null||tt===void 0||((Je=tt.destroyAll)===null||Je===void 0)||Je.call(tt),M.info({content:C.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",C.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){be()}})},Pe=function(tt){Object(k.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(k.b)()},Ce=function(){var Ge=Object(z.a)(T.a.mark(function tt(){return T.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.abrupt("return",new Promise(function(){var et=Object(z.a)(T.a.mark(function St(At){var ht,xt,Tt;return T.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(!((ht=l.exerciseUserInfo)!==null&&ht!==void 0&&ht.screen_at)){Oe.next=3;break}return Oe.next=3,Object(O.g)(Object(q.a)(Object(q.a)({},Ie),{},{reset:!0}));case 3:return Oe.next=5,Object(O.R)({id:Ie.categoryId});case 5:if(xt=Oe.sent,!(xt!=null&&xt.is_commit)){Oe.next=9;break}return we(),Oe.abrupt("return");case 9:return Oe.next=11,ce();case 11:Tt=Oe.sent,At(Tt);case 13:case"end":return Oe.stop()}},St)}));return function(St){return et.apply(this,arguments)}}()));case 1:case"end":return Ye.stop()}},tt)}));return function(){return Ge.apply(this,arguments)}}(),Ve=function(){var Ge=Object(z.a)(T.a.mark(function tt(){var Je,Ye,et,St;return T.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Je=!1,console.log("fullscreen change"),!Object(k.a)()){ht.next=7;break}(Ye=l.exerciseUserInfo)!==null&&Ye!==void 0&&Ye.screen_at&&Object(O.g)(Object(q.a)(Object(q.a)({},Ie),{},{reset:!0})),clearTimeout(Z.current),ht.next=17;break;case 7:return Je=!0,ht.next=10,Object(O.g)(Object(q.a)({},Ie));case 10:return ht.next=12,ce();case 12:et=ht.sent,te(et.used_screen_num),St=setTimeout(Object(z.a)(T.a.mark(function xt(){return T.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:case"end":return Ot.stop()}},xt)})),l.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),Z.current=St;case 17:o({type:"globalSetting/headerFooterToggle",payload:Je});case 18:case"end":return ht.stop()}},tt)}));return function(){return Ge.apply(this,arguments)}}();return C.a.createElement("div",null,H)};De.a=Object(i.a)(function(y){var g=y.loading,D=y.user,S=y.exercise,d=y.globalSetting;return{globalSetting:d,user:D,exercise:S,loading:g.effects}})(R)},bT9E:function(ze,De,W){"use strict";W.d(De,"a",function(){return z});var q=W("VTBJ");function z(P,Y){var F=Object(q.a)({},P);return Array.isArray(Y)&&Y.forEach(function(A){delete F[A]}),F}},biw7:function(ze,De,W){"use strict";var q=W("q1tI"),z=W.n(q),P=q.createContext(null);De.a=P},c5Ni:function(ze,De,W){},cRFk:function(ze,De,W){ze.exports=W.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(ze,De,W){ze.exports=W.p+"static/choose.4ad1045f.svg"},dQei:function(ze,De){for(var W={glog:function(z){if(z<1)throw new Error("glog("+z+")");return W.LOG_TABLE[z]},gexp:function(z){for(;z<0;)z+=255;for(;z>=256;)z-=255;return W.EXP_TABLE[z]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},q=0;q<8;q++)W.EXP_TABLE[q]=1<<q;for(var q=8;q<256;q++)W.EXP_TABLE[q]=W.EXP_TABLE[q-4]^W.EXP_TABLE[q-5]^W.EXP_TABLE[q-6]^W.EXP_TABLE[q-8];for(var q=0;q<255;q++)W.LOG_TABLE[W.EXP_TABLE[q]]=q;ze.exports=W},dWSS:function(ze,De,W){var q=W("dQei");function z(P,Y){if(P.length==null)throw new Error(P.length+"/"+Y);for(var F=0;F<P.length&&P[F]==0;)F++;this.num=new Array(P.length-F+Y);for(var A=0;A<P.length-F;A++)this.num[A]=P[A+F]}z.prototype={get:function(P){return this.num[P]},getLength:function(){return this.num.length},multiply:function(P){for(var Y=new Array(this.getLength()+P.getLength()-1),F=0;F<this.getLength();F++)for(var A=0;A<P.getLength();A++)Y[F+A]^=q.gexp(q.glog(this.get(F))+q.glog(P.get(A)));return new z(Y,0)},mod:function(P){if(this.getLength()-P.getLength()<0)return this;for(var Y=q.glog(this.get(0))-q.glog(P.get(0)),F=new Array(this.getLength()),A=0;A<this.getLength();A++)F[A]=this.get(A);for(var A=0;A<P.getLength();A++)F[A]^=q.gexp(q.glog(P.get(A))+Y);return new z(F,0).mod(P)}},ze.exports=z},dejd:function(ze,De,W){},djh8:function(ze,De,W){ze.exports=W.p+"static/qrCode.42927872.png"},dmUQ:function(ze,De,W){"use strict";var q=W("Ff2n"),z=W("rePB"),P=W("1OyB"),Y=W("vuIU"),F=W("Ji7U"),A=W("md7G"),j=W("foSv"),B=W("q1tI"),L=W.n(B),T=W("TSYQ"),v=W.n(T),C=W("4IlW");function k(o,a){var x=Object.keys(o);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(o);a&&(E=E.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),x.push.apply(x,E)}return x}function O(o){for(var a=1;a<arguments.length;a++){var x=arguments[a]!=null?arguments[a]:{};a%2?k(Object(x),!0).forEach(function(E){Object(z.a)(o,E,x[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(x)):k(Object(x)).forEach(function(E){Object.defineProperty(o,E,Object.getOwnPropertyDescriptor(x,E))})}return o}function b(o){var a=p();return function(){var E=Object(j.a)(o),m;if(a){var _=Object(j.a)(this).constructor;m=Reflect.construct(E,arguments,_)}else m=E.apply(this,arguments);return Object(A.a)(this,m)}}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}function c(){}function i(o){o.preventDefault()}var u=function(a){return a.replace(/[^\w.-]+/g,"")},h=200,R=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,g=function(a){return a!=null},D=function(a,x){return x===a||typeof x=="number"&&typeof a=="number"&&isNaN(x)&&isNaN(a)},S=function(o){Object(F.a)(x,o);var a=b(x);function x(E){var m;Object(P.a)(this,x),m=a.call(this,E),m.onKeyDown=function(U){var M=m.props,H=M.onKeyDown,K=M.onPressEnter;if(U.keyCode===C.a.UP){var Z=m.getRatio(U);m.up(U,Z,null),m.stop()}else if(U.keyCode===C.a.DOWN){var le=m.getRatio(U);m.down(U,le,null),m.stop()}else U.keyCode===C.a.ENTER&&K&&K(U);if(m.recordCursorPosition(),m.lastKeyCode=U.keyCode,H){for(var he=arguments.length,ye=new Array(he>1?he-1:0),Ue=1;Ue<he;Ue++)ye[Ue-1]=arguments[Ue];H.apply(void 0,[U].concat(ye))}},m.onKeyUp=function(U){var M=m.props.onKeyUp;if(m.stop(),m.recordCursorPosition(),M){for(var H=arguments.length,K=new Array(H>1?H-1:0),Z=1;Z<H;Z++)K[Z-1]=arguments[Z];M.apply(void 0,[U].concat(K))}},m.onChange=function(U){var M=m.props.onChange;m.state.focused&&(m.inputting=!0),m.rawInput=m.props.parser(m.getValueFromEvent(U)),m.setState({inputValue:m.rawInput}),M(m.toNumber(m.rawInput))},m.onMouseUp=function(){var U=m.props.onMouseUp;m.recordCursorPosition(),U&&U.apply(void 0,arguments)},m.onFocus=function(){var U;m.setState({focused:!0}),(U=m.props).onFocus.apply(U,arguments)},m.onBlur=function(){var U=m.props.onBlur;m.inputting=!1,m.setState({focused:!1});var M=m.getCurrentValidValue(m.state.inputValue),H=m.setValue(M,c);if(U){var K=m.input.value,Z=m.getInputDisplayValue({focus:!1,value:H});m.input.value=Z&&Number(Z),U.apply(void 0,arguments),m.input.value=K}},m.getRatio=function(U){var M=1;return U.metaKey||U.ctrlKey?M=.1:U.shiftKey&&(M=10),M},m.getFullNum=function(U){return isNaN(U)?U:/e/i.test(String(U))?Number(U).toFixed(18).replace(/\.?0+$/,""):U},m.getPrecision=function(U){if(g(m.props.precision))return m.props.precision;var M=String(U);if(M.indexOf("e-")>=0)return parseInt(M.slice(M.indexOf("e-")+2),10);var H=0;return M.indexOf(".")>=0&&(H=M.length-M.indexOf(".")-1),H},m.getInputDisplayValue=function(U){var M=U||m.state,H=M.focused,K=M.inputValue,Z=M.value,le;H?le=K:le=m.toPrecisionAsStep(Z),le==null&&(le="");var he=m.formatWrapper(le);return g(m.props.decimalSeparator)&&(he=he.toString().replace(".",m.props.decimalSeparator)),he},m.recordCursorPosition=function(){try{m.cursorStart=m.input.selectionStart,m.cursorEnd=m.input.selectionEnd,m.currentValue=m.input.value,m.cursorBefore=m.input.value.substring(0,m.cursorStart),m.cursorAfter=m.input.value.substring(m.cursorEnd)}catch(U){}},m.restoreByAfter=function(U){if(U===void 0)return!1;var M=m.input.value,H=M.lastIndexOf(U);if(H===-1)return!1;var K=m.cursorBefore.length;return m.lastKeyCode===C.a.DELETE&&m.cursorBefore.charAt(K-1)===U[0]?(m.fixCaret(K,K),!0):H+U.length===M.length?(m.fixCaret(H,H),!0):!1},m.partRestoreByAfter=function(U){return U===void 0?!1:Array.prototype.some.call(U,function(M,H){var K=U.substring(H);return m.restoreByAfter(K)})},m.isNotCompleteNumber=function(U){return isNaN(U)||U===""||U===null||U&&U.toString().indexOf(".")===U.toString().length-1},m.stop=function(){m.autoStepTimer&&clearTimeout(m.autoStepTimer)},m.down=function(U,M,H){m.pressingUpOrDown=!0,m.step("down",U,M,H)},m.up=function(U,M,H){m.pressingUpOrDown=!0,m.step("up",U,M,H)},m.saveInput=function(U){m.input=U};var _=E.value;_===void 0&&(_=E.defaultValue),m.state={focused:E.autoFocus};var I=m.getValidValue(m.toNumber(_));return m.state=O(O({},m.state),{},{inputValue:m.toPrecisionAsStep(I),value:I}),m}return Object(Y.a)(x,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(m){var _=this.props,I=_.value,U=_.onChange,M=_.max,H=_.min,K=this.state.focused;if(m){if(!D(m.value,I)||!D(m.max,M)||!D(m.min,H)){var Z=K?I:this.getValidValue(I),le;this.pressingUpOrDown?le=Z:this.inputting?le=this.rawInput:le=this.toPrecisionAsStep(Z),this.setState({value:Z,inputValue:le})}var he="value"in this.props?I:this.state.value;"max"in this.props&&m.max!==M&&typeof he=="number"&&he>M&&U&&U(M),"min"in this.props&&m.min!==H&&typeof he=="number"&&he<H&&U&&U(H)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ye=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===C.a.BACKSPACE?ye=this.cursorStart-1:this.lastKeyCode===C.a.DELETE&&(ye=this.cursorStart):ye=this.input.value.length,this.fixCaret(ye,ye)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case C.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case C.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ue){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(m){var _=m;return _===""?_="":this.isNotCompleteNumber(parseFloat(_))?_=this.state.value:_=this.getValidValue(_),this.toNumber(_)}},{key:"getValueFromEvent",value:function(m){var _=m.target.value.trim().replace(/。/g,".");return g(this.props.decimalSeparator)&&(_=_.replace(this.props.decimalSeparator,".")),_}},{key:"getValidValue",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,U=parseFloat(m);return isNaN(U)?m:(U<_&&(U=_),U>I&&(U=I),U)}},{key:"setValue",value:function(m,_){var I=this.props.precision,U=this.isNotCompleteNumber(parseFloat(m))?null:parseFloat(m),M=this.state.value,H=M===void 0?null:M,K=this.state.inputValue,Z=K===void 0?null:K,le=typeof U=="number"?U.toFixed(I):"".concat(U),he=U!==H||le!=="".concat(Z);return"value"in this.props?(Z=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Z},_)):this.setState({value:U,inputValue:this.toPrecisionAsStep(m)},_),he&&this.props.onChange(U),U}},{key:"getMaxPrecision",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,I=this.props,U=I.precision,M=I.step;if(g(U))return U;var H=this.getPrecision(_),K=this.getPrecision(M),Z=this.getPrecision(m);return m?Math.max(Z,H+K):H+K}},{key:"getPrecisionFactor",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,I=this.getMaxPrecision(m,_);return Math.pow(10,I)}},{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(m){return this.props.formatter?this.props.formatter(m):m}},{key:"toPrecisionAsStep",value:function(m){if(this.isNotCompleteNumber(m)||m==="")return m;var _=Math.abs(this.getMaxPrecision(m));return isNaN(_)?m.toString():Number(m).toFixed(_)}},{key:"toNumber",value:function(m){var _=this.props.precision,I=this.state.focused,U=m&&m.length>16&&I;return this.isNotCompleteNumber(m)||U?m:g(_)?Math.round(m*Math.pow(10,_))/Math.pow(10,_):Number(m)}},{key:"upStep",value:function(m,_){var I=this.props.step,U=this.getPrecisionFactor(m,_),M=Math.abs(this.getMaxPrecision(m,_)),H=((U*m+U*I*_)/U).toFixed(M);return this.toNumber(H)}},{key:"downStep",value:function(m,_){var I=this.props.step,U=this.getPrecisionFactor(m,_),M=Math.abs(this.getMaxPrecision(m,_)),H=((U*m-U*I*_)/U).toFixed(M);return this.toNumber(H)}},{key:"step",value:function(m,_){var I=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=arguments.length>3?arguments[3]:void 0;this.stop(),_&&(_.persist(),_.preventDefault());var H=this.props;if(H.disabled)return;var K=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(K))return;var Z=this["".concat(m,"Step")](K,U),le=Z>H.max||Z<H.min;if(Z>H.max?Z=H.max:Z<H.min&&(Z=H.min),this.setValue(Z,null),this.setState({focused:!0},function(){I.pressingUpOrDown=!1}),le)return;this.autoStepTimer=setTimeout(function(){I[m](_,U,!0)},M?h:R)}},{key:"fixCaret",value:function(m,_){if(m===void 0||_===void 0||!this.input||!this.input.value)return;try{var I=this.input.selectionStart,U=this.input.selectionEnd;(m!==I||_!==U)&&this.input.setSelectionRange(m,_)}catch(M){}}},{key:"render",value:function(){var m,_=this.props,I=_.prefixCls,U=_.disabled,M=_.readOnly,H=_.useTouch,K=_.autoComplete,Z=_.upHandler,le=_.downHandler,he=_.className,ye=_.max,Ue=_.min,Me=_.style,_e=_.title,Ie=_.onMouseEnter,ke=_.onMouseLeave,me=_.onMouseOver,ce=_.onMouseOut,te=_.required,be=_.onClick,ae=_.tabIndex,we=_.type,Pe=_.placeholder,Ce=_.id,Ve=_.inputMode,Ge=_.pattern,tt=_.step,Je=_.maxLength,Ye=_.autoFocus,et=_.name,St=_.onPaste,At=_.onInput,ht=Object(q.a)(_,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),xt=this.state,Tt=xt.value,Ot=xt.focused,Oe=v()(I,(m={},Object(z.a)(m,he,!!he),Object(z.a)(m,"".concat(I,"-disabled"),U),Object(z.a)(m,"".concat(I,"-focused"),Ot),m)),Te={};Object.keys(ht).forEach(function(de){(de.substr(0,5)==="data-"||de.substr(0,5)==="aria-"||de==="role")&&(Te[de]=ht[de])});var rt=!M&&!U,ot=this.getInputDisplayValue(null),Ne=(Tt||Tt===0)&&(isNaN(Tt)||Number(Tt)>=ye),$e=(Tt||Tt===0)&&(isNaN(Tt)||Number(Tt)<=Ue),xe=Ne||U||M,fe=$e||U||M,pe=v()("".concat(I,"-handler"),"".concat(I,"-handler-up"),Object(z.a)({},"".concat(I,"-handler-up-disabled"),xe)),re=v()("".concat(I,"-handler"),"".concat(I,"-handler-down"),Object(z.a)({},"".concat(I,"-handler-down-disabled"),fe)),ie=H?{onTouchStart:xe?c:this.up,onTouchEnd:this.stop}:{onMouseDown:xe?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},se=H?{onTouchStart:fe?c:this.down,onTouchEnd:this.stop}:{onMouseDown:fe?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return L.a.createElement("div",{className:Oe,style:Me,title:_e,onMouseEnter:Ie,onMouseLeave:ke,onMouseOver:me,onMouseOut:ce,onFocus:function(){return null},onBlur:function(){return null}},L.a.createElement("div",{className:"".concat(I,"-handler-wrap")},L.a.createElement("span",Object.assign({unselectable:"on"},ie,{role:"button","aria-label":"Increase Value","aria-disabled":xe,className:pe}),Z||L.a.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-up-inner"),onClick:i})),L.a.createElement("span",Object.assign({unselectable:"on"},se,{role:"button","aria-label":"Decrease Value","aria-disabled":fe,className:re}),le||L.a.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-down-inner"),onClick:i}))),L.a.createElement("div",{className:"".concat(I,"-input-wrap")},L.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ue,"aria-valuemax":ye,"aria-valuenow":Tt,required:te,type:we,placeholder:Pe,onPaste:St,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(I,"-input"),tabIndex:ae,autoComplete:K,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:c,onKeyUp:rt?this.onKeyUp:c,autoFocus:Ye,maxLength:Je,readOnly:M,disabled:U,max:ye,min:Ue,step:tt,name:et,title:_e,id:Ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:Ge,inputMode:Ve,onInput:At},Te))))}}]),x}(L.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:u,required:!1,autoComplete:"off"};var d=S,l=De.a=d},f4xo:function(ze,De,W){var q=W("nVVt");function z(P){this.mode=q.MODE_8BIT_BYTE,this.data=P}z.prototype={getLength:function(P){return this.data.length},write:function(P){for(var Y=0;Y<this.data.length;Y++)P.put(this.data.charCodeAt(Y),8)}},ze.exports=z},fyJ8:function(ze,De,W){"use strict";var q=W("rePB"),z=W("VTBJ"),P=W("Ff2n"),Y=W("U8pU"),F=W("q1tI"),A=W.n(F),j=W("TSYQ"),B=W.n(j),L=W("c+Xe"),T=W("sR1s");function v(p){return p&&Object(Y.a)(p)==="object"&&!Array.isArray(p)&&!F.isValidElement(p)}function C(p){return typeof p=="string"?!0:Object(L.c)(p)}function k(p,c){var i,u=p.prefixCls,h=p.className,R=p.record,y=p.index,g=p.dataIndex,D=p.render,S=p.children,d=p.component,l=d===void 0?"td":d,o=p.colSpan,a=p.rowSpan,x=p.fixLeft,E=p.fixRight,m=p.firstFixLeft,_=p.lastFixLeft,I=p.firstFixRight,U=p.lastFixRight,M=p.appendNode,H=p.additionalProps,K=H===void 0?{}:H,Z=p.ellipsis,le=p.align,he=p.rowType,ye=p.isSticky,Ue="".concat(u,"-cell"),Me,_e;if(S)_e=S;else{var Ie=Object(T.b)(R,g);if(_e=Ie,D){var ke=D(Ie,R,y);v(ke)?(_e=ke.children,Me=ke.props):_e=ke}}Object(Y.a)(_e)==="object"&&!Array.isArray(_e)&&!F.isValidElement(_e)&&(_e=null),Z&&(_||I)&&(_e=F.createElement("span",{className:"".concat(Ue,"-content")},_e));var me=Me||{},ce=me.colSpan,te=me.rowSpan,be=me.style,ae=me.className,we=Object(P.a)(me,["colSpan","rowSpan","style","className"]),Pe=ce!==void 0?ce:o,Ce=te!==void 0?te:a;if(Pe===0||Ce===0)return null;var Ve={},Ge=typeof x=="number",tt=typeof E=="number";Ge&&(Ve.position="sticky",Ve.left=x),tt&&(Ve.position="sticky",Ve.right=E);var Je={};le&&(Je.textAlign=le);var Ye,et=Z===!0?{showTitle:!0}:Z;et&&(et.showTitle||he==="header")&&(typeof _e=="string"||typeof _e=="number"?Ye=_e.toString():F.isValidElement(_e)&&typeof _e.props.children=="string"&&(Ye=_e.props.children));var St=Object(z.a)(Object(z.a)(Object(z.a)({title:Ye},we),K),{},{colSpan:Pe&&Pe!==1?Pe:null,rowSpan:Ce&&Ce!==1?Ce:null,className:B()(Ue,h,(i={},Object(q.a)(i,"".concat(Ue,"-fix-left"),Ge),Object(q.a)(i,"".concat(Ue,"-fix-left-first"),m),Object(q.a)(i,"".concat(Ue,"-fix-left-last"),_),Object(q.a)(i,"".concat(Ue,"-fix-right"),tt),Object(q.a)(i,"".concat(Ue,"-fix-right-first"),I),Object(q.a)(i,"".concat(Ue,"-fix-right-last"),U),Object(q.a)(i,"".concat(Ue,"-ellipsis"),Z),Object(q.a)(i,"".concat(Ue,"-with-append"),M),Object(q.a)(i,"".concat(Ue,"-fix-sticky"),(Ge||tt)&&ye),i),K.className,ae),style:Object(z.a)(Object(z.a)(Object(z.a)(Object(z.a)({},K.style),Je),Ve),be),ref:C(l)?c:null});return F.createElement(l,Object.assign({},St),M,_e)}var O=F.forwardRef(k);O.displayName="Cell";var b=F.memo(O,function(p,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,p.record):!1});De.a=b},h78n:function(ze,De,W){"use strict";W.d(De,"a",function(){return m});var q=W("q1tI"),z=W.n(q),P=W("TSYQ"),Y=W.n(P),F={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},A=function(U){var M=U.map(function(){return Object(q.useRef)()}),H=Object(q.useRef)();return Object(q.useEffect)(function(){var K=Date.now(),Z=!1;Object.keys(M).forEach(function(le){var he=M[le].current;if(!he)return;Z=!0;var ye=he.style;ye.transitionDuration=".3s, .3s, .3s, .06s",H.current&&K-H.current<100&&(ye.transitionDuration="0s, 0s")}),Z&&(H.current=Date.now())}),[M]};function j(){return j=Object.assign||function(I){for(var U=1;U<arguments.length;U++){var M=arguments[U];for(var H in M)Object.prototype.hasOwnProperty.call(M,H)&&(I[H]=M[H])}return I},j.apply(this,arguments)}function B(I,U){return k(I)||C(I,U)||T(I,U)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(I,U){if(!I)return;if(typeof I=="string")return v(I,U);var M=Object.prototype.toString.call(I).slice(8,-1);if(M==="Object"&&I.constructor&&(M=I.constructor.name),M==="Map"||M==="Set")return Array.from(I);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return v(I,U)}function v(I,U){(U==null||U>I.length)&&(U=I.length);for(var M=0,H=new Array(U);M<U;M++)H[M]=I[M];return H}function C(I,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(I)))return;var M=[],H=!0,K=!1,Z=void 0;try{for(var le=I[Symbol.iterator](),he;!(H=(he=le.next()).done)&&!(M.push(he.value),U&&M.length===U);H=!0);}catch(ye){K=!0,Z=ye}finally{try{!H&&le.return!=null&&le.return()}finally{if(K)throw Z}}return M}function k(I){if(Array.isArray(I))return I}function O(I,U){if(I==null)return{};var M=b(I,U),H,K;if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(I);for(K=0;K<Z.length;K++){if(H=Z[K],U.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(I,H))continue;M[H]=I[H]}}return M}function b(I,U){if(I==null)return{};var M={},H=Object.keys(I),K,Z;for(Z=0;Z<H.length;Z++){if(K=H[Z],U.indexOf(K)>=0)continue;M[K]=I[K]}return M}var p=function(U){var M=U.className,H=U.percent,K=U.prefixCls,Z=U.strokeColor,le=U.strokeLinecap,he=U.strokeWidth,ye=U.style,Ue=U.trailColor,Me=U.trailWidth,_e=U.transition,Ie=O(U,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Ie.gapPosition;var ke=Array.isArray(H)?H:[H],me=Array.isArray(Z)?Z:[Z],ce=A(ke),te=B(ce,1),be=te[0],ae=he/2,we=100-he/2,Pe="M ".concat(le==="round"?ae:0,",").concat(ae,`
L `).concat(le==="round"?we:100,",").concat(ae),Ce="0 0 100 ".concat(he),Ve=0;return z.a.createElement("svg",j({className:Y()("".concat(K,"-line"),M),viewBox:Ce,preserveAspectRatio:"none",style:ye},Ie),z.a.createElement("path",{className:"".concat(K,"-line-trail"),d:Pe,strokeLinecap:le,stroke:Ue,strokeWidth:Me||he,fillOpacity:"0"}),ke.map(function(Ge,tt){var Je={strokeDasharray:"".concat(Ge,"px, 100px"),strokeDashoffset:"-".concat(Ve,"px"),transition:_e||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ye=me[tt]||me[me.length-1];return Ve+=Ge,z.a.createElement("path",{key:tt,className:"".concat(K,"-line-path"),d:Pe,strokeLinecap:le,stroke:Ye,strokeWidth:he,fillOpacity:"0",ref:be[tt],style:Je})}))};p.defaultProps=F;var c=p;function i(){return i=Object.assign||function(I){for(var U=1;U<arguments.length;U++){var M=arguments[U];for(var H in M)Object.prototype.hasOwnProperty.call(M,H)&&(I[H]=M[H])}return I},i.apply(this,arguments)}function u(I,U){return D(I)||g(I,U)||R(I,U)||h()}function h(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R(I,U){if(!I)return;if(typeof I=="string")return y(I,U);var M=Object.prototype.toString.call(I).slice(8,-1);if(M==="Object"&&I.constructor&&(M=I.constructor.name),M==="Map"||M==="Set")return Array.from(I);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return y(I,U)}function y(I,U){(U==null||U>I.length)&&(U=I.length);for(var M=0,H=new Array(U);M<U;M++)H[M]=I[M];return H}function g(I,U){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(I)))return;var M=[],H=!0,K=!1,Z=void 0;try{for(var le=I[Symbol.iterator](),he;!(H=(he=le.next()).done)&&!(M.push(he.value),U&&M.length===U);H=!0);}catch(ye){K=!0,Z=ye}finally{try{!H&&le.return!=null&&le.return()}finally{if(K)throw Z}}return M}function D(I){if(Array.isArray(I))return I}function S(I,U){if(I==null)return{};var M=d(I,U),H,K;if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(I);for(K=0;K<Z.length;K++){if(H=Z[K],U.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(I,H))continue;M[H]=I[H]}}return M}function d(I,U){if(I==null)return{};var M={},H=Object.keys(I),K,Z;for(Z=0;Z<H.length;Z++){if(K=H[Z],U.indexOf(K)>=0)continue;M[K]=I[K]}return M}var l=0;function o(I){return+I.replace("%","")}function a(I){return Array.isArray(I)?I:[I]}function x(I,U,M,H){var K=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,Z=arguments.length>5?arguments[5]:void 0,le=50-H/2,he=0,ye=-le,Ue=0,Me=-2*le;switch(Z){case"left":he=-le,ye=0,Ue=2*le,Me=0;break;case"right":he=le,ye=0,Ue=-2*le,Me=0;break;case"bottom":ye=le,Me=2*le;break;default:}var _e="M 50,50 m ".concat(he,",").concat(ye,`
a `).concat(le,",").concat(le," 0 1 1 ").concat(Ue,",").concat(-Me,`
a `).concat(le,",").concat(le," 0 1 1 ").concat(-Ue,",").concat(Me),Ie=Math.PI*2*le,ke={stroke:M,strokeDasharray:"".concat(U/100*(Ie-K),"px ").concat(Ie,"px"),strokeDashoffset:"-".concat(K/2+I/100*(Ie-K),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:_e,pathStyle:ke}}var E=function(U){var M=U.prefixCls,H=U.strokeWidth,K=U.trailWidth,Z=U.gapDegree,le=U.gapPosition,he=U.trailColor,ye=U.strokeLinecap,Ue=U.style,Me=U.className,_e=U.strokeColor,Ie=U.percent,ke=S(U,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),me=Object(q.useMemo)(function(){return l+=1,l},[]),ce=x(0,100,he,H,Z,le),te=ce.pathString,be=ce.pathStyle,ae=a(Ie),we=a(_e),Pe=we.find(function(Je){return Object.prototype.toString.call(Je)==="[object Object]"}),Ce=A(ae),Ve=u(Ce,1),Ge=Ve[0],tt=function(){var Ye=0;return ae.map(function(et,St){var At=we[St]||we[we.length-1],ht=Object.prototype.toString.call(At)==="[object Object]"?"url(#".concat(M,"-gradient-").concat(me,")"):"",xt=x(Ye,et,At,H,Z,le);return Ye+=et,z.a.createElement("path",{key:St,className:"".concat(M,"-circle-path"),d:xt.pathString,stroke:ht,strokeLinecap:ye,strokeWidth:H,opacity:et===0?0:1,fillOpacity:"0",style:xt.pathStyle,ref:Ge[St]})})};return z.a.createElement("svg",i({className:Y()("".concat(M,"-circle"),Me),viewBox:"0 0 100 100",style:Ue},ke),Pe&&z.a.createElement("defs",null,z.a.createElement("linearGradient",{id:"".concat(M,"-gradient-").concat(me),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Pe).sort(function(Je,Ye){return o(Je)-o(Ye)}).map(function(Je,Ye){return z.a.createElement("stop",{key:Ye,offset:Je,stopColor:Pe[Je]})}))),z.a.createElement("path",{className:"".concat(M,"-circle-trail"),d:te,stroke:he,strokeLinecap:ye,strokeWidth:K||H,fillOpacity:"0",style:be}),tt().reverse())};E.defaultProps=F;var m=E,_={Line:c,Circle:m}},hW8S:function(ze,De,W){"use strict";W.d(De,"a",function(){return Y}),W.d(De,"c",function(){return F}),W.d(De,"b",function(){return A});var q=W("VTBJ"),z=W("Ff2n"),P=W("Kwbf"),Y="RC_TABLE_INTERNAL_COL_DEFINE";function F(j){var B=j.expandable,L=Object(z.a)(j,["expandable"]);return"expandable"in j?Object(q.a)(Object(q.a)({},L),B):L}function A(j){return Object.keys(j).reduce(function(B,L){return(L.substr(0,5)==="data-"||L.substr(0,5)==="aria-")&&(B[L]=j[L]),B},{})}},ji0R:function(ze,De,W){ze.exports=W.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(ze,De,W){ze.exports=W.p+"static/question.cb52bef9.gif"},kPYp:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kUZQeW8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WJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(ze,De,W){},l2Kq:function(ze,De,W){ze.exports=W.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(ze,De,W){(function(q){q(W("VrN/"),W("1eCo"),W("8EBN"))})(function(q){"use strict";q.defineMode("markdown",function(z,P){var Y=q.getMode(z,"text/html"),F=Y.name=="null";function A(H){if(q.findModeByName){var K=q.findModeByName(H);K&&(H=K.mime||K.mimes[0])}var Z=q.getMode(z,H);return Z.name=="null"?null:Z}P.highlightFormatting===void 0&&(P.highlightFormatting=!1),P.maxBlockquoteDepth===void 0&&(P.maxBlockquoteDepth=0),P.taskLists===void 0&&(P.taskLists=!1),P.strikethrough===void 0&&(P.strikethrough=!1),P.emoji===void 0&&(P.emoji=!1),P.fencedCodeBlockHighlighting===void 0&&(P.fencedCodeBlockHighlighting=!0),P.fencedCodeBlockDefaultMode===void 0&&(P.fencedCodeBlockDefaultMode="text/plain"),P.xml===void 0&&(P.xml=!0),P.tokenTypeOverrides===void 0&&(P.tokenTypeOverrides={});var j={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 B in j)j.hasOwnProperty(B)&&P.tokenTypeOverrides[B]&&(j[B]=P.tokenTypeOverrides[B]);var L=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,C=P.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,k=/^ {0,3}(?:\={1,}|-{2,})\s*$/,O=/^[^#!\[\]*_\\<>` "'(~:]+/,b=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,i=" ";function u(H,K,Z){return K.f=K.inline=Z,Z(H,K)}function h(H,K,Z){return K.f=K.block=Z,Z(H,K)}function R(H){return!H||!/\S/.test(H.string)}function y(H){if(H.linkTitle=!1,H.linkHref=!1,H.linkText=!1,H.em=!1,H.strong=!1,H.strikethrough=!1,H.quote=0,H.indentedCode=!1,H.f==D){var K=F;if(!K){var Z=q.innerMode(Y,H.htmlState);K=Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText}K&&(H.f=o,H.block=g,H.htmlState=null)}return H.trailingSpace=0,H.trailingSpaceNewLine=!1,H.prevLine=H.thisLine,H.thisLine={stream:null},null}function g(H,K){var Z=H.column()===K.indentation,le=R(K.prevLine.stream),he=K.indentedCode,ye=K.prevLine.hr,Ue=K.list!==!1,Me=(K.listStack[K.listStack.length-1]||0)+3;K.indentedCode=!1;var _e=K.indentation;if(K.indentationDiff===null&&(K.indentationDiff=K.indentation,Ue)){for(K.list=null;_e<K.listStack[K.listStack.length-1];)K.listStack.pop(),K.listStack.length?K.indentation=K.listStack[K.listStack.length-1]:K.list=!1;K.list!==!1&&(K.indentationDiff=_e-K.listStack[K.listStack.length-1])}var Ie=!le&&!ye&&!K.prevLine.header&&(!Ue||!he)&&!K.prevLine.fencedCodeEnd,ke=(K.list===!1||ye||le)&&K.indentation<=Me&&H.match(L),me=null;if(K.indentationDiff>=4&&(he||K.prevLine.fencedCodeEnd||K.prevLine.header||le))return H.skipToEnd(),K.indentedCode=!0,j.code;if(H.eatSpace())return null;if(Z&&K.indentation<=Me&&(me=H.match(C))&&me[1].length<=6)return K.quote=0,K.header=me[1].length,K.thisLine.header=!0,P.highlightFormatting&&(K.formatting="header"),K.f=K.inline,d(K);if(K.indentation<=Me&&H.eat(">"))return K.quote=Z?1:K.quote+1,P.highlightFormatting&&(K.formatting="quote"),H.eatSpace(),d(K);if(!ke&&!K.setext&&Z&&K.indentation<=Me&&(me=H.match(T))){var ce=me[1]?"ol":"ul";return K.indentation=_e+H.current().length,K.list=!0,K.quote=0,K.listStack.push(K.indentation),K.em=!1,K.strong=!1,K.code=!1,K.strikethrough=!1,P.taskLists&&H.match(v,!1)&&(K.taskList=!0),K.f=K.inline,P.highlightFormatting&&(K.formatting=["list","list-"+ce]),d(K)}else{if(Z&&K.indentation<=Me&&(me=H.match(b,!0)))return K.quote=0,K.fencedEndRE=new RegExp(me[1]+"+ *$"),K.localMode=P.fencedCodeBlockHighlighting&&A(me[2]||P.fencedCodeBlockDefaultMode),K.localMode&&(K.localState=q.startState(K.localMode)),K.f=K.block=S,P.highlightFormatting&&(K.formatting="code-block"),K.code=-1,d(K);if(K.setext||(!Ie||!Ue)&&!K.quote&&K.list===!1&&!K.code&&!ke&&!p.test(H.string)&&(me=H.lookAhead(1))&&(me=me.match(k)))return K.setext?(K.header=K.setext,K.setext=0,H.skipToEnd(),P.highlightFormatting&&(K.formatting="header")):(K.header=me[0].charAt(0)=="="?1:2,K.setext=K.header),K.thisLine.header=!0,K.f=K.inline,d(K);if(ke)return H.skipToEnd(),K.hr=!0,K.thisLine.hr=!0,j.hr;if(H.peek()==="[")return u(H,K,_)}return u(H,K,K.inline)}function D(H,K){var Z=Y.token(H,K.htmlState);if(!F){var le=q.innerMode(Y,K.htmlState);(le.mode.name=="xml"&&le.state.tagStart===null&&!le.state.context&&le.state.tokenize.isInText||K.md_inside&&H.current().indexOf(">")>-1)&&(K.f=o,K.block=g,K.htmlState=null)}return Z}function S(H,K){var Z=K.listStack[K.listStack.length-1]||0,le=K.indentation<Z,he=Z+3;if(K.fencedEndRE&&K.indentation<=he&&(le||H.match(K.fencedEndRE))){P.highlightFormatting&&(K.formatting="code-block");var ye;return le||(ye=d(K)),K.localMode=K.localState=null,K.block=g,K.f=o,K.fencedEndRE=null,K.code=0,K.thisLine.fencedCodeEnd=!0,le?h(H,K,K.block):ye}else return K.localMode?K.localMode.token(H,K.localState):(H.skipToEnd(),j.code)}function d(H){var K=[];if(H.formatting){K.push(j.formatting),typeof H.formatting=="string"&&(H.formatting=[H.formatting]);for(var Z=0;Z<H.formatting.length;Z++)K.push(j.formatting+"-"+H.formatting[Z]),H.formatting[Z]==="header"&&K.push(j.formatting+"-"+H.formatting[Z]+"-"+H.header),H.formatting[Z]==="quote"&&(!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=H.quote?K.push(j.formatting+"-"+H.formatting[Z]+"-"+H.quote):K.push("error"))}if(H.taskOpen)return K.push("meta"),K.length?K.join(" "):null;if(H.taskClosed)return K.push("property"),K.length?K.join(" "):null;if(H.linkHref?K.push(j.linkHref,"url"):(H.strong&&K.push(j.strong),H.em&&K.push(j.em),H.strikethrough&&K.push(j.strikethrough),H.emoji&&K.push(j.emoji),H.linkText&&K.push(j.linkText),H.code&&K.push(j.code),H.image&&K.push(j.image),H.imageAltText&&K.push(j.imageAltText,"link"),H.imageMarker&&K.push(j.imageMarker)),H.header&&K.push(j.header,j.header+"-"+H.header),H.quote&&(K.push(j.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=H.quote?K.push(j.quote+"-"+H.quote):K.push(j.quote+"-"+P.maxBlockquoteDepth)),H.list!==!1){var le=(H.listStack.length-1)%3;le?le===1?K.push(j.list2):K.push(j.list3):K.push(j.list1)}return H.trailingSpaceNewLine?K.push("trailing-space-new-line"):H.trailingSpace&&K.push("trailing-space-"+(H.trailingSpace%2?"a":"b")),K.length?K.join(" "):null}function l(H,K){return H.match(O,!0)?d(K):void 0}function o(H,K){var Z=K.text(H,K);if(typeof Z!="undefined")return Z;if(K.list)return K.list=null,d(K);if(K.taskList){var le=H.match(v,!0)[1]===" ";return le?K.taskOpen=!0:K.taskClosed=!0,P.highlightFormatting&&(K.formatting="task"),K.taskList=!1,d(K)}if(K.taskOpen=!1,K.taskClosed=!1,K.header&&H.match(/^#+$/,!0))return P.highlightFormatting&&(K.formatting="header"),d(K);var he=H.next();if(K.linkTitle){K.linkTitle=!1;var ye=he;he==="("&&(ye=")"),ye=(ye+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ue="^\\s*(?:[^"+ye+"\\\\]+|\\\\\\\\|\\\\.)"+ye;if(H.match(new RegExp(Ue),!0))return j.linkHref}if(he==="`"){var Me=K.formatting;P.highlightFormatting&&(K.formatting="code"),H.eatWhile("`");var _e=H.current().length;if(K.code==0&&(!K.quote||_e==1))return K.code=_e,d(K);if(_e==K.code){var Ie=d(K);return K.code=0,Ie}else return K.formatting=Me,d(K)}else if(K.code)return d(K);if(he==="\\"&&(H.next(),P.highlightFormatting)){var ke=d(K),me=j.formatting+"-escape";return ke?ke+" "+me:me}if(he==="!"&&H.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return K.imageMarker=!0,K.image=!0,P.highlightFormatting&&(K.formatting="image"),d(K);if(he==="["&&K.imageMarker&&H.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return K.imageMarker=!1,K.imageAltText=!0,P.highlightFormatting&&(K.formatting="image"),d(K);if(he==="]"&&K.imageAltText){P.highlightFormatting&&(K.formatting="image");var ke=d(K);return K.imageAltText=!1,K.image=!1,K.inline=K.f=x,ke}if(he==="["&&!K.image)return K.linkText&&H.match(/^.*?\]/)||(K.linkText=!0,P.highlightFormatting&&(K.formatting="link")),d(K);if(he==="]"&&K.linkText){P.highlightFormatting&&(K.formatting="link");var ke=d(K);return K.linkText=!1,K.inline=K.f=H.match(/\(.*?\)| ?\[.*?\]/,!1)?x:o,ke}if(he==="<"&&H.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){K.f=K.inline=a,P.highlightFormatting&&(K.formatting="link");var ke=d(K);return ke?ke+=" ":ke="",ke+j.linkInline}if(he==="<"&&H.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){K.f=K.inline=a,P.highlightFormatting&&(K.formatting="link");var ke=d(K);return ke?ke+=" ":ke="",ke+j.linkEmail}if(P.xml&&he==="<"&&H.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ce=H.string.indexOf(">",H.pos);if(ce!=-1){var te=H.string.substring(H.start,ce);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(K.md_inside=!0)}return H.backUp(1),K.htmlState=q.startState(Y),h(H,K,D)}if(P.xml&&he==="<"&&H.match(/^\/\w*?>/))return K.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var be=1,ae=H.pos==1?" ":H.string.charAt(H.pos-2);be<3&&H.eat(he);)be++;var we=H.peek()||" ",Pe=!/\s/.test(we)&&(!c.test(we)||/\s/.test(ae)||c.test(ae)),Ce=!/\s/.test(ae)&&(!c.test(ae)||/\s/.test(we)||c.test(we)),Ve=null,Ge=null;if(be%2&&(!K.em&&Pe&&(he==="*"||!Ce||c.test(ae))?Ve=!0:K.em==he&&Ce&&(he==="*"||!Pe||c.test(we))&&(Ve=!1)),be>1&&(!K.strong&&Pe&&(he==="*"||!Ce||c.test(ae))?Ge=!0:K.strong==he&&Ce&&(he==="*"||!Pe||c.test(we))&&(Ge=!1)),Ge!=null||Ve!=null){P.highlightFormatting&&(K.formatting=Ve==null?"strong":Ge==null?"em":"strong em"),Ve===!0&&(K.em=he),Ge===!0&&(K.strong=he);var Ie=d(K);return Ve===!1&&(K.em=!1),Ge===!1&&(K.strong=!1),Ie}}else if(he===" "&&(H.eat("*")||H.eat("_"))){if(H.peek()===" ")return d(K);H.backUp(1)}if(P.strikethrough){if(he==="~"&&H.eatWhile(he)){if(K.strikethrough){P.highlightFormatting&&(K.formatting="strikethrough");var Ie=d(K);return K.strikethrough=!1,Ie}else if(H.match(/^[^\s]/,!1))return K.strikethrough=!0,P.highlightFormatting&&(K.formatting="strikethrough"),d(K)}else if(he===" "&&H.match(/^~~/,!0)){if(H.peek()===" ")return d(K);H.backUp(2)}}if(P.emoji&&he===":"&&H.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){K.emoji=!0,P.highlightFormatting&&(K.formatting="emoji");var tt=d(K);return K.emoji=!1,tt}return he===" "&&(H.match(/^ +$/,!1)?K.trailingSpace++:K.trailingSpace&&(K.trailingSpaceNewLine=!0)),d(K)}function a(H,K){var Z=H.next();if(Z===">"){K.f=K.inline=o,P.highlightFormatting&&(K.formatting="link");var le=d(K);return le?le+=" ":le="",le+j.linkInline}return H.match(/^[^>]+/,!0),j.linkInline}function x(H,K){if(H.eatSpace())return null;var Z=H.next();return Z==="("||Z==="["?(K.f=K.inline=m(Z==="("?")":"]"),P.highlightFormatting&&(K.formatting="link-string"),K.linkHref=!0,d(K)):"error"}var E={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function m(H){return function(K,Z){var le=K.next();if(le===H){Z.f=Z.inline=o,P.highlightFormatting&&(Z.formatting="link-string");var he=d(Z);return Z.linkHref=!1,he}return K.match(E[H]),Z.linkHref=!0,d(Z)}}function _(H,K){return H.match(/^([^\]\\]|\\.)*\]:/,!1)?(K.f=I,H.next(),P.highlightFormatting&&(K.formatting="link"),K.linkText=!0,d(K)):u(H,K,o)}function I(H,K){if(H.match(/^\]:/,!0)){K.f=K.inline=U,P.highlightFormatting&&(K.formatting="link");var Z=d(K);return K.linkText=!1,Z}return H.match(/^([^\]\\]|\\.)+/,!0),j.linkText}function U(H,K){return H.eatSpace()?null:(H.match(/^[^\s]+/,!0),H.peek()===void 0?K.linkTitle=!0:H.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),K.f=K.inline=o,j.linkHref+" url")}var M={startState:function(){return{f:g,prevLine:{stream:null},thisLine:{stream:null},block:g,htmlState:null,indentation:0,inline:o,text:l,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(H){return{f:H.f,prevLine:H.prevLine,thisLine:H.thisLine,block:H.block,htmlState:H.htmlState&&q.copyState(Y,H.htmlState),indentation:H.indentation,localMode:H.localMode,localState:H.localMode?q.copyState(H.localMode,H.localState):null,inline:H.inline,text:H.text,formatting:!1,linkText:H.linkText,linkTitle:H.linkTitle,linkHref:H.linkHref,code:H.code,em:H.em,strong:H.strong,strikethrough:H.strikethrough,emoji:H.emoji,header:H.header,setext:H.setext,hr:H.hr,taskList:H.taskList,list:H.list,listStack:H.listStack.slice(0),quote:H.quote,indentedCode:H.indentedCode,trailingSpace:H.trailingSpace,trailingSpaceNewLine:H.trailingSpaceNewLine,md_inside:H.md_inside,fencedEndRE:H.fencedEndRE}},token:function(H,K){if(K.formatting=!1,H!=K.thisLine.stream){if(K.header=0,K.hr=!1,H.match(/^\s*$/,!0))return y(K),null;if(K.prevLine=K.thisLine,K.thisLine={stream:H},K.taskList=!1,K.trailingSpace=0,K.trailingSpaceNewLine=!1,!K.localState&&(K.f=K.block,K.f!=D)){var Z=H.match(/^\s*/,!0)[0].replace(/\t/g,i).length;if(K.indentation=Z,K.indentationDiff=null,Z>0)return null}}return K.f(H,K)},innerMode:function(H){return H.block==D?{state:H.htmlState,mode:Y}:H.localState?{state:H.localState,mode:H.localMode}:{state:H,mode:M}},indent:function(H,K,Z){return H.block==D&&Y.indent?Y.indent(H.htmlState,K,Z):H.localState&&H.localMode.indent?H.localMode.indent(H.localState,K,Z):q.Pass},blankLine:y,getType:d,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},lzim:function(ze,De,W){"use strict";var q=W("E7E6"),z=W.n(q);W.d(De,"C",function(){return z.a});var P=W("/GNS"),Y=W.n(P);W.d(De,"B",function(){return Y.a});var F=W("FOrL"),A=W.n(F);W.d(De,"v",function(){return A.a});var j=W("HpTS"),B=W.n(j);W.d(De,"D",function(){return B.a});var L=W("tWlo"),T=W.n(L);W.d(De,"b",function(){return T.a});var v=W("7ZXX"),C=W.n(v);W.d(De,"o",function(){return C.a});var k=W("GABl"),O=W.n(k);W.d(De,"g",function(){return O.a});var b=W("onxn"),p=W.n(b);W.d(De,"q",function(){return p.a});var c=W("nKGa"),i=W.n(c);W.d(De,"p",function(){return i.a});var u=W("4qgm"),h=W.n(u);W.d(De,"H",function(){return h.a});var R=W("JeFH"),y=W.n(R);W.d(De,"c",function(){return y.a});var g=W("ji0R"),D=W.n(g);W.d(De,"l",function(){return D.a});var S=W("W6BS"),d=W.n(S);W.d(De,"I",function(){return d.a});var l=W("kPYp"),o=W.n(l);W.d(De,"J",function(){return o.a});var a=W("nukY"),x=W.n(a),E=W("4u4S"),m=W.n(E),_=W("yslc"),I=W.n(_),U=W("l2Kq"),M=W.n(U);W.d(De,"u",function(){return M.a});var H=W("RMFE"),K=W.n(H);W.d(De,"r",function(){return K.a});var Z=W("TGq3"),le=W.n(Z);W.d(De,"s",function(){return le.a});var he=W("SMhR"),ye=W.n(he);W.d(De,"G",function(){return ye.a});var Ue=W("8/bI"),Me=W.n(Ue);W.d(De,"m",function(){return Me.a});var _e=W("JWDV"),Ie=W.n(_e);W.d(De,"e",function(){return Ie.a});var ke=W("Xsq0"),me=W.n(ke);W.d(De,"t",function(){return me.a});var ce=W("Ohmc"),te=W.n(ce);W.d(De,"d",function(){return te.a});var be=W("csWT"),ae=W.n(be);W.d(De,"f",function(){return ae.a});var we=W("7v3h"),Pe=W.n(we);W.d(De,"n",function(){return Pe.a});var Ce=W("cRFk"),Ve=W.n(Ce);W.d(De,"A",function(){return Ve.a});var Ge=W("kPWJ"),tt=W.n(Ge);W.d(De,"z",function(){return tt.a});var Je=W("qgvg"),Ye=W.n(Je);W.d(De,"w",function(){return Ye.a});var et=W("FPkq"),St=W.n(et);W.d(De,"y",function(){return St.a});var At=W("A/g1"),ht=W.n(At);W.d(De,"i",function(){return ht.a});var xt=W("Nmxd"),Tt=W.n(xt);W.d(De,"j",function(){return Tt.a});var Ot=W("5D2P"),Oe=W.n(Ot);W.d(De,"k",function(){return Oe.a});var Te=W("djh8"),rt=W.n(Te);W.d(De,"x",function(){return rt.a});var ot=W("Jq4h"),Ne=W.n(ot);W.d(De,"a",function(){return Ne.a});var $e=W("NhNJ"),xe=W.n($e);W.d(De,"E",function(){return xe.a});var fe=W("C6hP"),pe=W.n(fe);W.d(De,"F",function(){return pe.a});var re=W("uM6B"),ie=W.n(re);W.d(De,"h",function(){return ie.a})},n6Qo:function(ze,De,W){"use strict";W.d(De,"a",function(){return B});var q=W("q1tI"),z=W("biw7"),P=W("fyJ8");function Y(L){var T=L.className,v=L.index,C=L.children,k=L.colSpan,O=L.rowSpan,b=q.useContext(z.a),p=b.prefixCls,c=b.fixedInfoList,i=c[v];return q.createElement(P.a,Object.assign({className:T,index:v,component:"td",prefixCls:p,record:null,dataIndex:null,render:function(){return{children:C,props:{colSpan:k,rowSpan:O}}}},i))}function F(L){return q.createElement("tr",Object.assign({},L))}function A(L){var T=L.children,v=q.useContext(z.a),C=v.prefixCls;return q.createElement("tfoot",{className:"".concat(C,"-summary")},T)}var j=De.b=A,B={Cell:Y,Row:F}},nKGa:function(ze,De,W){ze.exports=W.p+"static/export_exercise-template.f7655c19.png"},nVVt:function(ze,De){ze.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nukY:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoTo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KT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},o5mm:function(ze,De,W){ze.exports={flex_box_center:"flex_box_center___yMfGk",flex_space_between:"flex_space_between___3T4Rr",flex_box_vertical_center:"flex_box_vertical_center___2K9ch",flex_box_center_end:"flex_box_center_end___1GgKp",flex_box_column:"flex_box_column___2DSuN",shixunWrp:"shixunWrp___2_2ep"}},onxn:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7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Zl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(ze,De,W){(function(q){q(W("VrN/"))})(function(q){"use strict";var z=q.Pos;function P(c,i){return c.line-i.line||c.ch-i.ch}var Y="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",F=Y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",A=new RegExp("<(/?)(["+Y+"]["+F+"]*)","g");function j(c,i,u,h){this.line=i,this.ch=u,this.cm=c,this.text=c.getLine(i),this.min=h?Math.max(h.from,c.firstLine()):c.firstLine(),this.max=h?Math.min(h.to-1,c.lastLine()):c.lastLine()}function B(c,i){var u=c.cm.getTokenTypeAt(z(c.line,i));return u&&/\btag\b/.test(u)}function L(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function T(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function v(c){for(;;){var i=c.text.indexOf(">",c.ch);if(i==-1){if(L(c))continue;return}if(!B(c,i+1)){c.ch=i+1;continue}var u=c.text.lastIndexOf("/",i),h=u>-1&&!/\S/.test(c.text.slice(u+1,i));return c.ch=i+1,h?"selfClose":"regular"}}function C(c){for(;;){var i=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(i==-1){if(T(c))continue;return}if(!B(c,i+1)){c.ch=i;continue}A.lastIndex=i,c.ch=i;var u=A.exec(c.text);if(u&&u.index==i)return u}}function k(c){for(;;){A.lastIndex=c.ch;var i=A.exec(c.text);if(!i){if(L(c))continue;return}if(!B(c,i.index+1)){c.ch=i.index+1;continue}return c.ch=i.index+i[0].length,i}}function O(c){for(;;){var i=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(i==-1){if(T(c))continue;return}if(!B(c,i+1)){c.ch=i;continue}var u=c.text.lastIndexOf("/",i),h=u>-1&&!/\S/.test(c.text.slice(u+1,i));return c.ch=i+1,h?"selfClose":"regular"}}function b(c,i){for(var u=[];;){var h=k(c),R,y=c.line,g=c.ch-(h?h[0].length:0);if(!h||!(R=v(c)))return;if(R=="selfClose")continue;if(h[1]){for(var D=u.length-1;D>=0;--D)if(u[D]==h[2]){u.length=D;break}if(D<0&&(!i||i==h[2]))return{tag:h[2],from:z(y,g),to:z(c.line,c.ch)}}else u.push(h[2])}}function p(c,i){for(var u=[];;){var h=O(c);if(!h)return;if(h=="selfClose"){C(c);continue}var R=c.line,y=c.ch,g=C(c);if(!g)return;if(g[1])u.push(g[2]);else{for(var D=u.length-1;D>=0;--D)if(u[D]==g[2]){u.length=D;break}if(D<0&&(!i||i==g[2]))return{tag:g[2],from:z(c.line,c.ch),to:z(R,y)}}}}q.registerHelper("fold","xml",function(c,i){for(var u=new j(c,i.line,0);;){var h=k(u);if(!h||u.line!=i.line)return;var R=v(u);if(!R)return;if(!h[1]&&R!="selfClose"){var y=z(u.line,u.ch),g=b(u,h[2]);return g&&P(g.from,y)>0?{from:y,to:g.from}:null}}}),q.findMatchingTag=function(c,i,u){var h=new j(c,i.line,i.ch,u);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var R=v(h),y=R&&z(h.line,h.ch),g=R&&C(h);if(!R||!g||P(h,i)>0)return;var D={from:z(h.line,h.ch),to:y,tag:g[2]};return R=="selfClose"?{open:D,close:null,at:"open"}:g[1]?{open:p(h,g[2]),close:D,at:"close"}:(h=new j(c,y.line,y.ch,u),{open:D,close:b(h,g[2]),at:"open"})},q.findEnclosingTag=function(c,i,u,h){for(var R=new j(c,i.line,i.ch,u);;){var y=p(R,h);if(!y)break;var g=new j(c,i.line,i.ch,u),D=b(g,y.tag);if(D)return{open:y,close:D}}},q.scanForClosingTag=function(c,i,u,h){var R=new j(c,i.line,i.ch,h?{from:0,to:h}:null);return b(R,u)}})},p5ED:function(ze,De,W){"use strict";var q=W("+L6B"),z=W("2/Rp"),P=W("5Dmo"),Y=W("3S7+"),F=W("k1fw"),A=W("tJVT"),j=W("q1tI"),B=W.n(j),L=W("vHTk"),T=W.n(L),v=W("yEEn"),C=W("ZW9T"),k=W("1vsH");De.a=function(O){var b=O.name,p=O.data,c=O.theme,i=O.type,u=O.filename,h=O.monacoEditor,R=O.className,y=O.style,g=O.close,D=O.onClose,S=O.hasMask,d=Object(j.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),l=Object(A.a)(d,2),o=l[0],a=l[1],x=Object(j.useState)(""),E=Object(A.a)(x,2),m=E[0],_=E[1],I=Object(j.useRef)();u&&(h.filename=u),Object(j.useEffect)(function(){var H,K,Z=(H=document.cookie)===null||H===void 0||((K=H.replace(/\s/g,""))===null||K===void 0)?void 0:K.split(";");Z==null||Z.map(function(le){var he=le.split("=");he[0]==="_educoder_session"&&_(he[1])})},[]);var U=function(){if(p.startsWith("http")||p.startsWith("/")){M();return}Object(k.x)(u||"educoder",p,u)},M=function(){Object(k.v)(u||b,p)};return console.log("data:",p,"fileanme:",u," name:",b),B.a.createElement("div",{style:Object(F.a)({},y||{}),className:"".concat(S&&T.a.bgBlack," ").concat(i?T.a.wrp:"hide")},g&&B.a.createElement("div",{className:T.a.close,ref:I},B.a.createElement(Y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return I.current}},B.a.createElement("span",{onClick:M},B.a.createElement("i",{className:"icon-quxiaozhiding"}))),B.a.createElement(Y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return I.current}},B.a.createElement("span",{className:"",onClick:D},B.a.createElement("i",{className:"icon-guanbi1"})))),B.a.createElement("div",{className:"".concat(T.a[R]," ").concat(R," ").concat(T.a.monaco," ").concat(i==="txt"?"show":"hide")},i==="txt"&&B.a.createElement(C.b,h)),i==="audio"&&B.a.createElement("audio",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?p:"data:audio/mp3;base64,").concat(p),autoPlay:!0}),i==="video"&&B.a.createElement(B.a.Fragment,null,p!=null&&p.startsWith("/")?B.a.createElement("video",{controls:!0,src:"".concat(p),autoPlay:!0}):B.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(p),autoPlay:!0})),i==="html"&&B.a.createElement("iframe",{src:p+"&disposition=inline"}),i==="pdf"&&B.a.createElement("embed",{className:T.a.embed,src:p}),i==="image"&&B.a.createElement(B.a.Fragment,null,B.a.createElement("img",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(p)})),i==="other"&&B.a.createElement("div",null,B.a.createElement(z.a,{type:"primary",size:"large",onClick:U},B.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(i==="download"||i==="office")&&B.a.createElement(z.a,{type:"primary",size:"large",onClick:U},B.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ze,De,W){},qgvg:function(ze,De){ze.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSV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VyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+":function(ze,De,W){"use strict";W.d(De,"a",function(){return z});var q=W("Qw5x");function z(P,Y){var F;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(F=Object(q.a)(P))||Y&&P&&typeof P.length=="number"){F&&(P=F);var A=0,j=function(){};return{s:j,n:function(){return A>=P.length?{done:!0}:{done:!1,value:P[A++]}},e:function(C){throw C},f:j}}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 B=!0,L=!1,T;return{s:function(){F=P[Symbol.iterator]()},n:function(){var C=F.next();return B=C.done,C},e:function(C){L=!0,T=C},f:function(){try{!B&&F.return!=null&&F.return()}finally{if(L)throw T}}}}},rUJ1:function(ze,De){const W=/[&<>"']/,q=/[&<>"']/g,z=/[<>"']|&(?!#?\w+;)/,P=/[<>"']|&(?!#?\w+;)/g,Y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F=S=>Y[S];function A(S,d){if(d){if(W.test(S))return S.replace(q,F)}else if(z.test(S))return S.replace(P,F);return S}const j=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function B(S){return S.replace(j,(d,l)=>(l=l.toLowerCase(),l==="colon"?":":l.charAt(0)==="#"?l.charAt(1)==="x"?String.fromCharCode(parseInt(l.substring(2),16)):String.fromCharCode(+l.substring(1)):""))}const L=/(^|[^\[])\^/g;function T(S,d){S=S.source||S,d=d||"";const l={replace:(o,a)=>(a=a.source||a,a=a.replace(L,"$1"),S=S.replace(o,a),l),getRegex:()=>new RegExp(S,d)};return l}const v=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(S,d,l){if(S){let o;try{o=decodeURIComponent(B(l)).replace(v,"").toLowerCase()}catch(a){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}d&&!C.test(l)&&(l=i(d,l));try{l=encodeURI(l).replace(/%25/g,"%")}catch(o){return null}return l}const O={},b=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(S,d){O[" "+S]||(b.test(S)?O[" "+S]=S+"/":O[" "+S]=y(S,"/",!0)),S=O[" "+S];const l=S.indexOf(":")===-1;return d.substring(0,2)==="//"?l?d:S.replace(p,"$1")+d:d.charAt(0)==="/"?l?d:S.replace(c,"$1")+d:S+d}const u={exec:function(){}};function h(S){let d=1,l,o;for(;d<arguments.length;d++){l=arguments[d];for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(S[o]=l[o])}return S}function R(S,d){const l=S.replace(/\|/g,(x,E,m)=>{let _=!1,I=E;for(;--I>=0&&m[I]==="\\";)_=!_;return _?"|":" |"}),o=l.split(/ \|/);let a=0;if(o.length>d)o.splice(d);else for(;o.length<d;)o.push("");for(;a<o.length;a++)o[a]=o[a].trim().replace(/\\\|/g,"|");return o}function y(S,d,l){const o=S.length;if(o===0)return"";let a=0;for(;a<o;){const x=S.charAt(o-a-1);if(x===d&&!l)a++;else if(x!==d&&l)a++;else break}return S.substr(0,o-a)}function g(S,d){if(S.indexOf(d[1])===-1)return-1;const l=S.length;let o=0,a=0;for(;a<l;a++)if(S[a]==="\\")a++;else if(S[a]===d[0])o++;else if(S[a]===d[1]&&(o--,o<0))return a;return-1}function D(S){S&&S.sanitize&&!S.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ze.exports={escape:A,unescape:B,edit:T,cleanUrl:k,resolveUrl:i,noopTest:u,merge:h,splitCells:R,rtrim:y,findClosingBracket:g,checkSanitizeDeprecation:D}},rcnY:function(ze,De,W){var q=W("aRTE");function z(P,Y){this.totalCount=P,this.dataCount=Y}z.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],z.getRSBlocks=function(P,Y){var F=z.getRsBlockTable(P,Y);if(F==null)throw new Error("bad rs block @ typeNumber:"+P+"/errorCorrectLevel:"+Y);for(var A=F.length/3,j=new Array,B=0;B<A;B++)for(var L=F[B*3+0],T=F[B*3+1],v=F[B*3+2],C=0;C<L;C++)j.push(new z(T,v));return j},z.getRsBlockTable=function(P,Y){switch(Y){case q.L:return z.RS_BLOCK_TABLE[(P-1)*4+0];case q.M:return z.RS_BLOCK_TABLE[(P-1)*4+1];case q.Q:return z.RS_BLOCK_TABLE[(P-1)*4+2];case q.H:return z.RS_BLOCK_TABLE[(P-1)*4+3];default:return}},ze.exports=z},sR1s:function(ze,De,W){"use strict";W.d(De,"b",function(){return Y}),W.d(De,"a",function(){return F}),W.d(De,"c",function(){return A}),W.d(De,"d",function(){return j});var q=W("U8pU"),z="RC_TABLE_KEY";function P(B){return B==null?[]:Array.isArray(B)?B:[B]}function Y(B,L){if(!L&&typeof L!="number")return B;for(var T=P(L),v=B,C=0;C<T.length;C+=1){if(!v)return null;var k=T[C];v=v[k]}return v}function F(B){var L=[],T={};return B.forEach(function(v){for(var C=v||{},k=C.key,O=C.dataIndex,b=k||P(O).join("-")||z;T[b];)b="".concat(b,"_next");T[b]=!0,L.push(b)}),L}function A(){var B={};function L(k,O){O&&Object.keys(O).forEach(function(b){var p=O[b];p&&Object(q.a)(p)==="object"?(k[b]=k[b]||{},L(k[b],p)):k[b]=p})}for(var T=arguments.length,v=new Array(T),C=0;C<T;C++)v[C]=arguments[C];return v.forEach(function(k){L(B,k)}),B}function j(B){return B!=null}},sboe:function(ze,De,W){"use strict";W.d(De,"a",function(){return P});var q=W("q1tI"),z=W.n(q),P=q.createContext(null)},t23M:function(ze,De,W){"use strict";var q=W("VTBJ"),z=W("1OyB"),P=W("vuIU"),Y=W("Ji7U"),F=W("LK+K"),A=W("q1tI"),j=W.n(A),B=W("m+aA"),L=W("Zm9Q"),T=W("Kwbf"),v=W("c+Xe"),C=W("bdgK"),k="rc-observer-key",O=function(b){Object(Y.a)(c,b);var p=Object(F.a)(c);function c(){var i;return Object(z.a)(this,c),i=p.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(u){var h=i.props.onResize,R=u[0].target,y=R.getBoundingClientRect(),g=y.width,D=y.height,S=R.offsetWidth,d=R.offsetHeight,l=Math.floor(g),o=Math.floor(D);if(i.state.width!==l||i.state.height!==o||i.state.offsetWidth!==S||i.state.offsetHeight!==d){var a={width:l,height:o,offsetWidth:S,offsetHeight:d};i.setState(a),h&&Promise.resolve().then(function(){h(Object(q.a)(Object(q.a)({},a),{},{offsetWidth:S,offsetHeight:d}))})}},i.setChildNode=function(u){i.childNode=u},i}return Object(P.a)(c,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var u=this.props.disabled;if(u){this.destroyObserver();return}var h=Object(B.a)(this.childNode||this),R=h!==this.currentElement;R&&(this.destroyObserver(),this.currentElement=h),!this.resizeObserver&&h&&(this.resizeObserver=new C.default(this.onResize),this.resizeObserver.observe(h))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var u=this.props.children,h=Object(L.a)(u);if(h.length>1)Object(T.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(h.length===0)return Object(T.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var R=h[0];if(A.isValidElement(R)&&Object(v.c)(R)){var y=R.ref;h[0]=A.cloneElement(R,{ref:Object(v.a)(y,this.setChildNode)})}return h.length===1?h[0]:h.map(function(g,D){return!A.isValidElement(g)||"key"in g&&g.key!==null?g:A.cloneElement(g,{key:"".concat(k,"-").concat(D)})})}}]),c}(A.Component);O.displayName="ResizeObserver",De.a=O},tWlo:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlI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IjyAqPzoQl2UPnXtVKPpLycj4QFrI2OJATazowiZYKBAQCjQEBEFNt7ZDyWGeQlEx2zrH1kk5tJNYYOi7aIBAQCFy7CGDm8Hy9+z+xhIMEHZbTJwAAAABJRU5ErkJggg=="},ulZh:function(ze,De,W){typeof window!="undefined"&&function(z,P){ze.exports=P()}(this,function(){return function(q){var z={};function P(Y){if(z[Y])return z[Y].exports;var F=z[Y]={i:Y,l:!1,exports:{}};return q[Y].call(F.exports,F,F.exports,P),F.l=!0,F.exports}return P.m=q,P.c=z,P.d=function(Y,F,A){P.o(Y,F)||Object.defineProperty(Y,F,{enumerable:!0,get:A})},P.r=function(Y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Y,"__esModule",{value:!0})},P.t=function(Y,F){if(F&1&&(Y=P(Y)),F&8)return Y;if(F&4&&typeof Y=="object"&&Y&&Y.__esModule)return Y;var A=Object.create(null);if(P.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:Y}),F&2&&typeof Y!="string")for(var j in Y)P.d(A,j,function(B){return Y[B]}.bind(null,j));return A},P.n=function(Y){var F=Y&&Y.__esModule?function(){return Y.default}:function(){return Y};return P.d(F,"a",F),F},P.o=function(Y,F){return Object.prototype.hasOwnProperty.call(Y,F)},P.p="/dist/",P(P.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(q,z,P){"use strict";var Y=Object.prototype.hasOwnProperty,F="~";function A(){}Object.create&&(A.prototype=Object.create(null),new A().__proto__||(F=!1));function j(v,C,k){this.fn=v,this.context=C,this.once=k||!1}function B(v,C,k,O,b){if(typeof k!="function")throw new TypeError("The listener must be a function");var p=new j(k,O||v,b),c=F?F+C:C;return v._events[c]?v._events[c].fn?v._events[c]=[v._events[c],p]:v._events[c].push(p):(v._events[c]=p,v._eventsCount++),v}function L(v,C){--v._eventsCount===0?v._events=new A:delete v._events[C]}function T(){this._events=new A,this._eventsCount=0}T.prototype.eventNames=function(){var C=[],k,O;if(this._eventsCount===0)return C;for(O in k=this._events)Y.call(k,O)&&C.push(F?O.slice(1):O);return Object.getOwnPropertySymbols?C.concat(Object.getOwnPropertySymbols(k)):C},T.prototype.listeners=function(C){var k=F?F+C:C,O=this._events[k];if(!O)return[];if(O.fn)return[O.fn];for(var b=0,p=O.length,c=new Array(p);b<p;b++)c[b]=O[b].fn;return c},T.prototype.listenerCount=function(C){var k=F?F+C:C,O=this._events[k];return O?O.fn?1:O.length:0},T.prototype.emit=function(C,k,O,b,p,c){var i=F?F+C:C;if(!this._events[i])return!1;var u=this._events[i],h=arguments.length,R,y;if(u.fn){u.once&&this.removeListener(C,u.fn,void 0,!0);switch(h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,k),!0;case 3:return u.fn.call(u.context,k,O),!0;case 4:return u.fn.call(u.context,k,O,b),!0;case 5:return u.fn.call(u.context,k,O,b,p),!0;case 6:return u.fn.call(u.context,k,O,b,p,c),!0}for(y=1,R=new Array(h-1);y<h;y++)R[y-1]=arguments[y];u.fn.apply(u.context,R)}else{var g=u.length,D;for(y=0;y<g;y++){u[y].once&&this.removeListener(C,u[y].fn,void 0,!0);switch(h){case 1:u[y].fn.call(u[y].context);break;case 2:u[y].fn.call(u[y].context,k);break;case 3:u[y].fn.call(u[y].context,k,O);break;case 4:u[y].fn.call(u[y].context,k,O,b);break;default:if(!R)for(D=1,R=new Array(h-1);D<h;D++)R[D-1]=arguments[D];u[y].fn.apply(u[y].context,R)}}}return!0},T.prototype.on=function(C,k,O){return B(this,C,k,O,!1)},T.prototype.once=function(C,k,O){return B(this,C,k,O,!0)},T.prototype.removeListener=function(C,k,O,b){var p=F?F+C:C;if(!this._events[p])return this;if(!k)return L(this,p),this;var c=this._events[p];if(c.fn)c.fn===k&&(!b||c.once)&&(!O||c.context===O)&&L(this,p);else{for(var i=0,u=[],h=c.length;i<h;i++)(c[i].fn!==k||b&&!c[i].once||O&&c[i].context!==O)&&u.push(c[i]);u.length?this._events[p]=u.length===1?u[0]:u:L(this,p)}return this},T.prototype.removeAllListeners=function(C){var k;return C?(k=F?F+C:C,this._events[k]&&L(this,k)):(this._events=new A,this._eventsCount=0),this},T.prototype.off=T.prototype.removeListener,T.prototype.addListener=T.prototype.on,T.prefixed=F,T.EventEmitter=T,q.exports=T},"./node_modules/url-toolkit/src/url-toolkit.js":function(q,z,P){(function(Y){var F=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,A=/^([^\/?#]*)([^]*)$/,j=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,L={buildAbsoluteURL:function(T,v,C){if(C=C||{},T=T.trim(),v=v.trim(),!v){if(!C.alwaysNormalize)return T;var k=L.parseURL(T);if(!k)throw new Error("Error trying to parse base URL.");return k.path=L.normalizePath(k.path),L.buildURLFromParts(k)}var O=L.parseURL(v);if(!O)throw new Error("Error trying to parse relative URL.");if(O.scheme)return C.alwaysNormalize?(O.path=L.normalizePath(O.path),L.buildURLFromParts(O)):v;var b=L.parseURL(T);if(!b)throw new Error("Error trying to parse base URL.");if(!b.netLoc&&b.path&&b.path[0]!=="/"){var p=A.exec(b.path);b.netLoc=p[1],b.path=p[2]}b.netLoc&&!b.path&&(b.path="/");var c={scheme:b.scheme,netLoc:O.netLoc,path:null,params:O.params,query:O.query,fragment:O.fragment};if(!O.netLoc&&(c.netLoc=b.netLoc,O.path[0]!=="/"))if(!O.path)c.path=b.path,O.params||(c.params=b.params,O.query||(c.query=b.query));else{var i=b.path,u=i.substring(0,i.lastIndexOf("/")+1)+O.path;c.path=L.normalizePath(u)}return c.path===null&&(c.path=C.alwaysNormalize?L.normalizePath(O.path):O.path),L.buildURLFromParts(c)},parseURL:function(T){var v=F.exec(T);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(T){for(T=T.split("").reverse().join("").replace(j,"");T.length!==(T=T.replace(B,"")).length;);return T.split("").reverse().join("")},buildURLFromParts:function(T){return T.scheme+T.netLoc+T.path+T.params+T.query+T.fragment}};q.exports=L})(this)},"./node_modules/webworkify-webpack/index.js":function(q,z,P){function Y(C){var k={};function O(p){if(k[p])return k[p].exports;var c=k[p]={i:p,l:!1,exports:{}};return C[p].call(c.exports,c,c.exports,O),c.l=!0,c.exports}O.m=C,O.c=k,O.i=function(p){return p},O.d=function(p,c,i){O.o(p,c)||Object.defineProperty(p,c,{configurable:!1,enumerable:!0,get:i})},O.r=function(p){Object.defineProperty(p,"__esModule",{value:!0})},O.n=function(p){var c=p&&p.__esModule?function(){return p.default}:function(){return p};return O.d(c,"a",c),c},O.o=function(p,c){return Object.prototype.hasOwnProperty.call(p,c)},O.p="/",O.oe=function(p){throw console.error(p),p};var b=O(O.s=ENTRY_MODULE);return b.default||b}var F="[\\.|\\-|\\+|\\w|/|@]+",A="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+F+").*?\\)";function j(C){return(C+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function B(C){return!isNaN(1*C)}function L(C,k,O){var b={};b[O]=[];var p=k.toString(),c=p.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return b;for(var i=c[1],u=new RegExp("(\\\\n|\\W)"+j(i)+A,"g"),h;h=u.exec(p);){if(h[3]==="dll-reference")continue;b[O].push(h[3])}for(u=new RegExp("\\("+j(i)+'\\("(dll-reference\\s('+F+'))"\\)\\)'+A,"g");h=u.exec(p);)C[h[2]]||(b[O].push(h[1]),C[h[2]]=P(h[1]).m),b[h[2]]=b[h[2]]||[],b[h[2]].push(h[4]);for(var R=Object.keys(b),y=0;y<R.length;y++)for(var g=0;g<b[R[y]].length;g++)B(b[R[y]][g])&&(b[R[y]][g]=1*b[R[y]][g]);return b}function T(C){var k=Object.keys(C);return k.reduce(function(O,b){return O||C[b].length>0},!1)}function v(C,k){for(var O={main:[k]},b={main:[]},p={main:{}};T(O);)for(var c=Object.keys(O),i=0;i<c.length;i++){var u=c[i],h=O[u],R=h.pop();if(p[u]=p[u]||{},p[u][R]||!C[u][R])continue;p[u][R]=!0,b[u]=b[u]||[],b[u].push(R);for(var y=L(C,C[u][R],u),g=Object.keys(y),D=0;D<g.length;D++)O[g[D]]=O[g[D]]||[],O[g[D]]=O[g[D]].concat(y[g[D]])}return b}q.exports=function(C,k){k=k||{};var O={main:P.m},b=k.all?{main:Object.keys(O.main)}:v(O,C),p="";Object.keys(b).filter(function(R){return R!=="main"}).forEach(function(R){for(var y=0;b[R][y];)y++;b[R].push(y),O[R][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",p=p+"var "+R+" = ("+Y.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+b[R].map(function(g){return""+JSON.stringify(g)+": "+O[R][g].toString()}).join(",")+`});
`}),p=p+"new (("+Y.toString().replace("ENTRY_MODULE",JSON.stringify(C))+")({"+b.main.map(function(R){return""+JSON.stringify(R)+": "+O.main[R].toString()}).join(",")+"}))(self);";var c=new window.Blob([p],{type:"text/javascript"});if(k.bare)return c;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,u=i.createObjectURL(c),h=new window.Worker(u);return h.objectURL=u,h}},"./src/config.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"hlsDefaultConfig",function(){return D}),P.d(z,"mergeConfig",function(){return d}),P.d(z,"enableStreamingMode",function(){return l});var Y=P("./src/controller/abr-controller.ts"),F=P("./src/controller/audio-stream-controller.ts"),A=P("./src/controller/audio-track-controller.ts"),j=P("./src/controller/subtitle-stream-controller.ts"),B=P("./src/controller/subtitle-track-controller.ts"),L=P("./src/controller/buffer-controller.ts"),T=P("./src/controller/timeline-controller.ts"),v=P("./src/controller/cap-level-controller.ts"),C=P("./src/controller/fps-controller.ts"),k=P("./src/controller/eme-controller.ts"),O=P("./src/controller/cmcd-controller.ts"),b=P("./src/utils/xhr-loader.ts"),p=P("./src/utils/fetch-loader.ts"),c=P("./src/utils/cues.ts"),i=P("./src/utils/mediakeys-helper.ts"),u=P("./src/utils/logger.ts");function h(){return h=Object.assign||function(o){for(var a=1;a<arguments.length;a++){var x=arguments[a];for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(o[E]=x[E])}return o},h.apply(this,arguments)}function R(o,a){var x=Object.keys(o);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(o);a&&(E=E.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),x.push.apply(x,E)}return x}function y(o){for(var a=1;a<arguments.length;a++){var x=arguments[a]!=null?arguments[a]:{};a%2?R(Object(x),!0).forEach(function(E){g(o,E,x[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(x)):R(Object(x)).forEach(function(E){Object.defineProperty(o,E,Object.getOwnPropertyDescriptor(x,E))})}return o}function g(o,a,x){return a in o?Object.defineProperty(o,a,{value:x,enumerable:!0,configurable:!0,writable:!0}):o[a]=x,o}var D=y(y({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:b.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Y.default,bufferController:L.default,capLevelController:v.default,fpsController:C.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},S()),{},{subtitleStreamController:j.SubtitleStreamController,subtitleTrackController:B.default,timelineController:T.TimelineController,audioStreamController:F.default,audioTrackController:A.default,emeController:k.default,cmcdController:O.default});function S(){return{cueHandler:c.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function d(o,a){if((a.liveSyncDurationCount||a.liveMaxLatencyDurationCount)&&(a.liveSyncDuration||a.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(a.liveMaxLatencyDurationCount!==void 0&&(a.liveSyncDurationCount===void 0||a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(a.liveMaxLatencyDuration!==void 0&&(a.liveSyncDuration===void 0||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return h({},o,a)}function l(o){var a=o.loader;if(a!==p.default&&a!==b.default)u.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),o.progressive=!1;else{var x=Object(p.fetchSupported)();x&&(o.loader=p.default,o.progressive=!0,o.enableSoftwareAES=!0,u.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/ewma-bandwidth-estimator.ts"),A=P("./src/events.ts"),j=P("./src/utils/buffer-helper.ts"),B=P("./src/errors.ts"),L=P("./src/types/loader.ts"),T=P("./src/utils/logger.ts");function v(O,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(O,c.key,c)}}function C(O,b,p){return b&&v(O.prototype,b),p&&v(O,p),O}var k=function(){function O(p){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=p;var c=p.config;this.bwEstimator=new F.default(c.abrEwmaSlowVoD,c.abrEwmaFastVoD,c.abrEwmaDefaultEstimate),this.registerListeners()}var b=O.prototype;return b.registerListeners=function(){var c=this.hls;c.on(A.Events.FRAG_LOADING,this.onFragLoading,this),c.on(A.Events.FRAG_LOADED,this.onFragLoaded,this),c.on(A.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(A.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){var c=this.hls;c.off(A.Events.FRAG_LOADING,this.onFragLoading,this),c.off(A.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(A.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(A.Events.ERROR,this.onError,this)},b.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},b.onFragLoading=function(c,i){var u=i.frag;if(u.type===L.PlaylistLevelType.MAIN&&!this.timer){var h;this.fragCurrent=u,this.partCurrent=(h=i.part)!=null?h:null,this.timer=self.setInterval(this.onCheck,100)}},b.onLevelLoaded=function(c,i){var u=this.hls.config;i.details.live?this.bwEstimator.update(u.abrEwmaSlowLive,u.abrEwmaFastLive):this.bwEstimator.update(u.abrEwmaSlowVoD,u.abrEwmaFastVoD)},b._abandonRulesCheck=function(){var c=this.fragCurrent,i=this.partCurrent,u=this.hls,h=u.autoLevelEnabled,R=u.config,y=u.media;if(!c||!y)return;var g=i?i.stats:c.stats,D=i?i.duration:c.duration;if(g.aborted){T.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!h||y.paused||!y.playbackRate||!y.readyState)return;var S=performance.now()-g.loading.start,d=Math.abs(y.playbackRate);if(S<=500*D/d)return;var l=u.levels,o=u.minAutoLevel,a=l[c.level],x=g.total||Math.max(g.loaded,Math.round(D*a.maxBitrate/8)),E=Math.max(1,g.bwEstimate?g.bwEstimate/8:g.loaded*1e3/S),m=(x-g.loaded)/E,_=y.currentTime,I=(j.BufferHelper.bufferInfo(y,_,R.maxBufferHole).end-_)/d;if(I>=2*D/d||m<=I)return;var U=Number.POSITIVE_INFINITY,M;for(M=c.level-1;M>o;M--){var H=l[M].maxBitrate;if(U=D*H/(8*.8*E),U<I)break}if(U>=m)return;var K=this.bwEstimator.getEstimate();T.logger.warn("Fragment "+c.sn+(i?" part "+i.index:"")+" of level "+c.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+`
Current BW estimate: `+(Object(Y.isFiniteNumber)(K)?(K/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+m.toFixed(3)+` s
Estimated load time for the next fragment: `+U.toFixed(3)+` s
Time to underbuffer: `+I.toFixed(3)+" s"),u.nextLoadLevel=M,this.bwEstimator.sample(S,g.loaded),this.clearTimer(),c.loader&&(this.fragCurrent=this.partCurrent=null,c.loader.abort()),u.trigger(A.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:c,part:i,stats:g})},b.onFragLoaded=function(c,i){var u=i.frag,h=i.part;if(u.type===L.PlaylistLevelType.MAIN&&Object(Y.isFiniteNumber)(u.sn)){var R=h?h.stats:u.stats,y=h?h.duration:u.duration;if(this.clearTimer(),this.lastLoadedFragLevel=u.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var g=this.hls.levels[u.level],D=(g.loaded?g.loaded.bytes:0)+R.loaded,S=(g.loaded?g.loaded.duration:0)+y;g.loaded={bytes:D,duration:S},g.realBitrate=Math.round(8*D/S)}if(u.bitrateTest){var d={stats:R,frag:u,part:h,id:u.type};this.onFragBuffered(A.Events.FRAG_BUFFERED,d),u.bitrateTest=!1}}},b.onFragBuffered=function(c,i){var u=i.frag,h=i.part,R=h?h.stats:u.stats;if(R.aborted)return;if(u.type!==L.PlaylistLevelType.MAIN||u.sn==="initSegment")return;var y=R.parsing.end-R.loading.start;this.bwEstimator.sample(y,R.loaded),R.bwEstimate=this.bwEstimator.getEstimate(),u.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},b.onError=function(c,i){switch(i.details){case B.ErrorDetails.FRAG_LOAD_ERROR:case B.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},b.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},b.getNextABRAutoLevel=function(){var c=this.fragCurrent,i=this.partCurrent,u=this.hls,h=u.maxAutoLevel,R=u.config,y=u.minAutoLevel,g=u.media,D=i?i.duration:c?c.duration:0,S=g?g.currentTime:0,d=g&&g.playbackRate!==0?Math.abs(g.playbackRate):1,l=this.bwEstimator?this.bwEstimator.getEstimate():R.abrEwmaDefaultEstimate,o=(j.BufferHelper.bufferInfo(g,S,R.maxBufferHole).end-S)/d,a=this.findBestLevel(l,y,h,o,R.abrBandWidthFactor,R.abrBandWidthUpFactor);if(a>=0)return a;T.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var x=D?Math.min(D,R.maxStarvationDelay):R.maxStarvationDelay,E=R.abrBandWidthFactor,m=R.abrBandWidthUpFactor;if(!o){var _=this.bitrateTestDelay;if(_){var I=D?Math.min(D,R.maxLoadingDelay):R.maxLoadingDelay;x=I-_,T.logger.trace("bitrate test took "+Math.round(1e3*_)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*x)+" ms"),E=m=1}}return a=this.findBestLevel(l,y,h,o+x,E,m),Math.max(a,0)},b.findBestLevel=function(c,i,u,h,R,y){for(var g,D=this.fragCurrent,S=this.partCurrent,d=this.lastLoadedFragLevel,l=this.hls.levels,o=l[d],a=!!(o!=null&&(g=o.details)!==null&&g!==void 0&&g.live),x=o==null?void 0:o.codecSet,E=S?S.duration:D?D.duration:0,m=u;m>=i;m--){var _=l[m];if(!_||x&&_.codecSet!==x)continue;var I=_.details,U=(S?I==null?void 0:I.partTarget:I==null?void 0:I.averagetargetduration)||E,M=void 0;m<=d?M=R*c:M=y*c;var H=l[m].maxBitrate,K=H*U/M;if(T.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(M)+"/"+H+"/"+U+"/"+h+"/"+K),M>H&&(!K||a&&!this.bitrateTestDelay||K<h))return m}return-1},C(O,[{key:"nextAutoLevel",get:function(){var c=this._nextAutoLevel,i=this.bwEstimator;if(c!==-1&&(!i||!i.canEstimate()))return c;var u=this.getNextABRAutoLevel();return c!==-1&&(u=Math.min(c,u)),u},set:function(c){this._nextAutoLevel=c}}]),O}();z.default=k},"./src/controller/audio-stream-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/polyfills/number.ts"),F=P("./src/controller/base-stream-controller.ts"),A=P("./src/events.ts"),j=P("./src/utils/buffer-helper.ts"),B=P("./src/controller/fragment-tracker.ts"),L=P("./src/types/level.ts"),T=P("./src/types/loader.ts"),v=P("./src/loader/fragment.ts"),C=P("./src/demux/chunk-cache.ts"),k=P("./src/demux/transmuxer-interface.ts"),O=P("./src/types/transmuxer.ts"),b=P("./src/controller/fragment-finders.ts"),p=P("./src/utils/discontinuities.ts"),c=P("./src/errors.ts"),i=P("./src/utils/logger.ts");function u(){return u=Object.assign||function(D){for(var S=1;S<arguments.length;S++){var d=arguments[S];for(var l in d)Object.prototype.hasOwnProperty.call(d,l)&&(D[l]=d[l])}return D},u.apply(this,arguments)}function h(D,S){D.prototype=Object.create(S.prototype),D.prototype.constructor=D,R(D,S)}function R(D,S){return R=Object.setPrototypeOf||function(l,o){return l.__proto__=o,l},R(D,S)}var y=100,g=function(D){h(S,D);function S(l,o){var a;return a=D.call(this,l,o,"[audio-stream-controller]")||this,a.videoBuffer=null,a.videoTrackCC=-1,a.waitingVideoCC=-1,a.audioSwitch=!1,a.trackId=-1,a.waitingData=null,a.mainDetails=null,a.bufferFlushed=!1,a._registerListeners(),a}var d=S.prototype;return d.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},d._registerListeners=function(){var o=this.hls;o.on(A.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(A.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.on(A.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.on(A.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(A.Events.ERROR,this.onError,this),o.on(A.Events.BUFFER_RESET,this.onBufferReset,this),o.on(A.Events.BUFFER_CREATED,this.onBufferCreated,this),o.on(A.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.on(A.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(A.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d._unregisterListeners=function(){var o=this.hls;o.off(A.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(A.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.off(A.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.off(A.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(A.Events.ERROR,this.onError,this),o.off(A.Events.BUFFER_RESET,this.onBufferReset,this),o.off(A.Events.BUFFER_CREATED,this.onBufferCreated,this),o.off(A.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.off(A.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.off(A.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d.onInitPtsFound=function(o,a){var x=a.frag,E=a.id,m=a.initPTS;if(E==="main"){var _=x.cc;this.initPTS[x.cc]=m,this.log("InitPTS for cc: "+_+" found from main: "+m),this.videoTrackCC=_,this.state===F.State.WAITING_INIT_PTS&&this.tick()}},d.startLoad=function(o){if(!this.levels){this.startPosition=o,this.state=F.State.STOPPED;return}var a=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,a>0&&o===-1?(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),this.state=F.State.IDLE):(this.loadedmetadata=!1,this.state=F.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()},d.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_TRACK:{var o,a=this.levels,x=this.trackId,E=a==null||((o=a[x])===null||o===void 0)?void 0:o.details;if(E){if(this.waitForCdnTuneIn(E))break;this.state=F.State.WAITING_INIT_PTS}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var m,_=performance.now(),I=this.retryDate;(!I||_>=I||(m=this.media)!==null&&m!==void 0&&m.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=F.State.IDLE);break}case F.State.WAITING_INIT_PTS:{var U=this.waitingData;if(U){var M=U.frag,H=U.part,K=U.cache,Z=U.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.FRAG_LOADING;var le=K.flush(),he={frag:M,part:H,payload:le,networkDetails:null};this._handleFragmentLoadProgress(he),Z&&D.prototype._handleFragmentLoadComplete.call(this,he)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ye=this.getLoadPosition(),Ue=j.BufferHelper.bufferInfo(this.mediaBuffer,ye,this.config.maxBufferHole),Me=Object(b.fragmentWithinToleranceTest)(Ue.end,this.config.maxFragLookUpTolerance,M);Me<0&&(i.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+Ue.end+" is needed"),this.clearWaitingFragment())}}else this.state=F.State.IDLE}}this.onTickEnd()},d.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.IDLE)},d.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var a=this.mediaBuffer?this.mediaBuffer:o,x=a.buffered;!this.loadedmetadata&&x.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},d.doTickIdle=function(){var o,a,x=this.hls,E=this.levels,m=this.media,_=this.trackId,I=x.config;if(!E||!E[_])return;if(!m&&(this.startFragRequested||!I.startFragPrefetch))return;var U=E[_],M=U.details;if(!M||M.live&&this.levelLastLoaded!==_||this.waitForCdnTuneIn(M)){this.state=F.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,T.PlaylistLevelType.AUDIO));var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,T.PlaylistLevelType.AUDIO);if(H===null)return;var K=H.len,Z=this.getMaxBufferLength(),le=this.audioSwitch;if(K>=Z&&!le)return;if(!le&&this._streamEnded(H,M)){x.trigger(A.Events.BUFFER_EOS,{type:"audio"}),this.state=F.State.ENDED;return}var he=M.fragments,ye=he[0].start,Ue=H.end;if(le){var Me=this.getLoadPosition();Ue=Me,M.PTSKnown&&Me<ye&&((H.end>ye||H.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),m.currentTime=ye+.05))}var _e=this.getNextFragment(Ue,M);if(!_e){this.bufferFlushed=!0;return}((o=_e.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((a=_e.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(_e,M):this.loadFragment(_e,M,Ue)},d.getMaxBufferLength=function(){var o=D.prototype.getMaxBufferLength.call(this),a=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,T.PlaylistLevelType.MAIN);return a===null?o:Math.max(o,a.len)},d.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},d.onAudioTracksUpdated=function(o,a){var x=a.audioTracks;this.resetTransmuxer(),this.levels=x.map(function(E){return new L.Level(E)})},d.onAudioTrackSwitching=function(o,a){var x=!!a.url;this.trackId=a.id;var E=this.fragCurrent;E!=null&&E.loader&&E.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),x?this.setInterval(y):this.resetTransmuxer(),x?(this.audioSwitch=!0,this.state=F.State.IDLE):this.state=F.State.STOPPED,this.tick()},d.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},d.onLevelLoaded=function(o,a){this.mainDetails=a.details},d.onAudioTrackLoaded=function(o,a){var x,E=this.levels,m=a.details,_=a.id;if(!E){this.warn("Audio tracks were reset while loading level "+_);return}this.log("Track "+_+" loaded ["+m.startSN+","+m.endSN+"],duration:"+m.totalduration);var I=E[_],U=0;if(m.live||(x=I.details)!==null&&x!==void 0&&x.live){var M=this.mainDetails;if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed||!M)return;!I.details&&m.hasProgramDateTime&&M.hasProgramDateTime?(Object(p.alignMediaPlaylistByPDT)(m,M),U=m.fragments[0].start):U=this.alignPlaylists(m,I.details)}I.details=m,this.levelLastLoaded=_,!this.startFragRequested&&(this.mainDetails||!m.live)&&this.setStartPosition(I.details,U),this.state===F.State.WAITING_TRACK&&!this.waitForCdnTuneIn(m)&&(this.state=F.State.IDLE),this.tick()},d._handleFragmentLoadProgress=function(o){var a,x=o.frag,E=o.part,m=o.payload,_=this.config,I=this.trackId,U=this.levels;if(!U){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var M=U[I];console.assert(M,"Audio track is defined on fragment load progress");var H=M.details;console.assert(H,"Audio track details are defined on fragment load progress");var K=_.defaultAudioCodec||M.audioCodec||"mp4a.40.2",Z=this.transmuxer;Z||(Z=this.transmuxer=new k.default(this.hls,T.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var le=this.initPTS[x.cc],he=(a=x.initSegment)===null||a===void 0?void 0:a.data;if(le!==void 0){var ye=!1,Ue=E?E.index:-1,Me=Ue!==-1,_e=new O.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,m.byteLength,Ue,Me);Z.push(m,he,K,"",x,E,H.totalduration,ye,_e,le)}else{i.logger.log("Unknown video PTS for cc "+x.cc+", waiting for video PTS before demuxing audio frag "+x.sn+" of ["+H.startSN+" ,"+H.endSN+"],track "+I);var Ie=this.waitingData=this.waitingData||{frag:x,part:E,cache:new C.default,complete:!1},ke=Ie.cache;ke.push(new Uint8Array(m)),this.waitingVideoCC=this.videoTrackCC,this.state=F.State.WAITING_INIT_PTS}},d._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,o)},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.onBufferCreated=function(o,a){var x=a.tracks.audio;x&&(this.mediaBuffer=x.buffer),a.tracks.video&&(this.videoBuffer=a.tracks.video.buffer)},d.onFragBuffered=function(o,a){var x=a.frag,E=a.part;if(x.type!==T.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(E?" p: "+E.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}x.sn!=="initSegment"&&(this.fragPrevious=x,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(A.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(x,E)},d.onError=function(o,a){switch(a.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(T.PlaylistLevelType.AUDIO,a);break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==F.State.ERROR&&this.state!==F.State.STOPPED&&(this.state=a.fatal?F.State.ERROR:F.State.IDLE,this.warn(a.details+" while loading frag, switching to "+this.state+" state"));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="audio"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var x=!0,E=this.getFwdBufferInfo(this.mediaBuffer,T.PlaylistLevelType.AUDIO);E&&E.len>.5&&(x=!this.reduceMaxBufferLength(E.len)),x&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},d.onBufferFlushed=function(o,a){var x=a.type;x===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},d._handleTransmuxComplete=function(o){var a,x="audio",E=this.hls,m=o.remuxResult,_=o.chunkMeta,I=this.getCurrentContext(_);if(!I){this.warn("The loading context changed while buffering fragment "+_.sn+" of level "+_.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(_.level);return}var U=I.frag,M=I.part,H=m.audio,K=m.text,Z=m.id3,le=m.initSegment;if(this.fragContextChanged(U))return;if(this.state=F.State.PARSING,this.audioSwitch&&H&&this.completeAudioSwitch(),le!=null&&le.tracks&&(this._bufferInitSegment(le.tracks,U,_),E.trigger(A.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:x,tracks:le.tracks})),H){var he=H.startPTS,ye=H.endPTS,Ue=H.startDTS,Me=H.endDTS;M&&(M.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:ye,startDTS:Ue,endDTS:Me}),U.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,he,ye,Ue,Me),this.bufferFragmentData(H,U,M,_)}if(Z!=null&&(a=Z.samples)!==null&&a!==void 0&&a.length){var _e=u({frag:U,id:x},Z);E.trigger(A.Events.FRAG_PARSING_METADATA,_e)}if(K){var Ie=u({frag:U,id:x},K);E.trigger(A.Events.FRAG_PARSING_USERDATA,Ie)}},d._bufferInitSegment=function(o,a,x){if(this.state!==F.State.PARSING)return;o.video&&delete o.video;var E=o.audio;if(!E)return;E.levelCodec=E.codec,E.id="audio",this.log("Init audio buffer, container:"+E.container+", codecs[parsed]=["+E.codec+"]"),this.hls.trigger(A.Events.BUFFER_CODECS,o);var m=E.initSegment;if(m!=null&&m.byteLength){var _={type:"audio",frag:a,part:null,chunkMeta:x,parent:a.type,data:m};this.hls.trigger(A.Events.BUFFER_APPENDING,_)}this.tick()},d.loadFragment=function(o,a,x){var E=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||E===B.FragmentState.NOT_LOADED||E===B.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):a.live&&!Object(Y.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=F.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,o,a,x)))},d.completeAudioSwitch=function(){var o=this.hls,a=this.media,x=this.trackId;a&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(A.Events.AUDIO_TRACK_SWITCHED,{id:x})},S}(F.default);z.default=g},"./src/controller/audio-track-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts"),F=P("./src/errors.ts"),A=P("./src/controller/base-playlist-controller.ts"),j=P("./src/types/loader.ts");function B(k,O){for(var b=0;b<O.length;b++){var p=O[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(k,p.key,p)}}function L(k,O,b){return O&&B(k.prototype,O),b&&B(k,b),k}function T(k,O){k.prototype=Object.create(O.prototype),k.prototype.constructor=k,v(k,O)}function v(k,O){return v=Object.setPrototypeOf||function(p,c){return p.__proto__=c,p},v(k,O)}var C=function(k){T(O,k);function O(p){var c;return c=k.call(this,p,"[audio-track-controller]")||this,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.trackName="",c.selectDefaultTrack=!0,c.registerListeners(),c}var b=O.prototype;return b.registerListeners=function(){var c=this.hls;c.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.on(Y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.on(Y.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){var c=this.hls;c.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.off(Y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.off(Y.Events.ERROR,this.onError,this)},b.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,k.prototype.destroy.call(this)},b.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},b.onManifestParsed=function(c,i){this.tracks=i.audioTracks||[]},b.onAudioTrackLoaded=function(c,i){var u=i.id,h=i.details,R=this.tracksInGroup[u];if(!R){this.warn("Invalid audio track id "+u);return}var y=R.details;R.details=i.details,this.log("audioTrack "+u+" loaded ["+h.startSN+"-"+h.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,i,y))},b.onLevelLoading=function(c,i){this.switchLevel(i.level)},b.onLevelSwitching=function(c,i){this.switchLevel(i.level)},b.switchLevel=function(c){var i=this.hls.levels[c];if(!(i!=null&&i.audioGroupIds))return;var u=i.audioGroupIds[i.urlId];if(this.groupId!==u){this.groupId=u;var h=this.tracks.filter(function(y){return!u||y.groupId===u});this.selectDefaultTrack&&!h.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=h;var R={audioTracks:h};this.log("Updating audio tracks, "+h.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(Y.Events.AUDIO_TRACKS_UPDATED,R),this.selectInitialTrack()}},b.onError=function(c,i){if(k.prototype.onError.call(this,c,i),i.fatal||!i.context)return;i.context.type===j.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},b.setAudioTrack=function(c){var i=this.tracksInGroup;if(c<0||c>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var u=i[this.trackId];this.log("Now switching to audio-track index "+c);var h=i[c],R=h.id,y=h.groupId,g=y===void 0?"":y,D=h.name,S=h.type,d=h.url;if(this.trackId=c,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(Y.Events.AUDIO_TRACK_SWITCHING,{id:R,groupId:g,name:D,type:S,url:d}),h.details&&!h.details.live)return;var l=this.switchParams(h.url,u==null?void 0:u.details);this.loadPlaylist(l)},b.selectInitialTrack=function(){var c=this.tracksInGroup;console.assert(c.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,u=this.findTrackId(i)||this.findTrackId();u!==-1?this.setAudioTrack(u):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},b.findTrackId=function(c){for(var i=this.tracksInGroup,u=0;u<i.length;u++){var h=i[u];if((!this.selectDefaultTrack||h.default)&&(!c||c===h.name))return h.id}return-1},b.loadPlaylist=function(c){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var u=i.id,h=i.groupId,R=i.url;if(c)try{R=c.addDirectives(R)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+u),this.clearTimer(),this.hls.trigger(Y.Events.AUDIO_TRACK_LOADING,{url:R,id:u,groupId:h,deliveryDirectives:c||null})}},L(O,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(c){this.selectDefaultTrack=!1,this.setAudioTrack(c)}}]),O}(A.default);z.default=C},"./src/controller/base-playlist-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return L});var Y=P("./src/polyfills/number.ts"),F=P("./src/types/level.ts"),A=P("./src/controller/level-helper.ts"),j=P("./src/utils/logger.ts"),B=P("./src/errors.ts"),L=function(){function T(C,k){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=j.logger.log.bind(j.logger,k+":"),this.warn=j.logger.warn.bind(j.logger,k+":"),this.hls=C}var v=T.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(k,O){O.fatal&&O.type===B.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},v.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},v.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},v.stopLoad=function(){this.canLoad=!1,this.clearTimer()},v.switchParams=function(k,O){var b=O==null?void 0:O.renditionReports;if(b)for(var p=0;p<b.length;p++){var c=b[p],i=""+c.URI;if(i===k.substr(-i.length)){var u=parseInt(c["LAST-MSN"]),h=parseInt(c["LAST-PART"]);if(O&&this.hls.config.lowLatencyMode){var R=Math.min(O.age-O.partTarget,O.targetduration);h!==void 0&&R>O.partTarget&&(h+=1)}if(Object(Y.isFiniteNumber)(u))return new F.HlsUrlParameters(u,Object(Y.isFiniteNumber)(h)?h:void 0,F.HlsSkip.No)}}},v.loadPlaylist=function(k){},v.shouldLoadTrack=function(k){return this.canLoad&&k&&!!k.url&&(!k.details||k.details.live)},v.playlistLoaded=function(k,O,b){var p=this,c=O.details,i=O.stats,u=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(c.advancedDateTime=Date.now()-u,c.live||b!=null&&b.live){if(c.reloaded(b),b&&this.log("live playlist "+k+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:"MISSED")),b&&c.fragments.length>0&&Object(A.mergeDetails)(b,c),!this.canLoad||!c.live)return;var h,R=void 0,y=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var g=this.hls.config.lowLatencyMode,D=c.lastPartSn,S=c.endSN,d=c.lastPartIndex,l=d!==-1,o=D===S,a=g?0:d;l?(R=o?S+1:D,y=o?a:d+1):R=S+1;var x=c.age,E=x+c.ageHeader,m=Math.min(E-c.partTarget,c.targetduration*1.5);if(m>0){if(b&&m>b.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+b.tuneInGoal+" to: "+m+" with playlist age: "+c.age),m=0;else{var _=Math.floor(m/c.targetduration);if(R+=_,y!==void 0){var I=Math.round(m%c.targetduration/c.partTarget);y+=I}this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+x.toFixed(2)+"s goal: "+m+" skip sn "+_+" to part "+y)}c.tuneInGoal=m}if(h=this.getDeliveryDirectives(c,O.deliveryDirectives,R,y),g||!o){this.loadPlaylist(h);return}}else h=this.getDeliveryDirectives(c,O.deliveryDirectives,R,y);var U=Object(A.computeReloadInterval)(c,i);R!==void 0&&c.canBlockReload&&(U-=c.partTarget||1),this.log("reload live playlist "+k+" in "+Math.round(U)+" ms"),this.timer=self.setTimeout(function(){return p.loadPlaylist(h)},U)}else this.clearTimer()},v.getDeliveryDirectives=function(k,O,b,p){var c=Object(F.getSkipValue)(k,b);return O!=null&&O.skip&&k.deltaUpdateFailed&&(b=O.msn,p=O.part,c=F.HlsSkip.No),new F.HlsUrlParameters(b,p,c)},v.retryLoadingOrFail=function(k){var O=this,b=this.hls.config,p=this.retryCount<b.levelLoadingMaxRetry;if(p){var c;if(this.retryCount++,k.details.indexOf("LoadTimeOut")>-1&&(c=k.context)!==null&&c!==void 0&&c.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+k.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*b.levelLoadingRetryDelay,b.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return O.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+k.details+'"')}}else this.warn('cannot recover from error "'+k.details+'"'),this.clearTimer(),k.fatal=!0;return p},T}()},"./src/controller/base-stream-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"State",function(){return S}),P.d(z,"default",function(){return d});var Y=P("./src/polyfills/number.ts"),F=P("./src/task-loop.ts"),A=P("./src/controller/fragment-tracker.ts"),j=P("./src/utils/buffer-helper.ts"),B=P("./src/utils/logger.ts"),L=P("./src/events.ts"),T=P("./src/errors.ts"),v=P("./src/types/transmuxer.ts"),C=P("./src/utils/mp4-tools.ts"),k=P("./src/utils/discontinuities.ts"),O=P("./src/controller/fragment-finders.ts"),b=P("./src/controller/level-helper.ts"),p=P("./src/loader/fragment-loader.ts"),c=P("./src/crypt/decrypter.ts"),i=P("./src/utils/time-ranges.ts"),u=P("./src/types/loader.ts");function h(l,o){for(var a=0;a<o.length;a++){var x=o[a];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function R(l,o,a){return o&&h(l.prototype,o),a&&h(l,a),l}function y(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function g(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,D(l,o)}function D(l,o){return D=Object.setPrototypeOf||function(x,E){return x.__proto__=E,x},D(l,o)}var S={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},d=function(l){g(o,l);function o(x,E,m){var _;return _=l.call(this)||this,_.hls=void 0,_.fragPrevious=null,_.fragCurrent=null,_.fragmentTracker=void 0,_.transmuxer=null,_._state=S.STOPPED,_.media=void 0,_.mediaBuffer=void 0,_.config=void 0,_.bitrateTest=!1,_.lastCurrentTime=0,_.nextLoadPosition=0,_.startPosition=0,_.loadedmetadata=!1,_.fragLoadError=0,_.retryDate=0,_.levels=null,_.fragmentLoader=void 0,_.levelLastLoaded=null,_.startFragRequested=!1,_.decrypter=void 0,_.initPTS=[],_.onvseeking=null,_.onvended=null,_.logPrefix="",_.log=void 0,_.warn=void 0,_.logPrefix=m,_.log=B.logger.log.bind(B.logger,m+":"),_.warn=B.logger.warn.bind(B.logger,m+":"),_.hls=x,_.fragmentLoader=new p.default(x.config),_.fragmentTracker=E,_.config=x.config,_.decrypter=new c.default(x,x.config),x.on(L.Events.KEY_LOADED,_.onKeyLoaded,y(_)),_}var a=o.prototype;return a.doTick=function(){this.onTickEnd()},a.onTickEnd=function(){},a.startLoad=function(E){},a.stopLoad=function(){this.fragmentLoader.abort();var E=this.fragCurrent;E&&this.fragmentTracker.removeFragment(E),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=S.STOPPED},a._streamEnded=function(E,m){var _=this.fragCurrent,I=this.fragmentTracker;if(!m.live&&_&&_.sn===m.endSN&&!E.nextStart){var U=I.getState(_);return U===A.FragmentState.PARTIAL||U===A.FragmentState.OK}return!1},a.onMediaAttached=function(E,m){var _=this.media=this.mediaBuffer=m.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),_.addEventListener("seeking",this.onvseeking),_.addEventListener("ended",this.onvended);var I=this.config;this.levels&&I.autoStartLoad&&this.state===S.STOPPED&&this.startLoad(I.startPosition)},a.onMediaDetaching=function(){var E=this.media;E!=null&&E.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),E&&(E.removeEventListener("seeking",this.onvseeking),E.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},a.onMediaSeeking=function(){var E=this.config,m=this.fragCurrent,_=this.media,I=this.mediaBuffer,U=this.state,M=_?_.currentTime:0,H=j.BufferHelper.bufferInfo(I||_,M,E.maxBufferHole);if(this.log("media seeking to "+(Object(Y.isFiniteNumber)(M)?M.toFixed(3):M)+", state: "+U),U===S.ENDED)this.resetLoadingState();else if(m&&!H.len){var K=E.maxFragLookUpTolerance,Z=m.start-K,le=m.start+m.duration+K,he=M>le;(M<Z||he)&&(he&&m.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),m.loader.abort()),this.resetLoadingState())}_&&(this.lastCurrentTime=M),!this.loadedmetadata&&!H.len&&(this.nextLoadPosition=this.startPosition=M),this.tickImmediate()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onKeyLoaded=function(E,m){if(this.state!==S.KEY_LOADING||m.frag!==this.fragCurrent||!this.levels)return;this.state=S.IDLE;var _=this.levels[m.frag.level].details;_&&this.loadFragment(m.frag,_,m.frag.start)},a.onHandlerDestroying=function(){this.stopLoad(),l.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=S.STOPPED,this.hls.off(L.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,l.prototype.onHandlerDestroyed.call(this)},a.loadKey=function(E,m){this.log("Loading key for "+E.sn+" of ["+m.startSN+"-"+m.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+E.level),this.state=S.KEY_LOADING,this.fragCurrent=E,this.hls.trigger(L.Events.KEY_LOADING,{frag:E})},a.loadFragment=function(E,m,_){this._loadFragForPlayback(E,m,_)},a._loadFragForPlayback=function(E,m,_){var I=this,U=function(H){if(I.fragContextChanged(E)){I.warn("Fragment "+E.sn+(H.part?" p: "+H.part.index:"")+" of level "+E.level+" was dropped during download."),I.fragmentTracker.removeFragment(E);return}E.stats.chunkCount++,I._handleFragmentLoadProgress(H)};this._doFragLoad(E,m,_,U).then(function(M){if(!M)return;I.fragLoadError=0;var H=I.state;if(I.fragContextChanged(E)){(H===S.FRAG_LOADING||H===S.BACKTRACKING||!I.fragCurrent&&H===S.PARSING)&&(I.fragmentTracker.removeFragment(E),I.state=S.IDLE);return}if("payload"in M&&(I.log("Loaded fragment "+E.sn+" of level "+E.level),I.hls.trigger(L.Events.FRAG_LOADED,M),I.state===S.BACKTRACKING)){I.fragmentTracker.backtrack(E,M),I.resetFragmentLoading(E);return}I._handleFragmentLoadComplete(M)}).catch(function(M){I.warn(M),I.resetFragmentLoading(E)})},a.flushMainBuffer=function(E,m,_){if(_===void 0&&(_=null),!(E-m))return;var I={startOffset:E,endOffset:m,type:_};this.fragLoadError=0,this.hls.trigger(L.Events.BUFFER_FLUSHING,I)},a._loadInitSegment=function(E){var m=this;this._doFragLoad(E).then(function(_){if(!_||m.fragContextChanged(E)||!m.levels)throw new Error("init load aborted");return _}).then(function(_){var I=m.hls,U=_.payload,M=E.decryptdata;if(U&&U.byteLength>0&&M&&M.key&&M.iv&&M.method==="AES-128"){var H=self.performance.now();return m.decrypter.webCryptoDecrypt(new Uint8Array(U),M.key.buffer,M.iv.buffer).then(function(K){var Z=self.performance.now();return I.trigger(L.Events.FRAG_DECRYPTED,{frag:E,payload:K,stats:{tstart:H,tdecrypt:Z}}),_.payload=K,_})}return _}).then(function(_){var I=m.fragCurrent,U=m.hls,M=m.levels;if(!M)throw new Error("init load aborted, missing levels");var H=M[E.level].details;console.assert(H,"Level details are defined when init segment is loaded");var K=E.stats;m.state=S.IDLE,m.fragLoadError=0,E.data=new Uint8Array(_.payload),K.parsing.start=K.buffering.start=self.performance.now(),K.parsing.end=K.buffering.end=self.performance.now(),_.frag===I&&U.trigger(L.Events.FRAG_BUFFERED,{stats:K,frag:I,part:null,id:E.type}),m.tick()}).catch(function(_){m.warn(_),m.resetFragmentLoading(E)})},a.fragContextChanged=function(E){var m=this.fragCurrent;return!E||!m||E.level!==m.level||E.sn!==m.sn||E.urlId!==m.urlId},a.fragBufferedComplete=function(E,m){var _=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+E.type+" sn: "+E.sn+(m?" part: "+m.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+E.level+" "+i.default.toString(j.BufferHelper.getBuffered(_))),this.state=S.IDLE,this.tick()},a._handleFragmentLoadComplete=function(E){var m=this.transmuxer;if(!m)return;var _=E.frag,I=E.part,U=E.partsLoaded,M=!U||U.length===0||U.some(function(K){return!K}),H=new v.ChunkMetadata(_.level,_.sn,_.stats.chunkCount+1,0,I?I.index:-1,!M);m.flush(H)},a._handleFragmentLoadProgress=function(E){},a._doFragLoad=function(E,m,_,I){var U=this;if(_===void 0&&(_=null),!this.levels)throw new Error("frag load aborted, missing levels");if(_=Math.max(E.start,_||0),this.config.lowLatencyMode&&m){var M=m.partList;if(M&&I){_>E.end&&m.fragmentHint&&(E=m.fragmentHint);var H=this.getNextPart(M,E,_);if(H>-1){var K=M[H];return this.log("Loading part sn: "+E.sn+" p: "+K.index+" cc: "+E.cc+" of playlist ["+m.startSN+"-"+m.endSN+"] parts [0-"+H+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(_.toFixed(3))),this.nextLoadPosition=K.start+K.duration,this.state=S.FRAG_LOADING,this.hls.trigger(L.Events.FRAG_LOADING,{frag:E,part:M[H],targetBufferTime:_}),this.doFragPartsLoad(E,M,H,I).catch(function(Z){return U.handleFragLoadError(Z)})}else if(!E.url||this.loadedEndOfParts(M,_))return Promise.resolve(null)}}return this.log("Loading fragment "+E.sn+" cc: "+E.cc+" "+(m?"of ["+m.startSN+"-"+m.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(_.toFixed(3))),Object(Y.isFiniteNumber)(E.sn)&&!this.bitrateTest&&(this.nextLoadPosition=E.start+E.duration),this.state=S.FRAG_LOADING,this.hls.trigger(L.Events.FRAG_LOADING,{frag:E,targetBufferTime:_}),this.fragmentLoader.load(E,I).catch(function(Z){return U.handleFragLoadError(Z)})},a.doFragPartsLoad=function(E,m,_,I){var U=this;return new Promise(function(M,H){var K=[],Z=function le(he){var ye=m[he];U.fragmentLoader.loadPart(E,ye,I).then(function(Ue){K[ye.index]=Ue;var Me=Ue.part;U.hls.trigger(L.Events.FRAG_LOADED,Ue);var _e=m[he+1];if(_e&&_e.fragment===E)le(he+1);else return M({frag:E,part:Me,partsLoaded:K})}).catch(H)};Z(_)})},a.handleFragLoadError=function(E){var m=E.data;return m&&m.details===T.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(m.frag,m.part):this.hls.trigger(L.Events.ERROR,m),null},a._handleTransmuxerFlush=function(E){var m=this.getCurrentContext(E);if(!m||this.state!==S.PARSING){this.fragCurrent||(this.state=S.IDLE);return}var _=m.frag,I=m.part,U=m.level,M=self.performance.now();_.stats.parsing.end=M,I&&(I.stats.parsing.end=M),this.updateLevelTiming(_,I,U,E.partial)},a.getCurrentContext=function(E){var m=this.levels,_=E.level,I=E.sn,U=E.part;if(!m||!m[_])return this.warn("Levels object was unset while buffering fragment "+I+" of level "+_+". The current chunk will not be buffered."),null;var M=m[_],H=U>-1?Object(b.getPartWith)(M,I,U):null,K=H?H.fragment:Object(b.getFragmentWithSN)(M,I,this.fragCurrent);return K?{frag:K,part:H,level:M}:null},a.bufferFragmentData=function(E,m,_,I){if(!E||this.state!==S.PARSING)return;var U=E.data1,M=E.data2,H=U;if(U&&M&&(H=Object(C.appendUint8Array)(U,M)),!H||!H.length)return;var K={type:E.type,frag:m,part:_,chunkMeta:I,parent:m.type,data:H};this.hls.trigger(L.Events.BUFFER_APPENDING,K),E.dropped&&E.independent&&!_&&this.flushBufferGap(m)},a.flushBufferGap=function(E){var m=this.media;if(!m)return;if(!j.BufferHelper.isBuffered(m,m.currentTime)){this.flushMainBuffer(0,E.start);return}var _=m.currentTime,I=j.BufferHelper.bufferInfo(m,_,0),U=E.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,U*.25),H=Math.max(Math.min(E.start-M,I.end-M),_+M);E.start-H>M&&this.flushMainBuffer(H,E.start)},a.getFwdBufferInfo=function(E,m){var _=this.config,I=this.getLoadPosition();if(!Object(Y.isFiniteNumber)(I))return null;var U=j.BufferHelper.bufferInfo(E,I,_.maxBufferHole);if(U.len===0&&U.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(I,m);if(M&&U.nextStart<M.end)return j.BufferHelper.bufferInfo(E,I,Math.max(U.nextStart,_.maxBufferHole))}return U},a.getMaxBufferLength=function(E){var m=this.config,_;return E?_=Math.max(8*m.maxBufferSize/E,m.maxBufferLength):_=m.maxBufferLength,Math.min(_,m.maxMaxBufferLength)},a.reduceMaxBufferLength=function(E){var m=this.config,_=E||m.maxBufferLength;return m.maxMaxBufferLength>=_?(m.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+m.maxMaxBufferLength+"s"),!0):!1},a.getNextFragment=function(E,m){var _,I,U=m.fragments,M=U.length;if(!M)return null;var H=this.config,K=U[0].start,Z;if(m.live){var le=H.initialLiveManifestSize;if(M<le)return this.warn("Not enough fragments to start playback (have: "+M+", need: "+le+")"),null;!m.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Z=this.getInitialLiveFragment(m,U),this.startPosition=Z?this.hls.liveSyncPosition||Z.start:E)}else E<=K&&(Z=U[0]);if(!Z){var he=H.lowLatencyMode?m.partEnd:m.fragmentEnd;Z=this.getFragmentAtPosition(E,he,m)}return(_=Z)!==null&&_!==void 0&&_.initSegment&&!((I=Z)!==null&&I!==void 0&&I.initSegment.data)&&!this.bitrateTest&&(Z=Z.initSegment),Z},a.getNextPart=function(E,m,_){for(var I=-1,U=!1,M=!0,H=0,K=E.length;H<K;H++){var Z=E[H];if(M=M&&!Z.independent,I>-1&&_<Z.start)break;var le=Z.loaded;!le&&(U||Z.independent||M)&&Z.fragment===m&&(I=H),U=le}return I},a.loadedEndOfParts=function(E,m){var _=E[E.length-1];return _&&m>_.start&&_.loaded},a.getInitialLiveFragment=function(E,m){var _=this.fragPrevious,I=null;if(_){if(E.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+_.programDateTime),I=Object(O.findFragmentByPDT)(m,_.endProgramDateTime,this.config.maxFragLookUpTolerance)),!I){var U=_.sn+1;if(U>=E.startSN&&U<=E.endSN){var M=m[U-E.startSN];_.cc===M.cc&&(I=M,this.log("Live playlist, switching playlist, load frag with next SN: "+I.sn))}I||(I=Object(O.findFragWithCC)(m,_.cc),I&&this.log("Live playlist, switching playlist, load frag with same CC: "+I.sn))}}else{var H=this.hls.liveSyncPosition;H!==null&&(I=this.getFragmentAtPosition(H,this.bitrateTest?E.fragmentEnd:E.edge,E))}return I},a.getFragmentAtPosition=function(E,m,_){var I=this.config,U=this.fragPrevious,M=_.fragments,H=_.endSN,K=_.fragmentHint,Z=I.maxFragLookUpTolerance,le=!!(I.lowLatencyMode&&_.partList&&K);le&&K&&!this.bitrateTest&&(M=M.concat(K),H=K.sn);var he;if(E<m){var ye=E>m-Z?0:Z;he=Object(O.findFragmentByPTS)(U,M,E,ye)}else he=M[M.length-1];if(he){var Ue=he.sn-_.startSN,Me=U&&he.level===U.level,_e=M[Ue+1],Ie=this.fragmentTracker.getState(he);if(Ie===A.FragmentState.BACKTRACKED){he=null;for(var ke=Ue;M[ke]&&this.fragmentTracker.getState(M[ke])===A.FragmentState.BACKTRACKED;)U?he=M[ke--]:he=M[--ke];he||(he=_e)}else U&&he.sn===U.sn&&!le&&(Me&&(he.sn<H&&this.fragmentTracker.getState(_e)!==A.FragmentState.OK?(this.log("SN "+he.sn+" just loaded, load next one: "+_e.sn),he=_e):he=null))}return he},a.synchronizeToLiveEdge=function(E){var m=this.config,_=this.media;if(!_)return;var I=this.hls.liveSyncPosition,U=_.currentTime,M=E.fragments[0].start,H=E.edge,K=U>=M-m.maxFragLookUpTolerance&&U<=H;if(I!==null&&_.duration>I&&(U<I||!K)){var Z=m.liveMaxLatencyDuration!==void 0?m.liveMaxLatencyDuration:m.liveMaxLatencyDurationCount*E.targetduration;(!K&&_.readyState<4||U<H-Z)&&(this.loadedmetadata||(this.nextLoadPosition=I),_.readyState&&(this.warn("Playback: "+U.toFixed(3)+" is located too far from the end of live sliding playlist: "+H+", reset currentTime to : "+I.toFixed(3)),_.currentTime=I))}},a.alignPlaylists=function(E,m){var _=this.levels,I=this.levelLastLoaded,U=this.fragPrevious,M=I!==null?_[I]:null,H=E.fragments.length;if(!H)return this.warn("No fragments in live playlist"),0;var K=E.fragments[0].start,Z=!m,le=E.alignedSliding&&Object(Y.isFiniteNumber)(K);if(Z||!le&&!K){Object(k.alignStream)(U,M,E);var he=E.fragments[0].start;return this.log("Live playlist sliding: "+he.toFixed(2)+" start-sn: "+(m?m.startSN:"na")+"->"+E.startSN+" prev-sn: "+(U?U.sn:"na")+" fragments: "+H),he}return K},a.waitForCdnTuneIn=function(E){var m=3;return E.live&&E.canBlockReload&&E.tuneInGoal>Math.max(E.partHoldBack,E.partTarget*m)},a.setStartPosition=function(E,m){var _=this.startPosition;if(_<m&&(_=-1),_===-1||this.lastCurrentTime===-1){var I=E.startTimeOffset;Object(Y.isFiniteNumber)(I)?(_=m+I,I<0&&(_+=E.totalduration),_=Math.min(Math.max(m,_),m+E.totalduration),this.log("Start time offset "+I+" found in playlist, adjust startPosition to "+_),this.startPosition=_):E.live?_=this.hls.liveSyncPosition||m:this.startPosition=_=0,this.lastCurrentTime=_}this.nextLoadPosition=_},a.getLoadPosition=function(){var E=this.media,m=0;return this.loadedmetadata&&E?m=E.currentTime:this.nextLoadPosition&&(m=this.nextLoadPosition),m},a.handleFragLoadAborted=function(E,m){this.transmuxer&&E.sn!=="initSegment"&&E.stats.aborted&&(this.warn("Fragment "+E.sn+(m?" part"+m.index:"")+" of level "+E.level+" was aborted"),this.resetFragmentLoading(E))},a.resetFragmentLoading=function(E){(!this.fragCurrent||!this.fragContextChanged(E))&&(this.state=S.IDLE)},a.onFragmentOrKeyLoadError=function(E,m){if(m.fatal)return;var _=m.frag;if(!_||_.type!==E)return;var I=this.fragCurrent;console.assert(I&&_.sn===I.sn&&_.level===I.level&&_.urlId===I.urlId,"Frag load error must match current frag to retry");var U=this.config;if(this.fragLoadError+1<=U.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(_.level))return;var M=Math.min(Math.pow(2,this.fragLoadError)*U.fragLoadingRetryDelay,U.fragLoadingMaxRetryTimeout);this.warn("Fragment "+_.sn+" of "+E+" "+_.level+" failed to load, retrying in "+M+"ms"),this.retryDate=self.performance.now()+M,this.fragLoadError++,this.state=S.FRAG_LOADING_WAITING_RETRY}else m.levelRetry?(E===u.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=S.IDLE):(B.logger.error(m.details+" reaches max retry, redispatch as fatal ..."),m.fatal=!0,this.hls.stopLoad(),this.state=S.ERROR)},a.afterBufferFlushed=function(E,m,_){if(!E)return;var I=j.BufferHelper.getBuffered(E);this.fragmentTracker.detectEvictedFragments(m,I,_),this.state===S.ENDED&&this.resetLoadingState()},a.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=S.IDLE},a.resetLiveStartWhenNotLoaded=function(E){if(!this.loadedmetadata){this.startFragRequested=!1;var m=this.levels?this.levels[E].details:null;if(m!=null&&m.live)return this.startPosition=-1,this.setStartPosition(m,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},a.updateLevelTiming=function(E,m,_,I){var U=this,M=_.details;console.assert(!!M,"level.details must be defined");var H=Object.keys(E.elementaryStreams).reduce(function(K,Z){var le=E.elementaryStreams[Z];if(le){var he=le.endPTS-le.startPTS;if(he<=0)return U.warn("Could not parse fragment "+E.sn+" "+Z+" duration reliably ("+he+") resetting transmuxer to fallback to playlist timing"),U.resetTransmuxer(),K||!1;var ye=I?0:Object(b.updateFragPTSDTS)(M,E,le.startPTS,le.endPTS,le.startDTS,le.endDTS);return U.hls.trigger(L.Events.LEVEL_PTS_UPDATED,{details:M,level:_,drift:ye,type:Z,frag:E,start:le.startPTS,end:le.endPTS}),!0}return K},!1);H?(this.state=S.PARSED,this.hls.trigger(L.Events.FRAG_PARSED,{frag:E,part:m})):this.resetLoadingState()},a.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},R(o,[{key:"state",get:function(){return this._state},set:function(E){var m=this._state;m!==E&&(this._state=E,this.log(m+"->"+E))}}]),o}(F.default)},"./src/controller/buffer-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return O});var Y=P("./src/polyfills/number.ts"),F=P("./src/events.ts"),A=P("./src/utils/logger.ts"),j=P("./src/errors.ts"),B=P("./src/utils/buffer-helper.ts"),L=P("./src/utils/mediasource-helper.ts"),T=P("./src/loader/fragment.ts"),v=P("./src/controller/buffer-operation-queue.ts"),C=Object(L.getMediaSource)(),k=/([ha]vc.)(?:\.[^.,]+)+/,O=function(){function b(c){var i=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 u=i.hls,h=i.media,R=i.mediaSource;A.logger.log("[buffer-controller]: Media source opened"),h&&(i.updateMediaElementDuration(),u.trigger(F.Events.MEDIA_ATTACHED,{media:h})),R&&R.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){A.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){A.logger.log("[buffer-controller]: Media source ended")},this.hls=c,this._initSourceBuffer(),this.registerListeners()}var p=b.prototype;return p.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},p.destroy=function(){this.unregisterListeners(),this.details=null},p.registerListeners=function(){var i=this.hls;i.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(F.Events.BUFFER_RESET,this.onBufferReset,this),i.on(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(F.Events.BUFFER_EOS,this.onBufferEos,this),i.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(F.Events.FRAG_PARSED,this.onFragParsed,this),i.on(F.Events.FRAG_CHANGED,this.onFragChanged,this)},p.unregisterListeners=function(){var i=this.hls;i.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(F.Events.BUFFER_RESET,this.onBufferReset,this),i.off(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(F.Events.BUFFER_EOS,this.onBufferEos,this),i.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(F.Events.FRAG_PARSED,this.onFragParsed,this),i.off(F.Events.FRAG_CHANGED,this.onFragChanged,this)},p._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},p.onManifestParsed=function(i,u){var h=2;(u.audio&&!u.video||!u.altAudio)&&(h=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=h,this.details=null,A.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},p.onMediaAttaching=function(i,u){var h=this.media=u.media;if(h&&C){var R=this.mediaSource=new C;R.addEventListener("sourceopen",this._onMediaSourceOpen),R.addEventListener("sourceended",this._onMediaSourceEnded),R.addEventListener("sourceclose",this._onMediaSourceClose),h.src=self.URL.createObjectURL(R),this._objectUrl=h.src}},p.onMediaDetaching=function(){var i=this.media,u=this.mediaSource,h=this._objectUrl;if(u){if(A.logger.log("[buffer-controller]: media source detaching"),u.readyState==="open")try{u.endOfStream()}catch(R){A.logger.warn("[buffer-controller]: onMediaDetaching: "+R.message+" while calling endOfStream")}this.onBufferReset(),u.removeEventListener("sourceopen",this._onMediaSourceOpen),u.removeEventListener("sourceended",this._onMediaSourceEnded),u.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(h&&self.URL.revokeObjectURL(h),i.src===h?(i.removeAttribute("src"),i.load()):A.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(F.Events.MEDIA_DETACHED,void 0)},p.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(u){var h=i.sourceBuffer[u];try{h&&(i.removeBufferListeners(u),i.mediaSource&&i.mediaSource.removeSourceBuffer(h),i.sourceBuffer[u]=void 0)}catch(R){A.logger.warn("[buffer-controller]: Failed to reset the "+u+" buffer",R)}}),this._initSourceBuffer()},p.onBufferCodecs=function(i,u){var h=this,R=this.getSourceBufferTypes().length;if(Object.keys(u).forEach(function(y){if(R){var g=h.tracks[y];if(g&&typeof g.buffer.changeType=="function"){var D=u[y],S=D.codec,d=D.levelCodec,l=D.container,o=(g.levelCodec||g.codec).replace(k,"$1"),a=(d||S).replace(k,"$1");if(o!==a){var x=l+";codecs="+(d||S);h.appendChangeType(y,x)}}}else h.pendingTracks[y]=u[y]}),R)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},p.appendChangeType=function(i,u){var h=this,R=this.operationQueue,y={execute:function(){var D=h.sourceBuffer[i];D&&(A.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+u),D.changeType(u)),R.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(D){A.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",D)}};R.append(y,i)},p.onBufferAppending=function(i,u){var h=this,R=this.hls,y=this.operationQueue,g=this.tracks,D=u.data,S=u.type,d=u.frag,l=u.part,o=u.chunkMeta,a=o.buffering[S],x=self.performance.now();a.start=x;var E=d.stats.buffering,m=l?l.stats.buffering:null;E.start===0&&(E.start=x),m&&m.start===0&&(m.start=x);var _=g.audio,I=S==="audio"&&o.id===1&&(_==null?void 0:_.container)==="audio/mpeg",U={execute:function(){if(a.executeStart=self.performance.now(),I){var H=h.sourceBuffer[S];if(H){var K=d.start-H.timestampOffset;Math.abs(K)>=.1&&(A.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+K+") sn: "+d.sn+")"),H.timestampOffset=d.start)}}h.appendExecutor(D,S)},onStart:function(){},onComplete:function(){var H=self.performance.now();a.executeEnd=a.end=H,E.first===0&&(E.first=H),m&&m.first===0&&(m.first=H);var K=h.sourceBuffer,Z={};for(var le in K)Z[le]=B.BufferHelper.getBuffered(K[le]);h.appendError=0,h.hls.trigger(F.Events.BUFFER_APPENDED,{type:S,frag:d,part:l,chunkMeta:o,parent:d.type,timeRanges:Z})},onError:function(H){A.logger.error("[buffer-controller]: Error encountered while trying to append to the "+S+" SourceBuffer",H);var K={type:j.ErrorTypes.MEDIA_ERROR,parent:d.type,details:j.ErrorDetails.BUFFER_APPEND_ERROR,err:H,fatal:!1};H.code===DOMException.QUOTA_EXCEEDED_ERR?K.details=j.ErrorDetails.BUFFER_FULL_ERROR:(h.appendError++,K.details=j.ErrorDetails.BUFFER_APPEND_ERROR,h.appendError>R.config.appendErrorMaxRetry&&(A.logger.error("[buffer-controller]: Failed "+R.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),K.fatal=!0)),R.trigger(F.Events.ERROR,K)}};y.append(U,S)},p.onBufferFlushing=function(i,u){var h=this,R=this.operationQueue,y=function(D){return{execute:h.removeExecutor.bind(h,D,u.startOffset,u.endOffset),onStart:function(){},onComplete:function(){h.hls.trigger(F.Events.BUFFER_FLUSHED,{type:D})},onError:function(d){A.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",d)}}};u.type?R.append(y(u.type),u.type):this.getSourceBufferTypes().forEach(function(g){R.append(y(g),g)})},p.onFragParsed=function(i,u){var h=this,R=u.frag,y=u.part,g=[],D=y?y.elementaryStreams:R.elementaryStreams;D[T.ElementaryStreamTypes.AUDIOVIDEO]?g.push("audiovideo"):(D[T.ElementaryStreamTypes.AUDIO]&&g.push("audio"),D[T.ElementaryStreamTypes.VIDEO]&&g.push("video"));var S=function(){var l=self.performance.now();R.stats.buffering.end=l,y&&(y.stats.buffering.end=l);var o=y?y.stats:R.stats;h.hls.trigger(F.Events.FRAG_BUFFERED,{frag:R,part:y,stats:o,id:R.type})};g.length===0&&A.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+R.type+" level: "+R.level+" sn: "+R.sn),this.blockBuffers(S,g)},p.onFragChanged=function(i,u){this.flushBackBuffer()},p.onBufferEos=function(i,u){var h=this,R=this.getSourceBufferTypes().reduce(function(y,g){var D=h.sourceBuffer[g];return(!u.type||u.type===g)&&(D&&!D.ended&&(D.ended=!0,A.logger.log("[buffer-controller]: "+g+" sourceBuffer now EOS"))),y&&!!(!D||D.ended)},!0);R&&this.blockBuffers(function(){var y=h.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},p.onLevelUpdated=function(i,u){var h=u.details;if(!h.fragments.length)return;this.details=h,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},p.flushBackBuffer=function(){var i=this.hls,u=this.details,h=this.media,R=this.sourceBuffer;if(!h||u===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var g=u.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(Y.isFiniteNumber)(g)||g<0)return;var D=h.currentTime,S=u.levelTargetDuration,d=Math.max(g,S),l=Math.floor(D/S)*S-d;y.forEach(function(o){var a=R[o];if(a){var x=B.BufferHelper.getBuffered(a);x.length>0&&l>x.start(0)&&(i.trigger(F.Events.BACK_BUFFER_REACHED,{bufferEnd:l}),u.live&&i.trigger(F.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:l}),i.trigger(F.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:l,type:o}))}})},p.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,u=this.hls,h=this.media,R=this.mediaSource,y=i.fragments[0].start+i.totalduration,g=h.duration,D=Object(Y.isFiniteNumber)(R.duration)?R.duration:0;i.live&&u.config.liveDurationInfinity?(A.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),R.duration=Infinity,this.updateSeekableRange(i)):(y>D&&y>g||!Object(Y.isFiniteNumber)(g))&&(A.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),R.duration=y)},p.updateSeekableRange=function(i){var u=this.mediaSource,h=i.fragments,R=h.length;if(R&&i.live&&u!==null&&u!==void 0&&u.setLiveSeekableRange){var y=Math.max(0,h[0].start),g=Math.max(y,y+i.totalduration);u.setLiveSeekableRange(y,g)}},p.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,u=this.operationQueue,h=this.pendingTracks,R=Object.keys(h).length;if(R&&!i||R===2){this.createSourceBuffers(h),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(F.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}y.forEach(function(g){u.executeNext(g)})}},p.createSourceBuffers=function(i){var u=this.sourceBuffer,h=this.mediaSource;if(!h)throw Error("createSourceBuffers called when mediaSource was null");var R=0;for(var y in i)if(!u[y]){var g=i[y];if(!g)throw Error("source buffer exists for track "+y+", however track does not");var D=g.levelCodec||g.codec,S=g.container+";codecs="+D;A.logger.log("[buffer-controller]: creating sourceBuffer("+S+")");try{var d=u[y]=h.addSourceBuffer(S),l=y;this.addBufferListener(l,"updatestart",this._onSBUpdateStart),this.addBufferListener(l,"updateend",this._onSBUpdateEnd),this.addBufferListener(l,"error",this._onSBUpdateError),this.tracks[y]={buffer:d,codec:D,container:g.container,levelCodec:g.levelCodec,id:g.id},R++}catch(o){A.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(F.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:S})}}R&&this.hls.trigger(F.Events.BUFFER_CREATED,{tracks:this.tracks})},p._onSBUpdateStart=function(i){var u=this.operationQueue,h=u.current(i);h.onStart()},p._onSBUpdateEnd=function(i){var u=this.operationQueue,h=u.current(i);h.onComplete(),u.shiftAndExecuteNext(i)},p._onSBUpdateError=function(i,u){A.logger.error("[buffer-controller]: "+i+" SourceBuffer error",u),this.hls.trigger(F.Events.ERROR,{type:j.ErrorTypes.MEDIA_ERROR,details:j.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var h=this.operationQueue.current(i);h&&h.onError(u)},p.removeExecutor=function(i,u,h){var R=this.media,y=this.mediaSource,g=this.operationQueue,D=this.sourceBuffer,S=D[i];if(!R||!y||!S){A.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),g.shiftAndExecuteNext(i);return}var d=Object(Y.isFiniteNumber)(R.duration)?R.duration:Infinity,l=Object(Y.isFiniteNumber)(y.duration)?y.duration:Infinity,o=Math.max(0,u),a=Math.min(h,d,l);a>o?(A.logger.log("[buffer-controller]: Removing ["+o+","+a+"] from the "+i+" SourceBuffer"),console.assert(!S.updating,i+" sourceBuffer must not be updating"),S.remove(o,a)):g.shiftAndExecuteNext(i)},p.appendExecutor=function(i,u){var h=this.operationQueue,R=this.sourceBuffer,y=R[u];if(!y){A.logger.warn("[buffer-controller]: Attempting to append to the "+u+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(u);return}y.ended=!1,console.assert(!y.updating,u+" sourceBuffer must not be updating"),y.appendBuffer(i)},p.blockBuffers=function(i,u){var h=this;if(u===void 0&&(u=this.getSourceBufferTypes()),!u.length){A.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var R=this.operationQueue,y=u.map(function(g){return R.appendBlocker(g)});Promise.all(y).then(function(){i(),u.forEach(function(g){var D=h.sourceBuffer[g];(!D||!D.updating)&&R.shiftAndExecuteNext(g)})})},p.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},p.addBufferListener=function(i,u,h){var R=this.sourceBuffer[i];if(!R)return;var y=h.bind(this,i);this.listeners[i].push({event:u,listener:y}),R.addEventListener(u,y)},p.removeBufferListeners=function(i){var u=this.sourceBuffer[i];if(!u)return;this.listeners[i].forEach(function(h){u.removeEventListener(h.event,h.listener)})},b}()},"./src/controller/buffer-operation-queue.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return F});var Y=P("./src/utils/logger.ts"),F=function(){function A(B){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=B}var j=A.prototype;return j.append=function(L,T){var v=this.queues[T];v.push(L),v.length===1&&this.buffers[T]&&this.executeNext(T)},j.insertAbort=function(L,T){var v=this.queues[T];v.unshift(L),this.executeNext(T)},j.appendBlocker=function(L){var T,v=new Promise(function(k){T=k}),C={execute:T,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(C,L),v},j.executeNext=function(L){var T=this.buffers,v=this.queues,C=T[L],k=v[L];if(k.length){var O=k[0];try{O.execute()}catch(b){Y.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),O.onError(b),(!C||!C.updating)&&(k.shift(),this.executeNext(L))}}},j.shiftAndExecuteNext=function(L){this.queues[L].shift(),this.executeNext(L)},j.current=function(L){return this.queues[L][0]},A}()},"./src/controller/cap-level-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts");function F(B,L){for(var T=0;T<L.length;T++){var v=L[T];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(B,v.key,v)}}function A(B,L,T){return L&&F(B.prototype,L),T&&F(B,T),B}var j=function(){function B(T){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=T,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var L=B.prototype;return L.setStreamController=function(v){this.streamController=v},L.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},L.registerListeners=function(){var v=this.hls;v.on(Y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(Y.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},L.unregisterListener=function(){var v=this.hls;v.off(Y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(Y.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},L.onFpsDropLevelCapping=function(v,C){B.isLevelAllowed(C.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(C.droppedLevel)},L.onMediaAttaching=function(v,C){this.media=C.media instanceof HTMLVideoElement?C.media:null},L.onManifestParsed=function(v,C){var k=this.hls;this.restrictedLevels=[],this.firstLevel=C.firstLevel,k.config.capLevelToPlayerSize&&C.video&&this.startCapping()},L.onBufferCodecs=function(v,C){var k=this.hls;k.config.capLevelToPlayerSize&&C.video&&this.startCapping()},L.onMediaDetaching=function(){this.stopCapping()},L.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var C=this.hls;C.autoLevelCapping=this.getMaxLevel(v.length-1),C.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=C.autoLevelCapping}}},L.getMaxLevel=function(v){var C=this,k=this.hls.levels;if(!k.length)return-1;var O=k.filter(function(b,p){return B.isLevelAllowed(p,C.restrictedLevels)&&p<=v});return this.clientRect=null,B.getMaxLevelByMediaSize(O,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 v=this.media,C={width:0,height:0};if(v){var k=v.getBoundingClientRect();C.width=k.width,C.height=k.height,!C.width&&!C.height&&(C.width=k.right-k.left||v.width||0,C.height=k.bottom-k.top||v.height||0)}return this.clientRect=C,C},B.isLevelAllowed=function(v,C){return C===void 0&&(C=[]),C.indexOf(v)===-1},B.getMaxLevelByMediaSize=function(v,C,k){if(!v||!v.length)return-1;for(var O=function(u,h){return h?u.width!==h.width||u.height!==h.height:!0},b=v.length-1,p=0;p<v.length;p+=1){var c=v[p];if((c.width>=C||c.height>=k)&&O(c,v[p+1])){b=p;break}}return b},A(B,[{key:"mediaWidth",get:function(){return this.getDimensions().width*B.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*B.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(C){}return v}}]),B}();z.default=j},"./src/controller/cmcd-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return O});var Y=P("./src/events.ts"),F=P("./src/types/cmcd.ts"),A=P("./src/utils/buffer-helper.ts"),j=P("./src/utils/logger.ts");function B(b,p){for(var c=0;c<p.length;c++){var i=p[c];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(b,i.key,i)}}function L(b,p,c){return p&&B(b.prototype,p),c&&B(b,c),b}function T(b,p){var c=typeof Symbol!="undefined"&&b[Symbol.iterator]||b["@@iterator"];if(c)return(c=c.call(b)).next.bind(c);if(Array.isArray(b)||(c=v(b))||p&&b&&typeof b.length=="number"){c&&(b=c);var i=0;return function(){return i>=b.length?{done:!0}:{done:!1,value:b[i++]}}}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 v(b,p){if(!b)return;if(typeof b=="string")return C(b,p);var c=Object.prototype.toString.call(b).slice(8,-1);if(c==="Object"&&b.constructor&&(c=b.constructor.name),c==="Map"||c==="Set")return Array.from(b);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return C(b,p)}function C(b,p){(p==null||p>b.length)&&(p=b.length);for(var c=0,i=new Array(p);c<p;c++)i[c]=b[c];return i}function k(){return k=Object.assign||function(b){for(var p=1;p<arguments.length;p++){var c=arguments[p];for(var i in c)Object.prototype.hasOwnProperty.call(c,i)&&(b[i]=c[i])}return b},k.apply(this,arguments)}var O=function(){function b(c){var i=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(R){try{i.apply(R,{ot:F.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(y){j.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(R){try{var y=R.frag,g=i.hls.levels[y.level],D=i.getObjectType(y),S={d:y.duration*1e3,ot:D};(D===F.CMCDObjectType.VIDEO||D===F.CMCDObjectType.AUDIO||D==F.CMCDObjectType.MUXED)&&(S.br=g.bitrate/1e3,S.tb=i.getTopBandwidth(D),S.bl=i.getBufferLength(D)),i.apply(R,S)}catch(d){j.logger.warn("Could not generate segment CMCD data.",d)}},this.hls=c;var u=this.config=c.config,h=u.cmcd;h!=null&&(u.pLoader=this.createPlaylistLoader(),u.fLoader=this.createFragmentLoader(),this.sid=h.sessionId||b.uuid(),this.cid=h.contentId,this.useHeaders=h.useHeaders===!0,this.registerListeners())}var p=b.prototype;return p.registerListeners=function(){var i=this.hls;i.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(Y.Events.BUFFER_CREATED,this.onBufferCreated,this)},p.unregisterListeners=function(){var i=this.hls;i.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(Y.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},p.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},p.onMediaAttached=function(i,u){this.media=u.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},p.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},p.onBufferCreated=function(i,u){var h,R;this.audioBuffer=(h=u.tracks.audio)===null||h===void 0?void 0:h.buffer,this.videoBuffer=(R=u.tracks.video)===null||R===void 0?void 0:R.buffer},p.createData=function(){var i;return{v:F.CMCDVersion,sf:F.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},p.apply=function(i,u){u===void 0&&(u={}),k(u,this.createData());var h=u.ot===F.CMCDObjectType.INIT||u.ot===F.CMCDObjectType.VIDEO||u.ot===F.CMCDObjectType.MUXED;if(this.starved&&h&&(u.bs=!0,u.su=!0,this.starved=!1),u.su==null&&(u.su=this.buffering),this.useHeaders){var R=b.toHeaders(u);if(!Object.keys(R).length)return;i.headers||(i.headers={}),k(i.headers,R)}else{var y=b.toQuery(u);if(!y)return;i.url=b.appendQueryToUri(i.url,y)}},p.getObjectType=function(i){var u=i.type;return u==="subtitle"?F.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?F.CMCDObjectType.INIT:u==="audio"?F.CMCDObjectType.AUDIO:u==="main"?this.hls.audioTracks.length?F.CMCDObjectType.VIDEO:F.CMCDObjectType.MUXED:void 0},p.getTopBandwidth=function(i){for(var u=0,h=i===F.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,R=T(h),y;!(y=R()).done;){var g=y.value;g.bitrate>u&&(u=g.bitrate)}return u>0?u:NaN},p.getBufferLength=function(i){var u=this.hls.media,h=i===F.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!h||!u)return NaN;var R=A.BufferHelper.bufferInfo(h,u.currentTime,this.config.maxBufferHole);return R.len*1e3},p.createPlaylistLoader=function(){var i=this.config.pLoader,u=this.applyPlaylistData,h=i||this.config.loader;return function(){function R(g){this.loader=void 0,this.loader=new h(g)}var y=R.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(D,S,d){u(D),this.loader.load(D,S,d)},L(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},p.createFragmentLoader=function(){var i=this.config.fLoader,u=this.applyFragmentData,h=i||this.config.loader;return function(){function R(g){this.loader=void 0,this.loader=new h(g)}var y=R.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(D,S,d){u(D),this.loader.load(D,S,d)},L(R,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),R}()},b.uuid=function(){var i=URL.createObjectURL(new Blob),u=i.toString();return URL.revokeObjectURL(i),u.substr(u.lastIndexOf("/")+1)},b.serialize=function(i){for(var u=[],h=function(I){return!Number.isNaN(I)&&I!=null&&I!==""&&I!==!1},R=function(I){return Math.round(I)},y=function(I){return R(I/100)*100},g=function(I){return encodeURIComponent(I)},D={br:R,d:R,bl:y,dl:y,mtp:y,nor:g,rtp:y,tb:R},S=Object.keys(i||{}).sort(),d=T(S),l;!(l=d()).done;){var o=l.value,a=i[o];if(!h(a))continue;if(o==="v"&&a===1)continue;if(o=="pr"&&a===1)continue;var x=D[o];x&&(a=x(a));var E=typeof a,m=void 0;o==="ot"||o==="sf"||o==="st"?m=o+"="+a:E==="boolean"?m=o:E==="number"?m=o+"="+a:m=o+"="+JSON.stringify(a),u.push(m)}return u.join(",")},b.toHeaders=function(i){for(var u=Object.keys(i),h={},R=["Object","Request","Session","Status"],y=[{},{},{},{}],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},D=0,S=u;D<S.length;D++){var d=S[D],l=g[d]!=null?g[d]:1;y[l][d]=i[d]}for(var o=0;o<y.length;o++){var a=b.serialize(y[o]);a&&(h["CMCD-"+R[o]]=a)}return h},b.toQuery=function(i){return"CMCD="+encodeURIComponent(b.serialize(i))},b.appendQueryToUri=function(i,u){if(!u)return i;var h=i.includes("?")?"&":"?";return""+i+h+u},b}()},"./src/controller/eme-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts"),F=P("./src/errors.ts"),A=P("./src/utils/logger.ts"),j=P("./src/utils/mediakeys-helper.ts");function B(O,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(O,c.key,c)}}function L(O,b,p){return b&&B(O.prototype,b),p&&B(O,p),O}var T=3,v=function(b,p,c){var i={audioCapabilities:[],videoCapabilities:[]};return b.forEach(function(u){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+u+'"',robustness:c.audioRobustness||""})}),p.forEach(function(u){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+u+'"',robustness:c.videoRobustness||""})}),[i]},C=function(b,p,c,i){switch(b){case j.KeySystems.WIDEVINE:return v(p,c,i);default:throw new Error("Unknown key-system: "+b)}},k=function(){function O(p){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=p,this._config=p.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var b=O.prototype;return b.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},b._registerListeners=function(){this.hls.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},b._unregisterListeners=function(){this.hls.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},b.getLicenseServerUrl=function(c){switch(c){case j.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+c+'"')},b._attemptKeySystemAccess=function(c,i,u){var h=this,R=C(c,i,u,this._drmSystemOptions);A.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(c,R);this.mediaKeysPromise=y.then(function(g){return h._onMediaKeySystemAccessObtained(c,g)}),y.catch(function(g){A.logger.error('Failed to obtain key-system "'+c+'" access:',g)})},b._onMediaKeySystemAccessObtained=function(c,i){var u=this;A.logger.log('Access for key-system "'+c+'" obtained');var h={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:c};this._mediaKeysList.push(h);var R=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(y){return h.mediaKeys=y,A.logger.log('Media-keys created for key-system "'+c+'"'),u._onMediaKeysCreated(),y});return R.catch(function(y){A.logger.error("Failed to create media-keys:",y)}),R},b._onMediaKeysCreated=function(){var c=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),c._onNewMediaKeySession(i.mediaKeysSession))})},b._onNewMediaKeySession=function(c){var i=this;A.logger.log("New key-system session "+c.sessionId),c.addEventListener("message",function(u){i._onKeySessionMessage(c,u.message)},!1)},b._onKeySessionMessage=function(c,i){A.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(u){A.logger.log("Received license data (length: "+(u&&u.byteLength)+"), updating key-session"),c.update(u)})},b.onMediaEncrypted=function(c){var i=this;if(A.logger.log('Media is encrypted using "'+c.initDataType+'" init data type'),!this.mediaKeysPromise){A.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var u=function(R){if(!i._media)return;i._attemptSetMediaKeys(R),i._generateRequestWithPreferredKeySession(c.initDataType,c.initData)};this.mediaKeysPromise.then(u).catch(u)},b._attemptSetMediaKeys=function(c){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){A.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}A.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},b._generateRequestWithPreferredKeySession=function(c,i){var u=this,h=this._mediaKeysList[0];if(!h){A.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(h.mediaKeysSessionInitialized){A.logger.warn("Key-Session already initialized but requested again");return}var R=h.mediaKeysSession;if(!R){A.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){A.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}A.logger.log('Generating key-session request for "'+c+'" init data type'),h.mediaKeysSessionInitialized=!0,R.generateRequest(c,i).then(function(){A.logger.debug("Key-session generation succeeded")}).catch(function(y){A.logger.error("Error generating key-session request:",y),u.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},b._createLicenseXhr=function(c,i,u){var h=new XMLHttpRequest;h.responseType="arraybuffer",h.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,h,c,i,u);var R=this._licenseXhrSetup;if(R)try{R.call(this.hls,h,c),R=void 0}catch(y){A.logger.error(y)}try{h.readyState||h.open("POST",c,!0),R&&R.call(this.hls,h,c)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return h},b._onLicenseRequestReadyStageChange=function(c,i,u,h){switch(c.readyState){case 4:if(c.status===200){this._requestLicenseFailureCount=0,A.logger.log("License request succeeded");var R=c.response,y=this._licenseResponseCallback;if(y)try{R=y.call(this.hls,c,i)}catch(D){A.logger.error(D)}h(R)}else{if(A.logger.error("License Request XHR failed ("+i+"). Status: "+c.status+" ("+c.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>T){this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var g=T-this._requestLicenseFailureCount+1;A.logger.warn("Retrying license request, "+g+" attempts left"),this._requestLicense(u,h)}break}},b._generateLicenseRequestChallenge=function(c,i){switch(c.mediaKeySystemDomain){case j.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+c.mediaKeySystemDomain)},b._requestLicense=function(c,i){A.logger.log("Requesting content license for key-system");var u=this._mediaKeysList[0];if(!u){A.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var h=this.getLicenseServerUrl(u.mediaKeySystemDomain),R=this._createLicenseXhr(h,c,i);A.logger.log("Sending license request to URL: "+h);var y=this._generateLicenseRequestChallenge(u,c);R.send(y)}catch(g){A.logger.error("Failure requesting DRM license: "+g),this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},b.onMediaAttached=function(c,i){if(!this._emeEnabled)return;var u=i.media;this._media=u,u.addEventListener("encrypted",this._onMediaEncrypted)},b.onMediaDetached=function(){var c=this._media,i=this._mediaKeysList;if(!c)return;c.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(u){if(u.mediaKeysSession)return u.mediaKeysSession.close().catch(function(){})})).then(function(){return c.setMediaKeys(null)}).catch(function(){})},b.onManifestParsed=function(c,i){if(!this._emeEnabled)return;var u=i.levels.map(function(R){return R.audioCodec}).filter(function(R){return!!R}),h=i.levels.map(function(R){return R.videoCodec}).filter(function(R){return!!R});this._attemptKeySystemAccess(j.KeySystems.WIDEVINE,u,h)},L(O,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),O}();z.default=k},"./src/controller/fps-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts"),F=P("./src/utils/logger.ts"),A=function(){function j(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 B=j.prototype;return B.setStreamController=function(T){this.streamController=T},B.registerListeners=function(){this.hls.on(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},B.unregisterListeners=function(){this.hls.off(Y.Events.MEDIA_ATTACHING,this.onMediaAttaching)},B.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},B.onMediaAttaching=function(T,v){var C=this.hls.config;if(C.capLevelOnFPSDrop){var k=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=k,k&&typeof k.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),C.fpsDroppedMonitoringPeriod)}},B.checkFPS=function(T,v,C){var k=performance.now();if(v){if(this.lastTime){var O=k-this.lastTime,b=C-this.lastDroppedFrames,p=v-this.lastDecodedFrames,c=1e3*b/O,i=this.hls;if(i.trigger(Y.Events.FPS_DROP,{currentDropped:b,currentDecoded:p,totalDroppedFrames:C}),c>0&&b>i.config.fpsDroppedMonitoringThreshold*p){var u=i.currentLevel;F.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=u)&&(u=u-1,i.trigger(Y.Events.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:i.currentLevel}),i.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=k,this.lastDroppedFrames=C,this.lastDecodedFrames=v}},B.checkFPSInterval=function(){var T=this.media;if(T)if(this.isVideoPlaybackQualityAvailable){var v=T.getVideoPlaybackQuality();this.checkFPS(T,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(T,T.webkitDecodedFrameCount,T.webkitDroppedFrameCount)},j}();z.default=A},"./src/controller/fragment-finders.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"findFragmentByPDT",function(){return A}),P.d(z,"findFragmentByPTS",function(){return j}),P.d(z,"fragmentWithinToleranceTest",function(){return B}),P.d(z,"pdtWithinToleranceTest",function(){return L}),P.d(z,"findFragWithCC",function(){return T});var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/binary-search.ts");function A(v,C,k){if(C===null||!Array.isArray(v)||!v.length||!Object(Y.isFiniteNumber)(C))return null;var O=v[0].programDateTime;if(C<(O||0))return null;var b=v[v.length-1].endProgramDateTime;if(C>=(b||0))return null;k=k||0;for(var p=0;p<v.length;++p){var c=v[p];if(L(C,k,c))return c}return null}function j(v,C,k,O){k===void 0&&(k=0),O===void 0&&(O=0);var b=null;if(v?b=C[v.sn-C[0].sn+1]||null:k===0&&C[0].start===0&&(b=C[0]),b&&B(k,O,b)===0)return b;var p=F.default.search(C,B.bind(null,k,O));return p||b}function B(v,C,k){v===void 0&&(v=0),C===void 0&&(C=0);var O=Math.min(C,k.duration+(k.deltaPTS?k.deltaPTS:0));return k.start+k.duration-O<=v?1:k.start-O>v&&k.start?-1:0}function L(v,C,k){var O=Math.min(C,k.duration+(k.deltaPTS?k.deltaPTS:0))*1e3,b=k.endProgramDateTime||0;return b-O>v}function T(v,C){return F.default.search(v,function(k){return k.cc<C?1:k.cc>C?-1:0})}},"./src/controller/fragment-tracker.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"FragmentState",function(){return A}),P.d(z,"FragmentTracker",function(){return j});var Y=P("./src/events.ts"),F=P("./src/types/loader.ts"),A;(function(T){T.NOT_LOADED="NOT_LOADED",T.BACKTRACKED="BACKTRACKED",T.APPENDING="APPENDING",T.PARTIAL="PARTIAL",T.OK="OK"})(A||(A={}));var j=function(){function T(C){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=C,this._registerListeners()}var v=T.prototype;return v._registerListeners=function(){var k=this.hls;k.on(Y.Events.BUFFER_APPENDED,this.onBufferAppended,this),k.on(Y.Events.FRAG_BUFFERED,this.onFragBuffered,this),k.on(Y.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var k=this.hls;k.off(Y.Events.BUFFER_APPENDED,this.onBufferAppended,this),k.off(Y.Events.FRAG_BUFFERED,this.onFragBuffered,this),k.off(Y.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(k,O){if(O===F.PlaylistLevelType.MAIN){var b=this.activeFragment,p=this.activeParts;if(!b)return null;if(p)for(var c=p.length;c--;){var i=p[c],u=i?i.end:b.appendedPTS;if(i.start<=k&&u!==void 0&&k<=u)return c>9&&(this.activeParts=p.slice(c-9)),i}else if(b.start<=k&&b.appendedPTS!==void 0&&k<=b.appendedPTS)return b}return this.getBufferedFrag(k,O)},v.getBufferedFrag=function(k,O){for(var b=this.fragments,p=Object.keys(b),c=p.length;c--;){var i=b[p[c]];if((i==null?void 0:i.body.type)===O&&i.buffered){var u=i.body;if(u.start<=k&&k<=u.end)return u}}return null},v.detectEvictedFragments=function(k,O,b){var p=this;Object.keys(this.fragments).forEach(function(c){var i=p.fragments[c];if(!i)return;if(!i.buffered){i.body.type===b&&p.removeFragment(i.body);return}var u=i.range[k];if(!u)return;u.time.some(function(h){var R=!p.isTimeBuffered(h.startPTS,h.endPTS,O);return R&&p.removeFragment(i.body),R})})},v.detectPartialFragments=function(k){var O=this,b=this.timeRanges,p=k.frag,c=k.part;if(!b||p.sn==="initSegment")return;var i=L(p),u=this.fragments[i];if(!u)return;Object.keys(b).forEach(function(h){var R=p.elementaryStreams[h];if(!R)return;var y=b[h],g=c!==null||R.partial===!0;u.range[h]=O.getBufferedTimes(p,c,g,y)}),u.backtrack=u.loaded=null,Object.keys(u.range).length?u.buffered=!0:this.removeFragment(u.body)},v.fragBuffered=function(k){var O=L(k),b=this.fragments[O];b&&(b.backtrack=b.loaded=null,b.buffered=!0)},v.getBufferedTimes=function(k,O,b,p){for(var c={time:[],partial:b},i=O?O.start:k.start,u=O?O.end:k.end,h=k.minEndPTS||u,R=k.maxStartPTS||i,y=0;y<p.length;y++){var g=p.start(y)-this.bufferPadding,D=p.end(y)+this.bufferPadding;if(R>=g&&h<=D){c.time.push({startPTS:Math.max(i,p.start(y)),endPTS:Math.min(u,p.end(y))});break}else if(i<D&&u>g)c.partial=!0,c.time.push({startPTS:Math.max(i,p.start(y)),endPTS:Math.min(u,p.end(y))});else if(u<=g)break}return c},v.getPartialFragment=function(k){var O=null,b,p,c,i=0,u=this.bufferPadding,h=this.fragments;return Object.keys(h).forEach(function(R){var y=h[R];if(!y)return;B(y)&&(p=y.body.start-u,c=y.body.end+u,k>=p&&k<=c&&(b=Math.min(k-p,c-k),i<=b&&(O=y.body,i=b)))}),O},v.getState=function(k){var O=L(k),b=this.fragments[O];return b?b.buffered?B(b)?A.PARTIAL:A.OK:b.backtrack?A.BACKTRACKED:A.APPENDING:A.NOT_LOADED},v.backtrack=function(k,O){var b=L(k),p=this.fragments[b];if(!p||p.backtrack)return null;var c=p.backtrack=O||p.loaded;return p.loaded=null,c},v.getBacktrackData=function(k){var O=L(k),b=this.fragments[O];if(b){var p,c=b.backtrack;if(c!=null&&(p=c.payload)!==null&&p!==void 0&&p.byteLength)return c;this.removeFragment(k)}return null},v.isTimeBuffered=function(k,O,b){for(var p,c,i=0;i<b.length;i++){if(p=b.start(i)-this.bufferPadding,c=b.end(i)+this.bufferPadding,k>=p&&O<=c)return!0;if(O<=p)return!1}return!1},v.onFragLoaded=function(k,O){var b=O.frag,p=O.part;if(b.sn==="initSegment"||b.bitrateTest||p)return;var c=L(b);this.fragments[c]={body:b,loaded:O,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(k,O){var b=this,p=O.frag,c=O.part,i=O.timeRanges;if(p.type===F.PlaylistLevelType.MAIN)if(this.activeFragment=p,c){var u=this.activeParts;u||(this.activeParts=u=[]),u.push(c)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(h){var R=i[h];if(b.detectEvictedFragments(h,R),!c)for(var y=0;y<R.length;y++)p.appendedPTS=Math.max(R.end(y),p.appendedPTS||0)})},v.onFragBuffered=function(k,O){this.detectPartialFragments(O)},v.hasFragment=function(k){var O=L(k);return!!this.fragments[O]},v.removeFragmentsInRange=function(k,O,b){var p=this;Object.keys(this.fragments).forEach(function(c){var i=p.fragments[c];if(!i)return;if(i.buffered){var u=i.body;u.type===b&&u.start<O&&u.end>k&&p.removeFragment(u)}})},v.removeFragment=function(k){var O=L(k);k.stats.loaded=0,k.clearElementaryStreamInfo(),delete this.fragments[O]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},T}();function B(T){var v,C;return T.buffered&&(((v=T.range.video)===null||v===void 0?void 0:v.partial)||((C=T.range.audio)===null||C===void 0?void 0:C.partial))}function L(T){return T.type+"_"+T.level+"_"+T.urlId+"_"+T.sn}},"./src/controller/gap-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"STALL_MINIMUM_DURATION_MS",function(){return B}),P.d(z,"MAX_START_GAP_JUMP",function(){return L}),P.d(z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return T}),P.d(z,"SKIP_BUFFER_RANGE_START",function(){return v}),P.d(z,"default",function(){return C});var Y=P("./src/utils/buffer-helper.ts"),F=P("./src/errors.ts"),A=P("./src/events.ts"),j=P("./src/utils/logger.ts"),B=250,L=2,T=.1,v=.05,C=function(){function k(b,p,c,i){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=b,this.media=p,this.fragmentTracker=c,this.hls=i}var O=k.prototype;return O.destroy=function(){this.hls=this.fragmentTracker=this.media=null},O.poll=function(p){var c=this.config,i=this.media,u=this.stalled,h=i.currentTime,R=i.seeking,y=this.seeking&&!R,g=!this.seeking&&R;if(this.seeking=R,h!==p){if(this.moved=!0,u!==null){if(this.stallReported){var D=self.performance.now()-u;j.logger.warn("playback not stuck anymore @"+h+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((g||y)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!Y.BufferHelper.getBuffered(i).length)return;var S=Y.BufferHelper.bufferInfo(i,h,0),d=S.len>0,l=S.nextStart||0;if(!d&&!l)return;if(R){var o=S.len>L,a=!l||l-h>L&&!this.fragmentTracker.getPartialFragment(h);if(o||a)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var x,E=Math.max(l,S.start||0)-h,m=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,_=m==null||((x=m.details)===null||x===void 0)?void 0:x.live,I=_?m.details.targetduration*2:L;if(E>0&&E<=I){this._trySkipBufferHole(null);return}}var U=self.performance.now();if(u===null){this.stalled=U;return}var M=U-u;!R&&M>=B&&this._reportStall(S.len);var H=Y.BufferHelper.bufferInfo(i,h,c.maxBufferHole);this._tryFixBufferStall(H,M)},O._tryFixBufferStall=function(p,c){var i=this.config,u=this.fragmentTracker,h=this.media,R=h.currentTime,y=u.getPartialFragment(R);if(y){var g=this._trySkipBufferHole(y);if(g)return}p.len>i.maxBufferHole&&c>i.highBufferWatchdogPeriod*1e3&&(j.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},O._reportStall=function(p){var c=this.hls,i=this.media,u=this.stallReported;u||(this.stallReported=!0,j.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+p+")"),c.trigger(A.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}))},O._trySkipBufferHole=function(p){for(var c=this.config,i=this.hls,u=this.media,h=u.currentTime,R=0,y=Y.BufferHelper.getBuffered(u),g=0;g<y.length;g++){var D=y.start(g);if(h+c.maxBufferHole>=R&&h<D){var S=Math.max(D+v,u.currentTime+T);return j.logger.warn("skipping hole, adjusting currentTime from "+h+" to "+S),this.moved=!0,this.stalled=null,u.currentTime=S,p&&i.trigger(A.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+h+" to "+S,frag:p}),S}R=y.end(g)}return 0},O._tryNudgeBuffer=function(){var p=this.config,c=this.hls,i=this.media,u=i.currentTime,h=(this.nudgeRetry||0)+1;if(this.nudgeRetry=h,h<p.nudgeMaxRetry){var R=u+h*p.nudgeOffset;j.logger.warn("Nudging 'currentTime' from "+u+" to "+R),i.currentTime=R,c.trigger(A.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else j.logger.error("Playhead still not moving while enough data buffered @"+u+" after "+p.nudgeMaxRetry+" nudges"),c.trigger(A.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},k}()},"./src/controller/id3-track-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts"),F=P("./src/utils/texttrack-utils.ts"),A=P("./src/demux/id3.ts"),j=.25,B=function(){function L(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var T=L.prototype;return T.destroy=function(){this._unregisterListeners()},T._registerListeners=function(){var C=this.hls;C.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),C.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),C.on(Y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),C.on(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T._unregisterListeners=function(){var C=this.hls;C.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),C.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),C.off(Y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),C.off(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T.onMediaAttached=function(C,k){this.media=k.media},T.onMediaDetaching=function(){if(!this.id3Track)return;Object(F.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},T.getID3Track=function(C){if(!this.media)return;for(var k=0;k<C.length;k++){var O=C[k];if(O.kind==="metadata"&&O.label==="id3")return Object(F.sendAddTrackEvent)(O,this.media),O}return this.media.addTextTrack("metadata","id3")},T.onFragParsingMetadata=function(C,k){if(!this.media)return;var O=k.frag,b=k.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var p=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,c=0;c<b.length;c++){var i=A.getID3Frames(b[c].data);if(i){var u=b[c].pts,h=c<b.length-1?b[c+1].pts:O.end,R=h-u;R<=0&&(h=u+j);for(var y=0;y<i.length;y++){var g=i[y];if(!A.isTimeStampFrame(g)){var D=new p(u,h,"");D.value=g,this.id3Track.addCue(D)}}}}},T.onBufferFlushing=function(C,k){var O=k.startOffset,b=k.endOffset,p=k.type;if(!p||p==="audio"){var c=this.id3Track;c&&Object(F.removeCuesInRange)(c,O,b)}},L}();z.default=B},"./src/controller/latency-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return L});var Y=P("./src/errors.ts"),F=P("./src/events.ts"),A=P("./src/utils/logger.ts");function j(T,v){for(var C=0;C<v.length;C++){var k=v[C];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,k.key,k)}}function B(T,v,C){return v&&j(T.prototype,v),C&&j(T,C),T}var L=function(){function T(C){var k=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return k.timeupdate()},this.hls=C,this.config=C.config,this.registerListeners()}var v=T.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(F.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(F.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(F.Events.ERROR,this.onError)},v.onMediaAttached=function(k,O){this.media=O.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(k,O){var b=O.details;this.levelDetails=b,b.advanced&&this.timeupdate(),!b.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(k,O){if(O.details!==Y.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,A.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var k=this.media,O=this.levelDetails;if(!k||!O)return;this.currentTime=k.currentTime;var b=this.computeLatency();if(b===null)return;this._latency=b;var p=this.config,c=p.lowLatencyMode,i=p.maxLiveSyncPlaybackRate;if(!c||i===1)return;var u=this.targetLatency;if(u===null)return;var h=b-u,R=Math.min(this.maxLatency,u+O.targetduration),y=h<R;if(O.live&&y&&h>.05&&this.forwardBufferLength>1){var g=Math.min(2,Math.max(1,i)),D=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20;k.playbackRate=Math.min(g,Math.max(1,D))}else k.playbackRate!==1&&k.playbackRate!==0&&(k.playbackRate=1)},v.estimateLiveEdge=function(){var k=this.levelDetails;return k===null?null:k.edge+k.age},v.computeLatency=function(){var k=this.estimateLiveEdge();return k===null?null:k-this.currentTime},B(T,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var k=this.config,O=this.levelDetails;return k.liveMaxLatencyDuration!==void 0?k.liveMaxLatencyDuration:O?k.liveMaxLatencyDurationCount*O.targetduration:0}},{key:"targetLatency",get:function(){var k=this.levelDetails;if(k===null)return null;var O=k.holdBack,b=k.partHoldBack,p=k.targetduration,c=this.config,i=c.liveSyncDuration,u=c.liveSyncDurationCount,h=c.lowLatencyMode,R=this.hls.userConfig,y=h&&b||O;(R.liveSyncDuration||R.liveSyncDurationCount||y===0)&&(y=i!==void 0?i:u*p);var g=p,D=1;return y+Math.min(this.stallCount*D,g)}},{key:"liveSyncPosition",get:function(){var k=this.estimateLiveEdge(),O=this.targetLatency,b=this.levelDetails;if(k===null||O===null||b===null)return null;var p=b.edge,c=k-O-this.edgeStalled,i=p-b.totalduration,u=p-(this.config.lowLatencyMode&&b.partTarget||b.targetduration);return Math.min(Math.max(i,c),u)}},{key:"drift",get:function(){var k=this.levelDetails;return k===null?1:k.drift}},{key:"edgeStalled",get:function(){var k=this.levelDetails;if(k===null)return 0;var O=(this.config.lowLatencyMode&&k.partTarget||k.targetduration)*3;return Math.max(k.age-O,0)}},{key:"forwardBufferLength",get:function(){var k=this.media,O=this.levelDetails;if(!k||!O)return 0;var b=k.buffered.length;return b?k.buffered.end(b-1):O.edge-this.currentTime}}]),T}()},"./src/controller/level-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return c});var Y=P("./src/types/level.ts"),F=P("./src/events.ts"),A=P("./src/errors.ts"),j=P("./src/utils/codecs.ts"),B=P("./src/controller/level-helper.ts"),L=P("./src/controller/base-playlist-controller.ts"),T=P("./src/types/loader.ts");function v(){return v=Object.assign||function(i){for(var u=1;u<arguments.length;u++){var h=arguments[u];for(var R in h)Object.prototype.hasOwnProperty.call(h,R)&&(i[R]=h[R])}return i},v.apply(this,arguments)}function C(i,u){for(var h=0;h<u.length;h++){var R=u[h];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(i,R.key,R)}}function k(i,u,h){return u&&C(i.prototype,u),h&&C(i,h),i}function O(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,b(i,u)}function b(i,u){return b=Object.setPrototypeOf||function(R,y){return R.__proto__=y,R},b(i,u)}var p=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),c=function(i){O(u,i);function u(R){var y;return y=i.call(this,R,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var h=u.prototype;return h._registerListeners=function(){var y=this.hls;y.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(F.Events.ERROR,this.onError,this)},h._unregisterListeners=function(){var y=this.hls;y.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(F.Events.ERROR,this.onError,this)},h.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},h.startLoad=function(){var y=this._levels;y.forEach(function(g){g.loadError=0}),i.prototype.startLoad.call(this)},h.onManifestLoaded=function(y,g){var D=[],S=[],d=[],l,o={},a,x=!1,E=!1,m=!1;if(g.levels.forEach(function(M){var H=M.attrs;x=x||!!(M.width&&M.height),E=E||!!M.videoCodec,m=m||!!M.audioCodec,p&&M.audioCodec&&M.audioCodec.indexOf("mp4a.40.34")!==-1&&(M.audioCodec=void 0);var K=M.bitrate+"-"+M.attrs.RESOLUTION+"-"+M.attrs.CODECS;a=o[K],a?a.url.push(M.url):(a=new Y.Level(M),o[K]=a,D.push(a)),H&&(H.AUDIO&&Object(B.addGroupId)(a,"audio",H.AUDIO),H.SUBTITLES&&Object(B.addGroupId)(a,"text",H.SUBTITLES))}),(x||E)&&m&&(D=D.filter(function(M){var H=M.videoCodec,K=M.width,Z=M.height;return!!H||!!(K&&Z)})),D=D.filter(function(M){var H=M.audioCodec,K=M.videoCodec;return(!H||Object(j.isCodecSupportedInMp4)(H,"audio"))&&(!K||Object(j.isCodecSupportedInMp4)(K,"video"))}),g.audioTracks&&(S=g.audioTracks.filter(function(M){return!M.audioCodec||Object(j.isCodecSupportedInMp4)(M.audioCodec,"audio")}),Object(B.assignTrackIdsByGroup)(S)),g.subtitles&&(d=g.subtitles,Object(B.assignTrackIdsByGroup)(d)),D.length>0){l=D[0].bitrate,D.sort(function(M,H){return M.bitrate-H.bitrate}),this._levels=D;for(var _=0;_<D.length;_++)if(D[_].bitrate===l){this._firstLevel=_,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+l);break}var I=m&&!E,U={levels:D,audioTracks:S,subtitleTracks:d,firstLevel:this._firstLevel,stats:g.stats,audio:m,video:E,altAudio:!I&&S.some(function(M){return!!M.url})};this.hls.trigger(F.Events.MANIFEST_PARSED,U),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(F.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:g.url,reason:"no level with compatible codecs found in manifest"})},h.onError=function(y,g){if(i.prototype.onError.call(this,y,g),g.fatal)return;var D=g.context,S=this._levels[this.currentLevelIndex];if(D&&(D.type===T.PlaylistContextType.AUDIO_TRACK&&S.audioGroupIds&&D.groupId===S.audioGroupIds[S.urlId]||D.type===T.PlaylistContextType.SUBTITLE_TRACK&&S.textGroupIds&&D.groupId===S.textGroupIds[S.urlId])){this.redundantFailover(this.currentLevelIndex);return}var d=!1,l=!0,o;switch(g.details){case A.ErrorDetails.FRAG_LOAD_ERROR:case A.ErrorDetails.FRAG_LOAD_TIMEOUT:case A.ErrorDetails.KEY_LOAD_ERROR:case A.ErrorDetails.KEY_LOAD_TIMEOUT:if(g.frag){var a=this._levels[g.frag.level];a?(a.fragmentError++,a.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=g.frag.level)):o=g.frag.level}break;case A.ErrorDetails.LEVEL_LOAD_ERROR:case A.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(l=!1),o=D.level),d=!0;break;case A.ErrorDetails.REMUX_ALLOC_ERROR:o=g.level,d=!0;break}o!==void 0&&this.recoverLevel(g,o,d,l)},h.recoverLevel=function(y,g,D,S){var d=y.details,l=this._levels[g];if(l.loadError++,D){var o=this.retryLoadingOrFail(y);if(o)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(S){var a=l.url.length;if(a>1&&l.loadError<a)y.levelRetry=!0,this.redundantFailover(g);else if(this.manualLevelIndex===-1){var x=g===0?this._levels.length-1:g-1;this.currentLevelIndex!==x&&this._levels[x].loadError===0&&(this.warn(d+": switch to "+x),y.levelRetry=!0,this.hls.nextAutoLevel=x)}}},h.redundantFailover=function(y){var g=this._levels[y],D=g.url.length;if(D>1){var S=(g.urlId+1)%D;this.warn("Switching to redundant URL-id "+S),this._levels.forEach(function(d){d.urlId=S}),this.level=y}},h.onFragLoaded=function(y,g){var D=g.frag;if(D!==void 0&&D.type===T.PlaylistLevelType.MAIN){var S=this._levels[D.level];S!==void 0&&(S.fragmentError=0,S.loadError=0)}},h.onLevelLoaded=function(y,g){var D,S=g.level,d=g.details,l=this._levels[S];if(!l){var o;this.warn("Invalid level index "+S),(o=g.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(d.deltaUpdateFailed=!0);return}S===this.currentLevelIndex?(l.fragmentError===0&&(l.loadError=0,this.retryCount=0),this.playlistLoaded(S,g,l.details)):(D=g.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(d.deltaUpdateFailed=!0)},h.onAudioTrackSwitched=function(y,g){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var S=-1,d=this.hls.audioTracks[g.id].groupId,l=0;l<D.audioGroupIds.length;l++)if(D.audioGroupIds[l]===d){S=l;break}S!==D.urlId&&(D.urlId=S,this.startLoad())}},h.loadPlaylist=function(y){var g=this.currentLevelIndex,D=this._levels[g];if(this.canLoad&&D&&D.url.length>0){var S=D.urlId,d=D.url[S];if(y)try{d=y.addDirectives(d)}catch(l){this.warn("Could not construct new URL with HLS Delivery Directives: "+l)}this.log("Attempt loading level index "+g+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+S+" "+d),this.clearTimer(),this.hls.trigger(F.Events.LEVEL_LOADING,{url:d,level:g,id:S,deliveryDirectives:y||null})}},h.removeLevel=function(y,g){var D=function(l,o){return o!==g},S=this._levels.filter(function(d,l){return l!==y?!0:d.url.length>1&&g!==void 0?(d.url=d.url.filter(D),d.audioGroupIds&&(d.audioGroupIds=d.audioGroupIds.filter(D)),d.textGroupIds&&(d.textGroupIds=d.textGroupIds.filter(D)),d.urlId=0,!0):!1}).map(function(d,l){var o=d.details;return o!=null&&o.fragments&&o.fragments.forEach(function(a){a.level=l}),d});this._levels=S,this.hls.trigger(F.Events.LEVELS_UPDATED,{levels:S})},k(u,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var g,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===y&&(g=D[y])!==null&&g!==void 0&&g.details)return;if(y<0||y>=D.length){var S=y<0;if(this.hls.trigger(F.Events.ERROR,{type:A.ErrorTypes.OTHER_ERROR,details:A.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:S,reason:"invalid level idx"}),S)return;y=Math.min(y,D.length-1)}this.clearTimer();var d=this.currentLevelIndex,l=D[d],o=D[y];this.log("switching to level "+y+" from "+d),this.currentLevelIndex=y;var a=v({},o,{level:y,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete a._urlId,this.hls.trigger(F.Events.LEVEL_SWITCHING,a);var x=o.details;if(!x||x.live){var E=this.switchParams(o.uri,l==null?void 0:l.details);this.loadPlaylist(E)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),u}(L.default)},"./src/controller/level-helper.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"addGroupId",function(){return A}),P.d(z,"assignTrackIdsByGroup",function(){return j}),P.d(z,"updatePTS",function(){return B}),P.d(z,"updateFragPTSDTS",function(){return T}),P.d(z,"mergeDetails",function(){return v}),P.d(z,"mapPartIntersection",function(){return C}),P.d(z,"mapFragmentIntersection",function(){return k}),P.d(z,"adjustSliding",function(){return O}),P.d(z,"addSliding",function(){return b}),P.d(z,"computeReloadInterval",function(){return p}),P.d(z,"getFragmentWithSN",function(){return c}),P.d(z,"getPartWith",function(){return i});var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/logger.ts");function A(u,h,R){switch(h){case"audio":u.audioGroupIds||(u.audioGroupIds=[]),u.audioGroupIds.push(R);break;case"text":u.textGroupIds||(u.textGroupIds=[]),u.textGroupIds.push(R);break}}function j(u){var h={};u.forEach(function(R){var y=R.groupId||"";R.id=h[y]=h[y]||0,h[y]++})}function B(u,h,R){var y=u[h],g=u[R];L(y,g)}function L(u,h){var R=h.startPTS;if(Object(Y.isFiniteNumber)(R)){var y=0,g;h.sn>u.sn?(y=R-u.start,g=u):(y=u.start-R,g=h),g.duration!==y&&(g.duration=y)}else if(h.sn>u.sn){var D=u.cc===h.cc;D&&u.minEndPTS?h.start=u.start+(u.minEndPTS-u.start):h.start=u.start+u.duration}else h.start=Math.max(u.start-h.duration,0)}function T(u,h,R,y,g,D){var S=y-R;S<=0&&(F.logger.warn("Fragment should have a positive duration",h),y=R+h.duration,D=g+h.duration);var d=R,l=y,o=h.startPTS,a=h.endPTS;if(Object(Y.isFiniteNumber)(o)){var x=Math.abs(o-R);Object(Y.isFiniteNumber)(h.deltaPTS)?h.deltaPTS=Math.max(x,h.deltaPTS):h.deltaPTS=x,d=Math.max(R,o),R=Math.min(R,o),g=Math.min(g,h.startDTS),l=Math.min(y,a),y=Math.max(y,a),D=Math.max(D,h.endDTS)}h.duration=y-R;var E=R-h.start;h.appendedPTS=y,h.start=h.startPTS=R,h.maxStartPTS=d,h.startDTS=g,h.endPTS=y,h.minEndPTS=l,h.endDTS=D;var m=h.sn;if(!u||m<u.startSN||m>u.endSN)return 0;var _,I=m-u.startSN,U=u.fragments;for(U[I]=h,_=I;_>0;_--)L(U[_],U[_-1]);for(_=I;_<U.length-1;_++)L(U[_],U[_+1]);return u.fragmentHint&&L(U[U.length-1],u.fragmentHint),u.PTSKnown=u.alignedSliding=!0,E}function v(u,h){for(var R=null,y=u.fragments,g=y.length-1;g>=0;g--){var D=y[g].initSegment;if(D){R=D;break}}u.fragmentHint&&delete u.fragmentHint.endPTS;var S=0,d;if(k(u,h,function(_,I){_.relurl&&(S=_.cc-I.cc),Object(Y.isFiniteNumber)(_.startPTS)&&Object(Y.isFiniteNumber)(_.endPTS)&&(I.start=I.startPTS=_.startPTS,I.startDTS=_.startDTS,I.appendedPTS=_.appendedPTS,I.maxStartPTS=_.maxStartPTS,I.endPTS=_.endPTS,I.endDTS=_.endDTS,I.minEndPTS=_.minEndPTS,I.duration=_.endPTS-_.startPTS,I.duration&&(d=I),h.PTSKnown=h.alignedSliding=!0),I.elementaryStreams=_.elementaryStreams,I.loader=_.loader,I.stats=_.stats,I.urlId=_.urlId,_.initSegment&&(I.initSegment=_.initSegment,R=_.initSegment)}),R){var l=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments;l.forEach(function(_){var I;(!_.initSegment||_.initSegment.relurl===((I=R)===null||I===void 0?void 0:I.relurl))&&(_.initSegment=R)})}if(h.skippedSegments&&(h.deltaUpdateFailed=h.fragments.some(function(_){return!_}),h.deltaUpdateFailed)){F.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=h.skippedSegments;o--;)h.fragments.shift();h.startSN=h.fragments[0].sn,h.startCC=h.fragments[0].cc}var a=h.fragments;if(S){F.logger.warn("discontinuity sliding from playlist, take drift into account");for(var x=0;x<a.length;x++)a[x].cc+=S}h.skippedSegments&&(h.startCC=h.fragments[0].cc),C(u.partList,h.partList,function(_,I){I.elementaryStreams=_.elementaryStreams,I.stats=_.stats}),d?T(h,d,d.startPTS,d.endPTS,d.startDTS,d.endDTS):O(u,h),a.length&&(h.totalduration=h.edge-a[0].start),h.driftStartTime=u.driftStartTime,h.driftStart=u.driftStart;var E=h.advancedDateTime;if(h.advanced&&E){var m=h.edge;h.driftStart||(h.driftStartTime=E,h.driftStart=m),h.driftEndTime=E,h.driftEnd=m}else h.driftEndTime=u.driftEndTime,h.driftEnd=u.driftEnd,h.advancedDateTime=u.advancedDateTime}function C(u,h,R){if(u&&h)for(var y=0,g=0,D=u.length;g<=D;g++){var S=u[g],d=h[g+y];S&&d&&S.index===d.index&&S.fragment.sn===d.fragment.sn?R(S,d):y--}}function k(u,h,R){for(var y=h.skippedSegments,g=Math.max(u.startSN,h.startSN)-h.startSN,D=(u.fragmentHint?1:0)+(y?h.endSN:Math.min(u.endSN,h.endSN))-h.startSN,S=h.startSN-u.startSN,d=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,l=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,o=g;o<=D;o++){var a=l[S+o],x=d[o];y&&!x&&o<y&&(x=h.fragments[o]=a),a&&x&&R(a,x)}}function O(u,h){var R=h.startSN+h.skippedSegments-u.startSN,y=u.fragments;if(R<0||R>=y.length)return;b(h,y[R].start)}function b(u,h){if(h){for(var R=u.fragments,y=u.skippedSegments;y<R.length;y++)R[y].start+=h;u.fragmentHint&&(u.fragmentHint.start+=h)}}function p(u,h){var R=1e3*u.levelTargetDuration,y=R/2,g=u.age,D=g>0&&g<R*3,S=h.loading.end-h.loading.start,d,l=u.availabilityDelay;if(u.updated===!1)if(D){var o=333*u.misses;d=Math.max(Math.min(y,S*2),o),u.availabilityDelay=(u.availabilityDelay||0)+d}else d=y;else D?(l=Math.min(l||R/2,g),u.availabilityDelay=l,d=l+R-g):d=R-S;return Math.round(d)}function c(u,h,R){if(!u||!u.details)return null;var y=u.details,g=y.fragments[h-y.startSN];return g||(g=y.fragmentHint,g&&g.sn===h?g:h<y.startSN&&R&&R.sn===h?R:null)}function i(u,h,R){if(!u||!u.details)return null;var y=u.details.partList;if(y)for(var g=y.length;g--;){var D=y[g];if(D.index===R&&D.fragment.sn===h)return D}return null}},"./src/controller/stream-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return y});var Y=P("./src/polyfills/number.ts"),F=P("./src/controller/base-stream-controller.ts"),A=P("./src/is-supported.ts"),j=P("./src/events.ts"),B=P("./src/utils/buffer-helper.ts"),L=P("./src/controller/fragment-tracker.ts"),T=P("./src/types/loader.ts"),v=P("./src/loader/fragment.ts"),C=P("./src/demux/transmuxer-interface.ts"),k=P("./src/types/transmuxer.ts"),O=P("./src/controller/gap-controller.ts"),b=P("./src/errors.ts"),p=P("./src/utils/logger.ts");function c(g,D){for(var S=0;S<D.length;S++){var d=D[S];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function i(g,D,S){return D&&c(g.prototype,D),S&&c(g,S),g}function u(g,D){g.prototype=Object.create(D.prototype),g.prototype.constructor=g,h(g,D)}function h(g,D){return h=Object.setPrototypeOf||function(d,l){return d.__proto__=l,d},h(g,D)}var R=100,y=function(g){u(D,g);function D(d,l){var o;return o=g.call(this,d,l,"[stream-controller]")||this,o.audioCodecSwap=!1,o.gapController=null,o.level=-1,o._forceStartLoad=!1,o.altAudio=!1,o.audioOnly=!1,o.fragPlaying=null,o.onvplaying=null,o.onvseeked=null,o.fragLastKbps=0,o.stalled=!1,o.couldBacktrack=!1,o.audioCodecSwitch=!1,o.videoBuffer=null,o._registerListeners(),o}var S=D.prototype;return S._registerListeners=function(){var l=this.hls;l.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(j.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),l.on(j.Events.ERROR,this.onError,this),l.on(j.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(j.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),l.on(j.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(j.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(j.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),l.on(j.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S._unregisterListeners=function(){var l=this.hls;l.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(j.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),l.off(j.Events.ERROR,this.onError,this),l.off(j.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(j.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),l.off(j.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(j.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(j.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),l.off(j.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},S.startLoad=function(l){if(this.levels){var o=this.lastCurrentTime,a=this.hls;if(this.stopLoad(),this.setInterval(R),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var x=a.startLevel;x===-1&&(a.config.testBandwidth?(x=0,this.bitrateTest=!0):x=a.nextAutoLevel),this.level=a.nextLoadLevel=x,this.loadedmetadata=!1}o>0&&l===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),l=o),this.state=F.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()}else this._forceStartLoad=!0,this.state=F.State.STOPPED},S.stopLoad=function(){this._forceStartLoad=!1,g.prototype.stopLoad.call(this)},S.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_LEVEL:{var l,o=this.levels,a=this.level,x=o==null||((l=o[a])===null||l===void 0)?void 0:l.details;if(x&&(!x.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(x))break;this.state=F.State.IDLE;break}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var E,m=self.performance.now(),_=this.retryDate;(!_||m>=_||(E=this.media)!==null&&E!==void 0&&E.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=F.State.IDLE)}break;default:break}this.onTickEnd()},S.onTickEnd=function(){g.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},S.doTickIdle=function(){var l,o,a=this.hls,x=this.levelLastLoaded,E=this.levels,m=this.media,_=a.config,I=a.nextLoadLevel;if(x===null||!m&&(this.startFragRequested||!_.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!E||!E[I])return;var U=E[I];this.level=a.nextLoadLevel=I;var M=U.details;if(!M||this.state===F.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==I){this.state=F.State.WAITING_LEVEL;return}var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:m,T.PlaylistLevelType.MAIN);if(H===null)return;var K=H.len,Z=this.getMaxBufferLength(U.maxBitrate);if(K>=Z)return;if(this._streamEnded(H,M)){var le={};this.altAudio&&(le.type="video"),this.hls.trigger(j.Events.BUFFER_EOS,le),this.state=F.State.ENDED;return}var he=H.end,ye=this.getNextFragment(he,M);if(this.couldBacktrack&&!this.fragPrevious&&ye&&ye.sn!=="initSegment"){var Ue=ye.sn-M.startSN;Ue>1&&(ye=M.fragments[Ue-1],this.fragmentTracker.removeFragment(ye))}if(ye&&this.fragmentTracker.getState(ye)===L.FragmentState.OK&&this.nextLoadPosition>he){var Me=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(m,Me,T.PlaylistLevelType.MAIN),ye=this.getNextFragment(this.nextLoadPosition,M)}if(!ye)return;ye.initSegment&&!ye.initSegment.data&&!this.bitrateTest&&(ye=ye.initSegment),((l=ye.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((o=ye.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(ye,M):this.loadFragment(ye,M,he)},S.loadFragment=function(l,o,a){var x,E=this.fragmentTracker.getState(l);if(this.fragCurrent=l,E===L.FragmentState.BACKTRACKED){var m=this.fragmentTracker.getBacktrackData(l);if(m){this._handleFragmentLoadProgress(m),this._handleFragmentLoadComplete(m);return}else E=L.FragmentState.NOT_LOADED}E===L.FragmentState.NOT_LOADED||E===L.FragmentState.PARTIAL?l.sn==="initSegment"?this._loadInitSegment(l):this.bitrateTest?(l.bitrateTest=!0,this.log("Fragment "+l.sn+" of level "+l.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(l)):(this.startFragRequested=!0,g.prototype.loadFragment.call(this,l,o,a)):E===L.FragmentState.APPENDING?this.reduceMaxBufferLength(l.duration)&&this.fragmentTracker.removeFragment(l):((x=this.media)===null||x===void 0?void 0:x.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},S.getAppendedFrag=function(l){var o=this.fragmentTracker.getAppendedFrag(l,T.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},S.getBufferedFrag=function(l){return this.fragmentTracker.getBufferedFrag(l,T.PlaylistLevelType.MAIN)},S.followingBufferedFrag=function(l){return l?this.getBufferedFrag(l.end+.5):null},S.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},S.nextLevelSwitch=function(){var l=this.levels,o=this.media;if(o!=null&&o.readyState){var a,x=this.getAppendedFrag(o.currentTime);if(x&&x.start>1&&this.flushMainBuffer(0,x.start-1),!o.paused&&l){var E=this.hls.nextLoadLevel,m=l[E],_=this.fragLastKbps;_&&this.fragCurrent?a=this.fragCurrent.duration*m.maxBitrate/(1e3*_)+1:a=0}else a=0;var I=this.getBufferedFrag(o.currentTime+a);if(I){var U=this.followingBufferedFrag(I);if(U){this.abortCurrentFrag();var M=U.maxStartPTS?U.maxStartPTS:U.start,H=U.duration,K=Math.max(I.end,M+Math.min(Math.max(H-this.config.maxFragLookUpTolerance,H*.5),H*.75));this.flushMainBuffer(K,Number.POSITIVE_INFINITY)}}}},S.abortCurrentFrag=function(){var l=this.fragCurrent;this.fragCurrent=null,l!=null&&l.loader&&l.loader.abort(),this.state===F.State.KEY_LOADING&&(this.state=F.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},S.flushMainBuffer=function(l,o){g.prototype.flushMainBuffer.call(this,l,o,this.altAudio?"video":null)},S.onMediaAttached=function(l,o){g.prototype.onMediaAttached.call(this,l,o);var a=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),a.addEventListener("playing",this.onvplaying),a.addEventListener("seeked",this.onvseeked),this.gapController=new O.default(this.config,a,this.fragmentTracker,this.hls)},S.onMediaDetaching=function(){var l=this.media;l&&(l.removeEventListener("playing",this.onvplaying),l.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),g.prototype.onMediaDetaching.call(this)},S.onMediaPlaying=function(){this.tick()},S.onMediaSeeked=function(){var l=this.media,o=l?l.currentTime:null;Object(Y.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},S.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(j.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},S.onManifestParsed=function(l,o){var a=!1,x=!1,E;o.levels.forEach(function(m){E=m.audioCodec,E&&(E.indexOf("mp4a.40.2")!==-1&&(a=!0),E.indexOf("mp4a.40.5")!==-1&&(x=!0))}),this.audioCodecSwitch=a&&x&&!Object(A.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},S.onLevelLoading=function(l,o){var a=this.levels;if(!a||this.state!==F.State.IDLE)return;var x=a[o.level];(!x.details||x.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(x.details))&&(this.state=F.State.WAITING_LEVEL)},S.onLevelLoaded=function(l,o){var a,x=this.levels,E=o.level,m=o.details,_=m.totalduration;if(!x){this.warn("Levels were reset while loading level "+E);return}this.log("Level "+E+" loaded ["+m.startSN+","+m.endSN+"], cc ["+m.startCC+", "+m.endCC+"] duration:"+_);var I=this.fragCurrent;I&&(this.state===F.State.FRAG_LOADING||this.state===F.State.FRAG_LOADING_WAITING_RETRY)&&(I.level!==o.level&&I.loader&&(this.state=F.State.IDLE,I.loader.abort()));var U=x[E],M=0;if(m.live||(a=U.details)!==null&&a!==void 0&&a.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;M=this.alignPlaylists(m,U.details)}if(U.details=m,this.levelLastLoaded=E,this.hls.trigger(j.Events.LEVEL_UPDATED,{details:m,level:E}),this.state===F.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=F.State.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,M),this.tick()},S._handleFragmentLoadProgress=function(l){var o,a=l.frag,x=l.part,E=l.payload,m=this.levels;if(!m){this.warn("Levels were reset while fragment load was in progress. Fragment "+a.sn+" of level "+a.level+" will not be buffered");return}var _=m[a.level],I=_.details;if(!I){this.warn("Dropping fragment "+a.sn+" of level "+a.level+" after level details were reset");return}var U=_.videoCodec,M=I.PTSKnown||!I.live,H=(o=a.initSegment)===null||o===void 0?void 0:o.data,K=this._getAudioCodec(_),Z=this.transmuxer=this.transmuxer||new C.default(this.hls,T.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),le=x?x.index:-1,he=le!==-1,ye=new k.ChunkMetadata(a.level,a.sn,a.stats.chunkCount,E.byteLength,le,he),Ue=this.initPTS[a.cc];Z.push(E,H,K,U,a,x,I.totalduration,M,ye,Ue)},S.onAudioTrackSwitching=function(l,o){var a=this.altAudio,x=!!o.url,E=o.id;if(!x){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var m=this.fragCurrent;m!=null&&m.loader&&(this.log("Switching to main audio track, cancel main fragment load"),m.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var _=this.hls;a&&_.trigger(j.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),_.trigger(j.Events.AUDIO_TRACK_SWITCHED,{id:E})}},S.onAudioTrackSwitched=function(l,o){var a=o.id,x=!!this.hls.audioTracks[a].url;if(x){var E=this.videoBuffer;E&&this.mediaBuffer!==E&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=E)}this.altAudio=x,this.tick()},S.onBufferCreated=function(l,o){var a=o.tracks,x,E,m=!1;for(var _ in a){var I=a[_];if(I.id==="main"){if(E=_,x=I,_==="video"){var U=a[_];U&&(this.videoBuffer=U.buffer)}}else m=!0}m&&x?(this.log("Alternate track found, use "+E+".buffered to schedule main fragment loading"),this.mediaBuffer=x.buffer):this.mediaBuffer=this.media},S.onFragBuffered=function(l,o){var a=o.frag,x=o.part;if(a&&a.type!==T.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(a)){this.warn("Fragment "+a.sn+(x?" p: "+x.index:"")+" of level "+a.level+" finished buffering, but was aborted. state: "+this.state),this.state===F.State.PARSED&&(this.state=F.State.IDLE);return}var E=x?x.stats:a.stats;this.fragLastKbps=Math.round(8*E.total/(E.buffering.end-E.loading.first)),a.sn!=="initSegment"&&(this.fragPrevious=a),this.fragBufferedComplete(a,x)},S.onError=function(l,o){switch(o.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(T.PlaylistLevelType.MAIN,o);break;case b.ErrorDetails.LEVEL_LOAD_ERROR:case b.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==F.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=F.State.ERROR):!o.levelRetry&&this.state===F.State.WAITING_LEVEL&&(this.state=F.State.IDLE));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var a=!0,x=this.getFwdBufferInfo(this.media,T.PlaylistLevelType.MAIN);x&&x.len>.5&&(a=!this.reduceMaxBufferLength(x.len)),a&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},S.checkBuffer=function(){var l=this.media,o=this.gapController;if(!l||!o||!l.readyState)return;var a=B.BufferHelper.getBuffered(l);!this.loadedmetadata&&a.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=l.currentTime},S.onFragLoadEmergencyAborted=function(){this.state=F.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},S.onBufferFlushed=function(l,o){var a=o.type;if(a!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var x=(a===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(x,a,T.PlaylistLevelType.MAIN)}},S.onLevelsUpdated=function(l,o){this.levels=o.levels},S.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},S.seekToStartPos=function(){var l=this.media,o=l.currentTime,a=this.startPosition;if(a>=0&&o<a){if(l.seeking){p.logger.log("could not seek to "+a+", already seeking at "+o);return}var x=B.BufferHelper.getBuffered(l),E=x.length?x.start(0):0,m=E-a;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(p.logger.log("adjusting start position by "+m+" to match buffer start"),a+=m,this.startPosition=a),this.log("seek to target start position "+a+" from current time "+o),l.currentTime=a}},S._getAudioCodec=function(l){var o=this.config.defaultAudioCodec||l.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},S._loadBitrateTestFrag=function(l){var o=this;this._doFragLoad(l).then(function(a){var x=o.hls;if(!a||x.nextLoadLevel||o.fragContextChanged(l))return;o.fragLoadError=0,o.state=F.State.IDLE,o.startFragRequested=!1,o.bitrateTest=!1;var E=l.stats;E.parsing.start=E.parsing.end=E.buffering.start=E.buffering.end=self.performance.now(),x.trigger(j.Events.FRAG_LOADED,a)})},S._handleTransmuxComplete=function(l){var o,a="main",x=this.hls,E=l.remuxResult,m=l.chunkMeta,_=this.getCurrentContext(m);if(!_){this.warn("The loading context changed while buffering fragment "+m.sn+" of level "+m.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(m.level);return}var I=_.frag,U=_.part,M=_.level,H=E.video,K=E.text,Z=E.id3,le=E.initSegment,he=this.altAudio?void 0:E.audio;if(this.fragContextChanged(I))return;if(this.state=F.State.PARSING,le){le.tracks&&(this._bufferInitSegment(M,le.tracks,I,m),x.trigger(j.Events.FRAG_PARSING_INIT_SEGMENT,{frag:I,id:a,tracks:le.tracks}));var ye=le.initPTS,Ue=le.timescale;Object(Y.isFiniteNumber)(ye)&&(this.initPTS[I.cc]=ye,x.trigger(j.Events.INIT_PTS_FOUND,{frag:I,id:a,initPTS:ye,timescale:Ue}))}if(H&&E.independent!==!1){if(M.details){var Me=H.startPTS,_e=H.endPTS,Ie=H.startDTS,ke=H.endDTS;if(U)U.elementaryStreams[H.type]={startPTS:Me,endPTS:_e,startDTS:Ie,endDTS:ke};else if(H.firstKeyFrame&&H.independent&&(this.couldBacktrack=!0),H.dropped&&H.independent){var me=this.getLoadPosition()+this.config.maxBufferHole;if(me<Me){this.backtrack(I);return}I.setElementaryStreamInfo(H.type,I.start,_e,I.start,ke,!0)}I.setElementaryStreamInfo(H.type,Me,_e,Ie,ke),this.bufferFragmentData(H,I,U,m)}}else if(E.independent===!1){this.backtrack(I);return}if(he){var ce=he.startPTS,te=he.endPTS,be=he.startDTS,ae=he.endDTS;U&&(U.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:ce,endPTS:te,startDTS:be,endDTS:ae}),I.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,ce,te,be,ae),this.bufferFragmentData(he,I,U,m)}if(Z!=null&&(o=Z.samples)!==null&&o!==void 0&&o.length){var we={frag:I,id:a,samples:Z.samples};x.trigger(j.Events.FRAG_PARSING_METADATA,we)}if(K){var Pe={frag:I,id:a,samples:K.samples};x.trigger(j.Events.FRAG_PARSING_USERDATA,Pe)}},S._bufferInitSegment=function(l,o,a,x){var E=this;if(this.state!==F.State.PARSING)return;this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var m=o.audio,_=o.video,I=o.audiovideo;if(m){var U=l.audioCodec,M=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(U&&(U.indexOf("mp4a.40.5")!==-1?U="mp4a.40.2":U="mp4a.40.5"),m.metadata.channelCount!==1&&M.indexOf("firefox")===-1&&(U="mp4a.40.5")),M.indexOf("android")!==-1&&m.container!=="audio/mpeg"&&(U="mp4a.40.2",this.log("Android: force audio codec to "+U)),l.audioCodec&&l.audioCodec!==U&&this.log('Swapping manifest audio codec "'+l.audioCodec+'" for "'+U+'"'),m.levelCodec=U,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(U||"")+"/"+(l.audioCodec||"")+"/"+m.codec+"]")}_&&(_.levelCodec=l.videoCodec,_.id="main",this.log("Init video buffer, container:"+_.container+", codecs[level/parsed]=["+(l.videoCodec||"")+"/"+_.codec+"]")),I&&this.log("Init audiovideo buffer, container:"+I.container+", codecs[level/parsed]=["+(l.attrs.CODECS||"")+"/"+I.codec+"]"),this.hls.trigger(j.Events.BUFFER_CODECS,o),Object.keys(o).forEach(function(H){var K=o[H],Z=K.initSegment;Z!=null&&Z.byteLength&&E.hls.trigger(j.Events.BUFFER_APPENDING,{type:H,data:Z,frag:a,part:null,chunkMeta:x,parent:a.type})}),this.tick()},S.backtrack=function(l){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(l);var o=this.fragmentTracker.backtrack(l);this.fragPrevious=null,this.nextLoadPosition=l.start,o?this.resetFragmentLoading(l):this.state=F.State.BACKTRACKING},S.checkFragmentChanged=function(){var l=this.media,o=null;if(l&&l.readyState>1&&l.seeking===!1){var a=l.currentTime;if(B.BufferHelper.isBuffered(l,a)?o=this.getAppendedFrag(a):B.BufferHelper.isBuffered(l,a+.1)&&(o=this.getAppendedFrag(a+.1)),o){var x=this.fragPlaying,E=o.level;(!x||o.sn!==x.sn||x.level!==E||o.urlId!==x.urlId)&&(this.hls.trigger(j.Events.FRAG_CHANGED,{frag:o}),(!x||x.level!==E)&&this.hls.trigger(j.Events.LEVEL_SWITCHED,{level:E}),this.fragPlaying=o)}}},i(D,[{key:"nextLevel",get:function(){var l=this.nextBufferedFrag;return l?l.level:-1}},{key:"currentLevel",get:function(){var l=this.media;if(l){var o=this.getAppendedFrag(l.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var l=this.media;if(l){var o=this.getAppendedFrag(l.currentTime);return this.followingBufferedFrag(o)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(F.default)},"./src/controller/subtitle-stream-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"SubtitleStreamController",function(){return u});var Y=P("./src/events.ts"),F=P("./src/utils/logger.ts"),A=P("./src/utils/buffer-helper.ts"),j=P("./src/controller/fragment-finders.ts"),B=P("./src/utils/discontinuities.ts"),L=P("./src/controller/level-helper.ts"),T=P("./src/controller/fragment-tracker.ts"),v=P("./src/controller/base-stream-controller.ts"),C=P("./src/types/loader.ts"),k=P("./src/types/level.ts");function O(h,R){for(var y=0;y<R.length;y++){var g=R[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}function b(h,R,y){return R&&O(h.prototype,R),y&&O(h,y),h}function p(h,R){h.prototype=Object.create(R.prototype),h.prototype.constructor=h,c(h,R)}function c(h,R){return c=Object.setPrototypeOf||function(g,D){return g.__proto__=D,g},c(h,R)}var i=500,u=function(h){p(R,h);function R(g,D){var S;return S=h.call(this,g,D,"[subtitle-stream-controller]")||this,S.levels=[],S.currentTrackId=-1,S.tracksBuffered=[],S.mainDetails=null,S._registerListeners(),S}var y=R.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var D=this.hls;D.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(Y.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(Y.Events.ERROR,this.onError,this),D.on(Y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(Y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(Y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var D=this.hls;D.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(Y.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(Y.Events.ERROR,this.onError,this),D.off(Y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(Y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(Y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(Y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(i),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(D,S){this.mainDetails=S.details},y.onSubtitleFragProcessed=function(D,S){var d=S.frag,l=S.success;if(this.fragPrevious=d,this.state=v.State.IDLE,!l)return;var o=this.tracksBuffered[this.currentTrackId];if(!o)return;for(var a,x=d.start,E=0;E<o.length;E++)if(x>=o[E].start&&x<=o[E].end){a=o[E];break}var m=d.start+d.duration;a?a.end=m:(a={start:x,end:m},o.push(a)),this.fragmentTracker.fragBuffered(d)},y.onBufferFlushing=function(D,S){var d=S.startOffset,l=S.endOffset;if(d===0&&l!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,a=this.levels;if(!a.length||!a[o]||!a[o].details)return;var x=a[o].details,E=x.targetduration,m=l-E;if(m<=0)return;S.endOffsetSubtitles=Math.max(0,m),this.tracksBuffered.forEach(function(_){for(var I=0;I<_.length;){if(_[I].end<=m){_.shift();continue}else if(_[I].start<m)_[I].start=m;else break;I++}}),this.fragmentTracker.removeFragmentsInRange(d,m,C.PlaylistLevelType.SUBTITLE)}},y.onError=function(D,S){var d,l=S.frag;if(!l||l.type!==C.PlaylistLevelType.SUBTITLE)return;(d=this.fragCurrent)!==null&&d!==void 0&&d.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},y.onSubtitleTracksUpdated=function(D,S){var d=this,l=S.subtitleTracks;this.tracksBuffered=[],this.levels=l.map(function(o){return new k.Level(o)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(o){d.tracksBuffered[o.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(D,S){if(this.currentTrackId=S.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var d=this.levels[this.currentTrackId];d!=null&&d.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,d&&this.setInterval(i)},y.onSubtitleTrackLoaded=function(D,S){var d,l=S.details,o=S.id,a=this.currentTrackId,x=this.levels;if(!x.length)return;var E=x[a];if(o>=x.length||o!==a||!E)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,l.live||(d=E.details)!==null&&d!==void 0&&d.live){var m=this.mainDetails;if(l.deltaUpdateFailed||!m)return;var _=m.fragments[0];if(!E.details)l.hasProgramDateTime&&m.hasProgramDateTime?Object(B.alignMediaPlaylistByPDT)(l,m):_&&Object(L.addSliding)(l,_.start);else{var I=this.alignPlaylists(l,E.details);I===0&&_&&Object(L.addSliding)(l,_.start)}}if(E.details=l,this.levelLastLoaded=o,this.tick(),l.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var U=Object(j.findFragmentByPTS)(null,l.fragments,this.media.currentTime,0);U||(this.warn("Subtitle playlist not aligned with playback"),E.details=void 0)}},y._handleFragmentLoadComplete=function(D){var S=D.frag,d=D.payload,l=S.decryptdata,o=this.hls;if(this.fragContextChanged(S))return;if(d&&d.byteLength>0&&l&&l.key&&l.iv&&l.method==="AES-128"){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(d),l.key.buffer,l.iv.buffer).then(function(x){var E=performance.now();o.trigger(Y.Events.FRAG_DECRYPTED,{frag:S,payload:x,stats:{tstart:a,tdecrypt:E}})})}},y.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var D,S=this.currentTrackId,d=this.levels;if(!d.length||!d[S]||!d[S].details)return;var l=d[S].details,o=l.targetduration,a=this.config,x=this.media,E=A.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,x.currentTime-o,a.maxBufferHole),m=E.end,_=E.len,I=this.getMaxBufferLength()+o;if(_>I)return;console.assert(l,"Subtitle track details are defined on idle subtitle stream controller tick");var U=l.fragments,M=U.length,H=l.edge,K,Z=this.fragPrevious;if(m<H){var le=a.maxFragLookUpTolerance;Z&&l.hasProgramDateTime&&(K=Object(j.findFragmentByPDT)(U,Z.endProgramDateTime,le)),K||(K=Object(j.findFragmentByPTS)(Z,U,m,le),!K&&Z&&Z.start<U[0].start&&(K=U[0]))}else K=U[M-1];(D=K)!==null&&D!==void 0&&D.encrypted?(F.logger.log("Loading key for "+K.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(Y.Events.KEY_LOADING,{frag:K})):K&&this.fragmentTracker.getState(K)===T.FragmentState.NOT_LOADED&&this.loadFragment(K,l,m)}},y.loadFragment=function(D,S,d){this.fragCurrent=D,h.prototype.loadFragment.call(this,D,S,d)},b(R,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),R}(v.default)},"./src/controller/subtitle-track-controller.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/events.ts"),F=P("./src/utils/texttrack-utils.ts"),A=P("./src/controller/base-playlist-controller.ts"),j=P("./src/types/loader.ts");function B(O,b){for(var p=0;p<b.length;p++){var c=b[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(O,c.key,c)}}function L(O,b,p){return b&&B(O.prototype,b),p&&B(O,p),O}function T(O,b){O.prototype=Object.create(b.prototype),O.prototype.constructor=O,v(O,b)}function v(O,b){return v=Object.setPrototypeOf||function(c,i){return c.__proto__=i,c},v(O,b)}var C=function(O){T(b,O);function b(c){var i;return i=O.call(this,c,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var p=b.prototype;return p.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,O.prototype.destroy.call(this)},p.registerListeners=function(){var i=this.hls;i.on(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(Y.Events.ERROR,this.onError,this)},p.unregisterListeners=function(){var i=this.hls;i.off(Y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(Y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(Y.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(Y.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(Y.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(Y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(Y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(Y.Events.ERROR,this.onError,this)},p.onMediaAttached=function(i,u){if(this.media=u.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},p.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},p.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 i=k(this.media.textTracks);i.forEach(function(u){Object(F.clearCurrentCues)(u)}),this.subtitleTrack=-1,this.media=null},p.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},p.onManifestParsed=function(i,u){this.tracks=u.subtitleTracks},p.onSubtitleTrackLoaded=function(i,u){var h=u.id,R=u.details,y=this.trackId,g=this.tracksInGroup[y];if(!g){this.warn("Invalid subtitle track id "+h);return}var D=g.details;g.details=u.details,this.log("subtitle track "+h+" loaded ["+R.startSN+"-"+R.endSN+"]"),h===this.trackId&&(this.retryCount=0,this.playlistLoaded(h,u,D))},p.onLevelLoading=function(i,u){this.switchLevel(u.level)},p.onLevelSwitching=function(i,u){this.switchLevel(u.level)},p.switchLevel=function(i){var u=this.hls.levels[i];if(!(u!=null&&u.textGroupIds))return;var h=u.textGroupIds[u.urlId];if(this.groupId!==h){var R=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(S){return!h||S.groupId===h});this.tracksInGroup=y;var g=this.findTrackId(R==null?void 0:R.name)||this.findTrackId();this.groupId=h;var D={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+h+'" group-id'),this.hls.trigger(Y.Events.SUBTITLE_TRACKS_UPDATED,D),g!==-1&&this.setSubtitleTrack(g,R)}},p.findTrackId=function(i){for(var u=this.tracksInGroup,h=0;h<u.length;h++){var R=u[h];if((!this.selectDefaultTrack||R.default)&&(!i||i===R.name))return R.id}return-1},p.onError=function(i,u){if(O.prototype.onError.call(this,i,u),u.fatal||!u.context)return;u.context.type===j.PlaylistContextType.SUBTITLE_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},p.loadPlaylist=function(i){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var h=u.id,R=u.groupId,y=u.url;if(i)try{y=i.addDirectives(y)}catch(g){this.warn("Could not construct new URL with HLS Delivery Directives: "+g)}this.log("Loading subtitle playlist for id "+h),this.hls.trigger(Y.Events.SUBTITLE_TRACK_LOADING,{url:y,id:h,groupId:R,deliveryDirectives:i||null})}},p.toggleTrackModes=function(i){var u=this,h=this.media,R=this.subtitleDisplay,y=this.trackId;if(!h)return;var g=k(h.textTracks),D=g.filter(function(l){return l.groupId===u.groupId});if(i===-1)[].slice.call(g).forEach(function(l){l.mode="disabled"});else{var S=D[y];S&&(S.mode="disabled")}var d=D[i];d&&(d.mode=R?"showing":"hidden")},p.setSubtitleTrack=function(i,u){var h,R=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(h=R[i])!==null&&h!==void 0&&h.details)||i<-1||i>=R.length)return;this.clearTimer();var y=R[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,y){var g=y.id,D=y.groupId,S=D===void 0?"":D,d=y.name,l=y.type,o=y.url;this.hls.trigger(Y.Events.SUBTITLE_TRACK_SWITCH,{id:g,groupId:S,name:d,type:l,url:o});var a=this.switchParams(y.url,u==null?void 0:u.details);this.loadPlaylist(a)}else this.hls.trigger(Y.Events.SUBTITLE_TRACK_SWITCH,{id:i})},p.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,u=k(this.media.textTracks),h=0;h<u.length;h++)if(u[h].mode==="hidden")i=h;else if(u[h].mode==="showing"){i=h;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},L(b,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var u=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,u)}}]),b}(A.default);function k(O){for(var b=[],p=0;p<O.length;p++){var c=O[p];c.kind==="subtitles"&&c.label&&b.push(O[p])}return b}z.default=C},"./src/controller/timeline-controller.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"TimelineController",function(){return k});var Y=P("./src/polyfills/number.ts"),F=P("./src/events.ts"),A=P("./src/utils/cea-608-parser.ts"),j=P("./src/utils/output-filter.ts"),B=P("./src/utils/webvtt-parser.ts"),L=P("./src/utils/texttrack-utils.ts"),T=P("./src/utils/imsc1-ttml-parser.ts"),v=P("./src/types/loader.ts"),C=P("./src/utils/logger.ts"),k=function(){function c(u){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),this.captionsProperties=void 0,this.hls=u,this.config=u.config,this.Cues=u.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var h=new j.default(this,"textTrack1"),R=new j.default(this,"textTrack2"),y=new j.default(this,"textTrack3"),g=new j.default(this,"textTrack4");this.cea608Parser1=new A.default(1,h,R),this.cea608Parser2=new A.default(3,y,g)}u.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.on(F.Events.FRAG_LOADING,this.onFragLoading,this),u.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.on(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.on(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.on(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=c.prototype;return i.destroy=function(){var h=this.hls;h.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),h.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),h.off(F.Events.FRAG_LOADING,this.onFragLoading,this),h.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),h.off(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),h.off(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),h.off(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),h.off(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),h.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(h,R,y,g,D){for(var S=!1,d=D.length;d--;){var l=D[d],o=b(l[0],l[1],R,y);if(o>=0&&(l[0]=Math.min(l[0],R),l[1]=Math.max(l[1],y),S=!0,o/(y-R)>.5))return}if(S||D.push([R,y]),this.config.renderTextTracksNatively){var a=this.captionsTracks[h];this.Cues.newCue(a,R,y,g)}else{var x=this.Cues.newCue(null,R,y,g);this.hls.trigger(F.Events.CUES_PARSED,{type:"captions",cues:x,track:h})}},i.onInitPtsFound=function(h,R){var y=this,g=R.frag,D=R.id,S=R.initPTS,d=R.timescale,l=this.unparsedVttFrags;D==="main"&&(this.initPTS[g.cc]=S,this.timescale[g.cc]=d),l.length&&(this.unparsedVttFrags=[],l.forEach(function(o){y.onFragLoaded(F.Events.FRAG_LOADED,o)}))},i.getExistingTrack=function(h){var R=this.media;if(R)for(var y=0;y<R.textTracks.length;y++){var g=R.textTracks[y];if(g[h])return g}return null},i.createCaptionsTrack=function(h){this.config.renderTextTracksNatively?this.createNativeTrack(h):this.createNonNativeTrack(h)},i.createNativeTrack=function(h){if(this.captionsTracks[h])return;var R=this.captionsProperties,y=this.captionsTracks,g=this.media,D=R[h],S=D.label,d=D.languageCode,l=this.getExistingTrack(h);if(l)y[h]=l,Object(L.clearCurrentCues)(y[h]),Object(L.sendAddTrackEvent)(y[h],g);else{var o=this.createTextTrack("captions",S,d);o&&(o[h]=!0,y[h]=o)}},i.createNonNativeTrack=function(h){if(this.nonNativeCaptionsTracks[h])return;var R=this.captionsProperties[h];if(!R)return;var y=R.label,g={_id:h,label:y,kind:"captions",default:R.media?!!R.media.default:!1,closedCaptions:R.media};this.nonNativeCaptionsTracks[h]=g,this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[g]})},i.createTextTrack=function(h,R,y){var g=this.media;return g?g.addTextTrack(h,R,y):void 0},i.onMediaAttaching=function(h,R){this.media=R.media,this._cleanTracks()},i.onMediaDetaching=function(){var h=this.captionsTracks;Object.keys(h).forEach(function(R){Object(L.clearCurrentCues)(h[R]),delete h[R]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},i._cleanTracks=function(){var h=this.media;if(!h)return;var R=h.textTracks;if(R)for(var y=0;y<R.length;y++)Object(L.clearCurrentCues)(R[y])},i.onSubtitleTracksUpdated=function(h,R){var y=this;this.textTracks=[];var g=R.subtitleTracks||[],D=g.some(function(o){return o.textCodec===T.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var S=this.tracks&&g&&this.tracks.length===g.length;if(this.tracks=g||[],this.config.renderTextTracksNatively){var d=this.media?this.media.textTracks:[];this.tracks.forEach(function(o,a){var x;if(a<d.length){for(var E=null,m=0;m<d.length;m++)if(O(d[m],o)){E=d[m];break}E&&(x=E)}x?Object(L.clearCurrentCues)(x):(x=y.createTextTrack("subtitles",o.name,o.lang),x&&(x.mode="disabled")),x&&(x.groupId=o.groupId,y.textTracks.push(x))})}else if(!S&&this.tracks&&this.tracks.length){var l=this.tracks.map(function(o){return{label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}});this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},i.onManifestLoaded=function(h,R){var y=this;this.config.enableCEA708Captions&&R.captions&&R.captions.forEach(function(g){var D=/(?:CC|SERVICE)([1-4])/.exec(g.instreamId);if(!D)return;var S="textTrack"+D[1],d=y.captionsProperties[S];if(!d)return;d.label=g.name,g.lang&&(d.languageCode=g.lang),d.media=g})},i.onFragLoading=function(h,R){var y=this.cea608Parser1,g=this.cea608Parser2,D=this.lastSn,S=this.lastPartIndex;if(!this.enabled||!(y&&g))return;if(R.frag.type===v.PlaylistLevelType.MAIN){var d,l,o=R.frag.sn,a=(d=R==null||((l=R.part)===null||l===void 0)?void 0:l.index)!=null?d:-1;o===D+1||o===D&&a===S+1||(y.reset(),g.reset()),this.lastSn=o,this.lastPartIndex=a}},i.onFragLoaded=function(h,R){var y=R.frag,g=R.payload,D=this.initPTS,S=this.unparsedVttFrags;if(y.type===v.PlaylistLevelType.SUBTITLE)if(g.byteLength){if(!Object(Y.isFiniteNumber)(D[y.cc])){S.push(R),D.length&&this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var d=y.decryptdata;if(d==null||d.key==null||d.method!=="AES-128"){var l=this.tracks[y.level],o=this.vttCCs;o[y.cc]||(o[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),l&&l.textCodec===T.IMSC1_CODEC?this._parseIMSC1(y,g):this._parseVTTs(y,g,o)}}else this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(h,R){var y=this,g=this.hls;Object(T.parseIMSC1)(R,this.initPTS[h.cc],this.timescale[h.cc],function(D){y._appendCues(D,h.level),g.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(D){C.logger.log("Failed to parse IMSC1: "+D),g.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:D})})},i._parseVTTs=function(h,R,y){var g=this,D=this.hls;Object(B.parseWebVTT)(R,this.initPTS[h.cc],this.timescale[h.cc],y,h.cc,h.start,function(S){g._appendCues(S,h.level),D.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(S){g._fallbackToIMSC1(h,R),C.logger.log("Failed to parse VTT cue: "+S),D.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:S})})},i._fallbackToIMSC1=function(h,R){var y=this,g=this.tracks[h.level];g.textCodec||Object(T.parseIMSC1)(R,this.initPTS[h.cc],this.timescale[h.cc],function(){g.textCodec=T.IMSC1_CODEC,y._parseIMSC1(h,R)},function(){g.textCodec="wvtt"})},i._appendCues=function(h,R){var y=this.hls;if(this.config.renderTextTracksNatively){var g=this.textTracks[R];if(g.mode==="disabled")return;h.forEach(function(d){return Object(L.addCueToTrack)(g,d)})}else{var D=this.tracks[R],S=D.default?"default":"subtitles"+R;y.trigger(F.Events.CUES_PARSED,{type:"subtitles",cues:h,track:S})}},i.onFragDecrypted=function(h,R){var y=R.frag;if(y.type===v.PlaylistLevelType.SUBTITLE){if(!Object(Y.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(R);return}this.onFragLoaded(F.Events.FRAG_LOADED,R)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(h,R){var y=this.cea608Parser1,g=this.cea608Parser2;if(!this.enabled||!(y&&g))return;for(var D=0;D<R.samples.length;D++){var S=R.samples[D].bytes;if(S){var d=this.extractCea608Data(S);y.addData(R.samples[D].pts,d[0]),g.addData(R.samples[D].pts,d[1])}}},i.onBufferFlushing=function(h,R){var y=R.startOffset,g=R.endOffset,D=R.endOffsetSubtitles,S=R.type,d=this.media;if(!d||d.currentTime<g)return;if(!S||S==="video"){var l=this.captionsTracks;Object.keys(l).forEach(function(a){return Object(L.removeCuesInRange)(l[a],y,g)})}if(this.config.renderTextTracksNatively&&(y===0&&D!==void 0)){var o=this.textTracks;Object.keys(o).forEach(function(a){return Object(L.removeCuesInRange)(o[a],y,D)})}},i.extractCea608Data=function(h){for(var R=h[0]&31,y=2,g=[[],[]],D=0;D<R;D++){var S=h[y++],d=127&h[y++],l=127&h[y++],o=(4&S)!==0,a=3&S;if(d===0&&l===0)continue;o&&((a===0||a===1)&&(g[a].push(d),g[a].push(l)))}return g},c}();function O(c,i){return c&&c.label===i.name&&!(c.textTrack1||c.textTrack2)}function b(c,i,u,h){return Math.min(i,h)-Math.max(c,u)}function p(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return Y});var Y=function(){function F(j,B){this.subtle=void 0,this.aesIV=void 0,this.subtle=j,this.aesIV=B}var A=F.prototype;return A.decrypt=function(B,L){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},L,B)},F}()},"./src/crypt/aes-decryptor.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"removePadding",function(){return F}),P.d(z,"default",function(){return A});var Y=P("./src/utils/typed-array.ts");function F(j){var B=j.byteLength,L=B&&new DataView(j.buffer).getUint8(B-1);return L?Object(Y.sliceUint8)(j,0,B-L):j}var A=function(){function j(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var B=j.prototype;return B.uint8ArrayToUint32Array_=function(T){for(var v=new DataView(T),C=new Uint32Array(4),k=0;k<4;k++)C[k]=v.getUint32(k*4);return C},B.initTable=function(){var T=this.sBox,v=this.invSBox,C=this.subMix,k=C[0],O=C[1],b=C[2],p=C[3],c=this.invSubMix,i=c[0],u=c[1],h=c[2],R=c[3],y=new Uint32Array(256),g=0,D=0,S=0;for(S=0;S<256;S++)S<128?y[S]=S<<1:y[S]=S<<1^283;for(S=0;S<256;S++){var d=D^D<<1^D<<2^D<<3^D<<4;d=d>>>8^d&255^99,T[g]=d,v[d]=g;var l=y[g],o=y[l],a=y[o],x=y[d]*257^d*16843008;k[g]=x<<24|x>>>8,O[g]=x<<16|x>>>16,b[g]=x<<8|x>>>24,p[g]=x,x=a*16843009^o*65537^l*257^g*16843008,i[d]=x<<24|x>>>8,u[d]=x<<16|x>>>16,h[d]=x<<8|x>>>24,R[d]=x,g?(g=l^y[y[y[a^l]]],D^=y[y[D]]):g=D=1}},B.expandKey=function(T){for(var v=this.uint8ArrayToUint32Array_(T),C=!0,k=0;k<v.length&&C;)C=v[k]===this.key[k],k++;if(C)return;this.key=v;var O=this.keySize=v.length;if(O!==4&&O!==6&&O!==8)throw new Error("Invalid aes key size="+O);var b=this.ksRows=(O+6+1)*4,p,c,i=this.keySchedule=new Uint32Array(b),u=this.invKeySchedule=new Uint32Array(b),h=this.sBox,R=this.rcon,y=this.invSubMix,g=y[0],D=y[1],S=y[2],d=y[3],l,o;for(p=0;p<b;p++){if(p<O){l=i[p]=v[p];continue}o=l,p%O===0?(o=o<<8|o>>>24,o=h[o>>>24]<<24|h[o>>>16&255]<<16|h[o>>>8&255]<<8|h[o&255],o^=R[p/O|0]<<24):O>6&&p%O===4&&(o=h[o>>>24]<<24|h[o>>>16&255]<<16|h[o>>>8&255]<<8|h[o&255]),i[p]=l=(i[p-O]^o)>>>0}for(c=0;c<b;c++)p=b-c,c&3?o=i[p]:o=i[p-4],c<4||p<=4?u[c]=o:u[c]=g[h[o>>>24]]^D[h[o>>>16&255]]^S[h[o>>>8&255]]^d[h[o&255]],u[c]=u[c]>>>0},B.networkToHostOrderSwap=function(T){return T<<24|(T&65280)<<8|(T&16711680)>>8|T>>>24},B.decrypt=function(T,v,C){for(var k=this.keySize+6,O=this.invKeySchedule,b=this.invSBox,p=this.invSubMix,c=p[0],i=p[1],u=p[2],h=p[3],R=this.uint8ArrayToUint32Array_(C),y=R[0],g=R[1],D=R[2],S=R[3],d=new Int32Array(T),l=new Int32Array(d.length),o,a,x,E,m,_,I,U,M,H,K,Z,le,he,ye=this.networkToHostOrderSwap;v<d.length;){for(M=ye(d[v]),H=ye(d[v+1]),K=ye(d[v+2]),Z=ye(d[v+3]),m=M^O[0],_=Z^O[1],I=K^O[2],U=H^O[3],le=4,he=1;he<k;he++)o=c[m>>>24]^i[_>>16&255]^u[I>>8&255]^h[U&255]^O[le],a=c[_>>>24]^i[I>>16&255]^u[U>>8&255]^h[m&255]^O[le+1],x=c[I>>>24]^i[U>>16&255]^u[m>>8&255]^h[_&255]^O[le+2],E=c[U>>>24]^i[m>>16&255]^u[_>>8&255]^h[I&255]^O[le+3],m=o,_=a,I=x,U=E,le=le+4;o=b[m>>>24]<<24^b[_>>16&255]<<16^b[I>>8&255]<<8^b[U&255]^O[le],a=b[_>>>24]<<24^b[I>>16&255]<<16^b[U>>8&255]<<8^b[m&255]^O[le+1],x=b[I>>>24]<<24^b[U>>16&255]<<16^b[m>>8&255]<<8^b[_&255]^O[le+2],E=b[U>>>24]<<24^b[m>>16&255]<<16^b[_>>8&255]<<8^b[I&255]^O[le+3],l[v]=ye(o^y),l[v+1]=ye(E^g),l[v+2]=ye(x^D),l[v+3]=ye(a^S),y=M,g=H,D=K,S=Z,v=v+4}return l.buffer},j}()},"./src/crypt/decrypter.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return v});var Y=P("./src/crypt/aes-crypto.ts"),F=P("./src/crypt/fast-aes-key.ts"),A=P("./src/crypt/aes-decryptor.ts"),j=P("./src/utils/logger.ts"),B=P("./src/utils/mp4-tools.ts"),L=P("./src/utils/typed-array.ts"),T=16,v=function(){function C(O,b,p){var c=p===void 0?{}:p,i=c.removePKCS7Padding,u=i===void 0?!0:i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=O,this.config=b,this.removePKCS7Padding=u,u)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(R){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var k=C.prototype;return k.destroy=function(){this.observer=null},k.isSync=function(){return this.config.enableSoftwareAES},k.flush=function(){var b=this.currentResult;if(!b){this.reset();return}var p=new Uint8Array(b);return this.reset(),this.removePKCS7Padding?Object(A.removePadding)(p):p},k.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},k.decrypt=function(b,p,c,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(b),p,c);var u=this.flush();u&&i(u.buffer)}else this.webCryptoDecrypt(new Uint8Array(b),p,c).then(i)},k.softwareDecrypt=function(b,p,c){var i=this.currentIV,u=this.currentResult,h=this.remainderData;this.logOnce("JS AES decrypt"),h&&(b=Object(B.appendUint8Array)(h,b),this.remainderData=null);var R=this.getValidChunk(b);if(!R.length)return null;i&&(c=i);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new A.default),y.expandKey(p);var g=u;return this.currentResult=y.decrypt(R.buffer,0,c),this.currentIV=Object(L.sliceUint8)(R,-16).buffer,g||null},k.webCryptoDecrypt=function(b,p,c){var i=this,u=this.subtle;return(this.key!==p||!this.fastAesKey)&&(this.key=p,this.fastAesKey=new F.default(u,p)),this.fastAesKey.expandKey().then(function(h){if(!u)return Promise.reject(new Error("web crypto not initialized"));var R=new Y.default(u,c);return R.decrypt(b.buffer,h)}).catch(function(h){return i.onWebCryptoError(h,b,p,c)})},k.onWebCryptoError=function(b,p,c,i){return j.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",b),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(p,c,i)},k.getValidChunk=function(b){var p=b,c=b.length-b.length%T;return c!==b.length&&(p=Object(L.sliceUint8)(b,0,c),this.remainderData=Object(L.sliceUint8)(b,c)),p},k.logOnce=function(b){if(!this.logEnabled)return;j.logger.log("[decrypter.ts]: "+b),this.logEnabled=!1},C}()},"./src/crypt/fast-aes-key.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return Y});var Y=function(){function F(j,B){this.subtle=void 0,this.key=void 0,this.subtle=j,this.key=B}var A=F.prototype;return A.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},F}()},"./src/demux/aacdemuxer.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/demux/base-audio-demuxer.ts"),F=P("./src/demux/adts.ts"),A=P("./src/utils/logger.ts"),j=P("./src/demux/id3.ts");function B(v,C){v.prototype=Object.create(C.prototype),v.prototype.constructor=v,L(v,C)}function L(v,C){return L=Object.setPrototypeOf||function(O,b){return O.__proto__=b,O},L(v,C)}var T=function(v){B(C,v);function C(O,b){var p;return p=v.call(this)||this,p.observer=void 0,p.config=void 0,p.observer=O,p.config=b,p}var k=C.prototype;return k.resetInitSegment=function(b,p,c){v.prototype.resetInitSegment.call(this,b,p,c),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:b,duration:c,inputTimeScale:9e4,dropped:0}},C.probe=function(b){if(!b)return!1;for(var p=j.getID3Data(b,0)||[],c=p.length,i=b.length;c<i;c++)if(F.probe(b,c))return A.logger.log("ADTS sync word found !"),!0;return!1},k.canParse=function(b,p){return F.canParse(b,p)},k.appendFrame=function(b,p,c){F.initTrackConfig(b,this.observer,p,c,b.manifestCodec);var i=F.appendFrame(b,p,c,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},C}(Y.default);T.minProbeByteLength=9,z.default=T},"./src/demux/adts.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"getAudioConfig",function(){return j}),P.d(z,"isHeaderPattern",function(){return B}),P.d(z,"getHeaderLength",function(){return L}),P.d(z,"getFullFrameLength",function(){return T}),P.d(z,"canGetFrameLength",function(){return v}),P.d(z,"isHeader",function(){return C}),P.d(z,"canParse",function(){return k}),P.d(z,"probe",function(){return O}),P.d(z,"initTrackConfig",function(){return b}),P.d(z,"getFrameDuration",function(){return p}),P.d(z,"parseFrameHeader",function(){return c}),P.d(z,"appendFrame",function(){return i});var Y=P("./src/utils/logger.ts"),F=P("./src/errors.ts"),A=P("./src/events.ts");function j(u,h,R,y){var g,D,S,d,l=navigator.userAgent.toLowerCase(),o=y,a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];g=((h[R+2]&192)>>>6)+1;var x=(h[R+2]&60)>>>2;if(x>a.length-1){u.trigger(A.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+x});return}return S=(h[R+2]&1)<<2,S|=(h[R+3]&192)>>>6,Y.logger.log("manifest codec:"+y+", ADTS type:"+g+", samplingIndex:"+x),/firefox/i.test(l)?x>=6?(g=5,d=new Array(4),D=x-3):(g=2,d=new Array(2),D=x):l.indexOf("android")!==-1?(g=2,d=new Array(2),D=x):(g=5,d=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&x>=6?D=x-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(x>=6&&S===1||/vivaldi/i.test(l))||!y&&S===1)&&(g=2,d=new Array(2)),D=x)),d[0]=g<<3,d[0]|=(x&14)>>1,d[1]|=(x&1)<<7,d[1]|=S<<3,g===5&&(d[1]|=(D&14)>>1,d[2]=(D&1)<<7,d[2]|=2<<2,d[3]=0),{config:d,samplerate:a[x],channelCount:S,codec:"mp4a.40."+g,manifestCodec:o}}function B(u,h){return u[h]===255&&(u[h+1]&246)===240}function L(u,h){return u[h+1]&1?7:9}function T(u,h){return(u[h+3]&3)<<11|u[h+4]<<3|(u[h+5]&224)>>>5}function v(u,h){return h+5<u.length}function C(u,h){return h+1<u.length&&B(u,h)}function k(u,h){return v(u,h)&&B(u,h)&&T(u,h)<=u.length-h}function O(u,h){if(C(u,h)){var R=L(u,h);if(h+R>=u.length)return!1;var y=T(u,h);if(y<=R)return!1;var g=h+y;return g===u.length||C(u,g)}return!1}function b(u,h,R,y,g){if(!u.samplerate){var D=j(h,R,y,g);if(!D)return;u.config=D.config,u.samplerate=D.samplerate,u.channelCount=D.channelCount,u.codec=D.codec,u.manifestCodec=D.manifestCodec,Y.logger.log("parsed codec:"+u.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function p(u){return 1024*9e4/u}function c(u,h,R,y,g){var D=L(u,h),S=T(u,h);if(S-=D,S>0){var d=R+y*g;return{headerLength:D,frameLength:S,stamp:d}}}function i(u,h,R,y,g){var D=p(u.samplerate),S=c(h,R,y,g,D);if(S){var d=S.frameLength,l=S.headerLength,o=S.stamp,a=l+d,x=Math.max(0,R+a-h.length),E;x?(E=new Uint8Array(a-l),E.set(h.subarray(R+l,h.length),0)):E=h.subarray(R+l,R+a);var m={unit:E,pts:o};return x||u.samples.push(m),{sample:m,length:a,missing:x}}}},"./src/demux/base-audio-demuxer.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"initPTSFn",function(){return T});var Y=P("./src/polyfills/number.ts"),F=P("./src/demux/id3.ts"),A=P("./src/demux/dummy-demuxed-track.ts"),j=P("./src/utils/mp4-tools.ts"),B=P("./src/utils/typed-array.ts"),L=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var C=v.prototype;return C.resetInitSegment=function(O,b,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},C.resetTimeStamp=function(){},C.resetContiguity=function(){},C.canParse=function(O,b){return!1},C.appendFrame=function(O,b,p){},C.demux=function(O,b){this.cachedData&&(O=Object(j.appendUint8Array)(this.cachedData,O),this.cachedData=null);var p=F.getID3Data(O,0),c=p?p.length:0,i,u,h=this._audioTrack,R=this._id3Track,y=p?F.getTimeStamp(p):void 0,g=O.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=T(y,b)),p&&p.length>0&&R.samples.push({pts:this.initPTS,dts:this.initPTS,data:p}),u=this.initPTS;c<g;){if(this.canParse(O,c)){var D=this.appendFrame(h,O,c);D?(this.frameIndex++,u=D.sample.pts,c+=D.length,i=c):c=g}else F.canParse(O,c)?(p=F.getID3Data(O,c),R.samples.push({pts:u,dts:u,data:p}),c+=p.length,i=c):c++;if(c===g&&i!==g){var S=Object(B.sliceUint8)(O,i);this.cachedData?this.cachedData=Object(j.appendUint8Array)(this.cachedData,S):this.cachedData=S}}return{audioTrack:h,avcTrack:Object(A.dummyTrack)(),id3Track:R,textTrack:Object(A.dummyTrack)()}},C.demuxSampleAes=function(O,b,p){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},C.flush=function(O){var b=this.cachedData;return b&&(this.cachedData=null,this.demux(b,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(A.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(A.dummyTrack)()}},C.destroy=function(){},v}(),T=function(C,k){return Object(Y.isFiniteNumber)(C)?C*90:k*9e4};z.default=L},"./src/demux/chunk-cache.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return Y});var Y=function(){function A(){this.chunks=[],this.dataLength=0}var j=A.prototype;return j.push=function(L){this.chunks.push(L),this.dataLength+=L.length},j.flush=function(){var L=this.chunks,T=this.dataLength,v;if(L.length)L.length===1?v=L[0]:v=F(L,T);else return new Uint8Array(0);return this.reset(),v},j.reset=function(){this.chunks.length=0,this.dataLength=0},A}();function F(A,j){for(var B=new Uint8Array(j),L=0,T=0;T<A.length;T++){var v=A[T];B.set(v,L),L+=v.length}return B}},"./src/demux/dummy-demuxed-track.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"dummyTrack",function(){return Y});function Y(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/utils/logger.ts"),F=function(){function A(B){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=B,this.bytesAvailable=B.byteLength,this.word=0,this.bitsAvailable=0}var j=A.prototype;return j.loadWord=function(){var L=this.data,T=this.bytesAvailable,v=L.byteLength-T,C=new Uint8Array(4),k=Math.min(4,T);if(k===0)throw new Error("no bytes available");C.set(L.subarray(v,v+k)),this.word=new DataView(C.buffer).getUint32(0),this.bitsAvailable=k*8,this.bytesAvailable-=k},j.skipBits=function(L){var T;this.bitsAvailable>L?(this.word<<=L,this.bitsAvailable-=L):(L-=this.bitsAvailable,T=L>>3,L-=T>>3,this.bytesAvailable-=T,this.loadWord(),this.word<<=L,this.bitsAvailable-=L)},j.readBits=function(L){var T=Math.min(this.bitsAvailable,L),v=this.word>>>32-T;return L>32&&Y.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=T,this.bitsAvailable>0?this.word<<=T:this.bytesAvailable>0&&this.loadWord(),T=L-T,T>0&&this.bitsAvailable?v<<T|this.readBits(T):v},j.skipLZ=function(){var L;for(L=0;L<this.bitsAvailable;++L)if((this.word&2147483648>>>L)!==0)return this.word<<=L,this.bitsAvailable-=L,L;return this.loadWord(),L+this.skipLZ()},j.skipUEG=function(){this.skipBits(1+this.skipLZ())},j.skipEG=function(){this.skipBits(1+this.skipLZ())},j.readUEG=function(){var L=this.skipLZ();return this.readBits(L+1)-1},j.readEG=function(){var L=this.readUEG();return 1&L?1+L>>>1:-1*(L>>>1)},j.readBoolean=function(){return this.readBits(1)===1},j.readUByte=function(){return this.readBits(8)},j.readUShort=function(){return this.readBits(16)},j.readUInt=function(){return this.readBits(32)},j.skipScalingList=function(L){for(var T=8,v=8,C,k=0;k<L;k++)v!==0&&(C=this.readEG(),v=(T+C+256)%256),T=v===0?T:v},j.readSPS=function(){var L=0,T=0,v=0,C=0,k,O,b,p=this.readUByte.bind(this),c=this.readBits.bind(this),i=this.readUEG.bind(this),u=this.readBoolean.bind(this),h=this.skipBits.bind(this),R=this.skipEG.bind(this),y=this.skipUEG.bind(this),g=this.skipScalingList.bind(this);p();var D=p();if(c(5),h(3),p(),y(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var S=i();if(S===3&&h(1),y(),y(),h(1),u())for(O=S!==3?8:12,b=0;b<O;b++)u()&&(b<6?g(16):g(64))}y();var d=i();if(d===0)i();else if(d===1)for(h(1),R(),R(),k=i(),b=0;b<k;b++)R();y(),h(1);var l=i(),o=i(),a=c(1);a===0&&h(1),h(1),u()&&(L=i(),T=i(),v=i(),C=i());var x=[1,1];if(u()&&u()){var E=p();switch(E){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:{x=[p()<<8|p(),p()<<8|p()];break}}}return{width:Math.ceil((l+1)*16-L*2-T*2),height:(2-a)*(o+1)*16-(a?2:4)*(v+C),pixelRatio:x}},j.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},A}();z.default=F},"./src/demux/id3.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"isHeader",function(){return Y}),P.d(z,"isFooter",function(){return F}),P.d(z,"getID3Data",function(){return A}),P.d(z,"canParse",function(){return B}),P.d(z,"getTimeStamp",function(){return L}),P.d(z,"isTimeStampFrame",function(){return T}),P.d(z,"getID3Frames",function(){return C}),P.d(z,"decodeFrame",function(){return k}),P.d(z,"utf8ArrayToStr",function(){return i}),P.d(z,"testables",function(){return u});var Y=function(g,D){return D+10<=g.length&&(g[D]===73&&g[D+1]===68&&g[D+2]===51&&(g[D+3]<255&&g[D+4]<255&&(g[D+6]<128&&g[D+7]<128&&g[D+8]<128&&g[D+9]<128)))},F=function(g,D){return D+10<=g.length&&(g[D]===51&&g[D+1]===68&&g[D+2]===73&&(g[D+3]<255&&g[D+4]<255&&(g[D+6]<128&&g[D+7]<128&&g[D+8]<128&&g[D+9]<128)))},A=function(g,D){for(var S=D,d=0;Y(g,D);){d+=10;var l=j(g,D+6);d+=l,F(g,D+10)&&(d+=10),D+=d}return d>0?g.subarray(S,S+d):void 0},j=function(g,D){var S=0;return S=(g[D]&127)<<21,S|=(g[D+1]&127)<<14,S|=(g[D+2]&127)<<7,S|=g[D+3]&127,S},B=function(g,D){return Y(g,D)&&j(g,D+6)+10<=g.length-D},L=function(g){for(var D=C(g),S=0;S<D.length;S++){var d=D[S];if(T(d))return c(d)}return},T=function(g){return g&&g.key==="PRIV"&&g.info==="com.apple.streaming.transportStreamTimestamp"},v=function(g){var D=String.fromCharCode(g[0],g[1],g[2],g[3]),S=j(g,4),d=10;return{type:D,size:S,data:g.subarray(d,d+S)}},C=function(g){for(var D=0,S=[];Y(g,D);){var d=j(g,D+6);D+=10;for(var l=D+d;D+8<l;){var o=v(g.subarray(D)),a=k(o);a&&S.push(a),D+=o.size+10}F(g,D)&&(D+=10)}return S},k=function(g){return g.type==="PRIV"?O(g):g.type[0]==="W"?p(g):b(g)},O=function(g){if(g.size<2)return;var D=i(g.data,!0),S=new Uint8Array(g.data.subarray(D.length+1));return{key:g.type,info:D,data:S.buffer}},b=function(g){if(g.size<2)return;if(g.type==="TXXX"){var D=1,S=i(g.data.subarray(D),!0);D+=S.length+1;var d=i(g.data.subarray(D));return{key:g.type,info:S,data:d}}var l=i(g.data.subarray(1));return{key:g.type,data:l}},p=function(g){if(g.type==="WXXX"){if(g.size<2)return;var D=1,S=i(g.data.subarray(D),!0);D+=S.length+1;var d=i(g.data.subarray(D));return{key:g.type,info:S,data:d}}var l=i(g.data);return{key:g.type,data:l}},c=function(g){if(g.data.byteLength===8){var D=new Uint8Array(g.data),S=D[3]&1,d=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return d/=45,S&&(d+=4772185884e-2),Math.round(d)}return},i=function(g,D){D===void 0&&(D=!1);var S=R();if(S){var d=S.decode(g);if(D){var l=d.indexOf("\0");return l!==-1?d.substring(0,l):d}return d.replace(/\0/g,"")}for(var o=g.length,a,x,E,m="",_=0;_<o;){if(a=g[_++],a===0&&D)return m;if(a===0||a===3)continue;switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:m+=String.fromCharCode(a);break;case 12:case 13:x=g[_++],m+=String.fromCharCode((a&31)<<6|x&63);break;case 14:x=g[_++],E=g[_++],m+=String.fromCharCode((a&15)<<12|(x&63)<<6|(E&63)<<0);break;default:}}return m},u={decodeTextFrame:b},h;function R(){return!h&&typeof self.TextDecoder!="undefined"&&(h=new self.TextDecoder("utf-8")),h}},"./src/demux/mp3demuxer.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/demux/base-audio-demuxer.ts"),F=P("./src/demux/id3.ts"),A=P("./src/utils/logger.ts"),j=P("./src/demux/mpegaudio.ts");function B(v,C){v.prototype=Object.create(C.prototype),v.prototype.constructor=v,L(v,C)}function L(v,C){return L=Object.setPrototypeOf||function(O,b){return O.__proto__=b,O},L(v,C)}var T=function(v){B(C,v);function C(){return v.apply(this,arguments)||this}var k=C.prototype;return k.resetInitSegment=function(b,p,c){v.prototype.resetInitSegment.call(this,b,p,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:b,duration:c,inputTimeScale:9e4,dropped:0}},C.probe=function(b){if(!b)return!1;for(var p=F.getID3Data(b,0)||[],c=p.length,i=b.length;c<i;c++)if(j.probe(b,c))return A.logger.log("MPEG Audio sync word found !"),!0;return!1},k.canParse=function(b,p){return j.canParse(b,p)},k.appendFrame=function(b,p,c){return this.initPTS===null?void 0:j.appendFrame(b,p,c,this.initPTS,this.frameIndex)},C}(Y.default);T.minProbeByteLength=4,z.default=T},"./src/demux/mp4demuxer.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/utils/mp4-tools.ts"),F=P("./src/demux/dummy-demuxed-track.ts"),A=function(){function j(L,T){this.remainderData=null,this.config=void 0,this.config=T}var B=j.prototype;return B.resetTimeStamp=function(){},B.resetInitSegment=function(){},B.resetContiguity=function(){},j.probe=function(T){return Object(Y.findBox)({data:T,start:0,end:Math.min(T.length,16384)},["moof"]).length>0},B.demux=function(T){var v=T,C=Object(F.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(Y.appendUint8Array)(this.remainderData,T));var k=Object(Y.segmentValidRange)(v);this.remainderData=k.remainder,C.samples=k.valid||new Uint8Array}else C.samples=v;return{audioTrack:Object(F.dummyTrack)(),avcTrack:C,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},B.flush=function(){var T=Object(F.dummyTrack)();return T.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(F.dummyTrack)(),avcTrack:T,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},B.demuxSampleAes=function(T,v,C){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},B.destroy=function(){},j}();A.minProbeByteLength=1024,z.default=A},"./src/demux/mpegaudio.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"appendFrame",function(){return L}),P.d(z,"parseHeader",function(){return T}),P.d(z,"isHeaderPattern",function(){return v}),P.d(z,"isHeader",function(){return C}),P.d(z,"canParse",function(){return k}),P.d(z,"probe",function(){return O});var Y=null,F=[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],A=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],j=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],B=[0,1,1,4];function L(b,p,c,i,u){if(c+24>p.length)return;var h=T(p,c);if(h&&c+h.frameLength<=p.length){var R=h.samplesPerFrame*9e4/h.sampleRate,y=i+u*R,g={unit:p.subarray(c,c+h.frameLength),pts:y,dts:y};return b.config=[],b.channelCount=h.channelCount,b.samplerate=h.sampleRate,b.samples.push(g),{sample:g,length:h.frameLength,missing:0}}}function T(b,p){var c=b[p+1]>>3&3,i=b[p+1]>>1&3,u=b[p+2]>>4&15,h=b[p+2]>>2&3;if(c!==1&&u!==0&&u!==15&&h!==3){var R=b[p+2]>>1&1,y=b[p+3]>>6,g=c===3?3-i:i===3?3:4,D=F[g*14+u-1]*1e3,S=c===3?0:c===2?1:2,d=A[S*3+h],l=y===3?1:2,o=j[c][i],a=B[i],x=o*8*a,E=Math.floor(o*D/d+R)*a;if(Y===null){var m=navigator.userAgent||"",_=m.match(/Chrome\/(\d+)/i);Y=_?parseInt(_[1]):0}var I=!!Y&&Y<=87;return I&&i===2&&D>=224e3&&y===0&&(b[p+3]=b[p+3]|128),{sampleRate:d,channelCount:l,frameLength:E,samplesPerFrame:x}}}function v(b,p){return b[p]===255&&(b[p+1]&224)===224&&(b[p+1]&6)!==0}function C(b,p){return p+1<b.length&&v(b,p)}function k(b,p){var c=4;return v(b,p)&&c<=b.length-p}function O(b,p){if(p+1<b.length&&v(b,p)){var c=4,i=T(b,p),u=c;i!=null&&i.frameLength&&(u=i.frameLength);var h=p+u;return h===b.length||C(b,h)}return!1}},"./src/demux/sample-aes.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/crypt/decrypter.ts"),F=P("./src/demux/tsdemuxer.ts"),A=function(){function j(L,T,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new Y.default(L,T,{removePKCS7Padding:!1})}var B=j.prototype;return B.decryptBuffer=function(T,v){this.decrypter.decrypt(T,this.keyData.key.buffer,this.keyData.iv.buffer,v)},B.decryptAacSample=function(T,v,C,k){var O=T[v].unit,b=O.subarray(16,O.length-O.length%16),p=b.buffer.slice(b.byteOffset,b.byteOffset+b.length),c=this;this.decryptBuffer(p,function(i){var u=new Uint8Array(i);O.set(u,16),k||c.decryptAacSamples(T,v+1,C)})},B.decryptAacSamples=function(T,v,C){for(;;v++){if(v>=T.length){C();return}if(T[v].unit.length<32)continue;var k=this.decrypter.isSync();if(this.decryptAacSample(T,v,C,k),!k)return}},B.getAvcEncryptedData=function(T){for(var v=Math.floor((T.length-48)/160)*16+16,C=new Int8Array(v),k=0,O=32;O<=T.length-16;O+=160,k+=16)C.set(T.subarray(O,O+16),k);return C},B.getAvcDecryptedUnit=function(T,v){for(var C=new Uint8Array(v),k=0,O=32;O<=T.length-16;O+=160,k+=16)T.set(C.subarray(k,k+16),O);return T},B.decryptAvcSample=function(T,v,C,k,O,b){var p=Object(F.discardEPB)(O.data),c=this.getAvcEncryptedData(p),i=this;this.decryptBuffer(c.buffer,function(u){O.data=i.getAvcDecryptedUnit(p,u),b||i.decryptAvcSamples(T,v,C+1,k)})},B.decryptAvcSamples=function(T,v,C,k){if(T instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,C=0){if(v>=T.length){k();return}for(var O=T[v].units;!(C>=O.length);C++){var b=O[C];if(b.data.length<=48||b.type!==1&&b.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(T,v,C,k,b,p),!p)return}}},j}();z.default=A},"./src/demux/transmuxer-interface.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return O});var Y=P("./node_modules/webworkify-webpack/index.js"),F=P.n(Y),A=P("./src/events.ts"),j=P("./src/demux/transmuxer.ts"),B=P("./src/utils/logger.ts"),L=P("./src/errors.ts"),T=P("./src/utils/mediasource-helper.ts"),v=P("./node_modules/eventemitter3/index.js"),C=P.n(v),k=Object(T.getMediaSource)()||{isTypeSupported:function(){return!1}},O=function(){function b(c,i,u,h){var R=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=c,this.id=i,this.onTransmuxComplete=u,this.onFlush=h;var y=c.config,g=function(o,a){a=a||{},a.frag=R.frag,a.id=R.id,c.trigger(o,a)};this.observer=new v.EventEmitter,this.observer.on(A.Events.FRAG_DECRYPTED,g),this.observer.on(A.Events.ERROR,g);var D={mp4:k.isTypeSupported("video/mp4"),mpeg:k.isTypeSupported("audio/mpeg"),mp3:k.isTypeSupported('audio/mp4; codecs="mp3"')},S=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){B.logger.log("demuxing in webworker");var d;try{d=this.worker=Y("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(l){c.trigger(A.Events.ERROR,{type:L.ErrorTypes.OTHER_ERROR,details:L.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(l.message+" ("+l.filename+":"+l.lineno+")")})},d.postMessage({cmd:"init",typeSupported:D,vendor:S,id:i,config:JSON.stringify(y)})}catch(l){B.logger.warn("Error in worker:",l),B.logger.error("Error while initializing DemuxerWorker, fallback to inline"),d&&self.URL.revokeObjectURL(d.objectURL),this.transmuxer=new j.default(this.observer,D,y,S,i),this.worker=null}}else this.transmuxer=new j.default(this.observer,D,y,S,i)}var p=b.prototype;return p.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var u=this.transmuxer;u&&(u.destroy(),this.transmuxer=null)}var h=this.observer;h&&h.removeAllListeners(),this.observer=null},p.push=function(i,u,h,R,y,g,D,S,d,l){var o=this;d.transmuxing.start=self.performance.now();var a=this.transmuxer,x=this.worker,E=g?g.start:y.start,m=y.decryptdata,_=this.frag,I=!(_&&y.cc===_.cc),U=!(_&&d.level===_.level),M=_?d.sn-_.sn:-1,H=this.part?d.part-this.part.index:1,K=!U&&(M===1||M===0&&H===1),Z=self.performance.now();(U||M||y.stats.parsing.start===0)&&(y.stats.parsing.start=Z),g&&(H||!K)&&(g.stats.parsing.start=Z);var le=new j.TransmuxState(I,K,S,U,E);if(!K||I){B.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+d.sn+" p: "+d.part+" level: "+d.level+" id: "+d.id+`
discontinuity: `+I+`
trackSwitch: `+U+`
contiguous: `+K+`
accurateTimeOffset: `+S+`
timeOffset: `+E);var he=new j.TransmuxConfig(h,R,u,D,l);this.configureTransmuxer(he)}if(this.frag=y,this.part=g,x)x.postMessage({cmd:"demux",data:i,decryptdata:m,chunkMeta:d,state:le},i instanceof ArrayBuffer?[i]:[]);else if(a){var ye=a.push(i,m,d,le);Object(j.isPromise)(ye)?ye.then(function(Ue){o.handleTransmuxComplete(Ue)}):this.handleTransmuxComplete(ye)}},p.flush=function(i){var u=this;i.transmuxing.start=self.performance.now();var h=this.transmuxer,R=this.worker;if(R)R.postMessage({cmd:"flush",chunkMeta:i});else if(h){var y=h.flush(i);Object(j.isPromise)(y)?y.then(function(g){u.handleFlushResult(g,i)}):this.handleFlushResult(y,i)}},p.handleFlushResult=function(i,u){var h=this;i.forEach(function(R){h.handleTransmuxComplete(R)}),this.onFlush(u)},p.onWorkerMessage=function(i){var u=i.data,h=this.hls;switch(u.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.id=this.id,h.trigger(u.event,u.data);break}}},p.configureTransmuxer=function(i){var u=this.worker,h=this.transmuxer;u?u.postMessage({cmd:"configure",config:i}):h&&h.configure(i)},p.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},b}()},"./src/demux/transmuxer-worker.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return L});var Y=P("./src/demux/transmuxer.ts"),F=P("./src/events.ts"),A=P("./src/utils/logger.ts"),j=P("./node_modules/eventemitter3/index.js"),B=P.n(j);function L(O){var b=new j.EventEmitter,p=function(i,u){O.postMessage({event:i,data:u})};b.on(F.Events.FRAG_DECRYPTED,p),b.on(F.Events.ERROR,p),O.addEventListener("message",function(c){var i=c.data;switch(i.cmd){case"init":{var u=JSON.parse(i.config);O.transmuxer=new Y.default(b,i.typeSupported,u,i.vendor,i.id),Object(A.enableLogs)(u.debug),p("init",null);break}case"configure":{O.transmuxer.configure(i.config);break}case"demux":{var h=O.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(Y.isPromise)(h)?h.then(function(g){T(O,g)}):T(O,h);break}case"flush":{var R=i.chunkMeta,y=O.transmuxer.flush(R);Object(Y.isPromise)(y)?y.then(function(g){C(O,g,R)}):C(O,y,R);break}default:break}})}function T(O,b){if(k(b.remuxResult))return;var p=[],c=b.remuxResult,i=c.audio,u=c.video;i&&v(p,i),u&&v(p,u),O.postMessage({event:"transmuxComplete",data:b},p)}function v(O,b){b.data1&&O.push(b.data1.buffer),b.data2&&O.push(b.data2.buffer)}function C(O,b,p){b.forEach(function(c){T(O,c)}),O.postMessage({event:"flush",data:p})}function k(O){return!O.audio&&!O.video&&!O.text&&!O.id3&&!O.initSegment}},"./src/demux/transmuxer.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return u}),P.d(z,"isPromise",function(){return y}),P.d(z,"TransmuxConfig",function(){return g}),P.d(z,"TransmuxState",function(){return D});var Y=P("./src/events.ts"),F=P("./src/errors.ts"),A=P("./src/crypt/decrypter.ts"),j=P("./src/demux/aacdemuxer.ts"),B=P("./src/demux/mp4demuxer.ts"),L=P("./src/demux/tsdemuxer.ts"),T=P("./src/demux/mp3demuxer.ts"),v=P("./src/remux/mp4-remuxer.ts"),C=P("./src/remux/passthrough-remuxer.ts"),k=P("./src/demux/chunk-cache.ts"),O=P("./src/utils/mp4-tools.ts"),b=P("./src/utils/logger.ts"),p;try{p=self.performance.now.bind(self.performance)}catch(S){b.logger.debug("Unable to use Performance API on this environment"),p=self.Date.now}var c=[{demux:L.default,remux:v.default},{demux:B.default,remux:C.default},{demux:j.default,remux:v.default},{demux:T.default,remux:v.default}],i=1024;c.forEach(function(S){var d=S.demux;i=Math.max(i,d.minProbeByteLength)});var u=function(){function S(l,o,a,x,E){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 k.default,this.observer=l,this.typeSupported=o,this.config=a,this.vendor=x,this.id=E}var d=S.prototype;return d.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},d.push=function(o,a,x,E){var m=this,_=x.transmuxing;_.executeStart=p();var I=new Uint8Array(o),U=this.cache,M=this.config,H=this.currentTransmuxState,K=this.transmuxConfig;E&&(this.currentTransmuxState=E);var Z=h(I,a);if(Z&&Z.method==="AES-128"){var le=this.getDecrypter();if(M.enableSoftwareAES){var he=le.softwareDecrypt(I,Z.key.buffer,Z.iv.buffer);if(!he)return _.executeEnd=p(),R(x);I=new Uint8Array(he)}else return this.decryptionPromise=le.webCryptoDecrypt(I,Z.key.buffer,Z.iv.buffer).then(function(Ve){var Ge=m.push(Ve,null,x);return m.decryptionPromise=null,Ge}),this.decryptionPromise}var ye=E||H,Ue=ye.contiguous,Me=ye.discontinuity,_e=ye.trackSwitch,Ie=ye.accurateTimeOffset,ke=ye.timeOffset,me=K.audioCodec,ce=K.videoCodec,te=K.defaultInitPts,be=K.duration,ae=K.initSegmentData;if((Me||_e)&&this.resetInitSegment(ae,me,ce,be),Me&&this.resetInitialTimestamp(te),Ue||this.resetContiguity(),this.needsProbing(I,Me,_e)){if(U.dataLength){var we=U.flush();I=Object(O.appendUint8Array)(we,I)}this.configureTransmuxer(I,K)}var Pe=this.transmux(I,Z,ke,Ie,x),Ce=this.currentTransmuxState;return Ce.contiguous=!0,Ce.discontinuity=!1,Ce.trackSwitch=!1,_.executeEnd=p(),Pe},d.flush=function(o){var a=this,x=o.transmuxing;x.executeStart=p();var E=this.decrypter,m=this.cache,_=this.currentTransmuxState,I=this.decryptionPromise;if(I)return I.then(function(){return a.flush(o)});var U=[],M=_.timeOffset;if(E){var H=E.flush();H&&U.push(this.push(H,null,o))}var K=m.dataLength;m.reset();var Z=this.demuxer,le=this.remuxer;if(!Z||!le)return K>=i&&this.observer.emit(Y.Events.ERROR,Y.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),x.executeEnd=p(),[R(o)];var he=Z.flush(M);return y(he)?he.then(function(ye){return a.flushRemux(U,ye,o),U}):(this.flushRemux(U,he,o),U)},d.flushRemux=function(o,a,x){var E=a.audioTrack,m=a.avcTrack,_=a.id3Track,I=a.textTrack,U=this.currentTransmuxState,M=U.accurateTimeOffset,H=U.timeOffset;b.logger.log("[transmuxer.ts]: Flushed fragment "+x.sn+(x.part>-1?" p: "+x.part:"")+" of level "+x.level);var K=this.remuxer.remux(E,m,_,I,H,M,!0,this.id);o.push({remuxResult:K,chunkMeta:x}),x.transmuxing.executeEnd=p()},d.resetInitialTimestamp=function(o){var a=this.demuxer,x=this.remuxer;if(!a||!x)return;a.resetTimeStamp(o),x.resetTimeStamp(o)},d.resetContiguity=function(){var o=this.demuxer,a=this.remuxer;if(!o||!a)return;o.resetContiguity(),a.resetNextTimestamp()},d.resetInitSegment=function(o,a,x,E){var m=this.demuxer,_=this.remuxer;if(!m||!_)return;m.resetInitSegment(a,x,E),_.resetInitSegment(o,a,x)},d.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},d.transmux=function(o,a,x,E,m){var _;return a&&a.method==="SAMPLE-AES"?_=this.transmuxSampleAes(o,a,x,E,m):_=this.transmuxUnencrypted(o,x,E,m),_},d.transmuxUnencrypted=function(o,a,x,E){var m=this.demuxer.demux(o,a,!1,!this.config.progressive),_=m.audioTrack,I=m.avcTrack,U=m.id3Track,M=m.textTrack,H=this.remuxer.remux(_,I,U,M,a,x,!1,this.id);return{remuxResult:H,chunkMeta:E}},d.transmuxSampleAes=function(o,a,x,E,m){var _=this;return this.demuxer.demuxSampleAes(o,a,x).then(function(I){var U=_.remuxer.remux(I.audioTrack,I.avcTrack,I.id3Track,I.textTrack,x,E,!1,_.id);return{remuxResult:U,chunkMeta:m}})},d.configureTransmuxer=function(o,a){for(var x=this.config,E=this.observer,m=this.typeSupported,_=this.vendor,I=a.audioCodec,U=a.defaultInitPts,M=a.duration,H=a.initSegmentData,K=a.videoCodec,Z,le=0,he=c.length;le<he;le++)if(c[le].demux.probe(o)){Z=c[le];break}Z||(b.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Z={demux:B.default,remux:C.default});var ye=this.demuxer,Ue=this.remuxer,Me=Z.remux,_e=Z.demux;(!Ue||!(Ue instanceof Me))&&(this.remuxer=new Me(E,x,m,_)),(!ye||!(ye instanceof _e))&&(this.demuxer=new _e(E,x,m),this.probe=_e.probe),this.resetInitSegment(H,I,K,M),this.resetInitialTimestamp(U)},d.needsProbing=function(o,a,x){return!this.demuxer||!this.remuxer||a||x},d.getDecrypter=function(){var o=this.decrypter;return o||(o=this.decrypter=new A.default(this.observer,this.config)),o},S}();function h(S,d){var l=null;return S.byteLength>0&&d!=null&&d.key!=null&&d.iv!==null&&d.method!=null&&(l=d),l}var R=function(d){return{remuxResult:{},chunkMeta:d}};function y(S){return"then"in S&&S.then instanceof Function}var g=function(d,l,o,a,x){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=d,this.videoCodec=l,this.initSegmentData=o,this.duration=a,this.defaultInitPts=x},D=function(d,l,o,a,x){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=d,this.contiguous=l,this.accurateTimeOffset=o,this.trackSwitch=a,this.timeOffset=x}},"./src/demux/tsdemuxer.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"discardEPB",function(){return R});var Y=P("./src/demux/adts.ts"),F=P("./src/demux/mpegaudio.ts"),A=P("./src/demux/exp-golomb.ts"),j=P("./src/demux/id3.ts"),B=P("./src/demux/sample-aes.ts"),L=P("./src/events.ts"),T=P("./src/utils/mp4-tools.ts"),v=P("./src/utils/logger.ts"),C=P("./src/errors.ts"),k={video:1,audio:2,id3:3,text:4},O=function(){function y(D,S,d){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=S,this.typeSupported=d}y.probe=function(S){var d=y.syncOffset(S);return d<0?!1:(d&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+d+", junk ahead ?"),!0)},y.syncOffset=function(S){for(var d=Math.min(1e3,S.length-3*188),l=0;l<d;){if(S[l]===71&&S[l+188]===71&&S[l+2*188]===71)return l;l++}return-1},y.createTrack=function(S,d){return{container:S==="video"||S==="audio"?"video/mp2t":void 0,type:S,id:k[S],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:S==="audio"?d:void 0}};var g=y.prototype;return g.resetInitSegment=function(S,d,l){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",l),this._audioTrack=y.createTrack("audio",l),this._id3Track=y.createTrack("id3",l),this._txtTrack=y.createTrack("text",l),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=S,this.videoCodec=d,this._duration=l},g.resetTimeStamp=function(){},g.resetContiguity=function(){var S=this._audioTrack,d=this._avcTrack,l=this._id3Track;S&&(S.pesData=null),d&&(d.pesData=null),l&&(l.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},g.demux=function(S,d,l,o){l===void 0&&(l=!1),o===void 0&&(o=!1),l||(this.sampleAes=null);var a,x=this._avcTrack,E=this._audioTrack,m=this._id3Track,_=x.pid,I=x.pesData,U=E.pid,M=m.pid,H=E.pesData,K=m.pesData,Z=!1,le=this.pmtParsed,he=this._pmtId,ye=S.length;if(this.remainderData&&(S=Object(T.appendUint8Array)(this.remainderData,S),ye=S.length,this.remainderData=null),ye<188&&!o)return this.remainderData=S,{audioTrack:E,avcTrack:x,id3Track:m,textTrack:this._txtTrack};var Ue=Math.max(0,y.syncOffset(S));ye-=(ye+Ue)%188,ye<S.byteLength&&!o&&(this.remainderData=new Uint8Array(S.buffer,ye,S.buffer.byteLength-ye));for(var Me=Ue;Me<ye;Me+=188)if(S[Me]===71){var _e=!!(S[Me+1]&64),Ie=((S[Me+1]&31)<<8)+S[Me+2],ke=(S[Me+3]&48)>>4,me=void 0;if(ke>1){if(me=Me+5+S[Me+4],me===Me+188)continue}else me=Me+4;switch(Ie){case _:_e&&(I&&(a=i(I))&&this.parseAVCPES(a,!1),I={data:[],size:0}),I&&(I.data.push(S.subarray(me,Me+188)),I.size+=Me+188-me);break;case U:_e&&(H&&(a=i(H))&&(E.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),H={data:[],size:0}),H&&(H.data.push(S.subarray(me,Me+188)),H.size+=Me+188-me);break;case M:_e&&(K&&(a=i(K))&&this.parseID3PES(a),K={data:[],size:0}),K&&(K.data.push(S.subarray(me,Me+188)),K.size+=Me+188-me);break;case 0:_e&&(me+=S[me]+1),he=this._pmtId=p(S,me);break;case he:{_e&&(me+=S[me]+1);var ce=c(S,me,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,l);_=ce.avc,_>0&&(x.pid=_),U=ce.audio,U>0&&(E.pid=U,E.isAAC=ce.isAAC),M=ce.id3,M>0&&(m.pid=M),Z&&!le&&(v.logger.log("reparse from beginning"),Z=!1,Me=Ue-188),le=this.pmtParsed=!0;break}case 17:case 8191:break;default:Z=!0;break}}else this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});x.pesData=I,E.pesData=H,m.pesData=K;var te={audioTrack:E,avcTrack:x,id3Track:m,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(te),te},g.flush=function(){var S=this.remainderData;this.remainderData=null;var d;return S?d=this.demux(S,-1,!1,!0):d={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(d),this.sampleAes?this.decrypt(d,this.sampleAes):d},g.extractRemainingSamples=function(S){var d=S.audioTrack,l=S.avcTrack,o=S.id3Track,a=l.pesData,x=d.pesData,E=o.pesData,m;a&&(m=i(a))?(this.parseAVCPES(m,!0),l.pesData=null):l.pesData=a,x&&(m=i(x))?(d.isAAC?this.parseAACPES(m):this.parseMPEGPES(m),d.pesData=null):(x!=null&&x.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),d.pesData=x),E&&(m=i(E))?(this.parseID3PES(m),o.pesData=null):o.pesData=E},g.demuxSampleAes=function(S,d,l){var o=this.demux(S,l,!0,!this.config.progressive),a=this.sampleAes=new B.default(this.observer,this.config,d);return this.decrypt(o,a)},g.decrypt=function(S,d){return new Promise(function(l){var o=S.audioTrack,a=S.avcTrack;o.samples&&o.isAAC?d.decryptAacSamples(o.samples,0,function(){a.samples?d.decryptAvcSamples(a.samples,0,0,function(){l(S)}):l(S)}):a.samples&&d.decryptAvcSamples(a.samples,0,0,function(){l(S)})})},g.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},g.parseAVCPES=function(S,d){var l=this,o=this._avcTrack,a=this.parseAVCNALu(S.data),x=!1,E=this.avcSample,m,_=!1;S.data=null,E&&a.length&&!o.audFound&&(u(E,o),E=this.avcSample=b(!1,S.pts,S.dts,"")),a.forEach(function(I){switch(I.type){case 1:{m=!0,E||(E=l.avcSample=b(!0,S.pts,S.dts,"")),x&&(E.debug+="NDR "),E.frame=!0;var U=I.data;if(_&&U.length>4){var M=new A.default(U).readSliceType();(M===2||M===4||M===7||M===9)&&(E.key=!0)}break}case 5:m=!0,E||(E=l.avcSample=b(!0,S.pts,S.dts,"")),x&&(E.debug+="IDR "),E.key=!0,E.frame=!0;break;case 6:{m=!0,x&&E&&(E.debug+="SEI ");var H=new A.default(R(I.data));H.readUByte();for(var K=0,Z=0,le=!1,he=0;!le&&H.bytesAvailable>1;){K=0;do he=H.readUByte(),K+=he;while(he===255);Z=0;do he=H.readUByte(),Z+=he;while(he===255);if(K===4&&H.bytesAvailable!==0){le=!0;var ye=H.readUByte();if(ye===181){var Ue=H.readUShort();if(Ue===49){var Me=H.readUInt();if(Me===1195456820){var _e=H.readUByte();if(_e===3){for(var Ie=H.readUByte(),ke=H.readUByte(),me=31&Ie,ce=[Ie,ke],te=0;te<me;te++)ce.push(H.readUByte()),ce.push(H.readUByte()),ce.push(H.readUByte());h(l._txtTrack.samples,{type:3,pts:S.pts,bytes:ce})}}}}}else if(K===5&&H.bytesAvailable!==0){if(le=!0,Z>16){for(var be=[],ae=0;ae<16;ae++)be.push(H.readUByte().toString(16)),(ae===3||ae===5||ae===7||ae===9)&&be.push("-");for(var we=Z-16,Pe=new Uint8Array(we),Ce=0;Ce<we;Ce++)Pe[Ce]=H.readUByte();h(l._txtTrack.samples,{pts:S.pts,payloadType:K,uuid:be.join(""),userData:Object(j.utf8ArrayToStr)(Pe),userDataBytes:Pe})}}else if(Z<H.bytesAvailable)for(var Ve=0;Ve<Z;Ve++)H.readUByte()}break}case 7:if(m=!0,_=!0,x&&E&&(E.debug+="SPS "),!o.sps){var Ge=new A.default(I.data),tt=Ge.readSPS();o.width=tt.width,o.height=tt.height,o.pixelRatio=tt.pixelRatio,o.sps=[I.data],o.duration=l._duration;for(var Je=I.data.subarray(1,4),Ye="avc1.",et=0;et<3;et++){var St=Je[et].toString(16);St.length<2&&(St="0"+St),Ye+=St}o.codec=Ye}break;case 8:m=!0,x&&E&&(E.debug+="PPS "),o.pps||(o.pps=[I.data]);break;case 9:m=!1,o.audFound=!0,E&&u(E,o),E=l.avcSample=b(!1,S.pts,S.dts,x?"AUD ":"");break;case 12:m=!1;break;default:m=!1,E&&(E.debug+="unknown NAL "+I.type+" ");break}if(E&&m){var At=E.units;At.push(I)}}),d&&E&&(u(E,o),this.avcSample=null)},g.getLastNalUnit=function(){var S,d=this.avcSample,l;if(!d||d.units.length===0){var o=this._avcTrack.samples;d=o[o.length-1]}if((S=d)!==null&&S!==void 0&&S.units){var a=d.units;l=a[a.length-1]}return l},g.parseAVCNALu=function(S){var d=S.byteLength,l=this._avcTrack,o=l.naluState||0,a=o,x=[],E=0,m,_,I,U=-1,M=0;for(o===-1&&(U=0,M=S[0]&31,o=0,E=1);E<d;){if(m=S[E++],!o){o=m?0:1;continue}if(o===1){o=m?0:2;continue}if(!m)o=3;else if(m===1){if(U>=0){var H={data:S.subarray(U,E-o-1),type:M};x.push(H)}else{var K=this.getLastNalUnit();if(K&&(a&&E<=4-a&&(K.state&&(K.data=K.data.subarray(0,K.data.byteLength-a))),_=E-o-1,_>0)){var Z=new Uint8Array(K.data.byteLength+_);Z.set(K.data,0),Z.set(S.subarray(0,_),K.data.byteLength),K.data=Z,K.state=0}}E<d?(I=S[E]&31,U=E,M=I,o=0):o=-1}else o=0}if(U>=0&&o>=0){var le={data:S.subarray(U,d),type:M,state:o};x.push(le)}if(x.length===0){var he=this.getLastNalUnit();if(he){var ye=new Uint8Array(he.data.byteLength+S.byteLength);ye.set(he.data,0),ye.set(S,he.data.byteLength),he.data=ye}}return l.naluState=o,x},g.parseAACPES=function(S){var d=0,l=this._audioTrack,o=this.aacOverFlow,a=S.data;if(o){this.aacOverFlow=null;var x=o.sample.unit.byteLength,E=Math.min(o.missing,x),m=x-E;o.sample.unit.set(a.subarray(0,E),m),l.samples.push(o.sample),d=o.missing}var _,I;for(_=d,I=a.length;_<I-1&&!Y.isHeader(a,_);_++);if(_!==d){var U,M;if(_<I-1?(U="AAC PES did not start with ADTS header,offset:"+_,M=!1):(U="no ADTS header found in AAC PES",M=!0),v.logger.warn("parsing error:"+U),this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:M,reason:U}),M)return}Y.initTrackConfig(l,this.observer,a,_,this.audioCodec);var H;if(S.pts!==void 0)H=S.pts;else if(o){var K=Y.getFrameDuration(l.samplerate);H=o.sample.pts+K}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Z=0;_<I;)if(Y.isHeader(a,_)){if(_+5<I){var le=Y.appendFrame(l,a,_,H,Z);if(le)if(le.missing)this.aacOverFlow=le;else{_+=le.length,Z++;continue}}break}else _++},g.parseMPEGPES=function(S){var d=S.data,l=d.length,o=0,a=0,x=S.pts;if(x===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<l;)if(F.isHeader(d,a)){var E=F.appendFrame(this._audioTrack,d,a,x,o);if(E)a+=E.length,o++;else break}else a++},g.parseID3PES=function(S){if(S.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(S)},y}();O.minProbeByteLength=188;function b(y,g,D,S){return{key:y,frame:!1,pts:g,dts:D,units:[],debug:S,length:0}}function p(y,g){return(y[g+10]&31)<<8|y[g+11]}function c(y,g,D,S){var d={audio:-1,avc:-1,id3:-1,isAAC:!0},l=(y[g+1]&15)<<8|y[g+2],o=g+3+l-4,a=(y[g+10]&15)<<8|y[g+11];for(g+=12+a;g<o;){var x=(y[g+1]&31)<<8|y[g+2];switch(y[g]){case 207:if(!S){v.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:d.audio===-1&&(d.audio=x);break;case 21:d.id3===-1&&(d.id3=x);break;case 219:if(!S){v.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:d.avc===-1&&(d.avc=x);break;case 3:case 4:D?d.audio===-1&&(d.audio=x,d.isAAC=!1):v.logger.log("MPEG audio found, not supported in this browser");break;case 36:v.logger.warn("Unsupported HEVC stream type found");break;default:break}g+=((y[g+3]&15)<<8|y[g+4])+5}return d}function i(y){var g=0,D,S,d,l,o,a=y.data;if(!y||y.size===0)return null;for(;a[0].length<19&&a.length>1;){var x=new Uint8Array(a[0].length+a[1].length);x.set(a[0]),x.set(a[1],a[0].length),a[0]=x,a.splice(1,1)}D=a[0];var E=(D[0]<<16)+(D[1]<<8)+D[2];if(E===1){if(S=(D[4]<<8)+D[5],S&&S>y.size-6)return null;var m=D[7];m&192&&(l=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,m&64?(o=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,l-o>60*9e4&&(v.logger.warn(Math.round((l-o)/9e4)+"s delta between PTS and DTS, align them"),l=o)):o=l),d=D[8];var _=d+9;if(y.size<=_)return null;y.size-=_;for(var I=new Uint8Array(y.size),U=0,M=a.length;U<M;U++){D=a[U];var H=D.byteLength;if(_)if(_>H){_-=H;continue}else D=D.subarray(_),H-=_,_=0;I.set(D,g),g+=H}return S&&(S-=d+3),{data:I,pts:l,dts:o,len:S}}return null}function u(y,g){if(y.units.length&&y.frame){if(y.pts===void 0){var D=g.samples,S=D.length;if(S){var d=D[S-1];y.pts=d.pts,y.dts=d.dts}else{g.dropped++;return}}g.samples.push(y)}y.debug.length&&v.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function h(y,g){var D=y.length;if(D>0){if(g.pts>=y[D-1].pts)y.push(g);else for(var S=D-1;S>=0;S--)if(g.pts<y[S].pts){y.splice(S,0,g);break}}else y.push(g)}function R(y){for(var g=y.byteLength,D=[],S=1;S<g-2;)y[S]===0&&y[S+1]===0&&y[S+2]===3?(D.push(S+2),S+=2):S++;if(D.length===0)return y;var d=g-D.length,l=new Uint8Array(d),o=0;for(S=0;S<d;o++,S++)o===D[0]&&(o++,D.shift()),l[S]=y[o];return l}z.default=O},"./src/errors.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"ErrorTypes",function(){return Y}),P.d(z,"ErrorDetails",function(){return F});var Y;(function(A){A.NETWORK_ERROR="networkError",A.MEDIA_ERROR="mediaError",A.KEY_SYSTEM_ERROR="keySystemError",A.MUX_ERROR="muxError",A.OTHER_ERROR="otherError"})(Y||(Y={}));var F;(function(A){A.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",A.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",A.KEY_SYSTEM_NO_SESSION="keySystemNoSession",A.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",A.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",A.MANIFEST_LOAD_ERROR="manifestLoadError",A.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",A.MANIFEST_PARSING_ERROR="manifestParsingError",A.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",A.LEVEL_EMPTY_ERROR="levelEmptyError",A.LEVEL_LOAD_ERROR="levelLoadError",A.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",A.LEVEL_SWITCH_ERROR="levelSwitchError",A.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",A.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",A.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",A.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",A.FRAG_LOAD_ERROR="fragLoadError",A.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",A.FRAG_DECRYPT_ERROR="fragDecryptError",A.FRAG_PARSING_ERROR="fragParsingError",A.REMUX_ALLOC_ERROR="remuxAllocError",A.KEY_LOAD_ERROR="keyLoadError",A.KEY_LOAD_TIMEOUT="keyLoadTimeOut",A.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",A.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",A.BUFFER_APPEND_ERROR="bufferAppendError",A.BUFFER_APPENDING_ERROR="bufferAppendingError",A.BUFFER_STALLED_ERROR="bufferStalledError",A.BUFFER_FULL_ERROR="bufferFullError",A.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",A.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",A.INTERNAL_EXCEPTION="internalException",A.INTERNAL_ABORTED="aborted",A.UNKNOWN="unknown"})(F||(F={}))},"./src/events.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"Events",function(){return Y});var Y;(function(F){F.MEDIA_ATTACHING="hlsMediaAttaching",F.MEDIA_ATTACHED="hlsMediaAttached",F.MEDIA_DETACHING="hlsMediaDetaching",F.MEDIA_DETACHED="hlsMediaDetached",F.BUFFER_RESET="hlsBufferReset",F.BUFFER_CODECS="hlsBufferCodecs",F.BUFFER_CREATED="hlsBufferCreated",F.BUFFER_APPENDING="hlsBufferAppending",F.BUFFER_APPENDED="hlsBufferAppended",F.BUFFER_EOS="hlsBufferEos",F.BUFFER_FLUSHING="hlsBufferFlushing",F.BUFFER_FLUSHED="hlsBufferFlushed",F.MANIFEST_LOADING="hlsManifestLoading",F.MANIFEST_LOADED="hlsManifestLoaded",F.MANIFEST_PARSED="hlsManifestParsed",F.LEVEL_SWITCHING="hlsLevelSwitching",F.LEVEL_SWITCHED="hlsLevelSwitched",F.LEVEL_LOADING="hlsLevelLoading",F.LEVEL_LOADED="hlsLevelLoaded",F.LEVEL_UPDATED="hlsLevelUpdated",F.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",F.LEVELS_UPDATED="hlsLevelsUpdated",F.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",F.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",F.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",F.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",F.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",F.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",F.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",F.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",F.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",F.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",F.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",F.CUES_PARSED="hlsCuesParsed",F.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",F.INIT_PTS_FOUND="hlsInitPtsFound",F.FRAG_LOADING="hlsFragLoading",F.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",F.FRAG_LOADED="hlsFragLoaded",F.FRAG_DECRYPTED="hlsFragDecrypted",F.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",F.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",F.FRAG_PARSING_METADATA="hlsFragParsingMetadata",F.FRAG_PARSED="hlsFragParsed",F.FRAG_BUFFERED="hlsFragBuffered",F.FRAG_CHANGED="hlsFragChanged",F.FPS_DROP="hlsFpsDrop",F.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",F.ERROR="hlsError",F.DESTROYING="hlsDestroying",F.KEY_LOADING="hlsKeyLoading",F.KEY_LOADED="hlsKeyLoaded",F.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",F.BACK_BUFFER_REACHED="hlsBackBufferReached"})(Y||(Y={}))},"./src/hls.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return y});var Y=P("./node_modules/url-toolkit/src/url-toolkit.js"),F=P.n(Y),A=P("./src/loader/playlist-loader.ts"),j=P("./src/loader/key-loader.ts"),B=P("./src/controller/id3-track-controller.ts"),L=P("./src/controller/latency-controller.ts"),T=P("./src/controller/level-controller.ts"),v=P("./src/controller/fragment-tracker.ts"),C=P("./src/controller/stream-controller.ts"),k=P("./src/is-supported.ts"),O=P("./src/utils/logger.ts"),b=P("./src/config.ts"),p=P("./node_modules/eventemitter3/index.js"),c=P.n(p),i=P("./src/events.ts"),u=P("./src/errors.ts");function h(g,D){for(var S=0;S<D.length;S++){var d=D[S];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function R(g,D,S){return D&&h(g.prototype,D),S&&h(g,S),g}var y=function(){g.isSupported=function(){return Object(k.isSupported)()};function g(S){S===void 0&&(S={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var d=this.config=Object(b.mergeConfig)(g.DefaultConfig,S);this.userConfig=S,Object(O.enableLogs)(d.debug),this._autoLevelCapping=-1,d.progressive&&Object(b.enableStreamingMode)(d);var l=d.abrController,o=d.bufferController,a=d.capLevelController,x=d.fpsController,E=this.abrController=new l(this),m=this.bufferController=new o(this),_=this.capLevelController=new a(this),I=new x(this),U=new A.default(this),M=new j.default(this),H=new B.default(this),K=this.levelController=new T.default(this),Z=new v.FragmentTracker(this),le=this.streamController=new C.default(this,Z);_.setStreamController(le),I.setStreamController(le);var he=[K,le];this.networkControllers=he;var ye=[U,M,E,m,_,I,H,Z];this.audioTrackController=this.createController(d.audioTrackController,null,he),this.createController(d.audioStreamController,Z,he),this.subtitleTrackController=this.createController(d.subtitleTrackController,null,he),this.createController(d.subtitleStreamController,Z,he),this.createController(d.timelineController,null,ye),this.emeController=this.createController(d.emeController,null,ye),this.cmcdController=this.createController(d.cmcdController,null,ye),this.latencyController=this.createController(L.default,null,ye),this.coreComponents=ye}var D=g.prototype;return D.createController=function(d,l,o){if(d){var a=l?new d(this,l):new d(this);return o&&o.push(a),a}return null},D.on=function(d,l,o){o===void 0&&(o=this),this._emitter.on(d,l,o)},D.once=function(d,l,o){o===void 0&&(o=this),this._emitter.once(d,l,o)},D.removeAllListeners=function(d){this._emitter.removeAllListeners(d)},D.off=function(d,l,o,a){o===void 0&&(o=this),this._emitter.off(d,l,o,a)},D.listeners=function(d){return this._emitter.listeners(d)},D.emit=function(d,l,o){return this._emitter.emit(d,l,o)},D.trigger=function(d,l){if(this.config.debug)return this.emit(d,d,l);try{return this.emit(d,d,l)}catch(o){O.logger.error("An internal error happened while handling event "+d+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(i.Events.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:d,error:o})}return!1},D.listenerCount=function(d){return this._emitter.listenerCount(d)},D.destroy=function(){O.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(d){return d.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(d){return d.destroy()}),this.coreComponents.length=0},D.attachMedia=function(d){O.logger.log("attachMedia"),this._media=d,this.trigger(i.Events.MEDIA_ATTACHING,{media:d})},D.detachMedia=function(){O.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(d){this.stopLoad();var l=this.media,o=this.url,a=this.url=Y.buildAbsoluteURL(self.location.href,d,{alwaysNormalize:!0});O.logger.log("loadSource:"+a),l&&o&&o!==a&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(l)),this.trigger(i.Events.MANIFEST_LOADING,{url:d})},D.startLoad=function(d){d===void 0&&(d=-1),O.logger.log("startLoad("+d+")"),this.networkControllers.forEach(function(l){l.startLoad(d)})},D.stopLoad=function(){O.logger.log("stopLoad"),this.networkControllers.forEach(function(d){d.stopLoad()})},D.swapAudioCodec=function(){O.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){O.logger.log("recoverMediaError");var d=this._media;this.detachMedia(),d&&this.attachMedia(d)},D.removeLevel=function(d,l){l===void 0&&(l=0),this.levelController.removeLevel(d,l)},R(g,[{key:"levels",get:function(){var d=this.levelController.levels;return d||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(d){O.logger.log("set currentLevel:"+d),this.loadLevel=d,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(d){O.logger.log("set nextLevel:"+d),this.levelController.manualLevel=d,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(d){O.logger.log("set loadLevel:"+d),this.levelController.manualLevel=d}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(d){this.levelController.nextLoadLevel=d}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(d){O.logger.log("set firstLevel:"+d),this.levelController.firstLevel=d}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(d){O.logger.log("set startLevel:"+d),d!==-1&&(d=Math.max(d,this.minAutoLevel)),this.levelController.startLevel=d}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(d){var l=!!d;l!==this.config.capLevelToPlayerSize&&(l?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=l)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(d){this._autoLevelCapping!==d&&(O.logger.log("set autoLevelCapping:"+d),this._autoLevelCapping=d)}},{key:"bandwidthEstimate",get:function(){var d=this.abrController.bwEstimator;return d?d.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var d=this.levels,l=this.config.minAutoBitrate;if(!d)return 0;for(var o=d.length,a=0;a<o;a++)if(d[a].maxBitrate>l)return a;return 0}},{key:"maxAutoLevel",get:function(){var d=this.levels,l=this.autoLevelCapping,o;return l===-1&&d&&d.length?o=d.length-1:o=l,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(d){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,d)}},{key:"audioTracks",get:function(){var d=this.audioTrackController;return d?d.audioTracks:[]}},{key:"audioTrack",get:function(){var d=this.audioTrackController;return d?d.audioTrack:-1},set:function(d){var l=this.audioTrackController;l&&(l.audioTrack=d)}},{key:"subtitleTracks",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTrack:-1},set:function(d){var l=this.subtitleTrackController;l&&(l.subtitleTrack=d)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var d=this.subtitleTrackController;return d?d.subtitleDisplay:!1},set:function(d){var l=this.subtitleTrackController;l&&(l.subtitleDisplay=d)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(d){this.config.lowLatencyMode=d}},{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 i.Events}},{key:"ErrorTypes",get:function(){return u.ErrorTypes}},{key:"ErrorDetails",get:function(){return u.ErrorDetails}},{key:"DefaultConfig",get:function(){return g.defaultConfig?g.defaultConfig:b.hlsDefaultConfig},set:function(d){g.defaultConfig=d}}]),g}();y.defaultConfig=void 0},"./src/is-supported.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"isSupported",function(){return A}),P.d(z,"changeTypeSupported",function(){return j});var Y=P("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function A(){var B=Object(Y.getMediaSource)();if(!B)return!1;var L=F(),T=B&&typeof B.isTypeSupported=="function"&&B.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!L||L.prototype&&typeof L.prototype.appendBuffer=="function"&&typeof L.prototype.remove=="function";return!!T&&!!v}function j(){var B,L=F();return typeof(L==null||((B=L.prototype)===null||B===void 0)?void 0:B.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return O}),P.d(z,"LoadError",function(){return p});var Y=P("./src/polyfills/number.ts"),F=P("./src/errors.ts");function A(c,i){c.prototype=Object.create(i.prototype),c.prototype.constructor=c,v(c,i)}function j(c){var i=typeof Map=="function"?new Map:void 0;return j=function(h){if(h===null||!T(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(h))return i.get(h);i.set(h,R)}function R(){return B(h,arguments,C(this).constructor)}return R.prototype=Object.create(h.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),v(R,h)},j(c)}function B(c,i,u){return L()?B=Reflect.construct:B=function(R,y,g){var D=[null];D.push.apply(D,y);var S=Function.bind.apply(R,D),d=new S;return g&&v(d,g.prototype),d},B.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(c){return!1}}function T(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function v(c,i){return v=Object.setPrototypeOf||function(h,R){return h.__proto__=R,h},v(c,i)}function C(c){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},C(c)}var k=Math.pow(2,17),O=function(){function c(u){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=u}var i=c.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(h,R){var y=this,g=h.url;if(!g)return Promise.reject(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(g?"part list":"url")));this.abort();var D=this.config,S=D.fLoader,d=D.loader;return new Promise(function(l,o){y.loader&&y.loader.destroy();var a=y.loader=h.loader=S?new S(D):new d(D),x=b(h),E={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:k};h.stats=a.stats,a.load(x,E,{onSuccess:function(_,I,U,M){y.resetLoader(h,a),l({frag:h,part:null,payload:_.data,networkDetails:M})},onError:function(_,I,U){y.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:_,networkDetails:U}))},onAbort:function(_,I,U){y.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:U}))},onTimeout:function(_,I,U){y.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:U}))},onProgress:function(_,I,U,M){R&&R({frag:h,part:null,payload:U,networkDetails:M})}})})},i.loadPart=function(h,R,y){var g=this;this.abort();var D=this.config,S=D.fLoader,d=D.loader;return new Promise(function(l,o){g.loader&&g.loader.destroy();var a=g.loader=h.loader=S?new S(D):new d(D),x=b(h,R),E={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:k};R.stats=a.stats,a.load(x,E,{onSuccess:function(_,I,U,M){g.resetLoader(h,a),g.updateStatsFromPart(h,R);var H={frag:h,part:R,payload:_.data,networkDetails:M};y(H),l(H)},onError:function(_,I,U){g.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:R,response:_,networkDetails:U}))},onAbort:function(_,I,U){h.stats.aborted=R.stats.aborted,g.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:R,networkDetails:U}))},onTimeout:function(_,I,U){g.resetLoader(h,a),o(new p({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:R,networkDetails:U}))}})})},i.updateStatsFromPart=function(h,R){var y=h.stats,g=R.stats,D=g.total;if(y.loaded+=g.loaded,D){var S=Math.round(h.duration/R.duration),d=Math.min(Math.round(y.loaded/D),S),l=S-d,o=l*Math.round(y.loaded/d);y.total=y.loaded+o}else y.total=Math.max(y.loaded,y.total);var a=y.loading,x=g.loading;a.start?a.first+=x.first-x.start:(a.start=x.start,a.first=x.first),a.end=x.end},i.resetLoader=function(h,R){h.loader=null,this.loader===R&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),R.destroy()},c}();function b(c,i){i===void 0&&(i=null);var u=i||c,h={frag:c,part:i,responseType:"arraybuffer",url:u.url,headers:{},rangeStart:0,rangeEnd:0},R=u.byteRangeStartOffset,y=u.byteRangeEndOffset;return Object(Y.isFiniteNumber)(R)&&Object(Y.isFiniteNumber)(y)&&(h.rangeStart=R,h.rangeEnd=y),h}var p=function(c){A(i,c);function i(u){for(var h,R=arguments.length,y=new Array(R>1?R-1:0),g=1;g<R;g++)y[g-1]=arguments[g];return h=c.call.apply(c,[this].concat(y))||this,h.data=void 0,h.data=u,h}return i}(j(Error))},"./src/loader/fragment.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"ElementaryStreamTypes",function(){return O}),P.d(z,"BaseSegment",function(){return b}),P.d(z,"Fragment",function(){return p}),P.d(z,"Part",function(){return c});var Y=P("./src/polyfills/number.ts"),F=P("./node_modules/url-toolkit/src/url-toolkit.js"),A=P.n(F),j=P("./src/utils/logger.ts"),B=P("./src/loader/level-key.ts"),L=P("./src/loader/load-stats.ts");function T(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,v(i,u)}function v(i,u){return v=Object.setPrototypeOf||function(R,y){return R.__proto__=y,R},v(i,u)}function C(i,u){for(var h=0;h<u.length;h++){var R=u[h];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(i,R.key,R)}}function k(i,u,h){return u&&C(i.prototype,u),h&&C(i,h),i}var O;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(O||(O={}));var b=function(){function i(h){var R;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(R={},R[O.AUDIO]=null,R[O.VIDEO]=null,R[O.AUDIOVIDEO]=null,R),this.baseurl=h}var u=i.prototype;return u.setByteRange=function(R,y){var g=R.split("@",2),D=[];g.length===1?D[0]=y?y.byteRangeEndOffset:0:D[0]=parseInt(g[1]),D[1]=parseInt(g[0])+D[0],this._byteRange=D},k(i,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(F.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(R){this._url=R}}]),i}(),p=function(i){T(u,i);function u(R,y){var g;return g=i.call(this,y)||this,g._decryptdata=null,g.rawProgramDateTime=null,g.programDateTime=null,g.tagList=[],g.duration=0,g.sn=0,g.levelkey=void 0,g.type=void 0,g.loader=null,g.level=-1,g.cc=0,g.startPTS=void 0,g.endPTS=void 0,g.appendedPTS=void 0,g.startDTS=void 0,g.endDTS=void 0,g.start=0,g.deltaPTS=void 0,g.maxStartPTS=void 0,g.minEndPTS=void 0,g.stats=new L.LoadStats,g.urlId=0,g.data=void 0,g.bitrateTest=!1,g.title=null,g.initSegment=null,g.type=R,g}var h=u.prototype;return h.createInitializationVector=function(y){for(var g=new Uint8Array(16),D=12;D<16;D++)g[D]=y>>8*(15-D)&255;return g},h.setDecryptDataFromLevelKey=function(y,g){var D=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(D=B.LevelKey.fromURI(y.uri),D.method=y.method,D.iv=this.createInitializationVector(g),D.keyFormat="identity"),D},h.setElementaryStreamInfo=function(y,g,D,S,d,l){l===void 0&&(l=!1);var o=this.elementaryStreams,a=o[y];if(!a){o[y]={startPTS:g,endPTS:D,startDTS:S,endDTS:d,partial:l};return}a.startPTS=Math.min(a.startPTS,g),a.endPTS=Math.max(a.endPTS,D),a.startDTS=Math.min(a.startDTS,S),a.endDTS=Math.max(a.endDTS,d)},h.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[O.AUDIO]=null,y[O.VIDEO]=null,y[O.AUDIOVIDEO]=null},k(u,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&j.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(Y.isFiniteNumber)(this.programDateTime))return null;var y=Object(Y.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),u}(b),c=function(i){T(u,i);function u(h,R,y,g,D){var S;S=i.call(this,y)||this,S.fragOffset=0,S.duration=0,S.gap=!1,S.independent=!1,S.relurl=void 0,S.fragment=void 0,S.index=void 0,S.stats=new L.LoadStats,S.duration=h.decimalFloatingPoint("DURATION"),S.gap=h.bool("GAP"),S.independent=h.bool("INDEPENDENT"),S.relurl=h.enumeratedString("URI"),S.fragment=R,S.index=g;var d=h.enumeratedString("BYTERANGE");return d&&S.setByteRange(d,D),D&&(S.fragOffset=D.fragOffset+D.duration),S}return k(u,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var R=this.elementaryStreams;return!!(R.audio||R.video||R.audiovideo)}}]),u}(b)},"./src/loader/key-loader.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return j});var Y=P("./src/events.ts"),F=P("./src/errors.ts"),A=P("./src/utils/logger.ts"),j=function(){function B(T){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=T,this._registerListeners()}var L=B.prototype;return L._registerListeners=function(){this.hls.on(Y.Events.KEY_LOADING,this.onKeyLoading,this)},L._unregisterListeners=function(){this.hls.off(Y.Events.KEY_LOADING,this.onKeyLoading)},L.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var C=this.loaders[v];C&&C.destroy()}this.loaders={}},L.onKeyLoading=function(v,C){var k=C.frag,O=k.type,b=this.loaders[O];if(!k.decryptdata){A.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var p=k.decryptdata.uri;if(p!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(b&&(A.logger.warn("abort previous key loader for type:"+O),b.abort()),!p){A.logger.warn("key uri is falsy");return}var i=c.loader,u=k.loader=this.loaders[O]=new i(c);this.decrypturl=p,this.decryptkey=null;var h={url:p,frag:k,responseType:"arraybuffer"},R={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,R,y)}else this.decryptkey&&(k.decryptdata.key=this.decryptkey,this.hls.trigger(Y.Events.KEY_LOADED,{frag:k}))},L.loadsuccess=function(v,C,k){var O=k.frag;if(!O.decryptdata){A.logger.error("after key load, decryptdata unset");return}this.decryptkey=O.decryptdata.key=new Uint8Array(v.data),O.loader=null,delete this.loaders[O.type],this.hls.trigger(Y.Events.KEY_LOADED,{frag:O})},L.loaderror=function(v,C){var k=C.frag,O=k.loader;O&&O.abort(),delete this.loaders[k.type],this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:k,response:v})},L.loadtimeout=function(v,C){var k=C.frag,O=k.loader;O&&O.abort(),delete this.loaders[k.type],this.hls.trigger(Y.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:k})},B}()},"./src/loader/level-details.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"LevelDetails",function(){return B});var Y=P("./src/polyfills/number.ts");function F(L,T){for(var v=0;v<T.length;v++){var C=T[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(L,C.key,C)}}function A(L,T,v){return T&&F(L.prototype,T),v&&F(L,v),L}var j=10,B=function(){function L(v){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=v}var T=L.prototype;return T.reloaded=function(C){if(!C){this.advanced=!0,this.updated=!0;return}var k=this.lastPartSn-C.lastPartSn,O=this.lastPartIndex-C.lastPartIndex;this.updated=this.endSN!==C.endSN||!!O||!!k,this.advanced=this.endSN>C.endSN||k>0||k===0&&O>0,this.updated||this.advanced?this.misses=Math.floor(C.misses*.6):this.misses=C.misses+1,this.availabilityDelay=C.availabilityDelay},A(L,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(Y.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||j}},{key:"drift",get:function(){var C=this.driftEndTime-this.driftStartTime;if(C>0){var k=this.driftEnd-this.driftStart;return k*1e3/C}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var C;return(C=this.partList)!==null&&C!==void 0&&C.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var C;return(C=this.fragments)!==null&&C!==void 0&&C.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var C;return(C=this.partList)!==null&&C!==void 0&&C.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var C;return(C=this.partList)!==null&&C!==void 0&&C.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),L}()},"./src/loader/level-key.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"LevelKey",function(){return B});var Y=P("./node_modules/url-toolkit/src/url-toolkit.js"),F=P.n(Y);function A(L,T){for(var v=0;v<T.length;v++){var C=T[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(L,C.key,C)}}function j(L,T,v){return T&&A(L.prototype,T),v&&A(L,v),L}var B=function(){L.fromURL=function(v,C){return new L(v,C)},L.fromURI=function(v){return new L(v)};function L(T,v){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,v?this._uri=Object(Y.buildAbsoluteURL)(T,v,{alwaysNormalize:!0}):this._uri=T}return j(L,[{key:"uri",get:function(){return this._uri}}]),L}()},"./src/loader/load-stats.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"LoadStats",function(){return Y});var Y=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return u});var Y=P("./src/polyfills/number.ts"),F=P("./node_modules/url-toolkit/src/url-toolkit.js"),A=P.n(F),j=P("./src/loader/fragment.ts"),B=P("./src/loader/level-details.ts"),L=P("./src/loader/level-key.ts"),T=P("./src/utils/attr-list.ts"),v=P("./src/utils/logger.ts"),C=P("./src/utils/codecs.ts"),k=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,O=/#EXT-X-MEDIA:(.*)/g,b=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),c=/\.(mp4|m4s|m4v|m4a)$/i;function i(D){var S,d;return c.test((S=(d=F.parseURL(D))===null||d===void 0?void 0:d.path)!=null?S:"")}var u=function(){function D(){}return D.findGroup=function(d,l){for(var o=0;o<d.length;o++){var a=d[o];if(a.id===l)return a}},D.convertAVC1ToAVCOTI=function(d){var l=d.split(".");if(l.length>2){var o=l.shift()+".";return o+=parseInt(l.shift()).toString(16),o+=("000"+parseInt(l.shift()).toString(16)).substr(-4),o}return d},D.resolve=function(d,l){return F.buildAbsoluteURL(l,d,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(d,l){var o=[],a={},x=!1;k.lastIndex=0;for(var E;(E=k.exec(d))!=null;)if(E[1]){var m=new T.AttrList(E[1]),_={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:D.resolve(E[2],l)},I=m.decimalResolution("RESOLUTION");I&&(_.width=I.width,_.height=I.height),h((m.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),_),_.videoCodec&&_.videoCodec.indexOf("avc1")!==-1&&(_.videoCodec=D.convertAVC1ToAVCOTI(_.videoCodec)),o.push(_)}else if(E[3]){var U=new T.AttrList(E[3]);U["DATA-ID"]&&(x=!0,a[U["DATA-ID"]]=U)}return{levels:o,sessionData:x?a:null}},D.parseMasterPlaylistMedia=function(d,l,o,a){a===void 0&&(a=[]);var x,E=[],m=0;for(O.lastIndex=0;(x=O.exec(d))!==null;){var _=new T.AttrList(x[1]);if(_.TYPE===o){var I={attrs:_,bitrate:0,id:m++,groupId:_["GROUP-ID"],instreamId:_["INSTREAM-ID"],name:_.NAME||_.LANGUAGE||"",type:o,default:_.bool("DEFAULT"),autoselect:_.bool("AUTOSELECT"),forced:_.bool("FORCED"),lang:_.LANGUAGE,url:_.URI?D.resolve(_.URI,l):""};if(a.length){var U=D.findGroup(a,I.groupId)||a[0];R(I,U,"audioCodec"),R(I,U,"textCodec")}E.push(I)}}return E},D.parseLevelPlaylist=function(d,l,o,a,x){var E=new B.LevelDetails(l),m=E.fragments,_=null,I=0,U=0,M=0,H=0,K=null,Z=new j.Fragment(a,l),le,he,ye,Ue=-1,Me=!1;for(b.lastIndex=0,E.m3u8=d;(le=b.exec(d))!==null;){Me&&(Me=!1,Z=new j.Fragment(a,l),Z.start=M,Z.sn=I,Z.cc=H,Z.level=o,_&&(Z.initSegment=_,Z.rawProgramDateTime=_.rawProgramDateTime));var _e=le[1];if(_e){Z.duration=parseFloat(_e);var Ie=(" "+le[2]).slice(1);Z.title=Ie||null,Z.tagList.push(Ie?["INF",_e,Ie]:["INF",_e])}else if(le[3])Object(Y.isFiniteNumber)(Z.duration)&&(Z.start=M,ye&&(Z.levelkey=ye),Z.sn=I,Z.level=o,Z.cc=H,Z.urlId=x,m.push(Z),Z.relurl=(" "+le[3]).slice(1),g(Z,K),K=Z,M+=Z.duration,I++,U=0,Me=!0);else if(le[4]){var ke=(" "+le[4]).slice(1);K?Z.setByteRange(ke,K):Z.setByteRange(ke)}else if(le[5])Z.rawProgramDateTime=(" "+le[5]).slice(1),Z.tagList.push(["PROGRAM-DATE-TIME",Z.rawProgramDateTime]),Ue===-1&&(Ue=m.length);else{if(le=le[0].match(p),!le){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he<le.length&&!(typeof le[he]!="undefined");he++);var me=(" "+le[he]).slice(1),ce=(" "+le[he+1]).slice(1),te=le[he+2]?(" "+le[he+2]).slice(1):"";switch(me){case"PLAYLIST-TYPE":E.type=ce.toUpperCase();break;case"MEDIA-SEQUENCE":I=E.startSN=parseInt(ce);break;case"SKIP":{var be=new T.AttrList(ce),ae=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(Y.isFiniteNumber)(ae)){E.skippedSegments=ae;for(var we=ae;we--;)m.unshift(null);I+=ae}var Pe=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Pe&&(E.recentlyRemovedDateranges=Pe.split(" "));break}case"TARGETDURATION":E.targetduration=parseFloat(ce);break;case"VERSION":E.version=parseInt(ce);break;case"EXTM3U":break;case"ENDLIST":E.live=!1;break;case"#":(ce||te)&&Z.tagList.push(te?[ce,te]:[ce]);break;case"DIS":H++;case"GAP":Z.tagList.push([me]);break;case"BITRATE":Z.tagList.push([me,ce]);break;case"DISCONTINUITY-SEQ":H=parseInt(ce);break;case"KEY":{var Ce,Ve=new T.AttrList(ce),Ge=Ve.enumeratedString("METHOD"),tt=Ve.URI,Je=Ve.hexadecimalInteger("IV"),Ye=Ve.enumeratedString("KEYFORMATVERSIONS"),et=Ve.enumeratedString("KEYID"),St=(Ce=Ve.enumeratedString("KEYFORMAT"))!=null?Ce:"identity",At=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(At.indexOf(St)>-1){v.logger.warn("Keyformat "+St+" is not supported from the manifest");continue}else if(St!=="identity")continue;Ge&&(ye=L.LevelKey.fromURL(l,tt),tt&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ge)>=0&&(ye.method=Ge,ye.keyFormat=St,et&&(ye.keyID=et),Ye&&(ye.keyFormatVersions=Ye),ye.iv=Je));break}case"START":{var ht=new T.AttrList(ce),xt=ht.decimalFloatingPoint("TIME-OFFSET");Object(Y.isFiniteNumber)(xt)&&(E.startTimeOffset=xt);break}case"MAP":{var Tt=new T.AttrList(ce);Z.relurl=Tt.URI,Tt.BYTERANGE&&Z.setByteRange(Tt.BYTERANGE),Z.level=o,Z.sn="initSegment",ye&&(Z.levelkey=ye),Z.initSegment=null,_=Z,Me=!0;break}case"SERVER-CONTROL":{var Ot=new T.AttrList(ce);E.canBlockReload=Ot.bool("CAN-BLOCK-RELOAD"),E.canSkipUntil=Ot.optionalFloat("CAN-SKIP-UNTIL",0),E.canSkipDateRanges=E.canSkipUntil>0&&Ot.bool("CAN-SKIP-DATERANGES"),E.partHoldBack=Ot.optionalFloat("PART-HOLD-BACK",0),E.holdBack=Ot.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Oe=new T.AttrList(ce);E.partTarget=Oe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Te=E.partList;Te||(Te=E.partList=[]);var rt=U>0?Te[Te.length-1]:void 0,ot=U++,Ne=new j.Part(new T.AttrList(ce),Z,l,ot,rt);Te.push(Ne),Z.duration+=Ne.duration;break}case"PRELOAD-HINT":{var $e=new T.AttrList(ce);E.preloadHint=$e;break}case"RENDITION-REPORT":{var xe=new T.AttrList(ce);E.renditionReports=E.renditionReports||[],E.renditionReports.push(xe);break}default:v.logger.warn("line parsed but not handled: "+le);break}}}K&&!K.relurl?(m.pop(),M-=K.duration,E.partList&&(E.fragmentHint=K)):E.partList&&(g(Z,K),Z.cc=H,E.fragmentHint=Z);var fe=m.length,pe=m[0],re=m[fe-1];if(M+=E.skippedSegments*E.targetduration,M>0&&fe&&re){E.averagetargetduration=M/fe;var ie=re.sn;E.endSN=ie!=="initSegment"?ie:0,pe&&(E.startCC=pe.cc,pe.initSegment||E.fragments.every(function(se){return se.relurl&&i(se.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Z=new j.Fragment(a,l),Z.relurl=re.relurl,Z.level=o,Z.sn="initSegment",pe.initSegment=Z,E.needSidxRanges=!0))}else E.endSN=0,E.startCC=0;return E.fragmentHint&&(M+=E.fragmentHint.duration),E.totalduration=M,E.endCC=H,Ue>0&&y(m,Ue),E},D}();function h(D,S){["video","audio","text"].forEach(function(d){var l=D.filter(function(a){return Object(C.isCodecType)(a,d)});if(l.length){var o=l.filter(function(a){return a.lastIndexOf("avc1",0)===0||a.lastIndexOf("mp4a",0)===0});S[d+"Codec"]=o.length>0?o[0]:l[0],D=D.filter(function(a){return l.indexOf(a)===-1})}}),S.unknownCodecs=D}function R(D,S,d){var l=S[d];l&&(D[d]=l)}function y(D,S){for(var d=D[S],l=S;l--;){var o=D[l];if(!o)return;o.programDateTime=d.programDateTime-o.duration*1e3,d=o}}function g(D,S){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):S!=null&&S.programDateTime&&(D.programDateTime=S.endProgramDateTime),Object(Y.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/polyfills/number.ts"),F=P("./src/events.ts"),A=P("./src/errors.ts"),j=P("./src/utils/logger.ts"),B=P("./src/utils/mp4-tools.ts"),L=P("./src/loader/m3u8-parser.ts"),T=P("./src/types/loader.ts"),v=P("./src/utils/attr-list.ts");function C(b){var p=b.type;switch(p){case T.PlaylistContextType.AUDIO_TRACK:return T.PlaylistLevelType.AUDIO;case T.PlaylistContextType.SUBTITLE_TRACK:return T.PlaylistLevelType.SUBTITLE;default:return T.PlaylistLevelType.MAIN}}function k(b,p){var c=b.url;return(c===void 0||c.indexOf("data:")===0)&&(c=p.url),c}var O=function(){function b(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var p=b.prototype;return p.registerListeners=function(){var i=this.hls;i.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.unregisterListeners=function(){var i=this.hls;i.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.createInternalLoader=function(i){var u=this.hls.config,h=u.pLoader,R=u.loader,y=h||R,g=new y(u);return i.loader=g,this.loaders[i.type]=g,g},p.getInternalLoader=function(i){return this.loaders[i.type]},p.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},p.destroyInternalLoaders=function(){for(var i in this.loaders){var u=this.loaders[i];u&&u.destroy(),this.resetInternalLoader(i)}},p.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},p.onManifestLoading=function(i,u){var h=u.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:T.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},p.onLevelLoading=function(i,u){var h=u.id,R=u.level,y=u.url,g=u.deliveryDirectives;this.load({id:h,groupId:null,level:R,responseType:"text",type:T.PlaylistContextType.LEVEL,url:y,deliveryDirectives:g})},p.onAudioTrackLoading=function(i,u){var h=u.id,R=u.groupId,y=u.url,g=u.deliveryDirectives;this.load({id:h,groupId:R,level:null,responseType:"text",type:T.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:g})},p.onSubtitleTrackLoading=function(i,u){var h=u.id,R=u.groupId,y=u.url,g=u.deliveryDirectives;this.load({id:h,groupId:R,level:null,responseType:"text",type:T.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:g})},p.load=function(i){var u,h=this.hls.config,R=this.getInternalLoader(i);if(R){var y=R.context;if(y&&y.url===i.url){j.logger.trace("[playlist-loader]: playlist request ongoing");return}j.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),R.abort()}var g,D,S,d;switch(i.type){case T.PlaylistContextType.MANIFEST:g=h.manifestLoadingMaxRetry,D=h.manifestLoadingTimeOut,S=h.manifestLoadingRetryDelay,d=h.manifestLoadingMaxRetryTimeout;break;case T.PlaylistContextType.LEVEL:case T.PlaylistContextType.AUDIO_TRACK:case T.PlaylistContextType.SUBTITLE_TRACK:g=0,D=h.levelLoadingTimeOut;break;default:g=h.levelLoadingMaxRetry,D=h.levelLoadingTimeOut,S=h.levelLoadingRetryDelay,d=h.levelLoadingMaxRetryTimeout;break}if(R=this.createInternalLoader(i),(u=i.deliveryDirectives)!==null&&u!==void 0&&u.part){var l;if(i.type===T.PlaylistContextType.LEVEL&&i.level!==null?l=this.hls.levels[i.level].details:i.type===T.PlaylistContextType.AUDIO_TRACK&&i.id!==null?l=this.hls.audioTracks[i.id].details:i.type===T.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(l=this.hls.subtitleTracks[i.id].details),l){var o=l.partTarget,a=l.targetduration;o&&a&&(D=Math.min(Math.max(o*3,a*.8)*1e3,D))}}var x={timeout:D,maxRetry:g,retryDelay:S,maxRetryDelay:d,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};R.load(i,x,E)},p.loadsuccess=function(i,u,h,R){if(R===void 0&&(R=null),h.isSidxRequest){this.handleSidxRequest(i,h),this.handlePlaylistLoaded(i,u,h,R);return}this.resetInternalLoader(h.type);var y=i.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,h,"no EXTM3U delimiter",R);return}u.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,u,h,R):this.handleMasterPlaylist(i,u,h,R)},p.loaderror=function(i,u,h){h===void 0&&(h=null),this.handleNetworkError(u,h,!1,i)},p.loadtimeout=function(i,u,h){h===void 0&&(h=null),this.handleNetworkError(u,h,!0)},p.handleMasterPlaylist=function(i,u,h,R){var y=this.hls,g=i.data,D=k(i,h),S=L.default.parseMasterPlaylist(g,D),d=S.levels,l=S.sessionData;if(!d.length){this.handleManifestParsingError(i,h,"no level found in manifest",R);return}var o=d.map(function(I){return{id:I.attrs.AUDIO,audioCodec:I.audioCodec}}),a=d.map(function(I){return{id:I.attrs.SUBTITLES,textCodec:I.textCodec}}),x=L.default.parseMasterPlaylistMedia(g,D,"AUDIO",o),E=L.default.parseMasterPlaylistMedia(g,D,"SUBTITLES",a),m=L.default.parseMasterPlaylistMedia(g,D,"CLOSED-CAPTIONS");if(x.length){var _=x.some(function(I){return!I.url});!_&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(j.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),x.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}y.trigger(F.Events.MANIFEST_LOADED,{levels:d,audioTracks:x,subtitles:E,captions:m,url:D,stats:u,networkDetails:R,sessionData:l})},p.handleTrackOrLevelPlaylist=function(i,u,h,R){var y=this.hls,g=h.id,D=h.level,S=h.type,d=k(i,h),l=Object(Y.isFiniteNumber)(g)?g:0,o=Object(Y.isFiniteNumber)(D)?D:l,a=C(h),x=L.default.parseLevelPlaylist(i.data,d,o,a,l);if(!x.fragments.length){y.trigger(F.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:typeof h.level=="number"?h.level:void 0});return}if(S===T.PlaylistContextType.MANIFEST){var E={attrs:new v.AttrList({}),bitrate:0,details:x,name:"",url:d};y.trigger(F.Events.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:d,stats:u,networkDetails:R,sessionData:null})}if(u.parsing.end=performance.now(),x.needSidxRanges){var m,_=(m=x.fragments[0].initSegment)===null||m===void 0?void 0:m.url;this.load({url:_,isSidxRequest:!0,type:S,level:D,levelDetails:x,id:g,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}h.levelDetails=x,this.handlePlaylistLoaded(i,u,h,R)},p.handleSidxRequest=function(i,u){var h=Object(B.parseSegmentIndex)(new Uint8Array(i.data));if(!h)return;var R=h.references,y=u.levelDetails;R.forEach(function(g,D){var S=g.info,d=y.fragments[D];d.byteRange.length===0&&d.setByteRange(String(1+S.end-S.start)+"@"+String(S.start)),d.initSegment&&d.initSegment.setByteRange(String(h.moovEndOffset)+"@0")})},p.handleManifestParsingError=function(i,u,h,R){this.hls.trigger(F.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:u.type===T.PlaylistContextType.MANIFEST,url:i.url,reason:h,response:i,context:u,networkDetails:R})},p.handleNetworkError=function(i,u,h,R){h===void 0&&(h=!1),j.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var y=A.ErrorDetails.UNKNOWN,g=!1,D=this.getInternalLoader(i);switch(i.type){case T.PlaylistContextType.MANIFEST:y=h?A.ErrorDetails.MANIFEST_LOAD_TIMEOUT:A.ErrorDetails.MANIFEST_LOAD_ERROR,g=!0;break;case T.PlaylistContextType.LEVEL:y=h?A.ErrorDetails.LEVEL_LOAD_TIMEOUT:A.ErrorDetails.LEVEL_LOAD_ERROR,g=!1;break;case T.PlaylistContextType.AUDIO_TRACK:y=h?A.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:A.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,g=!1;break;case T.PlaylistContextType.SUBTITLE_TRACK:y=h?A.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:A.ErrorDetails.SUBTITLE_LOAD_ERROR,g=!1;break}D&&this.resetInternalLoader(i.type);var S={type:A.ErrorTypes.NETWORK_ERROR,details:y,fatal:g,url:i.url,loader:D,context:i,networkDetails:u};R&&(S.response=R),this.hls.trigger(F.Events.ERROR,S)},p.handlePlaylistLoaded=function(i,u,h,R){var y=h.type,g=h.level,D=h.id,S=h.groupId,d=h.loader,l=h.levelDetails,o=h.deliveryDirectives;if(!(l!=null&&l.targetduration)){this.handleManifestParsingError(i,h,"invalid target duration",R);return}if(!d)return;l.live&&(d.getCacheAge&&(l.ageHeader=d.getCacheAge()||0),(!d.getCacheAge||isNaN(l.ageHeader))&&(l.ageHeader=0));switch(y){case T.PlaylistContextType.MANIFEST:case T.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:l,level:g||0,id:D||0,stats:u,networkDetails:R,deliveryDirectives:o});break;case T.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:l,id:D||0,groupId:S||"",stats:u,networkDetails:R,deliveryDirectives:o});break;case T.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:l,id:D||0,groupId:S||"",stats:u,networkDetails:R,deliveryDirectives:o});break}},b}();z.default=O},"./src/polyfills/number.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"isFiniteNumber",function(){return Y}),P.d(z,"MAX_SAFE_INTEGER",function(){return F});var Y=Number.isFinite||function(A){return typeof A=="number"&&isFinite(A)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(q,z,P){"use strict";P.r(z);var Y=function(){function F(){}return F.getSilentFrame=function(j,B){switch(j){case"mp4a.40.2":if(B===1)return new Uint8Array([0,200,0,128,35,128]);if(B===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(B===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(B===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(B===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(B===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(B===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(B===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(B===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},F}();z.default=Y},"./src/remux/mp4-generator.ts":function(q,z,P){"use strict";P.r(z);var Y=Math.pow(2,32)-1,F=function(){function A(){}return A.init=function(){A.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 B;for(B in A.types)A.types.hasOwnProperty(B)&&(A.types[B]=[B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2),B.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]),T=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]);A.HDLR_TYPES={video:L,audio:T};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0]);A.STTS=A.STSC=A.STCO=C,A.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),A.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),A.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),A.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var k=new Uint8Array([105,115,111,109]),O=new Uint8Array([97,118,99,49]),b=new Uint8Array([0,0,0,1]);A.FTYP=A.box(A.types.ftyp,k,b,k,O),A.DINF=A.box(A.types.dinf,A.box(A.types.dref,v))},A.box=function(B){for(var L=8,T=arguments.length,v=new Array(T>1?T-1:0),C=1;C<T;C++)v[C-1]=arguments[C];for(var k=v.length,O=k;k--;)L+=v[k].byteLength;var b=new Uint8Array(L);for(b[0]=L>>24&255,b[1]=L>>16&255,b[2]=L>>8&255,b[3]=L&255,b.set(B,4),k=0,L=8;k<O;k++)b.set(v[k],L),L+=v[k].byteLength;return b},A.hdlr=function(B){return A.box(A.types.hdlr,A.HDLR_TYPES[B])},A.mdat=function(B){return A.box(A.types.mdat,B)},A.mdhd=function(B,L){L*=B;var T=Math.floor(L/(Y+1)),v=Math.floor(L%(Y+1));return A.box(A.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,B>>24&255,B>>16&255,B>>8&255,B&255,T>>24,T>>16&255,T>>8&255,T&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},A.mdia=function(B){return A.box(A.types.mdia,A.mdhd(B.timescale,B.duration),A.hdlr(B.type),A.minf(B))},A.mfhd=function(B){return A.box(A.types.mfhd,new Uint8Array([0,0,0,0,B>>24,B>>16&255,B>>8&255,B&255]))},A.minf=function(B){return B.type==="audio"?A.box(A.types.minf,A.box(A.types.smhd,A.SMHD),A.DINF,A.stbl(B)):A.box(A.types.minf,A.box(A.types.vmhd,A.VMHD),A.DINF,A.stbl(B))},A.moof=function(B,L,T){return A.box(A.types.moof,A.mfhd(B),A.traf(T,L))},A.moov=function(B){for(var L=B.length,T=[];L--;)T[L]=A.trak(B[L]);return A.box.apply(null,[A.types.moov,A.mvhd(B[0].timescale,B[0].duration)].concat(T).concat(A.mvex(B)))},A.mvex=function(B){for(var L=B.length,T=[];L--;)T[L]=A.trex(B[L]);return A.box.apply(null,[A.types.mvex].concat(T))},A.mvhd=function(B,L){L*=B;var T=Math.floor(L/(Y+1)),v=Math.floor(L%(Y+1)),C=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,B>>24&255,B>>16&255,B>>8&255,B&255,T>>24,T>>16&255,T>>8&255,T&255,v>>24,v>>16&255,v>>8&255,v&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 A.box(A.types.mvhd,C)},A.sdtp=function(B){var L=B.samples||[],T=new Uint8Array(4+L.length),v,C;for(v=0;v<L.length;v++)C=L[v].flags,T[v+4]=C.dependsOn<<4|C.isDependedOn<<2|C.hasRedundancy;return A.box(A.types.sdtp,T)},A.stbl=function(B){return A.box(A.types.stbl,A.stsd(B),A.box(A.types.stts,A.STTS),A.box(A.types.stsc,A.STSC),A.box(A.types.stsz,A.STSZ),A.box(A.types.stco,A.STCO))},A.avc1=function(B){var L=[],T=[],v,C,k;for(v=0;v<B.sps.length;v++)C=B.sps[v],k=C.byteLength,L.push(k>>>8&255),L.push(k&255),L=L.concat(Array.prototype.slice.call(C));for(v=0;v<B.pps.length;v++)C=B.pps[v],k=C.byteLength,T.push(k>>>8&255),T.push(k&255),T=T.concat(Array.prototype.slice.call(C));var O=A.box(A.types.avcC,new Uint8Array([1,L[3],L[4],L[5],252|3,224|B.sps.length].concat(L).concat([B.pps.length]).concat(T))),b=B.width,p=B.height,c=B.pixelRatio[0],i=B.pixelRatio[1];return A.box(A.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,b>>8&255,b&255,p>>8&255,p&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]),O,A.box(A.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),A.box(A.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255])))},A.esds=function(B){var L=B.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(B.config).concat([6,1,2]))},A.mp4a=function(B){var L=B.samplerate;return A.box(A.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B.channelCount,0,16,0,0,0,0,L>>8&255,L&255,0,0]),A.box(A.types.esds,A.esds(B)))},A.mp3=function(B){var L=B.samplerate;return A.box(A.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B.channelCount,0,16,0,0,0,0,L>>8&255,L&255,0,0]))},A.stsd=function(B){return B.type==="audio"?!B.isAAC&&B.codec==="mp3"?A.box(A.types.stsd,A.STSD,A.mp3(B)):A.box(A.types.stsd,A.STSD,A.mp4a(B)):A.box(A.types.stsd,A.STSD,A.avc1(B))},A.tkhd=function(B){var L=B.id,T=B.duration*B.timescale,v=B.width,C=B.height,k=Math.floor(T/(Y+1)),O=Math.floor(T%(Y+1));return A.box(A.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,k>>24,k>>16&255,k>>8&255,k&255,O>>24,O>>16&255,O>>8&255,O&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,v>>8&255,v&255,0,0,C>>8&255,C&255,0,0]))},A.traf=function(B,L){var T=A.sdtp(B),v=B.id,C=Math.floor(L/(Y+1)),k=Math.floor(L%(Y+1));return A.box(A.types.traf,A.box(A.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),A.box(A.types.tfdt,new Uint8Array([1,0,0,0,C>>24,C>>16&255,C>>8&255,C&255,k>>24,k>>16&255,k>>8&255,k&255])),A.trun(B,T.length+16+20+8+16+8+8),T)},A.trak=function(B){return B.duration=B.duration||4294967295,A.box(A.types.trak,A.tkhd(B),A.mdia(B))},A.trex=function(B){var L=B.id;return A.box(A.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]))},A.trun=function(B,L){var T=B.samples||[],v=T.length,C=12+16*v,k=new Uint8Array(C),O,b,p,c,i,u;for(L+=8+C,k.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255],0),O=0;O<v;O++)b=T[O],p=b.duration,c=b.size,i=b.flags,u=b.cts,k.set([p>>>24&255,p>>>16&255,p>>>8&255,p&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,u>>>24&255,u>>>16&255,u>>>8&255,u&255],12+16*O);return A.box(A.types.trun,k)},A.initSegment=function(B){A.types||A.init();var L=A.moov(B),T=new Uint8Array(A.FTYP.byteLength+L.byteLength);return T.set(A.FTYP),T.set(L,A.FTYP.byteLength),T},A}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,z.default=F},"./src/remux/mp4-remuxer.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return u}),P.d(z,"normalizePts",function(){return h});var Y=P("./src/polyfills/number.ts"),F=P("./src/remux/aac-helper.ts"),A=P("./src/remux/mp4-generator.ts"),j=P("./src/events.ts"),B=P("./src/errors.ts"),L=P("./src/utils/logger.ts"),T=P("./src/types/loader.ts"),v=P("./src/utils/timescale-conversion.ts");function C(){return C=Object.assign||function(D){for(var S=1;S<arguments.length;S++){var d=arguments[S];for(var l in d)Object.prototype.hasOwnProperty.call(d,l)&&(D[l]=d[l])}return D},C.apply(this,arguments)}var k=10*1e3,O=1024,b=1152,p=null,c=null,i=!1,u=function(){function D(d,l,o,a){if(a===void 0&&(a=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=d,this.config=l,this.typeSupported=o,this.ISGenerated=!1,p===null){var x=navigator.userAgent||"",E=x.match(/Chrome\/(\d+)/i);p=E?parseInt(E[1]):0}if(c===null){var m=navigator.userAgent.match(/Safari\/(\d+)/i);c=m?parseInt(m[1]):0}i=!!p&&p<75||!!c&&c<600}var S=D.prototype;return S.destroy=function(){},S.resetTimeStamp=function(l){L.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=l},S.resetNextTimestamp=function(){L.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},S.resetInitSegment=function(){L.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},S.getVideoStartPts=function(l){var o=!1,a=l.reduce(function(x,E){var m=E.pts-x;return m<-4294967296?(o=!0,h(x,E.pts)):m>0?x:E.pts},l[0].pts);return o&&L.logger.debug("PTS rollover detected"),a},S.remux=function(l,o,a,x,E,m,_,I){var U,M,H,K,Z,le,he=E,ye=E,Ue=l.pid>-1,Me=o.pid>-1,_e=o.samples.length,Ie=l.samples.length>0,ke=_e>1,me=(!Ue||Ie)&&(!Me||ke)||this.ISGenerated||_;if(me){this.ISGenerated||(H=this.generateIS(l,o,E));var ce=this.isVideoContiguous,te=-1;if(ke&&(te=R(o.samples),!ce&&this.config.forceKeyFrameOnDiscontinuity))if(le=!0,te>0){L.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+_e+" video samples due to a missing keyframe");var be=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(te),o.dropped+=te,ye+=(o.samples[0].pts-be)/(o.timescale||9e4)}else te===-1&&(L.logger.warn("[mp4-remuxer]: No keyframe found out of "+_e+" video samples"),le=!1);if(this.ISGenerated){if(Ie&&ke){var ae=this.getVideoStartPts(o.samples),we=h(l.samples[0].pts,ae)-ae,Pe=we/o.inputTimeScale;he+=Math.max(0,Pe),ye+=Math.max(0,-Pe)}if(Ie){if(l.samplerate||(L.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),H=this.generateIS(l,o,E)),M=this.remuxAudio(l,he,this.isAudioContiguous,m,Me||ke||I===T.PlaylistLevelType.AUDIO?ye:void 0),ke){var Ce=M?M.endPTS-M.startPTS:0;o.inputTimeScale||(L.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),H=this.generateIS(l,o,E)),U=this.remuxVideo(o,ye,ce,Ce)}}else ke&&(U=this.remuxVideo(o,ye,ce,0));U&&(U.firstKeyFrame=te,U.independent=te!==-1)}}return this.ISGenerated&&(a.samples.length&&(Z=this.remuxID3(a,E)),x.samples.length&&(K=this.remuxText(x,E))),{audio:M,video:U,initSegment:H,independent:le,text:K,id3:Z}},S.generateIS=function(l,o,a){var x=l.samples,E=o.samples,m=this.typeSupported,_={},I=!Object(Y.isFiniteNumber)(this._initPTS),U="audio/mp4",M,H,K;if(I&&(M=H=Infinity),l.config&&x.length&&(l.timescale=l.samplerate,l.isAAC||(m.mpeg?(U="audio/mpeg",l.codec=""):m.mp3&&(l.codec="mp3")),_.audio={id:"audio",container:U,codec:l.codec,initSegment:!l.isAAC&&m.mpeg?new Uint8Array(0):A.default.initSegment([l]),metadata:{channelCount:l.channelCount}},I&&(K=l.inputTimeScale,M=H=x[0].pts-Math.round(K*a))),o.sps&&o.pps&&E.length&&(o.timescale=o.inputTimeScale,_.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:A.default.initSegment([o]),metadata:{width:o.width,height:o.height}},I)){K=o.inputTimeScale;var Z=this.getVideoStartPts(E),le=Math.round(K*a);H=Math.min(H,h(E[0].dts,Z)-le),M=Math.min(M,Z-le)}if(Object.keys(_).length)return this.ISGenerated=!0,I&&(this._initPTS=M,this._initDTS=H),{tracks:_,initPTS:M,timescale:K}},S.remuxVideo=function(l,o,a,x){var E=l.inputTimeScale,m=l.samples,_=[],I=m.length,U=this._initPTS,M=this.nextAvcDts,H=8,K,Z,le,he=Number.POSITIVE_INFINITY,ye=Number.NEGATIVE_INFINITY,Ue=0,Me=!1;if(!a||M===null){var _e=o*E,Ie=m[0].pts-h(m[0].dts,m[0].pts);M=_e-Ie}for(var ke=0;ke<I;ke++){var me=m[ke];if(me.pts=h(me.pts-U,M),me.dts=h(me.dts-U,M),me.dts>me.pts){var ce=9e4*.2;Ue=Math.max(Math.min(Ue,me.pts-me.dts),-1*ce)}me.dts<m[ke>0?ke-1:ke].dts&&(Me=!0)}Me&&m.sort(function(gt,Qe){var Ze=gt.dts-Qe.dts,Fe=gt.pts-Qe.pts;return Ze||Fe}),Z=m[0].dts,le=m[m.length-1].dts;var te=Math.round((le-Z)/(I-1));if(Ue<0){if(Ue<te*-2){L.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-te,!0)+" ms");for(var be=Ue,ae=0;ae<I;ae++)m[ae].dts=be=Math.max(be,m[ae].pts-te),m[ae].pts=Math.max(be,m[ae].pts)}else{L.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(Ue,!0)+" ms to overcome this issue");for(var we=0;we<I;we++)m[we].dts=m[we].dts+Ue}Z=m[0].dts}if(a){var Pe=Z-M,Ce=Pe>te,Ve=Pe<-1;if(Ce||Ve){Ce?L.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(Pe,!0)+" ms ("+Pe+"dts) hole between fragments detected, filling it"):L.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-Pe,!0)+" ms ("+Pe+"dts) overlapping between fragments detected"),Z=M;var Ge=m[0].pts-Pe;m[0].dts=Z,m[0].pts=Ge,L.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Ge,!0)+"/"+Object(v.toMsFromMpegTsClock)(Z,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(Pe,!0)+" ms")}}i&&(Z=Math.max(0,Z));for(var tt=0,Je=0,Ye=0;Ye<I;Ye++){for(var et=m[Ye],St=et.units,At=St.length,ht=0,xt=0;xt<At;xt++)ht+=St[xt].data.length;Je+=ht,tt+=At,et.length=ht,et.dts=Math.max(et.dts,Z),et.pts=Math.max(et.pts,et.dts,0),he=Math.min(et.pts,he),ye=Math.max(et.pts,ye)}le=m[I-1].dts;var Tt=Je+4*tt+8,Ot;try{Ot=new Uint8Array(Tt)}catch(gt){this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:B.ErrorTypes.MUX_ERROR,details:B.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Tt,reason:"fail allocating video mdat "+Tt});return}var Oe=new DataView(Ot.buffer);Oe.setUint32(0,Tt),Ot.set(A.default.types.mdat,4);for(var Te=0;Te<I;Te++){for(var rt=m[Te],ot=rt.units,Ne=0,$e=0,xe=ot.length;$e<xe;$e++){var fe=ot[$e],pe=fe.data,re=fe.data.byteLength;Oe.setUint32(H,re),H+=4,Ot.set(pe,H),H+=re,Ne+=4+re}if(Te<I-1)K=m[Te+1].dts-rt.dts;else{var ie=this.config,se=rt.dts-m[Te>0?Te-1:Te].dts;if(ie.stretchShortVideoTrack&&this.nextAudioPts!==null){var de=Math.floor(ie.maxBufferHole*E),Le=(x?he+x*E:this.nextAudioPts)-rt.pts;Le>de?(K=Le-se,K<0&&(K=se),L.logger.log("[mp4-remuxer]: It is approximately "+Le/90+" ms to the next segment; using duration "+K/90+" ms for the last video frame.")):K=se}else K=se}var Ke=Math.round(rt.pts-rt.dts);_.push(new y(rt.key,K,Ne,Ke))}if(_.length&&p&&p<70){var dt=_[0].flags;dt.dependsOn=2,dt.isNonSync=0}console.assert(K!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=le+K,this.isVideoContiguous=!0;var _t=A.default.moof(l.sequenceNumber++,Z,C({},l,{samples:_})),Ht="video",it={data1:_t,data2:Ot,startPTS:he/E,endPTS:(ye+K)/E,startDTS:Z/E,endDTS:M/E,type:Ht,hasAudio:!1,hasVideo:!0,nb:_.length,dropped:l.dropped};return l.samples=[],l.dropped=0,console.assert(Ot.length,"MDAT length must not be zero"),it},S.remuxAudio=function(l,o,a,x,E){var m=l.inputTimeScale,_=l.samplerate?l.samplerate:m,I=m/_,U=l.isAAC?O:b,M=U*I,H=this._initPTS,K=!l.isAAC&&this.typeSupported.mpeg,Z=[],le=l.samples,he=K?0:8,ye=this.nextAudioPts||-1,Ue=o*m;if(this.isAudioContiguous=a=a||le.length&&ye>0&&(x&&Math.abs(Ue-ye)<9e3||Math.abs(h(le[0].pts-H,Ue)-ye)<20*M),le.forEach(function(pe){pe.pts=h(pe.pts-H,Ue)}),!a||ye<0){if(le=le.filter(function(pe){return pe.pts>=0}),!le.length)return;E===0?ye=0:x?ye=Math.max(0,Ue):ye=le[0].pts}if(l.isAAC)for(var Me=E!==void 0,_e=this.config.maxAudioFramesDrift,Ie=0,ke=ye;Ie<le.length;Ie++){var me=le[Ie],ce=me.pts,te=ce-ke,be=Math.abs(1e3*te/m);if(te<=-_e*M&&Me)Ie===0&&(L.logger.warn("Audio frame @ "+(ce/m).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/m)+" ms."),this.nextAudioPts=ye=ke=ce);else if(te>=_e*M&&be<k&&Me){var ae=Math.round(te/M);ke=ce-ae*M,ke<0&&(ae--,ke+=M),Ie===0&&(this.nextAudioPts=ye=ke),L.logger.warn("[mp4-remuxer]: Injecting "+ae+" audio frame @ "+(ke/m).toFixed(3)+"s due to "+Math.round(1e3*te/m)+" ms gap.");for(var we=0;we<ae;we++){var Pe=Math.max(ke,0),Ce=F.default.getSilentFrame(l.manifestCodec||l.codec,l.channelCount);Ce||(L.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ce=me.unit.subarray()),le.splice(Ie,0,{unit:Ce,pts:Pe}),ke+=M,Ie++}}me.pts=ke,ke+=M}for(var Ve=null,Ge=null,tt,Je=0,Ye=le.length;Ye--;)Je+=le[Ye].unit.byteLength;for(var et=0,St=le.length;et<St;et++){var At=le[et],ht=At.unit,xt=At.pts;if(Ge!==null){var Tt=Z[et-1];Tt.duration=Math.round((xt-Ge)/I)}else if(a&&l.isAAC&&(xt=ye),Ve=xt,Je>0){Je+=he;try{tt=new Uint8Array(Je)}catch(pe){this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:B.ErrorTypes.MUX_ERROR,details:B.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Je,reason:"fail allocating audio mdat "+Je});return}if(!K){var Ot=new DataView(tt.buffer);Ot.setUint32(0,Je),tt.set(A.default.types.mdat,4)}}else return;tt.set(ht,he);var Oe=ht.byteLength;he+=Oe,Z.push(new y(!0,U,Oe,0)),Ge=xt}var Te=Z.length;if(!Te)return;var rt=Z[Z.length-1];this.nextAudioPts=ye=Ge+I*rt.duration;var ot=K?new Uint8Array(0):A.default.moof(l.sequenceNumber++,Ve/I,C({},l,{samples:Z}));l.samples=[];var Ne=Ve/m,$e=ye/m,xe="audio",fe={data1:ot,data2:tt,startPTS:Ne,endPTS:$e,startDTS:Ne,endDTS:$e,type:xe,hasAudio:!0,hasVideo:!1,nb:Te};return this.isAudioContiguous=!0,console.assert(tt.length,"MDAT length must not be zero"),fe},S.remuxEmptyAudio=function(l,o,a,x){var E=l.inputTimeScale,m=l.samplerate?l.samplerate:E,_=E/m,I=this.nextAudioPts,U=(I!==null?I:x.startDTS*E)+this._initDTS,M=x.endDTS*E+this._initDTS,H=_*O,K=Math.ceil((M-U)/H),Z=F.default.getSilentFrame(l.manifestCodec||l.codec,l.channelCount);if(L.logger.warn("[mp4-remuxer]: remux empty Audio"),!Z){L.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var le=[],he=0;he<K;he++){var ye=U+he*H;le.push({unit:Z,pts:ye,dts:ye})}return l.samples=le,this.remuxAudio(l,o,a,!1)},S.remuxID3=function(l,o){var a=l.samples.length;if(!a)return;for(var x=l.inputTimeScale,E=this._initPTS,m=this._initDTS,_=0;_<a;_++){var I=l.samples[_];I.pts=h(I.pts-E,o*x)/x,I.dts=h(I.dts-m,o*x)/x}var U=l.samples;return l.samples=[],{samples:U}},S.remuxText=function(l,o){var a=l.samples.length;if(!a)return;for(var x=l.inputTimeScale,E=this._initPTS,m=0;m<a;m++){var _=l.samples[m];_.pts=h(_.pts-E,o*x)/x}l.samples.sort(function(U,M){return U.pts-M.pts});var I=l.samples;return l.samples=[],{samples:I}},D}();function h(D,S){var d;if(S===null)return D;for(S<D?d=-8589934592:d=8589934592;Math.abs(D-S)>4294967296;)D+=d;return D}function R(D){for(var S=0;S<D.length;S++)if(D[S].key)return S;return-1}var y=function(S,d,l,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=d,this.size=l,this.cts=o,this.flags=new g(S)},g=function(S){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=S?2:1,this.isNonSync=S?0:1}},"./src/remux/passthrough-remuxer.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/mp4-tools.ts"),A=P("./src/loader/fragment.ts"),j=P("./src/utils/logger.ts"),B=function(){function v(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var C=v.prototype;return C.destroy=function(){},C.resetTimeStamp=function(O){this.initPTS=O,this.lastEndDTS=null},C.resetNextTimestamp=function(){this.lastEndDTS=null},C.resetInitSegment=function(O,b,p){this.audioCodec=b,this.videoCodec=p,this.generateInitSegment(O),this.emitInitSegment=!0},C.generateInitSegment=function(O){var b=this.audioCodec,p=this.videoCodec;if(!O||!O.byteLength){this.initTracks=void 0,this.initData=void 0;return}var c=this.initData=Object(F.parseInitSegment)(O);b||(b=T(c.audio,A.ElementaryStreamTypes.AUDIO)),p||(p=T(c.video,A.ElementaryStreamTypes.VIDEO));var i={};c.audio&&c.video?i.audiovideo={container:"video/mp4",codec:b+","+p,initSegment:O,id:"main"}:c.audio?i.audio={container:"audio/mp4",codec:b,initSegment:O,id:"audio"}:c.video?i.video={container:"video/mp4",codec:p,initSegment:O,id:"main"}:j.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},C.remux=function(O,b,p,c,i){var u=this.initPTS,h=this.lastEndDTS,R={audio:void 0,video:void 0,text:c,id3:p,initSegment:void 0};Object(Y.isFiniteNumber)(h)||(h=this.lastEndDTS=i||0);var y=b.samples;if(!y||!y.length)return R;var g={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(y),D=this.initData),!D||!D.length)return j.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),R;this.emitInitSegment&&(g.tracks=this.initTracks,this.emitInitSegment=!1),Object(Y.isFiniteNumber)(u)||(this.initPTS=g.initPTS=u=L(D,y,h));var S=Object(F.getDuration)(y,D),d=h,l=S+d;Object(F.offsetStartDTS)(D,y,u),S>0?this.lastEndDTS=l:(j.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!D.audio,a=!!D.video,x="";o&&(x+="audio"),a&&(x+="video");var E={data1:y,startPTS:d,startDTS:d,endPTS:l,endDTS:l,type:x,hasAudio:o,hasVideo:a,nb:1,dropped:0};return R.audio=E.type==="audio"?E:void 0,R.video=E.type!=="audio"?E:void 0,R.text=c,R.id3=p,R.initSegment=g,R},v}(),L=function(C,k,O){return Object(F.getStartDTS)(C,k)-O};function T(v,C){var k=v==null?void 0:v.codec;return k&&k.length>4?k:k==="hvc1"?"hvc1.1.c.L120.90":k==="av01"?"av01.0.04M.08":k==="avc1"||C===A.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}z.default=B},"./src/task-loop.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return Y});var Y=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var A=F.prototype;return A.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},A.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},A.onHandlerDestroyed=function(){},A.hasInterval=function(){return!!this._tickInterval},A.hasNextTick=function(){return!!this._tickTimer},A.setInterval=function(B){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,B),!0)},A.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},A.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},A.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},A.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},A.doTick=function(){},F}()},"./src/types/cmcd.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"CMCDVersion",function(){return Y}),P.d(z,"CMCDObjectType",function(){return F}),P.d(z,"CMCDStreamingFormat",function(){return A}),P.d(z,"CMCDStreamType",function(){return j});var Y=1,F;(function(B){B.MANIFEST="m",B.AUDIO="a",B.VIDEO="v",B.MUXED="av",B.INIT="i",B.CAPTION="c",B.TIMED_TEXT="tt",B.KEY="k",B.OTHER="o"})(F||(F={}));var A;(function(B){B.DASH="d",B.HLS="h",B.SMOOTH="s",B.OTHER="o"})(A||(A={}));var j;(function(B){B.VOD="v",B.LIVE="l"})(j||(j={}))},"./src/types/level.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"HlsSkip",function(){return A}),P.d(z,"getSkipValue",function(){return j}),P.d(z,"HlsUrlParameters",function(){return B}),P.d(z,"Level",function(){return L});function Y(T,v){for(var C=0;C<v.length;C++){var k=v[C];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,k.key,k)}}function F(T,v,C){return v&&Y(T.prototype,v),C&&Y(T,C),T}var A;(function(T){T.No="",T.Yes="YES",T.v2="v2"})(A||(A={}));function j(T,v){var C=T.canSkipUntil,k=T.canSkipDateRanges,O=T.endSN,b=v!==void 0?v-O:0;return C&&b<C?k?A.v2:A.Yes:A.No}var B=function(){function T(C,k,O){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=C,this.part=k,this.skip=O}var v=T.prototype;return v.addDirectives=function(k){var O=new self.URL(k);return this.msn!==void 0&&O.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&O.searchParams.set("_HLS_part",this.part.toString()),this.skip&&O.searchParams.set("_HLS_skip",this.skip),O.toString()},T}(),L=function(){function T(v){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[v.url],this.attrs=v.attrs,this.bitrate=v.bitrate,v.details&&(this.details=v.details),this.id=v.id||0,this.name=v.name,this.width=v.width||0,this.height=v.height||0,this.audioCodec=v.audioCodec,this.videoCodec=v.videoCodec,this.unknownCodecs=v.unknownCodecs,this.codecSet=[v.videoCodec,v.audioCodec].filter(function(C){return C}).join(",").replace(/\.[^.,]+/g,"")}return F(T,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(C){var k=C%this.url.length;this._urlId!==k&&(this.details=void 0,this._urlId=k)}}]),T}()},"./src/types/loader.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"PlaylistContextType",function(){return Y}),P.d(z,"PlaylistLevelType",function(){return F});var Y;(function(A){A.MANIFEST="manifest",A.LEVEL="level",A.AUDIO_TRACK="audioTrack",A.SUBTITLE_TRACK="subtitleTrack"})(Y||(Y={}));var F;(function(A){A.MAIN="main",A.AUDIO="audio",A.SUBTITLE="subtitle"})(F||(F={}))},"./src/types/transmuxer.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"ChunkMetadata",function(){return Y});var Y=function(j,B,L,T,v,C){T===void 0&&(T=0),v===void 0&&(v=-1),C===void 0&&(C=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=F(),this.buffering={audio:F(),video:F(),audiovideo:F()},this.level=j,this.sn=B,this.id=L,this.size=T,this.part=v,this.partial=C};function F(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"AttrList",function(){return A});var Y=/^(\d+)x(\d+)$/,F=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,A=function(){function j(L){typeof L=="string"&&(L=j.parseAttrList(L));for(var T in L)L.hasOwnProperty(T)&&(this[T]=L[T])}var B=j.prototype;return B.decimalInteger=function(T){var v=parseInt(this[T],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},B.hexadecimalInteger=function(T){if(this[T]){var v=(this[T]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var C=new Uint8Array(v.length/2),k=0;k<v.length/2;k++)C[k]=parseInt(v.slice(k*2,k*2+2),16);return C}else return null},B.hexadecimalIntegerAsNumber=function(T){var v=parseInt(this[T],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},B.decimalFloatingPoint=function(T){return parseFloat(this[T])},B.optionalFloat=function(T,v){var C=this[T];return C?parseFloat(C):v},B.enumeratedString=function(T){return this[T]},B.bool=function(T){return this[T]==="YES"},B.decimalResolution=function(T){var v=Y.exec(this[T]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},j.parseAttrList=function(T){var v,C={},k='"';for(F.lastIndex=0;(v=F.exec(T))!==null;){var O=v[2];O.indexOf(k)===0&&O.lastIndexOf(k)===O.length-1&&(O=O.slice(1,-1)),C[v[1]]=O}return C},j}()},"./src/utils/binary-search.ts":function(q,z,P){"use strict";P.r(z);var Y={search:function(A,j){for(var B=0,L=A.length-1,T=null,v=null;B<=L;){T=(B+L)/2|0,v=A[T];var C=j(v);if(C>0)B=T+1;else if(C<0)L=T-1;else return v}return null}};z.default=Y},"./src/utils/buffer-helper.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"BufferHelper",function(){return A});var Y=P("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},A=function(){function j(){}return j.isBuffered=function(L,T){try{if(L){for(var v=j.getBuffered(L),C=0;C<v.length;C++)if(T>=v.start(C)&&T<=v.end(C))return!0}}catch(k){}return!1},j.bufferInfo=function(L,T,v){try{if(L){var C=j.getBuffered(L),k=[],O;for(O=0;O<C.length;O++)k.push({start:C.start(O),end:C.end(O)});return this.bufferedInfo(k,T,v)}}catch(b){}return{len:0,start:T,end:T,nextStart:void 0}},j.bufferedInfo=function(L,T,v){T=Math.max(0,T),L.sort(function(g,D){var S=g.start-D.start;return S||D.end-g.end});var C=[];if(v)for(var k=0;k<L.length;k++){var O=C.length;if(O){var b=C[O-1].end;L[k].start-b<v?L[k].end>b&&(C[O-1].end=L[k].end):C.push(L[k])}else C.push(L[k])}else C=L;for(var p=0,c,i=T,u=T,h=0;h<C.length;h++){var R=C[h].start,y=C[h].end;if(T+v>=R&&T<y)i=R,u=y,p=u-T;else if(T+v<R){c=R;break}}return{len:p,start:i||0,end:u||0,nextStart:c}},j.getBuffered=function(L){try{return L.buffered}catch(T){return Y.logger.log("failed to get media.buffered",T),F}},j}()},"./src/utils/cea-608-parser.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"Row",function(){return u}),P.d(z,"CaptionScreen",function(){return h});var Y=P("./src/utils/logger.ts"),F={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},A=function(l){var o=l;return F.hasOwnProperty(l)&&(o=F[l]),String.fromCharCode(o)},j=15,B=100,L={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},T={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},C={25:2,26:4,29:6,30:8,31:10,27:13,28:15},k=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],O;(function(d){d[d.ERROR=0]="ERROR",d[d.TEXT=1]="TEXT",d[d.WARNING=2]="WARNING",d[d.INFO=2]="INFO",d[d.DEBUG=3]="DEBUG",d[d.DATA=3]="DATA"})(O||(O={}));var b=function(){function d(){this.time=null,this.verboseLevel=O.ERROR}var l=d.prototype;return l.log=function(a,x){this.verboseLevel>=a&&Y.logger.log(this.time+" ["+a+"] "+x)},d}(),p=function(l){for(var o=[],a=0;a<l.length;a++)o.push(l[a].toString(16));return o},c=function(){function d(o,a,x,E,m){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=o||"white",this.underline=a||!1,this.italics=x||!1,this.background=E||"black",this.flash=m||!1}var l=d.prototype;return l.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},l.setStyles=function(a){for(var x=["foreground","underline","italics","background","flash"],E=0;E<x.length;E++){var m=x[E];a.hasOwnProperty(m)&&(this[m]=a[m])}},l.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},l.equals=function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},l.copy=function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},l.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},d}(),i=function(){function d(o,a,x,E,m,_){this.uchar=void 0,this.penState=void 0,this.uchar=o||" ",this.penState=new c(a,x,E,m,_)}var l=d.prototype;return l.reset=function(){this.uchar=" ",this.penState.reset()},l.setChar=function(a,x){this.uchar=a,this.penState.copy(x)},l.setPenState=function(a){this.penState.copy(a)},l.equals=function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},l.copy=function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},l.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},d}(),u=function(){function d(o){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var a=0;a<B;a++)this.chars.push(new i);this.logger=o,this.pos=0,this.currPenState=new c}var l=d.prototype;return l.equals=function(a){for(var x=!0,E=0;E<B;E++)if(!this.chars[E].equals(a.chars[E])){x=!1;break}return x},l.copy=function(a){for(var x=0;x<B;x++)this.chars[x].copy(a.chars[x])},l.isEmpty=function(){for(var a=!0,x=0;x<B;x++)if(!this.chars[x].isEmpty()){a=!1;break}return a},l.setCursor=function(a){this.pos!==a&&(this.pos=a),this.pos<0?(this.logger.log(O.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>B&&(this.logger.log(O.DEBUG,"Too large cursor position "+this.pos),this.pos=B)},l.moveCursor=function(a){var x=this.pos+a;if(a>1)for(var E=this.pos+1;E<x+1;E++)this.chars[E].setPenState(this.currPenState);this.setCursor(x)},l.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},l.insertChar=function(a){a>=144&&this.backSpace();var x=A(a);if(this.pos>=B){this.logger.log(O.ERROR,"Cannot insert "+a.toString(16)+" ("+x+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(x,this.currPenState),this.moveCursor(1)},l.clearFromPos=function(a){var x;for(x=a;x<B;x++)this.chars[x].reset()},l.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},l.clearToEndOfRow=function(){this.clearFromPos(this.pos)},l.getTextString=function(){for(var a=[],x=!0,E=0;E<B;E++){var m=this.chars[E].uchar;m!==" "&&(x=!1),a.push(m)}return x?"":a.join("")},l.setPenStyles=function(a){this.currPenState.setStyles(a);var x=this.chars[this.pos];x.setPenState(this.currPenState)},d}(),h=function(){function d(o){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var a=0;a<j;a++)this.rows.push(new u(o));this.logger=o,this.currRow=j-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var l=d.prototype;return l.reset=function(){for(var a=0;a<j;a++)this.rows[a].clear();this.currRow=j-1},l.equals=function(a){for(var x=!0,E=0;E<j;E++)if(!this.rows[E].equals(a.rows[E])){x=!1;break}return x},l.copy=function(a){for(var x=0;x<j;x++)this.rows[x].copy(a.rows[x])},l.isEmpty=function(){for(var a=!0,x=0;x<j;x++)if(!this.rows[x].isEmpty()){a=!1;break}return a},l.backSpace=function(){var a=this.rows[this.currRow];a.backSpace()},l.clearToEndOfRow=function(){var a=this.rows[this.currRow];a.clearToEndOfRow()},l.insertChar=function(a){var x=this.rows[this.currRow];x.insertChar(a)},l.setPen=function(a){var x=this.rows[this.currRow];x.setPenStyles(a)},l.moveCursor=function(a){var x=this.rows[this.currRow];x.moveCursor(a)},l.setCursor=function(a){this.logger.log(O.INFO,"setCursor: "+a);var x=this.rows[this.currRow];x.setCursor(a)},l.setPAC=function(a){this.logger.log(O.INFO,"pacData = "+JSON.stringify(a));var x=a.row-1;if(this.nrRollUpRows&&x<this.nrRollUpRows-1&&(x=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==x){for(var E=0;E<j;E++)this.rows[E].clear();var m=this.currRow+1-this.nrRollUpRows,_=this.lastOutputScreen;if(_){var I=_.rows[m].cueStartTime,U=this.logger.time;if(I&&U!==null&&I<U)for(var M=0;M<this.nrRollUpRows;M++)this.rows[x-this.nrRollUpRows+M+1].copy(_.rows[m+M])}}this.currRow=x;var H=this.rows[this.currRow];if(a.indent!==null){var K=a.indent,Z=Math.max(K-1,0);H.setCursor(a.indent),a.color=H.chars[Z].penState.foreground}var le={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(le)},l.setBkgData=function(a){this.logger.log(O.INFO,"bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},l.setRollUpRows=function(a){this.nrRollUpRows=a},l.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(O.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(O.TEXT,this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,x=this.rows.splice(a,1)[0];x.clear(),this.rows.splice(this.currRow,0,x),this.logger.log(O.INFO,"Rolling up")},l.getDisplayText=function(a){a=a||!1;for(var x=[],E="",m=-1,_=0;_<j;_++){var I=this.rows[_].getTextString();I&&(m=_+1,a?x.push("Row "+m+": '"+I+"'"):x.push(I.trim()))}return x.length>0&&(a?E="["+x.join(" | ")+"]":E=x.join(`
`)),E},l.getTextAndFormat=function(){return this.rows},d}(),R=function(){function d(o,a,x){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=o,this.outputFilter=a,this.mode=null,this.verbose=0,this.displayedMemory=new h(x),this.nonDisplayedMemory=new h(x),this.lastOutputScreen=new h(x),this.currRollUpRow=this.displayedMemory.rows[j-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=x}var l=d.prototype;return l.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[j-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},l.getHandler=function(){return this.outputFilter},l.setHandler=function(a){this.outputFilter=a},l.setPAC=function(a){this.writeScreen.setPAC(a)},l.setBkgData=function(a){this.writeScreen.setBkgData(a)},l.setMode=function(a){if(a===this.mode)return;this.mode=a,this.logger.log(O.INFO,"MODE="+a),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=a},l.insertChars=function(a){for(var x=0;x<a.length;x++)this.writeScreen.insertChar(a[x]);var E=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(O.INFO,E+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(O.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},l.ccRCL=function(){this.logger.log(O.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},l.ccBS=function(){if(this.logger.log(O.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},l.ccAOF=function(){},l.ccAON=function(){},l.ccDER=function(){this.logger.log(O.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},l.ccRU=function(a){this.logger.log(O.INFO,"RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},l.ccFON=function(){this.logger.log(O.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},l.ccRDC=function(){this.logger.log(O.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},l.ccTR=function(){this.logger.log(O.INFO,"TR"),this.setMode("MODE_TEXT")},l.ccRTD=function(){this.logger.log(O.INFO,"RTD"),this.setMode("MODE_TEXT")},l.ccEDM=function(){this.logger.log(O.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},l.ccCR=function(){this.logger.log(O.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},l.ccENM=function(){this.logger.log(O.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},l.ccEOC=function(){if(this.logger.log(O.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,this.logger.log(O.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},l.ccTO=function(a){this.logger.log(O.INFO,"TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},l.ccMIDROW=function(a){var x={flash:!1};if(x.underline=a%2===1,x.italics=a>=46,x.italics)x.foreground="white";else{var E=Math.floor(a/2)-16,m=["white","green","blue","cyan","red","yellow","magenta"];x.foreground=m[E]}this.logger.log(O.INFO,"MIDROW: "+JSON.stringify(x)),this.writeScreen.setPen(x)},l.outputDataUpdate=function(a){a===void 0&&(a=!1);var x=this.logger.time;if(x===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=x:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,x,this.lastOutputScreen),a&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:x),this.lastOutputScreen.copy(this.displayedMemory))},l.cueSplitAtTime=function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))},d}(),y=function(){function d(o,a,x){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var E=new b;this.channels=[null,new R(o,a,E),new R(o+1,x,E)],this.cmdHistory=S(),this.logger=E}var l=d.prototype;return l.getHandler=function(a){return this.channels[a].getHandler()},l.setHandler=function(a,x){this.channels[a].setHandler(x)},l.addData=function(a,x){var E,m,_,I=!1;this.logger.time=a;for(var U=0;U<x.length;U+=2){if(m=x[U]&127,_=x[U+1]&127,m===0&&_===0)continue;if(this.logger.log(O.DATA,"["+p([x[U],x[U+1]])+"] -> ("+p([m,_])+")"),E=this.parseCmd(m,_),E||(E=this.parseMidrow(m,_)),E||(E=this.parsePAC(m,_)),E||(E=this.parseBackgroundAttributes(m,_)),!E&&(I=this.parseChars(m,_),I)){var M=this.currentChannel;if(M&&M>0){var H=this.channels[M];H.insertChars(I)}else this.logger.log(O.WARNING,"No channel found yet. TEXT-MODE?")}!E&&!I&&this.logger.log(O.WARNING,"Couldn't parse cleaned data "+p([m,_])+" orig: "+p([x[U],x[U+1]]))}},l.parseCmd=function(a,x){var E=this.cmdHistory,m=(a===20||a===28||a===21||a===29)&&x>=32&&x<=47,_=(a===23||a===31)&&x>=33&&x<=35;if(!(m||_))return!1;if(D(a,x,E))return g(null,null,E),this.logger.log(O.DEBUG,"Repeated command ("+p([a,x])+") is dropped"),!0;var I=a===20||a===21||a===23?1:2,U=this.channels[I];return a===20||a===21||a===28||a===29?x===32?U.ccRCL():x===33?U.ccBS():x===34?U.ccAOF():x===35?U.ccAON():x===36?U.ccDER():x===37?U.ccRU(2):x===38?U.ccRU(3):x===39?U.ccRU(4):x===40?U.ccFON():x===41?U.ccRDC():x===42?U.ccTR():x===43?U.ccRTD():x===44?U.ccEDM():x===45?U.ccCR():x===46?U.ccENM():x===47&&U.ccEOC():U.ccTO(x-32),g(a,x,E),this.currentChannel=I,!0},l.parseMidrow=function(a,x){var E=0;if((a===17||a===25)&&x>=32&&x<=47){if(a===17?E=1:E=2,E!==this.currentChannel)return this.logger.log(O.ERROR,"Mismatch channel in midrow parsing"),!1;var m=this.channels[E];return m?(m.ccMIDROW(x),this.logger.log(O.DEBUG,"MIDROW ("+p([a,x])+")"),!0):!1}return!1},l.parsePAC=function(a,x){var E,m=this.cmdHistory,_=(a>=17&&a<=23||a>=25&&a<=31)&&x>=64&&x<=127,I=(a===16||a===24)&&x>=64&&x<=95;if(!(_||I))return!1;if(D(a,x,m))return g(null,null,m),!0;var U=a<=23?1:2;x>=64&&x<=95?E=U===1?L[a]:v[a]:E=U===1?T[a]:C[a];var M=this.channels[U];return M?(M.setPAC(this.interpretPAC(E,x)),g(a,x,m),this.currentChannel=U,!0):!1},l.interpretPAC=function(a,x){var E,m={color:null,italics:!1,indent:null,underline:!1,row:a};return x>95?E=x-96:E=x-64,m.underline=(E&1)===1,E<=13?m.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(E/2)]:E<=15?(m.italics=!0,m.color="white"):m.indent=Math.floor((E-16)/2)*4,m},l.parseChars=function(a,x){var E,m=null,_=null;if(a>=25?(E=2,_=a-8):(E=1,_=a),_>=17&&_<=19){var I;_===17?I=x+80:_===18?I=x+112:I=x+144,this.logger.log(O.INFO,"Special char '"+A(I)+"' in channel "+E),m=[I]}else a>=32&&a<=127&&(m=x===0?[a]:[a,x]);if(m){var U=p(m);this.logger.log(O.DEBUG,"Char codes = "+U.join(",")),g(a,x,this.cmdHistory)}return m},l.parseBackgroundAttributes=function(a,x){var E=(a===16||a===24)&&x>=32&&x<=47,m=(a===23||a===31)&&x>=45&&x<=47;if(!(E||m))return!1;var _,I={};a===16||a===24?(_=Math.floor((x-32)/2),I.background=k[_],x%2===1&&(I.background=I.background+"_semi")):x===45?I.background="transparent":(I.foreground="black",x===47&&(I.underline=!0));var U=a<=23?1:2,M=this.channels[U];return M.setBkgData(I),g(a,x,this.cmdHistory),!0},l.reset=function(){for(var a=0;a<Object.keys(this.channels).length;a++){var x=this.channels[a];x&&x.reset()}this.cmdHistory=S()},l.cueSplitAtTime=function(a){for(var x=0;x<this.channels.length;x++){var E=this.channels[x];E&&E.cueSplitAtTime(a)}},d}();function g(d,l,o){o.a=d,o.b=l}function D(d,l,o){return o.a===d&&o.b===l}function S(){return{a:null,b:null}}z.default=y},"./src/utils/codecs.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"isCodecType",function(){return F}),P.d(z,"isCodecSupportedInMp4",function(){return A});var Y={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function F(j,B){var L=Y[B];return!!L&&L[j.slice(0,4)]===!0}function A(j,B){return MediaSource.isTypeSupported((B||"video")+'/mp4;codecs="'+j+'"')}},"./src/utils/cues.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/utils/vttparser.ts"),F=P("./src/utils/webvtt-parser.ts"),A=P("./src/utils/texttrack-utils.ts"),j=/\s/,B={newCue:function(T,v,C,k){for(var O=[],b,p,c,i,u,h=self.VTTCue||self.TextTrackCue,R=0;R<k.rows.length;R++)if(b=k.rows[R],c=!0,i=0,u="",!b.isEmpty()){for(var y=0;y<b.chars.length;y++)j.test(b.chars[y].uchar)&&c?i++:(u+=b.chars[y].uchar,c=!1);b.cueStartTime=v,v===C&&(C+=1e-4),i>=16?i--:i++;var g=Object(Y.fixLineBreaks)(u.trim()),D=Object(F.generateCueId)(v,C,g);(!T||!T.cues||!T.cues.getCueById(D))&&(p=new h(v,C,g),p.id=D,p.line=R+1,p.align="left",p.position=10+Math.min(80,Math.floor(i*8/32)*10),O.push(p))}return T&&O.length&&(O.sort(function(S,d){return S.line==="auto"||d.line==="auto"?0:S.line>8&&d.line>8?d.line-S.line:S.line-d.line}),O.forEach(function(S){return Object(A.addCueToTrack)(T,S)})),O}};z.default=B},"./src/utils/discontinuities.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"findFirstFragWithCC",function(){return j}),P.d(z,"shouldAlignOnDiscontinuities",function(){return B}),P.d(z,"findDiscontinuousReferenceFrag",function(){return L}),P.d(z,"adjustSlidingStart",function(){return v}),P.d(z,"alignStream",function(){return C}),P.d(z,"alignPDT",function(){return O}),P.d(z,"alignFragmentByPDTDelta",function(){return b}),P.d(z,"alignMediaPlaylistByPDT",function(){return p});var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/logger.ts"),A=P("./src/controller/level-helper.ts");function j(c,i){for(var u=null,h=0,R=c.length;h<R;h++){var y=c[h];if(y&&y.cc===i){u=y;break}}return u}function B(c,i,u){return!!(i.details&&(u.endCC>u.startCC||c&&c.cc<u.startCC))}function L(c,i){var u=c.fragments,h=i.fragments;if(!h.length||!u.length){F.logger.log("No fragments to align");return}var R=j(u,h[0].cc);if(!R||R&&!R.startPTS){F.logger.log("No frag in previous level to align on");return}return R}function T(c,i){if(c){var u=c.start+i;c.start=c.startPTS=u,c.endPTS=u+c.duration}}function v(c,i){for(var u=i.fragments,h=0,R=u.length;h<R;h++)T(u[h],c);i.fragmentHint&&T(i.fragmentHint,c),i.alignedSliding=!0}function C(c,i,u){if(!i)return;k(c,u,i),!u.alignedSliding&&i.details&&O(u,i.details),!u.alignedSliding&&i.details&&!u.skippedSegments&&Object(A.adjustSliding)(i.details,u)}function k(c,i,u){if(B(c,u,i)){var h=L(u.details,i);h&&Object(Y.isFiniteNumber)(h.start)&&(F.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),v(h.start,i))}}function O(c,i){if(!i.fragments.length||!c.hasProgramDateTime||!i.hasProgramDateTime)return;var u=i.fragments[0].programDateTime,h=c.fragments[0].programDateTime,R=(h-u)/1e3+i.fragments[0].start;R&&Object(Y.isFiniteNumber)(R)&&(F.logger.log("Adjusting PTS using programDateTime delta "+(h-u)+"ms, sliding:"+R.toFixed(3)+" "+c.url+" "),v(R,c))}function b(c,i){var u=c.programDateTime;if(!u)return;var h=(u-i)/1e3;c.start=c.startPTS=h,c.endPTS=h+c.duration}function p(c,i){if(!i.fragments.length||!c.hasProgramDateTime||!i.hasProgramDateTime)return;var u=i.fragments[0].programDateTime,h=i.fragments[0].start,R=u-h*1e3;c.fragments.forEach(function(y){b(y,R)}),c.fragmentHint&&b(c.fragmentHint,R),c.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/utils/ewma.ts"),F=function(){function A(B,L,T){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=T,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Y.default(B),this.fast_=new Y.default(L)}var j=A.prototype;return j.update=function(L,T){var v=this.slow_,C=this.fast_;this.slow_.halfLife!==L&&(this.slow_=new Y.default(L,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==T&&(this.fast_=new Y.default(T,C.getEstimate(),C.getTotalWeight()))},j.sample=function(L,T){L=Math.max(L,this.minDelayMs_);var v=8*T,C=L/1e3,k=v/C;this.fast_.sample(C,k),this.slow_.sample(C,k)},j.canEstimate=function(){var L=this.fast_;return L&&L.getTotalWeight()>=this.minWeight_},j.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},j.destroy=function(){},A}();z.default=F},"./src/utils/ewma.ts":function(q,z,P){"use strict";P.r(z);var Y=function(){function F(j,B,L){B===void 0&&(B=0),L===void 0&&(L=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=j,this.alpha_=j?Math.exp(Math.log(.5)/j):0,this.estimate_=B,this.totalWeight_=L}var A=F.prototype;return A.sample=function(B,L){var T=Math.pow(this.alpha_,B);this.estimate_=L*(1-T)+T*this.estimate_,this.totalWeight_+=B},A.getTotalWeight=function(){return this.totalWeight_},A.getEstimate=function(){if(this.alpha_){var B=1-Math.pow(this.alpha_,this.totalWeight_);if(B)return this.estimate_/B}return this.estimate_},F}();z.default=Y},"./src/utils/fetch-loader.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"fetchSupported",function(){return b});var Y=P("./src/polyfills/number.ts"),F=P("./src/loader/load-stats.ts"),A=P("./src/demux/chunk-cache.ts");function j(h,R){h.prototype=Object.create(R.prototype),h.prototype.constructor=h,C(h,R)}function B(h){var R=typeof Map=="function"?new Map:void 0;return B=function(g){if(g===null||!v(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R!="undefined"){if(R.has(g))return R.get(g);R.set(g,D)}function D(){return L(g,arguments,k(this).constructor)}return D.prototype=Object.create(g.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),C(D,g)},B(h)}function L(h,R,y){return T()?L=Reflect.construct:L=function(D,S,d){var l=[null];l.push.apply(l,S);var o=Function.bind.apply(D,l),a=new o;return d&&C(a,d.prototype),a},L.apply(null,arguments)}function T(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}function v(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function C(h,R){return C=Object.setPrototypeOf||function(g,D){return g.__proto__=D,g},C(h,R)}function k(h){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},k(h)}function O(){return O=Object.assign||function(h){for(var R=1;R<arguments.length;R++){var y=arguments[R];for(var g in y)Object.prototype.hasOwnProperty.call(y,g)&&(h[g]=y[g])}return h},O.apply(this,arguments)}function b(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(h){}return!1}var p=function(){function h(y){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=y.fetchSetup||i,this.controller=new self.AbortController,this.stats=new F.LoadStats}var R=h.prototype;return R.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},R.abortInternal=function(){var g=this.response;(!g||!g.ok)&&(this.stats.aborted=!0,this.controller.abort())},R.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},R.load=function(g,D,S){var d=this,l=this.stats;if(l.loading.start)throw new Error("Loader can only be used once.");l.loading.start=self.performance.now();var o=c(g,this.controller.signal),a=S.onProgress,x=g.responseType==="arraybuffer",E=x?"byteLength":"length";this.context=g,this.config=D,this.callbacks=S,this.request=this.fetchSetup(g,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){d.abortInternal(),S.onTimeout(l,g,d.response)},D.timeout),self.fetch(this.request).then(function(m){if(d.response=d.loader=m,!m.ok){var _=m.status,I=m.statusText;throw new u(I||"fetch, bad network response",_,m)}return l.loading.first=Math.max(self.performance.now(),l.loading.start),l.total=parseInt(m.headers.get("Content-Length")||"0"),a&&Object(Y.isFiniteNumber)(D.highWaterMark)?d.loadProgressively(m,l,g,D.highWaterMark,a):x?m.arrayBuffer():m.text()}).then(function(m){var _=d.response;self.clearTimeout(d.requestTimeout),l.loading.end=Math.max(self.performance.now(),l.loading.first),l.loaded=l.total=m[E];var I={url:_.url,data:m};a&&!Object(Y.isFiniteNumber)(D.highWaterMark)&&a(l,g,m,_),S.onSuccess(I,l,g,_)}).catch(function(m){if(self.clearTimeout(d.requestTimeout),l.aborted)return;var _=m.code||0;S.onError({code:_,text:m.message},g,m.details)})},R.getCacheAge=function(){var g=null;if(this.response){var D=this.response.headers.get("age");g=D?parseFloat(D):null}return g},R.loadProgressively=function(g,D,S,d,l){d===void 0&&(d=0);var o=new A.default,a=g.body.getReader(),x=function E(){return a.read().then(function(m){if(m.done)return o.dataLength&&l(D,S,o.flush(),g),Promise.resolve(new ArrayBuffer(0));var _=m.value,I=_.length;return D.loaded+=I,I<d||o.dataLength?(o.push(_),o.dataLength>=d&&l(D,S,o.flush(),g)):l(D,S,_,g),E()}).catch(function(){return Promise.reject()})};return x()},h}();function c(h,R){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:R,headers:new self.Headers(O({},h.headers))};return h.rangeEnd&&y.headers.set("Range","bytes="+h.rangeStart+"-"+String(h.rangeEnd-1)),y}function i(h,R){return new self.Request(h.url,R)}var u=function(h){j(R,h);function R(y,g,D){var S;return S=h.call(this,y)||this,S.code=void 0,S.details=void 0,S.code=g,S.details=D,S}return R}(B(Error));z.default=p},"./src/utils/imsc1-ttml-parser.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"IMSC1_CODEC",function(){return v}),P.d(z,"parseIMSC1",function(){return b});var Y=P("./src/utils/mp4-tools.ts"),F=P("./src/utils/vttparser.ts"),A=P("./src/utils/vttcue.ts"),j=P("./src/demux/id3.ts"),B=P("./src/utils/timescale-conversion.ts"),L=P("./src/utils/webvtt-parser.ts");function T(){return T=Object.assign||function(d){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(d[a]=o[a])}return d},T.apply(this,arguments)}var v="stpp.ttml.im1t",C=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,k=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,O={left:"start",center:"center",right:"end",start:"start",end:"end"};function b(d,l,o,a,x){var E=Object(Y.findBox)(new Uint8Array(d),["mdat"]);if(E.length===0){x(new Error("Could not parse IMSC1 mdat"));return}var m=E[0],_=Object(j.utf8ArrayToStr)(new Uint8Array(d,m.start,m.end-m.start)),I=Object(B.toTimescaleFromScale)(l,1,o);try{a(p(_,I))}catch(U){x(U)}}function p(d,l){var o=new DOMParser,a=o.parseFromString(d,"text/xml"),x=a.getElementsByTagName("tt")[0];if(!x)throw new Error("Invalid ttml");var E={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},m=Object.keys(E).reduce(function(H,K){return H[K]=x.getAttribute("ttp:"+K)||E[K],H},{}),_=x.getAttribute("xml:space")!=="preserve",I=i(c(x,"styling","style")),U=i(c(x,"layout","region")),M=c(x,"body","[begin]");return[].map.call(M,function(H){var K=u(H,_);if(!K||!H.hasAttribute("begin"))return null;var Z=g(H.getAttribute("begin"),m),le=g(H.getAttribute("dur"),m),he=g(H.getAttribute("end"),m);if(Z===null)throw y(H);if(he===null){if(le===null)throw y(H);he=Z+le}var ye=new A.default(Z-l,he-l,K);ye.id=Object(L.generateCueId)(ye.startTime,ye.endTime,ye.text);var Ue=U[H.getAttribute("region")],Me=I[H.getAttribute("style")];ye.position=10,ye.size=80;var _e=h(Ue,Me),Ie=_e.textAlign;if(Ie){var ke=O[Ie];ke&&(ye.lineAlign=ke),ye.align=Ie}return T(ye,_e),ye}).filter(function(H){return H!==null})}function c(d,l,o){var a=d.getElementsByTagName(l)[0];return a?[].slice.call(a.querySelectorAll(o)):[]}function i(d){return d.reduce(function(l,o){var a=o.getAttribute("xml:id");return a&&(l[a]=o),l},{})}function u(d,l){return[].slice.call(d.childNodes).reduce(function(o,a,x){var E;return a.nodeName==="br"&&x?o+`
`:(E=a.childNodes)!==null&&E!==void 0&&E.length?u(a,l):l?o+a.textContent.trim().replace(/\s+/g," "):o+a.textContent},"")}function h(d,l){var o="http://www.w3.org/ns/ttml#styling",a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return a.reduce(function(x,E){var m=R(l,o,E)||R(d,o,E);return m&&(x[E]=m),x},{})}function R(d,l,o){return d.hasAttributeNS(l,o)?d.getAttributeNS(l,o):null}function y(d){return new Error("Could not parse ttml timestamp "+d)}function g(d,l){if(!d)return null;var o=Object(F.parseTimeStamp)(d);return o===null&&(C.test(d)?o=D(d,l):k.test(d)&&(o=S(d,l))),o}function D(d,l){var o=C.exec(d),a=(o[4]|0)+(o[5]|0)/l.subFrameRate;return(o[1]|0)*3600+(o[2]|0)*60+(o[3]|0)+a/l.frameRate}function S(d,l){var o=k.exec(d),a=Number(o[1]),x=o[2];switch(x){case"h":return a*3600;case"m":return a*60;case"ms":return a*1e3;case"f":return a/l.frameRate;case"t":return a/l.tickRate}return a}},"./src/utils/logger.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"enableLogs",function(){return L}),P.d(z,"logger",function(){return T});var Y=function(){},F={trace:Y,debug:Y,log:Y,warn:Y,info:Y,error:Y},A=F;function j(v){var C=self.console[v];return C?C.bind(self.console,"["+v+"] >"):Y}function B(v){for(var C=arguments.length,k=new Array(C>1?C-1:0),O=1;O<C;O++)k[O-1]=arguments[O];k.forEach(function(b){A[b]=v[b]?v[b].bind(v):j(b)})}function L(v){if(self.console&&v===!0||typeof v=="object"){B(v,"debug","log","info","warn","error");try{A.log()}catch(C){A=F}}else A=F}var T=A},"./src/utils/mediakeys-helper.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"KeySystems",function(){return Y}),P.d(z,"requestMediaKeySystemAccess",function(){return F});var Y;(function(A){A.WIDEVINE="com.widevine.alpha",A.PLAYREADY="com.microsoft.playready"})(Y||(Y={}));var F=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"getMediaSource",function(){return Y});function Y(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"bin2str",function(){return B}),P.d(z,"readUint16",function(){return L}),P.d(z,"readUint32",function(){return T}),P.d(z,"writeUint32",function(){return v}),P.d(z,"findBox",function(){return C}),P.d(z,"parseSegmentIndex",function(){return k}),P.d(z,"parseInitSegment",function(){return O}),P.d(z,"getStartDTS",function(){return b}),P.d(z,"getDuration",function(){return p}),P.d(z,"computeRawDurationFromSamples",function(){return c}),P.d(z,"offsetStartDTS",function(){return i}),P.d(z,"segmentValidRange",function(){return u}),P.d(z,"appendUint8Array",function(){return h});var Y=P("./src/utils/typed-array.ts"),F=P("./src/loader/fragment.ts"),A=Math.pow(2,32)-1,j=[].push;function B(R){return String.fromCharCode.apply(null,R)}function L(R,y){"data"in R&&(y+=R.start,R=R.data);var g=R[y]<<8|R[y+1];return g<0?65536+g:g}function T(R,y){"data"in R&&(y+=R.start,R=R.data);var g=R[y]<<24|R[y+1]<<16|R[y+2]<<8|R[y+3];return g<0?4294967296+g:g}function v(R,y,g){"data"in R&&(y+=R.start,R=R.data),R[y]=g>>24,R[y+1]=g>>16&255,R[y+2]=g>>8&255,R[y+3]=g&255}function C(R,y){var g=[];if(!y.length)return g;var D,S,d;"data"in R?(D=R.data,S=R.start,d=R.end):(D=R,S=0,d=D.byteLength);for(var l=S;l<d;){var o=T(D,l),a=B(D.subarray(l+4,l+8)),x=o>1?l+o:d;if(a===y[0])if(y.length===1)g.push({data:D,start:l+8,end:x});else{var E=C({data:D,start:l+8,end:x},y.slice(1));E.length&&j.apply(g,E)}l=x}return g}function k(R){var y=C(R,["moov"]),g=y[0],D=g?g.end:null,S=C(R,["sidx"]);if(!S||!S[0])return null;var d=[],l=S[0],o=l.data[0],a=o===0?8:16,x=T(l,a);a+=4;var E=0,m=0;o===0?a+=8:a+=16,a+=2;var _=l.end+m,I=L(l,a);a+=2;for(var U=0;U<I;U++){var M=a,H=T(l,M);M+=4;var K=H&2147483647,Z=(H&2147483648)>>>31;if(Z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var le=T(l,M);M+=4,d.push({referenceSize:K,subsegmentDuration:le,info:{duration:le/x,start:_,end:_+K-1}}),_+=K,M+=4,a=M}return{earliestPresentationTime:E,timescale:x,version:o,referencesCount:I,references:d,moovEndOffset:D}}function O(R){for(var y=[],g=C(R,["moov","trak"]),D=0;D<g.length;D++){var S=g[D],d=C(S,["tkhd"])[0];if(d){var l=d.data[d.start],o=l===0?12:20,a=T(d,o),x=C(S,["mdia","mdhd"])[0];if(x){l=x.data[x.start],o=l===0?12:20;var E=T(x,o),m=C(S,["mdia","hdlr"])[0];if(m){var _=B(m.data.subarray(m.start+8,m.start+12)),I={soun:F.ElementaryStreamTypes.AUDIO,vide:F.ElementaryStreamTypes.VIDEO}[_];if(I){var U=C(S,["mdia","minf","stbl","stsd"])[0],M=void 0;U&&(M=B(U.data.subarray(U.start+12,U.start+16))),y[a]={timescale:E,type:I},y[I]={timescale:E,id:a,codec:M}}}}}}var H=C(R,["moov","mvex","trex"]);return H.forEach(function(K){var Z=T(K,4),le=y[Z];le&&(le.default={duration:T(K,12),flags:T(K,20)})}),y}function b(R,y){return C(y,["moof","traf"]).reduce(function(g,D){var S=C(D,["tfdt"])[0],d=S.data[S.start],l=C(D,["tfhd"]).reduce(function(o,a){var x=T(a,4),E=R[x];if(E){var m=T(S,4);d===1&&(m*=Math.pow(2,32),m+=T(S,8));var _=E.timescale||9e4,I=m/_;if(isFinite(I)&&(o===null||I<o))return I}return o},null);return l!==null&&isFinite(l)&&(g===null||l<g)?l:g},null)||0}function p(R,y){for(var g=0,D=0,S=0,d=C(R,["moof","traf"]),l=0;l<d.length;l++){var o=d[l],a=C(o,["tfhd"])[0],x=T(a,4),E=y[x];if(!E)continue;var m=E.default,_=T(a,0)|(m==null?void 0:m.flags),I=m==null?void 0:m.duration;_&8&&(_&2?I=T(a,12):I=T(a,8));for(var U=E.timescale||9e4,M=C(o,["trun"]),H=0;H<M.length;H++){if(I){var K=T(M[H],4);g=I*K}else g=c(M[H]);E.type===F.ElementaryStreamTypes.VIDEO?D+=g/U:E.type===F.ElementaryStreamTypes.AUDIO&&(S+=g/U)}}if(D===0&&S===0){var Z=k(R);if(Z!=null&&Z.references)return Z.references.reduce(function(le,he){return le+he.info.duration||0},0)}return D||S}function c(R){var y=T(R,0),g=8;y&1&&(g+=4),y&4&&(g+=4);for(var D=0,S=T(R,4),d=0;d<S;d++){if(y&256){var l=T(R,g);D+=l,g+=4}y&512&&(g+=4),y&1024&&(g+=4),y&2048&&(g+=4)}return D}function i(R,y,g){C(y,["moof","traf"]).forEach(function(D){C(D,["tfhd"]).forEach(function(S){var d=T(S,4),l=R[d];if(!l)return;var o=l.timescale||9e4;C(D,["tfdt"]).forEach(function(a){var x=a.data[a.start],E=T(a,4);if(x===0)v(a,4,E-g*o);else{E*=Math.pow(2,32),E+=T(a,8),E-=g*o,E=Math.max(E,0);var m=Math.floor(E/(A+1)),_=Math.floor(E%(A+1));v(a,4,m),v(a,8,_)}})})})}function u(R){var y={valid:null,remainder:null},g=C(R,["moof"]);if(g){if(g.length<2)return y.remainder=R,y}else return y;var D=g[g.length-1];return y.valid=Object(Y.sliceUint8)(R,0,D.start-8),y.remainder=Object(Y.sliceUint8)(R,D.start-8),y}function h(R,y){var g=new Uint8Array(R.length+y.length);return g.set(R),g.set(y,R.length),g}},"./src/utils/output-filter.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"default",function(){return Y});var Y=function(){function F(j,B){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=j,this.trackName=B}var A=F.prototype;return A.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},A.newCue=function(B,L,T){(this.startTime===null||this.startTime>B)&&(this.startTime=B),this.endTime=L,this.screen=T,this.timelineController.createCaptionsTrack(this.trackName)},A.reset=function(){this.cueRanges=[]},F}()},"./src/utils/texttrack-utils.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"sendAddTrackEvent",function(){return F}),P.d(z,"addCueToTrack",function(){return A}),P.d(z,"clearCurrentCues",function(){return j}),P.d(z,"removeCuesInRange",function(){return B}),P.d(z,"getCuesInRange",function(){return T});var Y=P("./src/utils/logger.ts");function F(v,C){var k;try{k=new Event("addtrack")}catch(O){k=document.createEvent("Event"),k.initEvent("addtrack",!1,!1)}k.track=v,C.dispatchEvent(k)}function A(v,C){var k=v.mode;if(k==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(C.id))try{if(v.addCue(C),!v.cues.getCueById(C.id))throw new Error("addCue is failed for: "+C)}catch(b){Y.logger.debug("[texttrack-utils]: "+b);var O=new self.TextTrackCue(C.startTime,C.endTime,C.text);O.id=C.id,v.addCue(O)}k==="disabled"&&(v.mode=k)}function j(v){var C=v.mode;if(C==="disabled"&&(v.mode="hidden"),v.cues)for(var k=v.cues.length;k--;)v.removeCue(v.cues[k]);C==="disabled"&&(v.mode=C)}function B(v,C,k){var O=v.mode;if(O==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var b=T(v.cues,C,k),p=0;p<b.length;p++)v.removeCue(b[p]);O==="disabled"&&(v.mode=O)}function L(v,C){if(C<v[0].startTime)return 0;var k=v.length-1;if(C>v[k].endTime)return-1;for(var O=0,b=k;O<=b;){var p=Math.floor((b+O)/2);if(C<v[p].startTime)b=p-1;else if(C>v[p].startTime&&O<k)O=p+1;else return p}return v[O].startTime-C<C-v[b].startTime?O:b}function T(v,C,k){var O=[],b=L(v,C);if(b>-1)for(var p=b,c=v.length;p<c;p++){var i=v[p];if(i.startTime>=C&&i.endTime<=k)O.push(i);else if(i.startTime>k)return O}return O}},"./src/utils/time-ranges.ts":function(q,z,P){"use strict";P.r(z);var Y={toString:function(A){for(var j="",B=A.length,L=0;L<B;L++)j+="["+A.start(L).toFixed(3)+","+A.end(L).toFixed(3)+"]";return j}};z.default=Y},"./src/utils/timescale-conversion.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"toTimescaleFromBase",function(){return F}),P.d(z,"toTimescaleFromScale",function(){return A}),P.d(z,"toMsFromMpegTsClock",function(){return j}),P.d(z,"toMpegTsClockFromTimescale",function(){return B});var Y=9e4;function F(L,T,v,C){v===void 0&&(v=1),C===void 0&&(C=!1);var k=L*T*v;return C?Math.round(k):k}function A(L,T,v,C){return v===void 0&&(v=1),C===void 0&&(C=!1),F(L,T,1/v,C)}function j(L,T){return T===void 0&&(T=!1),F(L,1e3,1/Y,T)}function B(L,T){return T===void 0&&(T=1),F(L,Y,1/T)}},"./src/utils/typed-array.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"sliceUint8",function(){return Y});function Y(F,A,j){return Uint8Array.prototype.slice?F.slice(A,j):new Uint8Array(Array.prototype.slice.call(F,A,j))}},"./src/utils/vttcue.ts":function(q,z,P){"use strict";P.r(z),z.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Y=["","lr","rl"],F=["start","middle","end","left","right"];function A(v,C){if(typeof C!="string")return!1;if(!Array.isArray(v))return!1;var k=C.toLowerCase();return~v.indexOf(k)?k:!1}function j(v){return A(Y,v)}function B(v){return A(F,v)}function L(v){for(var C=arguments.length,k=new Array(C>1?C-1:0),O=1;O<C;O++)k[O-1]=arguments[O];for(var b=1;b<arguments.length;b++){var p=arguments[b];for(var c in p)v[c]=p[c]}return v}function T(v,C,k){var O=this,b={enumerable:!0};O.hasBeenReset=!1;var p="",c=!1,i=v,u=C,h=k,R=null,y="",g=!0,D="auto",S="start",d=50,l="middle",o=50,a="middle";Object.defineProperty(O,"id",L({},b,{get:function(){return p},set:function(E){p=""+E}})),Object.defineProperty(O,"pauseOnExit",L({},b,{get:function(){return c},set:function(E){c=!!E}})),Object.defineProperty(O,"startTime",L({},b,{get:function(){return i},set:function(E){if(typeof E!="number")throw new TypeError("Start time must be set to a number.");i=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"endTime",L({},b,{get:function(){return u},set:function(E){if(typeof E!="number")throw new TypeError("End time must be set to a number.");u=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"text",L({},b,{get:function(){return h},set:function(E){h=""+E,this.hasBeenReset=!0}})),Object.defineProperty(O,"region",L({},b,{get:function(){return R},set:function(E){R=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"vertical",L({},b,{get:function(){return y},set:function(E){var m=j(E);if(m===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=m,this.hasBeenReset=!0}})),Object.defineProperty(O,"snapToLines",L({},b,{get:function(){return g},set:function(E){g=!!E,this.hasBeenReset=!0}})),Object.defineProperty(O,"line",L({},b,{get:function(){return D},set:function(E){if(typeof E!="number"&&E!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"lineAlign",L({},b,{get:function(){return S},set:function(E){var m=B(E);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");S=m,this.hasBeenReset=!0}})),Object.defineProperty(O,"position",L({},b,{get:function(){return d},set:function(E){if(E<0||E>100)throw new Error("Position must be between 0 and 100.");d=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"positionAlign",L({},b,{get:function(){return l},set:function(E){var m=B(E);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");l=m,this.hasBeenReset=!0}})),Object.defineProperty(O,"size",L({},b,{get:function(){return o},set:function(E){if(E<0||E>100)throw new Error("Size must be between 0 and 100.");o=E,this.hasBeenReset=!0}})),Object.defineProperty(O,"align",L({},b,{get:function(){return a},set:function(E){var m=B(E);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");a=m,this.hasBeenReset=!0}})),O.displayState=void 0}return T.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},T}()},"./src/utils/vttparser.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"parseTimeStamp",function(){return A}),P.d(z,"fixLineBreaks",function(){return C}),P.d(z,"VTTParser",function(){return k});var Y=P("./src/utils/vttcue.ts"),F=function(){function O(){}var b=O.prototype;return b.decode=function(c,i){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},O}();function A(O){function b(c,i,u,h){return(c|0)*3600+(i|0)*60+(u|0)+parseFloat(h||0)}var p=O.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return p?parseFloat(p[2])>59?b(p[2],p[3],0,p[4]):b(p[1],p[2],p[3],p[4]):null}var j=function(){function O(){this.values=Object.create(null)}var b=O.prototype;return b.set=function(c,i){!this.get(c)&&i!==""&&(this.values[c]=i)},b.get=function(c,i,u){return u?this.has(c)?this.values[c]:i[u]:this.has(c)?this.values[c]:i},b.has=function(c){return c in this.values},b.alt=function(c,i,u){for(var h=0;h<u.length;++h)if(i===u[h]){this.set(c,i);break}},b.integer=function(c,i){/^-?\d+$/.test(i)&&this.set(c,parseInt(i,10))},b.percent=function(c,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var u=parseFloat(i);if(u>=0&&u<=100)return this.set(c,u),!0}return!1},O}();function B(O,b,p,c){var i=c?O.split(c):[O];for(var u in i){if(typeof i[u]!="string")continue;var h=i[u].split(p);if(h.length!==2)continue;var R=h[0],y=h[1];b(R,y)}}var L=new Y.default(0,0,""),T=L.align==="middle"?"middle":"center";function v(O,b,p){var c=O;function i(){var R=A(O);if(R===null)throw new Error("Malformed timestamp: "+c);return O=O.replace(/^[^\sa-zA-Z-]+/,""),R}function u(R,y){var g=new j;B(R,function(d,l){var o;switch(d){case"region":for(var a=p.length-1;a>=0;a--)if(p[a].id===l){g.set(d,p[a].region);break}break;case"vertical":g.alt(d,l,["rl","lr"]);break;case"line":o=l.split(","),g.integer(d,o[0]),g.percent(d,o[0])&&g.set("snapToLines",!1),g.alt(d,o[0],["auto"]),o.length===2&&g.alt("lineAlign",o[1],["start",T,"end"]);break;case"position":o=l.split(","),g.percent(d,o[0]),o.length===2&&g.alt("positionAlign",o[1],["start",T,"end","line-left","line-right","auto"]);break;case"size":g.percent(d,l);break;case"align":g.alt(d,l,["start",T,"end","left","right"]);break}},/:/,/\s/),y.region=g.get("region",null),y.vertical=g.get("vertical","");var D=g.get("line","auto");D==="auto"&&L.line===-1&&(D=-1),y.line=D,y.lineAlign=g.get("lineAlign","start"),y.snapToLines=g.get("snapToLines",!0),y.size=g.get("size",100),y.align=g.get("align",T);var S=g.get("position","auto");S==="auto"&&L.position===50&&(S=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=S}function h(){O=O.replace(/^\s+/,"")}if(h(),b.startTime=i(),h(),O.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);O=O.substr(3),h(),b.endTime=i(),h(),u(O,b)}function C(O){return O.replace(/<br(?: \/)?>/gi,`
`)}var k=function(){function O(){this.state="INITIAL",this.buffer="",this.decoder=new F,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var b=O.prototype;return b.parse=function(c){var i=this;c&&(i.buffer+=i.decoder.decode(c,{stream:!0}));function u(){var S=i.buffer,d=0;for(S=C(S);d<S.length&&S[d]!=="\r"&&S[d]!==`
`;)++d;var l=S.substr(0,d);return S[d]==="\r"&&++d,S[d]===`
`&&++d,i.buffer=S.substr(d),l}function h(S){B(S,function(d,l){},/:/)}try{var R="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;R=u();var y=R.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var g=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;g?g=!1:R=u();switch(i.state){case"HEADER":/:/.test(R)?h(R):R||(i.state="ID");continue;case"NOTE":R||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){i.state="NOTE";break}if(!R)continue;if(i.cue=new Y.default(0,0,""),i.state="CUE",R.indexOf("-->")===-1){i.cue.id=R;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{v(R,i.cue,i.regionList)}catch(S){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var D=R.indexOf("-->")!==-1;if(!R||D&&(g=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
`),i.cue.text+=R}continue;case"BADCUE":R||(i.state="ID")}}}catch(S){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},b.flush=function(){var c=this;try{if((c.cue||c.state==="HEADER")&&(c.buffer+=`
`,c.parse()),c.state==="INITIAL"||c.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){c.onparsingerror&&c.onparsingerror(i)}return c.onflush&&c.onflush(),this},O}()},"./src/utils/webvtt-parser.ts":function(q,z,P){"use strict";P.r(z),P.d(z,"generateCueId",function(){return k}),P.d(z,"parseWebVTT",function(){return b});var Y=P("./src/polyfills/number.ts"),F=P("./src/utils/vttparser.ts"),A=P("./src/demux/id3.ts"),j=P("./src/utils/timescale-conversion.ts"),B=P("./src/remux/mp4-remuxer.ts"),L=/\r\n|\n\r|\n|\r/g,T=function(c,i,u){return u===void 0&&(u=0),c.substr(u,i.length)===i},v=function(c){var i=parseInt(c.substr(-3)),u=parseInt(c.substr(-6,2)),h=parseInt(c.substr(-9,2)),R=c.length>9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(Y.isFiniteNumber)(i)||!Object(Y.isFiniteNumber)(u)||!Object(Y.isFiniteNumber)(h)||!Object(Y.isFiniteNumber)(R))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return i+=1e3*u,i+=60*1e3*h,i+=60*60*1e3*R,i},C=function(c){for(var i=5381,u=c.length;u;)i=i*33^c.charCodeAt(--u);return(i>>>0).toString()};function k(p,c,i){return C(p.toString())+C(c.toString())+C(i)}var O=function(c,i,u){var h=c[i],R=c[h.prevCC];if(!R||!R.new&&h.new){c.ccOffset=c.presentationOffset=h.start,h.new=!1;return}for(;(y=R)!==null&&y!==void 0&&y.new;){var y;c.ccOffset+=h.start-R.start,h.new=!1,h=R,R=c[h.prevCC]}c.presentationOffset=u};function b(p,c,i,u,h,R,y,g){var D=new F.VTTParser,S=Object(A.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(L,`
`).split(`
`),d=[],l=Object(j.toMpegTsClockFromTimescale)(c,i),o="00:00.000",a=0,x=0,E,m=!0,_=!1;D.oncue=function(I){var U=u[h],M=u.ccOffset,H=(a-l)/9e4;if(U!=null&&U.new&&(x!==void 0?M=u.ccOffset=U.start:O(u,h,H)),H&&(M=H-u.presentationOffset),_){var K=I.endTime-I.startTime,Z=Object(B.normalizePts)((I.startTime+M-x)*9e4,R*9e4)/9e4;I.startTime=Z,I.endTime=Z+K}var le=I.text.trim();I.text=decodeURIComponent(encodeURIComponent(le)),I.id||(I.id=k(I.startTime,I.endTime,le)),I.endTime>0&&d.push(I)},D.onparsingerror=function(I){E=I},D.onflush=function(){if(E){g(E);return}y(d)},S.forEach(function(I){if(m)if(T(I,"X-TIMESTAMP-MAP=")){m=!1,_=!0,I.substr(16).split(",").forEach(function(U){T(U,"LOCAL:")?o=U.substr(6):T(U,"MPEGTS:")&&(a=parseInt(U.substr(7)))});try{x=v(o)/1e3}catch(U){_=!1,E=U}return}else I===""&&(m=!1);D.parse(I+`
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(q,z,P){"use strict";P.r(z);var Y=P("./src/utils/logger.ts"),F=P("./src/loader/load-stats.ts"),A=/^age:\s*[\d.]+\s*$/m,j=function(){function B(T){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=T?T.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var L=B.prototype;return L.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},L.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},L.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},L.load=function(v,C,k){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=C,this.callbacks=k,this.retryDelay=C.retryDelay,this.loadInternal()},L.loadInternal=function(){var v=this.config,C=this.context;if(!v)return;var k=this.loader=new self.XMLHttpRequest,O=this.stats;O.loading.first=0,O.loaded=0;var b=this.xhrSetup;try{if(b)try{b(k,C.url)}catch(i){k.open("GET",C.url,!0),b(k,C.url)}k.readyState||k.open("GET",C.url,!0);var p=this.context.headers;if(p)for(var c in p)k.setRequestHeader(c,p[c])}catch(i){this.callbacks.onError({code:k.status,text:i.message},C,k);return}C.rangeEnd&&k.setRequestHeader("Range","bytes="+C.rangeStart+"-"+(C.rangeEnd-1)),k.onreadystatechange=this.readystatechange.bind(this),k.onprogress=this.loadprogress.bind(this),k.responseType=C.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),k.send()},L.readystatechange=function(){var v=this.context,C=this.loader,k=this.stats;if(!v||!C)return;var O=C.readyState,b=this.config;if(k.aborted)return;if(O>=2)if(self.clearTimeout(this.requestTimeout),k.loading.first===0&&(k.loading.first=Math.max(self.performance.now(),k.loading.start)),O===4){C.onreadystatechange=null,C.onprogress=null;var p=C.status;if(p>=200&&p<300){k.loading.end=Math.max(self.performance.now(),k.loading.first);var c,i;if(v.responseType==="arraybuffer"?(c=C.response,i=c.byteLength):(c=C.responseText,i=c.length),k.loaded=k.total=i,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(k,v,c,C),!this.callbacks)return;var h={url:C.responseURL,data:c};this.callbacks.onSuccess(h,k,v,C)}else k.retry>=b.maxRetry||p>=400&&p<499?(Y.logger.error(p+" while loading "+v.url),this.callbacks.onError({code:p,text:C.statusText},v,C)):(Y.logger.warn(p+" while loading "+v.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,b.maxRetryDelay),k.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),b.timeout)},L.loadtimeout=function(){Y.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},L.loadprogress=function(v){var C=this.stats;C.loaded=v.loaded,v.lengthComputable&&(C.total=v.total)},L.getCacheAge=function(){var v=null;if(this.loader&&A.test(this.loader.getAllResponseHeaders())){var C=this.loader.getResponseHeader("age");v=C?parseFloat(C):null}return v},B}();z.default=j}}).default})},vHTk:function(ze,De,W){ze.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(ze,De,W){"use strict";W.d(De,"a",function(){return ht});var q=W("rePB"),z=W("VTBJ"),P=W("KQm4"),Y=W("U8pU"),F=W("ODXe"),A=W("q1tI"),j=W("TSYQ"),B=W.n(j),L=W("Gytx"),T=W.n(L),v=W("Kwbf"),C=W("t23M"),k=W("qx4F"),O=W("6eGT"),b=W("IBYe"),p=W("Ff2n"),c=W("c+Xe"),i=W("fyJ8"),u=W("biw7");function h(Oe,Te,rt,ot,Ne){var $e=rt[Oe]||{},xe=rt[Te]||{},fe,pe;$e.fixed==="left"?fe=ot.left[Oe]:xe.fixed==="right"&&(pe=ot.right[Te]);var re=!1,ie=!1,se=!1,de=!1,Le=rt[Te+1],Ke=rt[Oe-1];if(Ne==="rtl"){if(fe!==void 0){var dt=Ke&&Ke.fixed==="left";de=!dt}else if(pe!==void 0){var _t=Le&&Le.fixed==="right";se=!_t}}else if(fe!==void 0){var Ht=Le&&Le.fixed==="left";re=!Ht}else if(pe!==void 0){var it=Ke&&Ke.fixed==="right";ie=!it}return{fixLeft:fe,fixRight:pe,lastFixLeft:re,firstFixRight:ie,lastFixRight:se,firstFixLeft:de,isSticky:ot.isSticky}}var R=W("sR1s");function y(Oe){var Te=Oe.cells,rt=Oe.stickyOffsets,ot=Oe.flattenColumns,Ne=Oe.rowComponent,$e=Oe.cellComponent,xe=Oe.onHeaderRow,fe=Oe.index,pe=A.useContext(u.a),re=pe.prefixCls,ie=pe.direction,se;xe&&(se=xe(Te.map(function(Le){return Le.column}),fe));var de=Object(R.a)(Te.map(function(Le){return Le.column}));return A.createElement(Ne,Object.assign({},se),Te.map(function(Le,Ke){var dt=Le.column,_t=h(Le.colStart,Le.colEnd,ot,rt,ie),Ht;return dt&&dt.onHeaderCell&&(Ht=Le.column.onHeaderCell(dt)),A.createElement(i.a,Object.assign({},Le,{ellipsis:dt.ellipsis,align:dt.align,component:$e,prefixCls:re,key:de[Ke]},_t,{additionalProps:Ht,rowType:"header"}))}))}y.displayName="HeaderRow";var g=y;function D(Oe){var Te=[];function rt(xe,fe){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Te[pe]=Te[pe]||[];var re=fe,ie=xe.filter(Boolean).map(function(se){var de={key:se.key,className:se.className||"",children:se.title,column:se,colStart:re},Le=1,Ke=se.children;return Ke&&Ke.length>0&&(Le=rt(Ke,re,pe+1).reduce(function(dt,_t){return dt+_t},0),de.hasSubColumns=!0),"colSpan"in se&&(Le=se.colSpan),"rowSpan"in se&&(de.rowSpan=se.rowSpan),de.colSpan=Le,de.colEnd=de.colStart+Le-1,Te[pe].push(de),re+=Le,Le});return ie}rt(Oe,0);for(var ot=Te.length,Ne=function(fe){Te[fe].forEach(function(pe){!("rowSpan"in pe)&&!pe.hasSubColumns&&(pe.rowSpan=ot-fe)})},$e=0;$e<ot;$e+=1)Ne($e);return Te}function S(Oe){var Te=Oe.stickyOffsets,rt=Oe.columns,ot=Oe.flattenColumns,Ne=Oe.onHeaderRow,$e=A.useContext(u.a),xe=$e.prefixCls,fe=$e.getComponent,pe=A.useMemo(function(){return D(rt)},[rt]),re=fe(["header","wrapper"],"thead"),ie=fe(["header","row"],"tr"),se=fe(["header","cell"],"th");return A.createElement(re,{className:"".concat(xe,"-thead")},pe.map(function(de,Le){var Ke=A.createElement(g,{key:Le,flattenColumns:ot,cells:de,stickyOffsets:Te,rowComponent:ie,cellComponent:se,onHeaderRow:Ne,index:Le});return Ke}))}var d=S,l=W("hW8S");function o(Oe){for(var Te=Oe.colWidths,rt=Oe.columns,ot=Oe.columCount,Ne=[],$e=ot||rt.length,xe=!1,fe=$e-1;fe>=0;fe-=1){var pe=Te[fe],re=rt&&rt[fe],ie=re&&re[l.a];(pe||ie||xe)&&(Ne.unshift(A.createElement("col",Object.assign({key:fe,style:{width:pe,minWidth:pe}},ie))),xe=!0)}return A.createElement("colgroup",null,Ne)}var a=o;function x(Oe,Te){return Object(A.useMemo)(function(){for(var rt=[],ot=0;ot<Te;ot+=1){var Ne=Oe[ot];if(Ne!==void 0)rt[ot]=Ne;else return null}return rt},[Oe.join("_"),Te])}var E=A.forwardRef(function(Oe,Te){var rt=Oe.noData,ot=Oe.columns,Ne=Oe.flattenColumns,$e=Oe.colWidths,xe=Oe.columCount,fe=Oe.stickyOffsets,pe=Oe.direction,re=Oe.fixHeader,ie=Oe.offsetHeader,se=Oe.stickyClassName,de=Oe.onScroll,Le=Object(p.a)(Oe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ke=A.useContext(u.a),dt=Ke.prefixCls,_t=Ke.scrollbarSize,Ht=Ke.isSticky,it=Ht&&!re?0:_t,gt=A.useRef(null),Qe=A.useCallback(function(bt){Object(c.b)(Te,bt),Object(c.b)(gt,bt)},[]);A.useEffect(function(){var bt;function mt(Re){var qe=Re.currentTarget,vt=Re.deltaX;vt&&(de({currentTarget:qe,scrollLeft:qe.scrollLeft+vt}),Re.preventDefault())}return(bt=gt.current)===null||bt===void 0||bt.addEventListener("wheel",mt),function(){var Re;(Re=gt.current)===null||Re===void 0||Re.removeEventListener("wheel",mt)}},[]);var Ze=Ne[Ne.length-1],Fe={fixed:Ze?Ze.fixed:null,onHeaderCell:function(){return{className:"".concat(dt,"-cell-scrollbar")}}},oe=Object(A.useMemo)(function(){return it?[].concat(Object(P.a)(ot),[Fe]):ot},[it,ot]),ve=Object(A.useMemo)(function(){return it?[].concat(Object(P.a)(Ne),[Fe]):Ne},[it,Ne]),nt=Object(A.useMemo)(function(){var bt=fe.right,mt=fe.left;return Object(z.a)(Object(z.a)({},fe),{},{left:pe==="rtl"?[].concat(Object(P.a)(mt.map(function(Re){return Re+it})),[0]):mt,right:pe==="rtl"?bt:[].concat(Object(P.a)(bt.map(function(Re){return Re+it})),[0]),isSticky:Ht})},[it,fe,Ht]),He=x($e,xe);return A.createElement("div",{style:Object(z.a)({overflow:"hidden"},Ht?{top:ie}:{}),ref:Qe,className:B()("".concat(dt,"-header"),Object(q.a)({},se,!!se))},A.createElement("table",{style:{tableLayout:"fixed",visibility:rt||He?null:"hidden"}},A.createElement(a,{colWidths:He?[].concat(Object(P.a)(He),[it]):[],columCount:xe+1,columns:ve}),A.createElement(d,Object.assign({},Le,{stickyOffsets:nt,columns:oe,flattenColumns:ve}))))});E.displayName="FixedHeader";var m=E,_=A.createContext(null),I=_;function U(Oe){var Te=Oe.prefixCls,rt=Oe.children,ot=Oe.component,Ne=Oe.cellComponent,$e=Oe.fixHeader,xe=Oe.fixColumn,fe=Oe.horizonScroll,pe=Oe.className,re=Oe.expanded,ie=Oe.componentWidth,se=Oe.colSpan,de=A.useContext(u.a),Le=de.scrollbarSize;return A.useMemo(function(){var Ke=rt;return xe&&(Ke=A.createElement("div",{style:{width:ie-($e?Le:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Te,"-expanded-row-fixed")},Ke)),A.createElement(ot,{className:pe,style:{display:re?null:"none"}},A.createElement(i.a,{component:Ne,prefixCls:Te,colSpan:se},Ke))},[rt,ot,$e,fe,pe,re,ie,se,Le])}var M=U;function H(Oe){var Te=Oe.className,rt=Oe.style,ot=Oe.record,Ne=Oe.index,$e=Oe.rowKey,xe=Oe.getRowKey,fe=Oe.rowExpandable,pe=Oe.expandedKeys,re=Oe.onRow,ie=Oe.indent,se=ie===void 0?0:ie,de=Oe.rowComponent,Le=Oe.cellComponent,Ke=Oe.childrenColumnName,dt=A.useContext(u.a),_t=dt.prefixCls,Ht=dt.fixedInfoList,it=A.useContext(I),gt=it.fixHeader,Qe=it.fixColumn,Ze=it.horizonScroll,Fe=it.componentWidth,oe=it.flattenColumns,ve=it.expandableType,nt=it.expandRowByClick,He=it.onTriggerExpand,bt=it.rowClassName,mt=it.expandedRowClassName,Re=it.indentSize,qe=it.expandIcon,vt=it.expandedRowRender,Ct=it.expandIconColumnIndex,wt=A.useState(!1),lt=Object(F.a)(wt,2),Ft=lt[0],$t=lt[1],Rt=pe&&pe.has(Oe.recordKey);A.useEffect(function(){Rt&&$t(!0)},[Rt]);var Zt=ve==="row"&&(!fe||fe(ot)),dn=ve==="nest",Jt=Ke&&ot&&ot[Ke],Gt=Zt||dn,fn;re&&(fn=re(ot,Ne));var On=function(f){if(nt&&Gt&&He(ot,f),fn&&fn.onClick){for(var w,G=arguments.length,ee=new Array(G>1?G-1:0),V=1;V<G;V++)ee[V-1]=arguments[V];(w=fn).onClick.apply(w,[f].concat(ee))}},Pn;typeof bt=="string"?Pn=bt:typeof bt=="function"&&(Pn=bt(ot,Ne,se));var ft=Object(R.a)(oe),Wt=A.createElement(de,Object.assign({},fn,{"data-row-key":$e,className:B()(Te,"".concat(_t,"-row"),"".concat(_t,"-row-level-").concat(se),Pn,fn&&fn.className),style:Object(z.a)(Object(z.a)({},rt),fn?fn.style:null),onClick:On}),oe.map(function(X,f){var w=X.render,G=X.dataIndex,ee=X.className,V=ft[f],Se=Ht[f],st;f===(Ct||0)&&dn&&(st=A.createElement(A.Fragment,null,A.createElement("span",{style:{paddingLeft:"".concat(Re*se,"px")},className:"".concat(_t,"-row-indent indent-level-").concat(se)}),qe({prefixCls:_t,expanded:Rt,expandable:Jt,record:ot,onExpand:He})));var je;return X.onCell&&(je=X.onCell(ot,Ne)),A.createElement(i.a,Object.assign({className:ee,ellipsis:X.ellipsis,align:X.align,component:Le,prefixCls:_t,key:V,record:ot,index:Ne,dataIndex:G,render:w,shouldCellUpdate:X.shouldCellUpdate},Se,{appendNode:st,additionalProps:je}))})),Qt;if(Zt&&(Ft||Rt)){var mn=vt(ot,Ne,se+1,Rt),pn=mt&&mt(ot,Ne,se);Qt=A.createElement(M,{expanded:Rt,className:B()("".concat(_t,"-expanded-row"),"".concat(_t,"-expanded-row-level-").concat(se+1),pn),prefixCls:_t,fixHeader:gt,fixColumn:Qe,horizonScroll:Ze,component:de,componentWidth:Fe,cellComponent:Le,colSpan:oe.length},mn)}var Dn;return Jt&&Rt&&(Dn=(ot[Ke]||[]).map(function(X,f){var w=xe(X,f);return A.createElement(H,Object.assign({},Oe,{key:w,rowKey:w,record:X,recordKey:w,index:f,indent:se+1}))})),A.createElement(A.Fragment,null,Wt,Qt,Dn)}H.displayName="BodyRow";var K=H,Z=A.createContext(null),le=Z;function he(Oe){var Te=Oe.columnKey,rt=Oe.onColumnResize,ot=A.useRef();return A.useEffect(function(){ot.current&&rt(Te,ot.current.offsetWidth)},[]),A.createElement(C.a,{onResize:function($e){var xe=$e.offsetWidth;rt(Te,xe)}},A.createElement("td",{ref:ot,style:{padding:0,border:0,height:0}},A.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ye(Oe){var Te=Oe.data,rt=Oe.getRowKey,ot=Oe.measureColumnWidth,Ne=Oe.expandedKeys,$e=Oe.onRow,xe=Oe.rowExpandable,fe=Oe.emptyNode,pe=Oe.childrenColumnName,re=A.useContext(le),ie=re.onColumnResize,se=A.useContext(u.a),de=se.prefixCls,Le=se.getComponent,Ke=A.useContext(I),dt=Ke.fixHeader,_t=Ke.horizonScroll,Ht=Ke.flattenColumns,it=Ke.componentWidth;return A.useMemo(function(){var gt=Le(["body","wrapper"],"tbody"),Qe=Le(["body","row"],"tr"),Ze=Le(["body","cell"],"td"),Fe;Te.length?Fe=Te.map(function(ve,nt){var He=rt(ve,nt);return A.createElement(K,{key:He,rowKey:He,record:ve,recordKey:He,index:nt,rowComponent:Qe,cellComponent:Ze,expandedKeys:Ne,onRow:$e,getRowKey:rt,rowExpandable:xe,childrenColumnName:pe})}):Fe=A.createElement(M,{expanded:!0,className:"".concat(de,"-placeholder"),prefixCls:de,fixHeader:dt,fixColumn:_t,horizonScroll:_t,component:Qe,componentWidth:it,cellComponent:Ze,colSpan:Ht.length},fe);var oe=Object(R.a)(Ht);return A.createElement(gt,{className:"".concat(de,"-tbody")},ot&&A.createElement("tr",{"aria-hidden":"true",className:"".concat(de,"-measure-row"),style:{height:0}},oe.map(function(ve){return A.createElement(he,{key:ve,columnKey:ve,onColumnResize:ie})})),Fe)},[Te,de,$e,ot,Ne,rt,Le,it,fe,Ht])}var Ue=A.memo(ye);Ue.displayName="Body";var Me=Ue,_e=W("wRmb"),Ie=W("xEkU"),ke=W.n(Ie);function me(Oe){var Te=Object(A.useRef)(Oe),rt=Object(A.useState)({}),ot=Object(F.a)(rt,2),Ne=ot[1],$e=Object(A.useRef)(null),xe=Object(A.useRef)([]);function fe(pe){$e.current===null&&(xe.current=[],$e.current=ke()(function(){xe.current.forEach(function(re){Te.current=re(Te.current)}),$e.current=null,Ne({})})),xe.current.push(pe)}return Object(A.useEffect)(function(){return function(){ke.a.cancel($e.current)}},[]),[Te.current,fe]}function ce(Oe){var Te=Object(A.useRef)(Oe),rt=Object(A.useRef)(null);function ot(){window.clearTimeout(rt.current)}function Ne(xe){Te.current=xe,ot(),rt.current=window.setTimeout(function(){Te.current=null,rt.current=null},100)}function $e(){return Te.current}return Object(A.useEffect)(function(){return ot},[]),[Ne,$e]}function te(Oe,Te,rt){var ot=Object(A.useMemo)(function(){for(var Ne=[],$e=[],xe=0,fe=0,pe=0;pe<Te;pe+=1)if(rt==="rtl"){$e[pe]=fe,fe+=Oe[pe]||0;var re=Te-pe-1;Ne[re]=xe,xe+=Oe[re]||0}else{Ne[pe]=xe,xe+=Oe[pe]||0;var ie=Te-pe-1;$e[ie]=fe,fe+=Oe[ie]||0}return{left:Ne,right:$e}},[Oe,Te,rt]);return ot}var be=te;function ae(Oe){var Te=Oe.className,rt=Oe.children;return A.createElement("div",{className:Te},rt)}var we=ae,Pe=W("n6Qo");function Ce(Oe){var Te,rt=Oe.prefixCls,ot=Oe.record,Ne=Oe.onExpand,$e=Oe.expanded,xe=Oe.expandable,fe="".concat(rt,"-row-expand-icon");if(!xe)return A.createElement("span",{className:B()(fe,"".concat(rt,"-row-spaced"))});var pe=function(ie){Ne(ot,ie),ie.stopPropagation()};return A.createElement("span",{className:B()(fe,(Te={},Object(q.a)(Te,"".concat(rt,"-row-expanded"),$e),Object(q.a)(Te,"".concat(rt,"-row-collapsed"),!$e),Te)),onClick:pe})}function Ve(Oe,Te,rt){var ot=[];function Ne($e){($e||[]).forEach(function(xe,fe){ot.push(Te(xe,fe)),Ne(xe[rt])})}return Ne(Oe),ot}var Ge=W("zT1h"),tt=W("y0+3"),Je=function(Te,rt){var ot,Ne,$e=Te.scrollBodyRef,xe=Te.onScroll,fe=Te.offsetScroll,pe=A.useContext(u.a),re=pe.prefixCls,ie=((ot=$e.current)===null||ot===void 0?void 0:ot.scrollWidth)||0,se=((Ne=$e.current)===null||Ne===void 0?void 0:Ne.clientWidth)||0,de=ie&&se*(se/ie),Le=A.useRef(),Ke=me({scrollLeft:0,isHiddenScrollBar:!1}),dt=Object(F.a)(Ke,2),_t=dt[0],Ht=dt[1],it=A.useRef({delta:0,x:0}),gt=A.useState(!1),Qe=Object(F.a)(gt,2),Ze=Qe[0],Fe=Qe[1],oe=function(){Fe(!1)},ve=function(Re){Re.persist(),it.current.delta=Re.pageX-_t.scrollLeft,it.current.x=0,Fe(!0),Re.preventDefault()},nt=function(Re){var qe,vt=Re||((qe=window)===null||qe===void 0?void 0:qe.event),Ct=vt.buttons;if(!Ze||Ct===0){Ze&&Fe(!1);return}var wt=it.current.x+Re.pageX-it.current.x-it.current.delta;wt<=0&&(wt=0),wt+de>=se&&(wt=se-de),xe({scrollLeft:wt/se*(ie+2)}),it.current.x=Re.pageX},He=function(){var Re=Object(tt.b)($e.current).top,qe=Re+$e.current.offsetHeight,vt=document.documentElement.scrollTop+window.innerHeight;qe-Object(k.a)()<=vt||Re>=vt-fe?Ht(function(Ct){return Object(z.a)(Object(z.a)({},Ct),{},{isHiddenScrollBar:!0})}):Ht(function(Ct){return Object(z.a)(Object(z.a)({},Ct),{},{isHiddenScrollBar:!1})})},bt=function(Re){Ht(function(qe){return Object(z.a)(Object(z.a)({},qe),{},{scrollLeft:Re/ie*se||0})})};return A.useImperativeHandle(rt,function(){return{setScrollLeft:bt}}),A.useEffect(function(){var mt=Object(Ge.a)(document.body,"mouseup",oe,!1),Re=Object(Ge.a)(document.body,"mousemove",nt,!1);return He(),function(){mt.remove(),Re.remove()}},[de,Ze]),A.useEffect(function(){var mt=Object(Ge.a)(window,"scroll",He,!1),Re=Object(Ge.a)(window,"resize",He,!1);return function(){mt.remove(),Re.remove()}},[]),A.useEffect(function(){_t.isHiddenScrollBar||Ht(function(mt){var Re,qe;return Object(z.a)(Object(z.a)({},mt),{},{scrollLeft:$e.current.scrollLeft/((Re=$e.current)===null||Re===void 0?void 0:Re.scrollWidth)*((qe=$e.current)===null||qe===void 0?void 0:qe.clientWidth)})})},[_t.isHiddenScrollBar]),ie<=se||!de||_t.isHiddenScrollBar?null:A.createElement("div",{style:{height:Object(k.a)(),width:se,bottom:fe},className:"".concat(re,"-sticky-scroll")},A.createElement("div",{onMouseDown:ve,ref:Le,className:B()("".concat(re,"-sticky-scroll-bar"),Object(q.a)({},"".concat(re,"-sticky-scroll-bar-active"),Ze)),style:{width:"".concat(de,"px"),transform:"translate3d(".concat(_t.scrollLeft,"px, 0, 0)")}}))},Ye=A.forwardRef(Je);function et(Oe,Te){return A.useMemo(function(){var rt=!!Oe;return{isSticky:rt,stickyClassName:rt?"".concat(Te,"-sticky-header"):"",offsetHeader:Object(Y.a)(Oe)==="object"&&Oe.offsetHeader||0,offsetScroll:Object(Y.a)(Oe)==="object"&&Oe.offsetScroll||0}},[Oe,Te])}var St=[],At={},ht="rc-table-internal-hook",xt=A.memo(function(Oe){var Te=Oe.children;return Te},function(Oe,Te){return T()(Oe.props,Te.props)?Oe.pingLeft!==Te.pingLeft||Oe.pingRight!==Te.pingRight:!1});function Tt(Oe){var Te,rt=Oe.prefixCls,ot=Oe.className,Ne=Oe.rowClassName,$e=Oe.style,xe=Oe.data,fe=Oe.rowKey,pe=Oe.scroll,re=Oe.tableLayout,ie=Oe.direction,se=Oe.title,de=Oe.footer,Le=Oe.summary,Ke=Oe.id,dt=Oe.showHeader,_t=Oe.components,Ht=Oe.emptyText,it=Oe.onRow,gt=Oe.onHeaderRow,Qe=Oe.internalHooks,Ze=Oe.transformColumns,Fe=Oe.internalRefs,oe=Oe.sticky,ve=xe||St,nt=!!ve.length,He=A.useState(0),bt=Object(F.a)(He,2),mt=bt[0],Re=bt[1];A.useEffect(function(){Re(Object(k.a)())});var qe=A.useMemo(function(){return Object(R.c)(_t,{})},[_t]),vt=A.useCallback(function(Yt,un){return Object(R.b)(qe,Yt)||un},[qe]),Ct=A.useMemo(function(){return typeof fe=="function"?fe:function(Yt){var un=Yt&&Yt[fe];return un}},[fe]),wt=Object(l.c)(Oe),lt=wt.expandIcon,Ft=wt.expandedRowKeys,$t=wt.defaultExpandedRowKeys,Rt=wt.defaultExpandAllRows,Zt=wt.expandedRowRender,dn=wt.onExpand,Jt=wt.onExpandedRowsChange,Gt=wt.expandRowByClick,fn=wt.rowExpandable,On=wt.expandIconColumnIndex,Pn=wt.expandedRowClassName,ft=wt.childrenColumnName,Wt=wt.indentSize,Qt=lt||Ce,mn=ft||"children",pn=A.useMemo(function(){return Zt?"row":Oe.expandable&&Qe===ht&&Oe.expandable.__PARENT_RENDER_ICON__||ve.some(function(Yt){return Yt&&Object(Y.a)(Yt)==="object"&&Yt[mn]})?"nest":!1},[!!Zt,ve]),Dn=A.useState(function(){return $t||(Rt?Ve(ve,Ct,mn):[])}),X=Object(F.a)(Dn,2),f=X[0],w=X[1],G=A.useMemo(function(){return new Set(Ft||f||[])},[Ft,f]),ee=A.useCallback(function(Yt){var un=Ct(Yt,ve.indexOf(Yt)),hn,Fn=G.has(un);Fn?(G.delete(un),hn=Object(P.a)(G)):hn=[].concat(Object(P.a)(G),[un]),w(hn),dn&&dn(!Fn,Yt),Jt&&Jt(hn)},[Ct,G,ve,dn,Jt]),V=A.useState(0),Se=Object(F.a)(V,2),st=Se[0],je=Se[1],Pt=Object(_e.b)(Object(z.a)(Object(z.a)(Object(z.a)({},Oe),wt),{},{expandable:!!Zt,expandedKeys:G,getRowKey:Ct,onTriggerExpand:ee,expandIcon:Qt,expandIconColumnIndex:On,direction:ie}),Qe===ht?Ze:null),ut=Object(F.a)(Pt,2),Vt=ut[0],qt=ut[1],yn=A.useMemo(function(){return{columns:Vt,flattenColumns:qt}},[Vt,qt]),Tn=A.useRef(),wn=A.useRef(),kn=A.useRef(),mr=A.useState(!1),Kr=Object(F.a)(mr,2),Zn=Kr[0],tr=Kr[1],Sr=A.useState(!1),Rr=Object(F.a)(Sr,2),gr=Rr[0],br=Rr[1],Ar=me(new Map),Tr=Object(F.a)(Ar,2),Jr=Tr[0],lr=Tr[1],nr=Object(R.a)(qt),Hr=nr.map(function(Yt){return Jr.get(Yt)}),cn=A.useMemo(function(){return Hr},[Hr.join("_")]),Nr=be(cn,qt.length,ie),_n=pe&&Object(R.d)(pe.y),ge=pe&&Object(R.d)(pe.x),Cn=ge&&qt.some(function(Yt){var un=Yt.fixed;return un}),Sn=A.useRef(),jn=et(oe,rt),tn=jn.isSticky,Xr=jn.offsetHeader,Hn=jn.offsetScroll,Wn=jn.stickyClassName,rr,Or,Br;_n&&(Or={overflowY:"scroll",maxHeight:pe.y}),ge&&(rr={overflowX:"auto"},_n||(Or={overflowY:"hidden"}),Br={width:pe.x===!0?"auto":pe.x,minWidth:"100%"});var ri=A.useCallback(function(Yt,un){lr(function(hn){var Fn=new Map(hn);return Fn.set(Yt,un),Fn})},[]),Dr=ce(null),_r=Object(F.a)(Dr,2),vr=_r[0],Qr=_r[1];function ir(Yt,un){if(!un)return;typeof un=="function"?un(Yt):un.scrollLeft!==Yt&&(un.scrollLeft=Yt)}var Er=function(un){var hn=un.currentTarget,Fn=un.scrollLeft,Ur=typeof Fn=="number"?Fn:hn.scrollLeft,ai=hn||At;if(!Qr()||Qr()===ai){var pi;vr(ai),ir(Ur,wn.current),ir(Ur,kn.current),ir(Ur,(pi=Sn.current)===null||pi===void 0?void 0:pi.setScrollLeft)}if(hn){var ia=hn.scrollWidth,aa=hn.clientWidth;tr(Ur>0),br(Ur<ia-aa)}},hi=function(){kn.current&&Er({currentTarget:kn.current})},Oi=function(un){var hn=un.width;hi(),je(Tn.current?Tn.current.offsetWidth:hn)};A.useEffect(function(){return hi},[]),A.useEffect(function(){ge&&hi()},[ge]),A.useEffect(function(){Qe===ht&&Fe&&(Fe.body.current=kn.current)});var Di=vt(["table"],"table"),ii=A.useMemo(function(){return re||(Cn?pe.x==="max-content"?"auto":"fixed":_n||qt.some(function(Yt){var un=Yt.ellipsis;return un})?"fixed":"auto")},[_n,Cn,qt,re]),fi,Zr={colWidths:cn,columCount:qt.length,stickyOffsets:Nr,onHeaderRow:gt,fixHeader:_n},Xt=A.useMemo(function(){return nt?null:typeof Ht=="function"?Ht():Ht},[nt,Ht]),an=A.createElement(Me,{data:ve,measureColumnWidth:_n||ge||tn,expandedKeys:G,rowExpandable:fn,getRowKey:Ct,onRow:it,emptyNode:Xt,childrenColumnName:mn}),en=A.createElement(a,{colWidths:qt.map(function(Yt){var un=Yt.width;return un}),columns:qt}),gn=Le&&A.createElement(Pe.b,null,Le(ve)),vn=vt(["body"]);if(_n||tn){var An;typeof vn=="function"?(An=vn(ve,{scrollbarSize:mt,ref:kn,onScroll:Er}),Zr.colWidths=qt.map(function(Yt,un){var hn=Yt.width,Fn=un===Vt.length-1?hn-mt:hn;return typeof Fn=="number"&&!Number.isNaN(Fn)?Fn:(Object(v.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):An=A.createElement("div",{style:Object(z.a)(Object(z.a)({},rr),Or),onScroll:Er,ref:kn,className:B()("".concat(rt,"-body"))},A.createElement(Di,{style:Object(z.a)(Object(z.a)({},Br),{},{tableLayout:ii})},en,an,gn),tn&&A.createElement(Ye,{ref:Sn,offsetScroll:Hn,scrollBodyRef:kn,onScroll:Er})),fi=A.createElement(A.Fragment,null,dt!==!1&&A.createElement(m,Object.assign({noData:!ve.length},Zr,yn,{direction:ie,offsetHeader:Xr,stickyClassName:Wn,ref:wn,onScroll:Er})),An)}else fi=A.createElement("div",{style:Object(z.a)(Object(z.a)({},rr),Or),className:B()("".concat(rt,"-content")),onScroll:Er,ref:kn},A.createElement(Di,{style:Object(z.a)(Object(z.a)({},Br),{},{tableLayout:ii})},en,dt!==!1&&A.createElement(d,Object.assign({},Zr,yn)),an,gn));var xn=Object(l.b)(Oe),In=A.createElement("div",Object.assign({className:B()(rt,ot,(Te={},Object(q.a)(Te,"".concat(rt,"-rtl"),ie==="rtl"),Object(q.a)(Te,"".concat(rt,"-ping-left"),Zn),Object(q.a)(Te,"".concat(rt,"-ping-right"),gr),Object(q.a)(Te,"".concat(rt,"-layout-fixed"),re==="fixed"),Object(q.a)(Te,"".concat(rt,"-fixed-header"),_n),Object(q.a)(Te,"".concat(rt,"-fixed-column"),Cn),Object(q.a)(Te,"".concat(rt,"-scroll-horizontal"),ge),Object(q.a)(Te,"".concat(rt,"-has-fix-left"),qt[0]&&qt[0].fixed),Object(q.a)(Te,"".concat(rt,"-has-fix-right"),qt[qt.length-1]&&qt[qt.length-1].fixed==="right"),Te)),style:$e,id:Ke,ref:Tn},xn),A.createElement(xt,{pingLeft:Zn,pingRight:gr,props:Object(z.a)(Object(z.a)({},Oe),{},{stickyOffsets:Nr,mergedExpandedKeys:G})},se&&A.createElement(we,{className:"".concat(rt,"-title")},se(ve)),A.createElement("div",{className:"".concat(rt,"-container")},fi),de&&A.createElement(we,{className:"".concat(rt,"-footer")},de(ve))));ge&&(In=A.createElement(C.a,{onResize:Oi},In));var qn=A.useMemo(function(){return{prefixCls:rt,getComponent:vt,scrollbarSize:mt,direction:ie,fixedInfoList:qt.map(function(Yt,un){return h(un,un,qt,Nr,ie)}),isSticky:tn}},[rt,vt,mt,ie,qt,Nr,ie,tn]),bn=A.useMemo(function(){return Object(z.a)(Object(z.a)({},yn),{},{tableLayout:ii,rowClassName:Ne,expandedRowClassName:Pn,componentWidth:st,fixHeader:_n,fixColumn:Cn,horizonScroll:ge,expandIcon:Qt,expandableType:pn,expandRowByClick:Gt,expandedRowRender:Zt,onTriggerExpand:ee,expandIconColumnIndex:On,indentSize:Wt})},[yn,ii,Ne,Pn,st,_n,Cn,ge,Qt,pn,Gt,Zt,ee,On,Wt]),qr=A.useMemo(function(){return{onColumnResize:ri}},[ri]);return A.createElement(u.a.Provider,{value:qn},A.createElement(I.Provider,{value:bn},A.createElement(le.Provider,{value:qr},In)))}Tt.Column=b.a,Tt.ColumnGroup=O.a,Tt.Summary=Pe.a,Tt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Ot=De.b=Tt},wRmb:function(ze,De,W){"use strict";W.d(De,"a",function(){return T});var q=W("rePB"),z=W("KQm4"),P=W("VTBJ"),Y=W("Ff2n"),F=W("q1tI"),A=W.n(F),j=W("Kwbf"),B=W("Zm9Q"),L=W("hW8S");function T(b){return Object(B.a)(b).filter(function(p){return F.isValidElement(p)}).map(function(p){var c=p.key,i=p.props,u=i.children,h=Object(Y.a)(i,["children"]),R=Object(P.a)({key:c},h);return u&&(R.children=T(u)),R})}function v(b){return b.reduce(function(p,c){var i=c.fixed,u=i===!0?"left":i,h=c.children;return h&&h.length>0?[].concat(Object(z.a)(p),Object(z.a)(v(h).map(function(R){return Object(P.a)({fixed:u},R)}))):[].concat(Object(z.a)(p),[Object(P.a)(Object(P.a)({},c),{},{fixed:u})])},[])}function C(b){for(var p=!0,c=0;c<b.length;c+=1){var i=b[c];if(p&&i.fixed!=="left")p=!1;else if(!p&&i.fixed==="left"){Object(j.a)(!1,"Index ".concat(c-1," of `columns` missing `fixed='left'` prop."));break}}for(var u=!0,h=b.length-1;h>=0;h-=1){var R=b[h];if(u&&R.fixed!=="right")u=!1;else if(!u&&R.fixed==="right"){Object(j.a)(!1,"Index ".concat(h+1," of `columns` missing `fixed='right'` prop."));break}}}function k(b){return b.map(function(p){var c=p.fixed,i=Object(Y.a)(p,["fixed"]),u=c;return c==="left"?u="right":c==="right"&&(u="left"),Object(P.a)({fixed:u},i)})}function O(b,p){var c=b.prefixCls,i=b.columns,u=b.children,h=b.expandable,R=b.expandedKeys,y=b.getRowKey,g=b.onTriggerExpand,D=b.expandIcon,S=b.rowExpandable,d=b.expandIconColumnIndex,l=b.direction,o=b.expandRowByClick,a=F.useMemo(function(){return i||T(u)},[i,u]),x=F.useMemo(function(){if(h){var _,I=d||0,U=a[I],M=(_={},Object(q.a)(_,L.a,{className:"".concat(c,"-expand-icon-col")}),Object(q.a)(_,"title",""),Object(q.a)(_,"fixed",U?U.fixed:null),Object(q.a)(_,"className","".concat(c,"-row-expand-icon-cell")),Object(q.a)(_,"render",function(Z,le,he){var ye=y(le,he),Ue=R.has(ye),Me=S?S(le):!0,_e=D({prefixCls:c,expanded:Ue,expandable:Me,record:le,onExpand:g});return o?F.createElement("span",{onClick:function(ke){return ke.stopPropagation()}},_e):_e}),_),H=a.slice();return I>=0&&H.splice(I,0,M),H}return a},[h,a,y,R,D,l]),E=F.useMemo(function(){var _=x;return p&&(_=p(_)),_.length||(_=[{render:function(){return null}}]),_},[p,x,l]),m=F.useMemo(function(){return l==="rtl"?k(v(E)):v(E)},[E,l]);return[E,m]}De.b=O},wU8J:function(ze,De){function W(){this.buffer=new Array,this.length=0}W.prototype={get:function(q){var z=Math.floor(q/8);return(this.buffer[z]>>>7-q%8&1)==1},put:function(q,z){for(var P=0;P<z;P++)this.putBit((q>>>z-P-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(q){var z=Math.floor(this.length/8);this.buffer.length<=z&&this.buffer.push(0),q&&(this.buffer[z]|=128>>>this.length%8),this.length++}},ze.exports=W},"y0+3":function(ze,De,W){"use strict";W.d(De,"a",function(){return v}),W.d(De,"b",function(){return k});var q=/margin|padding|width|height|max|min|offset/,z={left:!0,top:!0},P={cssFloat:1,styleFloat:1,float:1};function Y(O){return O.nodeType===1?O.ownerDocument.defaultView.getComputedStyle(O,null):{}}function F(O,b,p){if(b=b.toLowerCase(),p==="auto"){if(b==="height")return O.offsetHeight;if(b==="width")return O.offsetWidth}return b in z||(z[b]=q.test(b)),z[b]?parseFloat(p)||0:p}function A(O,b){var p=arguments.length,c=Y(O);return b=P[b]?"cssFloat"in O.style?"cssFloat":"styleFloat":b,p===1?c:F(O,b,c[b]||O.style[b])}function j(O,b,p){var c=arguments.length;if(b=P[b]?"cssFloat"in O.style?"cssFloat":"styleFloat":b,c===3)return typeof p=="number"&&q.test(b)&&(p="".concat(p,"px")),O.style[b]=p,p;for(var i in b)b.hasOwnProperty(i)&&j(O,i,b[i]);return Y(O)}function B(O){return O===document.body?document.documentElement.clientWidth:O.offsetWidth}function L(O){return O===document.body?window.innerHeight||document.documentElement.clientHeight:O.offsetHeight}function T(){var O=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:O,height:b}}function v(){var O=document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight;return{width:O,height:b}}function C(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function k(O){var b=O.getBoundingClientRect(),p=document.documentElement;return{left:b.left+(window.pageXOffset||p.scrollLeft)-(p.clientLeft||document.body.clientLeft||0),top:b.top+(window.pageYOffset||p.scrollTop)-(p.clientTop||document.body.clientTop||0)}}},yslc:function(ze,De){ze.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66K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