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.
208 lines
1009 KiB
208 lines
1009 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[52,5,6,7,9],{"+NIl":function(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){"use strict";ne.defineMode("stex",function(V,D){"use strict";function z(c,o){c.cmdState.push(o)}function N(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function k(c){var o=c.cmdState.pop();o&&o.closeBracket()}function W(c){for(var o=c.cmdState,h=o.length-1;h>=0;h--){var s=o[h];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function F(c,o,h){return function(){this.name=c,this.bracketNo=0,this.style=o,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var M={};M.importmodule=F("importmodule","tag",["string","builtin"]),M.documentclass=F("documentclass","tag",["","atom"]),M.usepackage=F("usepackage","tag",["atom"]),M.begin=F("begin","tag",["atom"]),M.end=F("end","tag",["atom"]),M.label=F("label","tag",["atom"]),M.ref=F("ref","tag",["atom"]),M.eqref=F("eqref","tag",["atom"]),M.cite=F("cite","tag",["atom"]),M.bibitem=F("bibitem","tag",["atom"]),M.Bibitem=F("Bibitem","tag",["atom"]),M.RBibitem=F("RBibitem","tag",["atom"]),M.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function R(c,o){c.f=o}function v(c,o){var h;if(c.match(/^\\[a-zA-Z@]+/)){var s=c.current().slice(1);return h=M.hasOwnProperty(s)?M[s]:M.DEFAULT,h=new h,z(o,h),R(o,p),h.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return R(o,function(l,f){return m(l,f,"\\]")}),"keyword";if(c.match("\\("))return R(o,function(l,f){return m(l,f,"\\)")}),"keyword";if(c.match("$$"))return R(o,function(l,f){return m(l,f,"$$")}),"keyword";if(c.match("$"))return R(o,function(l,f){return m(l,f,"$")}),"keyword";var i=c.next();if(i=="%")return c.skipToEnd(),"comment";if(i=="}"||i=="]"){if(h=N(o),h)h.closeBracket(i),R(o,p);else return"error";return"bracket"}else return i=="{"||i=="["?(h=M.DEFAULT,h=new h,z(o,h),"bracket"):/\d/.test(i)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),h=W(o),h.name=="begin"&&(h.argument=c.current()),h.styleIdentifier())}function m(c,o,h){if(c.eatSpace())return null;if(h&&c.match(h))return R(o,v),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=c.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(c.skipToEnd(),"comment"):"error"}function p(c,o){var h=c.peek(),s;return h=="{"||h=="["?(s=N(o),s.openBracket(h),c.eat(h),R(o,v),"bracket"):/[ \t\r]/.test(h)?(c.eat(h),null):(R(o,v),k(o),v(c,o))}return{startState:function(){var c=D.inMathMode?function(o,h){return m(o,h)}:v;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,o){return o.f(c,o)},blankLine:function(c){c.f=v,c.cmdState.length=0},lineComment:"%"}}),ne.defineMIME("text/x-stex","stex"),ne.defineMIME("text/x-latex","stex")})},"+ua5":function(Pe,we,Y){},"/GNS":function(Pe,we,Y){Pe.exports=Y.p+"static/search1.c4136dd4.png"},"19Vz":function(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){ne.defineOption("placeholder","",function(F,M,R){var v=R&&R!=ne.Init;if(M&&!v)F.on("blur",N),F.on("change",k),F.on("swapDoc",k),ne.on(F.getInputField(),"compositionupdate",F.state.placeholderCompose=function(){z(F)}),k(F);else if(!M&&v){F.off("blur",N),F.off("change",k),F.off("swapDoc",k),ne.off(F.getInputField(),"compositionupdate",F.state.placeholderCompose),V(F);var m=F.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}M&&!F.hasFocus()&&N(F)});function V(F){F.state.placeholder&&(F.state.placeholder.parentNode.removeChild(F.state.placeholder),F.state.placeholder=null)}function D(F){V(F);var M=F.state.placeholder=document.createElement("pre");M.style.cssText="height: 0; overflow: visible",M.style.direction=F.getOption("direction"),M.className="CodeMirror-placeholder CodeMirror-line-like";var R=F.getOption("placeholder");typeof R=="string"&&(R=document.createTextNode(R)),M.appendChild(R),F.display.lineSpace.insertBefore(M,F.display.lineSpace.firstChild)}function z(F){setTimeout(function(){var M=!1,R=F.getInputField();R.nodeName=="TEXTAREA"?M=!R.value:F.lineCount()==1&&(M=!/[^\u200b]/.test(R.querySelector(".CodeMirror-line").textContent)),M?D(F):V(F)},20)}function N(F){W(F)&&D(F)}function k(F){var M=F.getWrapperElement(),R=W(F);M.className=M.className.replace(" CodeMirror-empty","")+(R?" CodeMirror-empty":""),R?D(F):V(F)}function W(F){return F.lineCount()===1&&F.getLine(0)===""}})},"1eCo":function(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){"use strict";var V={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},D={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ne.defineMode("xml",function(z,N){var k=z.indentUnit,W={},F=N.htmlMode?V:D;for(var M in F)W[M]=F[M];for(var M in N)W[M]=N[M];var R,v;function m(u,E){function g(L){return E.tokenize=L,L(u,E)}var b=u.next();if(b=="<")return u.eat("!")?u.eat("[")?u.match("CDATA[")?g(o("atom","]]>")):null:u.match("--")?g(o("comment","-->")):u.match("DOCTYPE",!0,!0)?(u.eatWhile(/[\w\._\-]/),g(h(1))):null:u.eat("?")?(u.eatWhile(/[\w\._\-]/),E.tokenize=o("meta","?>"),"meta"):(R=u.eat("/")?"closeTag":"openTag",E.tokenize=p,"tag bracket");if(b=="&"){var P;return u.eat("#")?u.eat("x")?P=u.eatWhile(/[a-fA-F\d]/)&&u.eat(";"):P=u.eatWhile(/[\d]/)&&u.eat(";"):P=u.eatWhile(/[\w\.\-:]/)&&u.eat(";"),P?"atom":"error"}else return u.eatWhile(/[^&<]/),null}m.isInText=!0;function p(u,E){var g=u.next();if(g==">"||g=="/"&&u.eat(">"))return E.tokenize=m,R=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return R="equals",null;if(g=="<"){E.tokenize=m,E.state=f,E.tagName=E.tagStart=null;var b=E.tokenize(u,E);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(g)?(E.tokenize=c(g),E.stringStartCol=u.column(),E.tokenize(u,E)):(u.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(u){var E=function(g,b){for(;!g.eol();)if(g.next()==u){b.tokenize=p;break}return"string"};return E.isInAttribute=!0,E}function o(u,E){return function(g,b){for(;!g.eol();){if(g.match(E)){b.tokenize=m;break}g.next()}return u}}function h(u){return function(E,g){for(var b;(b=E.next())!=null;){if(b=="<")return g.tokenize=h(u+1),g.tokenize(E,g);if(b==">")if(u==1){g.tokenize=m;break}else return g.tokenize=h(u-1),g.tokenize(E,g)}return"meta"}}function s(u,E,g){this.prev=u.context,this.tagName=E,this.indent=u.indented,this.startOfLine=g,(W.doNotIndent.hasOwnProperty(E)||u.context&&u.context.noIndent)&&(this.noIndent=!0)}function i(u){u.context&&(u.context=u.context.prev)}function l(u,E){for(var g;;){if(!u.context)return;if(g=u.context.tagName,!W.contextGrabbers.hasOwnProperty(g)||!W.contextGrabbers[g].hasOwnProperty(E))return;i(u)}}function f(u,E,g){return u=="openTag"?(g.tagStart=E.column(),O):u=="closeTag"?A:f}function O(u,E,g){return u=="word"?(g.tagName=E.current(),v="tag",S):W.allowMissingTagName&&u=="endTag"?(v="tag bracket",S(u,E,g)):(v="error",O)}function A(u,E,g){if(u=="word"){var b=E.current();return g.context&&g.context.tagName!=b&&W.implicitlyClosed.hasOwnProperty(g.context.tagName)&&i(g),g.context&&g.context.tagName==b||W.matchClosing===!1?(v="tag",T):(v="tag error",w)}else return W.allowMissingTagName&&u=="endTag"?(v="tag bracket",T(u,E,g)):(v="error",w)}function T(u,E,g){return u!="endTag"?(v="error",T):(i(g),f)}function w(u,E,g){return v="error",T(u,E,g)}function S(u,E,g){if(u=="word")return v="attribute",x;if(u=="endTag"||u=="selfcloseTag"){var b=g.tagName,P=g.tagStart;return g.tagName=g.tagStart=null,u=="selfcloseTag"||W.autoSelfClosers.hasOwnProperty(b)?l(g,b):(l(g,b),g.context=new s(g,b,P==g.indented)),f}return v="error",S}function x(u,E,g){return u=="equals"?d:(W.allowMissing||(v="error"),S(u,E,g))}function d(u,E,g){return u=="string"?y:u=="word"&&W.allowUnquoted?(v="string",S):(v="error",S(u,E,g))}function y(u,E,g){return u=="string"?y:S(u,E,g)}return{startState:function(u){var E={tokenize:m,state:f,indented:u||0,tagName:null,tagStart:null,context:null};return u!=null&&(E.baseIndent=u),E},token:function(u,E){if(!E.tagName&&u.sol()&&(E.indented=u.indentation()),u.eatSpace())return null;R=null;var g=E.tokenize(u,E);return(g||R)&&g!="comment"&&(v=null,E.state=E.state(R||g,u,E),v&&(g=v=="error"?g+" error":v)),g},indent:function(u,E,g){var b=u.context;if(u.tokenize.isInAttribute)return u.tagStart==u.indented?u.stringStartCol+1:u.indented+k;if(b&&b.noIndent)return ne.Pass;if(u.tokenize!=p&&u.tokenize!=m)return g?g.match(/^(\s*)/)[0].length:0;if(u.tagName)return W.multilineTagIndentPastTag!==!1?u.tagStart+u.tagName.length+2:u.tagStart+k*(W.multilineTagIndentFactor||1);if(W.alignCDATA&&/<!\[CDATA\[/.test(E))return 0;var P=E&&/^<(\/)?([\w_:\.-]*)/.exec(E);if(P&&P[1])for(;b;)if(b.tagName==P[2]){b=b.prev;break}else if(W.implicitlyClosed.hasOwnProperty(b.tagName))b=b.prev;else break;else if(P)for(;b;){var L=W.contextGrabbers[b.tagName];if(L&&L.hasOwnProperty(P[2]))b=b.prev;else break}for(;b&&b.prev&&!b.startOfLine;)b=b.prev;return b?b.indent+k:u.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:W.htmlMode?"html":"xml",helperType:W.htmlMode?"html":"xml",skipAttribute:function(u){u.state==d&&(u.state=S)},xmlCurrentTag:function(u){return u.tagName?{name:u.tagName,close:u.type=="closeTag"}:null},xmlCurrentContext:function(u){for(var E=[],g=u.context;g;g=g.prev)g.tagName&&E.push(g.tagName);return E.reverse()}}}),ne.defineMIME("text/xml","xml"),ne.defineMIME("application/xml","xml"),ne.mimeModes.hasOwnProperty("text/html")||ne.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"4qgm":function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8Q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"),M=Y("oBTY"),R=Y("tJVT"),v=Y("DZo9"),m=Y("8z0m"),p=Y("WmNS"),c=Y.n(p),o=Y("cDcd"),h=Y.n(o),s=Y("m3rI"),i=Y("wzkS"),l=Y("y5JW"),f=Y("LtfV"),O=m.a.Dragger;function A(T){var w=[];return T&&T.length>0&&(w=T.map(function(S){return{uid:S.id,id:S.id,name:S.title+l.c+S.filesize,url:S.url,filesize:S.filesize,status:"done",response:{id:S.id}}})),w}we.b=function(T){var w=T.value,S=T.onChange,x=T.action,d=T.className,y=T.maxSize,u=y===void 0?150:y,E=T.title,g=E===void 0?"\u4E0A\u4F20\u9644\u4EF6":E,b=T.showRemoveModal,P=b===void 0?!1:b,L=T.accept,B=L===void 0?"":L,U=T.additionalText,C=T.isDragger,_=T.number,j=_===void 0?1e3:_,K=T.aloneClear,q=K===void 0?!1:K,te=Object(o.useState)(!1),_e=Object(R.a)(te,2),ue=_e[0],me=_e[1],fe=Object(o.useState)(w||[]),le=Object(R.a)(fe,2),ie=le[0],he=le[1];Object(o.useEffect)(function(){w&&(he(Object(M.a)(w)),j===(w==null?void 0:w.length)&&me(!0))},[w]);var J=function(){setTimeout(function(){ie.pop(),he(Object(M.a)(ie))},500)},ae={multiple:!0,disabled:ue,accept:B,withCredentials:!0,fileList:ie,beforeUpload:function(xe,ye){var Ae=xe.size/1024/1024;return ie.concat(ye).length>j?(ie.pop(),he(Object(M.a)(ie)),F.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(j,"\u4E2A\u6587\u4EF6")),q?Promise.reject():(J(),!1)):!0},action:x||"".concat(s.a.API_SERVER,"/api/attachments.json"),onChange:function(xe){var ye,Ae,Le=Object(M.a)(xe.fileList);if(xe.file.status==="done"&&((ye=xe.file)===null||ye===void 0||((Ae=ye.response)===null||Ae===void 0)?void 0:Ae.status)===-1){var Ne,ke;F.b.error((Ne=xe.file)===null||Ne===void 0||((ke=Ne.response)===null||ke===void 0)?void 0:ke.message);return}Le.length>=j?me(!0):me(!1),he(Object(M.a)(Le)),Le=Le.map(function(Oe){var Ie;if(Oe!=null&&(Ie=Oe.response)!==null&&Ie!==void 0&&Ie.id){var Ge;Oe.url="/api/attachments/".concat(Oe==null||((Ge=Oe.response)===null||Ge===void 0)?void 0:Ge.id)}return Oe.name.indexOf(l.c)===-1&&(Oe.name="".concat(Oe.name).concat(l.c).concat(Object(l.a)(Oe.size))),Object(k.a)({},Oe)}),console.log("info:",xe),S(Le)},onRemove:function(){var be=Object(N.a)(c.a.mark(function ye(Ae){var Le;return c.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(Le=function(){var Oe=Object(N.a)(c.a.mark(function Ie(){var Ge,Je;return c.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(Ge=Ae.response?Ae.response.id:Ae.id,!Ge){Ke.next=8;break}return Ke.next=4,Object(i.d)(Ae.response?Ae.response.id:Ae.uid);case 4:return Je=Ke.sent,Ke.abrupt("return",Je);case 8:return Ke.abrupt("return",!0);case 9:case"end":return Ke.stop()}},Ie)}));return function(){return Oe.apply(this,arguments)}}(),!P){ke.next=5;break}return ke.abrupt("return",new Promise(function(Oe,Ie){z.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:h.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Ge=Object(N.a)(c.a.mark(function Ve(){var Ke;return c.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Le();case 2:Ke=Qe.sent,F.b.success("\u5220\u9664\u6210\u529F"),Oe(!0);case 5:case"end":return Qe.stop()}},Ve)}));function Je(){return Ge.apply(this,arguments)}return Je}(),onCancel:function(){return Oe(!1)}})}));case 5:return ke.next=7,Le();case 7:return ke.abrupt("return",ke.sent);case 8:case"end":return ke.stop()}},ye)}));function xe(ye){return be.apply(this,arguments)}return xe}()};function ee(be){be.preventDefault(),be.stopPropagation()}return h.a.createElement("div",{className:"multi-upload ".concat(d||"")},C&&h.a.createElement(O,ae,h.a.createElement("p",{className:"ant-upload-drag-icon"},h.a.createElement(f.a,null)),h.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",h.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",u,"MB)"," "),U),!C&&h.a.createElement(m.a,ae,h.a.createElement(V.a,{disabled:ue},g),h.a.createElement("span",{onClick:ee,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",u,"MB)"," ")))}},"55Ip":function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return l});var ne=Y("Ty5D"),V=Y("dI71"),D=Y("cDcd"),z=Y.n(D),N=Y("YS25"),k=Y("17x9"),W=Y.n(k),F=Y("wx14"),M=Y("zLVn"),R=Y("9R94"),v=function(d){Object(V.a)(y,d);function y(){for(var E,g=arguments.length,b=new Array(g),P=0;P<g;P++)b[P]=arguments[P];return E=d.call.apply(d,[this].concat(b))||this,E.history=Object(N.a)(E.props),E}var u=y.prototype;return u.render=function(){return z.a.createElement(ne.c,{history:this.history,children:this.props.children})},y}(z.a.Component),m=function(d){Object(V.a)(y,d);function y(){for(var E,g=arguments.length,b=new Array(g),P=0;P<g;P++)b[P]=arguments[P];return E=d.call.apply(d,[this].concat(b))||this,E.history=Object(N.b)(E.props),E}var u=y.prototype;return u.render=function(){return z.a.createElement(ne.c,{history:this.history,children:this.props.children})},y}(z.a.Component),p=function(y,u){return typeof y=="function"?y(u):y},c=function(y,u){return typeof y=="string"?Object(N.c)(y,null,null,u):y},o=function(y){return y},h=z.a.forwardRef;typeof h=="undefined"&&(h=o);function s(d){return!!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)}var i=h(function(d,y){var u=d.innerRef,E=d.navigate,g=d.onClick,b=Object(M.a)(d,["innerRef","navigate","onClick"]),P=b.target,L=Object(F.a)({},b,{onClick:function(U){try{g&&g(U)}catch(C){throw U.preventDefault(),C}!U.defaultPrevented&&U.button===0&&(!P||P==="_self")&&!s(U)&&(U.preventDefault(),E())}});return o!==h?L.ref=y||u:L.ref=u,z.a.createElement("a",L)}),l=h(function(d,y){var u=d.component,E=u===void 0?i:u,g=d.replace,b=d.to,P=d.innerRef,L=Object(M.a)(d,["component","replace","to","innerRef"]);return z.a.createElement(ne.e.Consumer,null,function(B){B||Object(R.a)(!1);var U=B.history,C=c(p(b,B.location),B.location),_=C?U.createHref(C):"",j=Object(F.a)({},L,{href:_,navigate:function(){var q=p(b,B.location),te=g?U.replace:U.push;te(q)}});return o!==h?j.ref=y||P:j.innerRef=P,z.a.createElement(E,j)})});if(!1)var f,O;var A=function(y){return y},T=z.a.forwardRef;typeof T=="undefined"&&(T=A);function w(){for(var d=arguments.length,y=new Array(d),u=0;u<d;u++)y[u]=arguments[u];return y.filter(function(E){return E}).join(" ")}var S=T(function(d,y){var u=d["aria-current"],E=u===void 0?"page":u,g=d.activeClassName,b=g===void 0?"active":g,P=d.activeStyle,L=d.className,B=d.exact,U=d.isActive,C=d.location,_=d.sensitive,j=d.strict,K=d.style,q=d.to,te=d.innerRef,_e=Object(M.a)(d,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return z.a.createElement(ne.e.Consumer,null,function(ue){ue||Object(R.a)(!1);var me=C||ue.location,fe=c(p(q,me),me),le=fe.pathname,ie=le&&le.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),he=ie?Object(ne.f)(me.pathname,{path:ie,exact:B,sensitive:_,strict:j}):null,J=!!(U?U(he,me):he),ae=J?w(L,b):L,ee=J?Object(F.a)({},K,{},P):K,be=Object(F.a)({"aria-current":J&&E||null,className:ae,style:ee,to:fe},_e);return A!==T?be.ref=y||te:be.innerRef=te,z.a.createElement(l,be)})});if(!1)var x},"5D2P":function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"5VLF":function(Pe,we,Y){"use strict";var ne,V;function D(z,N,k){var W=function(F,M){return z.js_beautify(F,M)};return W.js=z.js_beautify,W.css=N.css_beautify,W.html=k.html_beautify,W.js_beautify=z.js_beautify,W.css_beautify=N.css_beautify,W.html_beautify=k.html_beautify,W}!(ne=[Y("6UM0"),Y("TXwP"),Y("psGv")],V=function(z,N,k){return D(z,N,k)}.apply(we,ne),V!==void 0&&(Pe.exports=V))},"6UM0":function(Pe,we,Y){var ne,V;(function(){var D;(function(){"use strict";var N=[function(M,R,v){var m=v(1).Beautifier,p=v(5).Options;function c(o,h){var s=new m(o,h);return s.beautify()}M.exports=c,M.exports.defaultOptions=function(){return new p}},function(M,R,v){var m=v(2).Output,p=v(3).Token,c=v(4),o=v(5).Options,h=v(7).Tokenizer,s=v(7).line_starters,i=v(7).positionable_operators,l=v(7).TOKEN;function f(_,j){return j.indexOf(_)!==-1}function O(_){return _.replace(/^\s+/g,"")}function A(_){for(var j={},K=0;K<_.length;K++)j[_[K].replace(/-/g,"_")]=_[K];return j}function T(_,j){return _&&_.type===l.RESERVED&&_.text===j}function w(_,j){return _&&_.type===l.RESERVED&&f(_.text,j)}var S=["case","return","do","if","throw","else","await","break","continue","async"],x=["before-newline","after-newline","preserve-newline"],d=A(x),y=[d.before_newline,d.preserve_newline],u={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function E(_,j){if(j.multiline_frame||j.mode===u.ForInitializer||j.mode===u.Conditional)return;_.remove_indent(j.start_line_index)}function g(_){_=_.replace(c.allLineBreaks,`
|
|
`);for(var j=[],K=_.indexOf(`
|
|
`);K!==-1;)j.push(_.substring(0,K)),_=_.substring(K+1),K=_.indexOf(`
|
|
`);return _.length&&j.push(_),j}function b(_){return _===u.ArrayLiteral}function P(_){return f(_,[u.Expression,u.ForInitializer,u.Conditional])}function L(_,j){for(var K=0;K<_.length;K++){var q=_[K].trim();if(q.charAt(0)!==j)return!1}return!0}function B(_,j){for(var K=0,q=_.length,te;K<q;K++)if(te=_[K],te&&te.indexOf(j)!==0)return!1;return!0}function U(_,j){j=j||{},this._source_text=_||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(j)}U.prototype.create_flags=function(_,j){var K=0;_&&(K=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>K&&(K=_.line_indent_level));var q={mode:j,parent:_,last_token:_?_.last_token:new p(l.START_BLOCK,""),last_word:_?_.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:K,alignment:0,line_indent_level:_?_.line_indent_level:K,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},U.prototype._reset=function(_){var j=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,j),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(u.BlockStatement);var K=new h(_,this._options);return this._tokens=K.tokenize(),_},U.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,j=this._reset(this._source_text),K=this._options.eol;this._options.eol==="auto"&&(K=`
|
|
`,j&&c.lineBreak.test(j||"")&&(K=j.match(c.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return _=this._output.get_code(K),_},U.prototype.handle_token=function(_,j){_.type===l.START_EXPR?this.handle_start_expr(_):_.type===l.END_EXPR?this.handle_end_expr(_):_.type===l.START_BLOCK?this.handle_start_block(_):_.type===l.END_BLOCK?this.handle_end_block(_):_.type===l.WORD?this.handle_word(_):_.type===l.RESERVED?this.handle_word(_):_.type===l.SEMICOLON?this.handle_semicolon(_):_.type===l.STRING?this.handle_string(_):_.type===l.EQUALS?this.handle_equals(_):_.type===l.OPERATOR?this.handle_operator(_):_.type===l.COMMA?this.handle_comma(_):_.type===l.BLOCK_COMMENT?this.handle_block_comment(_,j):_.type===l.COMMENT?this.handle_comment(_,j):_.type===l.DOT?this.handle_dot(_):_.type===l.EOF?this.handle_eof(_):_.type===l.UNKNOWN?this.handle_unknown(_,j):this.handle_unknown(_,j)},U.prototype.handle_whitespace_and_comments=function(_,j){var K=_.newlines,q=this._options.keep_array_indentation&&b(this._flags.mode);if(_.comments_before)for(var te=_.comments_before.next();te;)this.handle_whitespace_and_comments(te,j),this.handle_token(te,j),te=_.comments_before.next();if(q)for(var _e=0;_e<K;_e+=1)this.print_newline(_e>0,j);else if(this._options.max_preserve_newlines&&K>this._options.max_preserve_newlines&&(K=this._options.max_preserve_newlines),this._options.preserve_newlines&&K>1){this.print_newline(!1,j);for(var ue=1;ue<K;ue+=1)this.print_newline(!0,j)}};var C=["async","break","continue","return","throw","yield"];U.prototype.allow_wrap_or_preserved_newline=function(_,j){if(j=j===void 0?!1:j,this._output.just_added_newline())return;var K=this._options.preserve_newlines&&_.newlines||j,q=f(this._flags.last_token.text,i)||f(_.text,i);if(q){var te=f(this._flags.last_token.text,i)&&f(this._options.operator_position,y)||f(_.text,i);K=K&&te}if(K)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(w(this._flags.last_token,C))return;this._output.set_wrap_point()}},U.prototype.print_newline=function(_,j){if(!j&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var K=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&T(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},U.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||b(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},U.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===l.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var j=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(j),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},U.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},U.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},U.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},U.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===u.Statement&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},U.prototype.start_of_object_property=function(){return this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||w(this._flags.last_token,["get","set"]))},U.prototype.start_of_statement=function(_){var j=!1;return j=j||w(this._flags.last_token,["var","let","const"])&&_.type===l.WORD,j=j||T(this._flags.last_token,"do"),j=j||!(this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement)&&w(this._flags.last_token,C)&&!_.newlines,j=j||T(this._flags.last_token,"else")&&!(T(_,"if")&&!_.comments_before),j=j||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===u.ForInitializer||this._previous_flags.mode===u.Conditional),j=j||this._flags.last_token.type===l.WORD&&this._flags.mode===u.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==l.WORD&&_.type!==l.RESERVED,j=j||this._flags.mode===u.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||w(this._flags.last_token,["get","set"])),j?(this.set_mode(u.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,w(_,["do","for","if","while"])),!0):!1},U.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var j=u.Expression;if(_.text==="["){if(this._flags.last_token.type===l.WORD||this._flags.last_token.text===")"){w(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(j),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}j=u.ArrayLiteral,b(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),f(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,j=u.ForInitializer):f(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,j=u.Conditional):f(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(f(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var K=this._tokens.peek(-3);if(this._options.space_after_named_function&&K){var q=this._tokens.peek(-4);w(K,["async","function"])||K.text==="*"&&w(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===u.ObjectLiteral?(K.text==="{"||K.text===","||K.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(_);(this._flags.last_token.type===l.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&f(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(j),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},U.prototype.handle_end_expr=function(_){for(;this._flags.mode===u.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&b(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===l.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(_),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===u.Conditional&&(this._previous_flags.mode=u.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},U.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var j=this._tokens.peek(),K=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(u.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(u.BlockStatement):K&&(f(K.text,[":",","])&&f(j.type,[l.STRING,l.WORD,l.RESERVED])||f(j.text,["get","set","..."])&&f(K.type,[l.WORD,l.RESERVED]))?f(this._last_last_text,["class","interface"])&&!f(K.text,[":",","])?this.set_mode(u.BlockStatement):this.set_mode(u.ObjectLiteral):this._flags.last_token.type===l.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(u.BlockStatement):f(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||w(this._flags.last_token,["return","throw","import","default"])?this.set_mode(u.ObjectLiteral):this.set_mode(u.BlockStatement),this._flags.last_token&&(w(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!j.comments_before&&j.text==="}",te=q&&this._flags.last_word==="function"&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,ue=null;this._flags.inline_frame=!0;do if(_e+=1,ue=this._tokens.peek(_e-1),ue.newlines){this._flags.inline_frame=!1;break}while(ue.type!==l.EOF&&!(ue.type===l.END_BLOCK&&ue.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(te||this._flags.last_token.type===l.EQUALS||w(this._flags.last_token,S)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(b(this._previous_flags.mode)&&(this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type===l.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},U.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===u.Statement;)this.restore_mode();var j=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!j?this._output.space_before_token=!0:this._options.brace_style==="expand"?j||this.print_newline():j||(b(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(_)},U.prototype.handle_word=function(_){if(_.type===l.RESERVED){if(f(_.text,["set","get"])&&this._flags.mode!==u.ObjectLiteral)_.type=l.WORD;else if(_.text==="import"&&f(this._tokens.peek().text,["(","."]))_.type=l.WORD;else if(f(_.text,["as","from"])&&!this._flags.import_block)_.type=l.WORD;else if(this._flags.mode===u.ObjectLiteral){var j=this._tokens.peek();j.text===":"&&(_.type=l.WORD)}}if(this.start_of_statement(_)?w(this._flags.last_token,["var","let","const"])&&_.type===l.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==l.EQUALS&&(this._options.preserve_newlines||!w(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(T(_,"while")){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&T(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===u.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&w(_,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_)),T(_,"function")){(f(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(f(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&(!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?w(this._flags.last_token,["get","set","new","export"])||w(this._flags.last_token,C)?this._output.space_before_token=!0:T(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||b(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var K="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?K="SPACE":w(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?K="NEWLINE":(K="SPACE",this._output.space_before_token=!0):K="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===u.BlockStatement?K="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&P(this._flags.mode)?K="SPACE":this._flags.last_token.type===l.STRING?K="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&f(this._last_last_text,["{",","]))?K="SPACE":this._flags.last_token.type===l.START_BLOCK?this._flags.inline_frame?K="SPACE":K="NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,K="NEWLINE"),w(_,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?K="SPACE":K="NEWLINE"),w(_,["else","catch","finally"]))if((!(this._flags.last_token.type===l.END_BLOCK&&this._previous_flags.mode===u.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else K==="NEWLINE"?w(this._flags.last_token,S)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&w(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!w(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(_,"if")&&T(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):w(_,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&b(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():K==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===l.WORD||_.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===l.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(_,"from")&&(this._flags.import_block=!1))},U.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var j=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&T(j,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},U.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===l.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===l.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},U.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},U.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(P(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)):this._flags.mode===u.ObjectLiteral||this._flags.mode===u.Statement&&this._flags.parent.mode===u.ObjectLiteral?(this._flags.mode===u.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},U.prototype.handle_operator=function(_){var j=_.text==="*"&&(w(this._flags.last_token,["function","yield"])||f(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),K=f(_.text,["-","+"])&&(f(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||f(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var q=!j;this.handle_whitespace_and_comments(_,q)}if(_.text==="*"&&this._flags.last_token.type===l.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(this._flags.last_token.type===l.OPERATOR&&f(this._options.operator_position,y)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var te=!0,_e=!0,ue=!1;if(_.text===":"?this._flags.ternary_depth===0?te=!1:(this._flags.ternary_depth-=1,ue=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!K&&!j&&this._options.preserve_newlines&&f(_.text,i)){var me=_.text===":",fe=me&&ue,le=me&&!ue;switch(this._options.operator_position){case d.before_newline:this._output.space_before_token=!le,this.print_token(_),(!me||fe)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case d.after_newline:this._output.space_before_token=!0,!me||fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case d.preserve_newline:le||this.allow_wrap_or_preserved_newline(_),te=!(this._output.just_added_newline()||le),this._output.space_before_token=te,this.print_token(_),this._output.space_before_token=!0;return}}if(j){this.allow_wrap_or_preserved_newline(_),te=!1;var ie=this._tokens.peek();_e=ie&&f(ie.type,[l.WORD,l.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),te=this._flags.last_token.type===l.START_BLOCK,_e=!1;else if(f(_.text,["--","++","!","~"])||K){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),te=!1,_e=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var he=w(this._flags.last_token,S)&&_.newlines;he&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(he,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(te=!0),this._flags.last_token.type===l.RESERVED?te=!0:this._flags.last_token.type===l.END_EXPR?te=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===l.OPERATOR&&(te=f(_.text,["--","-","++","+"])&&f(this._flags.last_token.text,["--","-","++","+"]),f(_.text,["+","-"])&&f(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===u.BlockStatement&&!this._flags.inline_frame||this._flags.mode===u.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||te,this.print_token(_),this._output.space_before_token=_e},U.prototype.handle_block_comment=function(_,j){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,j),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!c.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,j)},U.prototype.print_block_commment=function(_,j){var K=g(_.text),q,te=!1,_e=!1,ue=_.whitespace_before,me=ue.length;if(this.print_newline(!1,j),this.print_token_line_indentation(_),this._output.add_token(K[0]),this.print_newline(!1,j),K.length>1){for(K=K.slice(1),te=L(K,"*"),_e=B(K,ue),te&&(this._flags.alignment=1),q=0;q<K.length;q++)te?(this.print_token_line_indentation(_),this._output.add_token(O(K[q]))):_e&&K[q]?(this.print_token_line_indentation(_),this._output.add_token(K[q].substring(me))):(this._output.current_line.set_indent(-1),this._output.add_token(K[q])),this.print_newline(!1,j);this._flags.alignment=0}},U.prototype.handle_comment=function(_,j){_.newlines?this.print_newline(!1,j):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,j)},U.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),w(this._flags.last_token,S)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(_)},U.prototype.handle_unknown=function(_,j){this.print_token(_),_.text[_.text.length-1]===`
|
|
`&&this.print_newline(!1,j)},U.prototype.handle_eof=function(_){for(;this._flags.mode===u.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},M.exports.Beautifier=U},function(M){function R(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}R.prototype.clone_empty=function(){var p=new R(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},R.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},R.prototype.has_match=function(p){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(p))return!0;return!1},R.prototype.set_indent=function(p,c){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},R.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(p){this.__items.push(p);var c=p.lastIndexOf(`
|
|
`);c!==-1?this.__character_count=p.length-c:this.__character_count+=p.length},R.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function v(p,c){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),c=c||"",p.indent_level>0&&(c=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}v.prototype.get_indent_size=function(p,c){var o=this.__base_string_length;return c=c||0,p<0&&(o=0),o+=p*this.__indent_size,o+=c,o},v.prototype.get_indent_string=function(p,c){var o=this.__base_string;return c=c||0,p<0&&(p=0,o=""),c+=p*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,c=0,o="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),p&&(o+=new Array(p+1).join(" ")),this.__cache.push(o)};function m(p,c){this.__indent_cache=new v(p,c),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,c){return this.__indent_cache.get_indent_string(p,c)},m.prototype.get_indent_size=function(p,c){return this.__indent_cache.get_indent_size(p,c)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
|
|
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return p!==`
|
|
`&&(o=o.replace(/[\n]/g,p)),o},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(p,c){return p=p||0,c=c||0,this.next_line.set_indent(p,c),this.__lines.length>1?(this.current_line.set_indent(p,c),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(p){for(var c=0;c<p.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},m.prototype.remove_indent=function(p){for(var c=this.__lines.length;p<c;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(p,c){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(p)!==0&&h.item(-1)!==c){this.__lines.splice(o+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},M.exports.Output=m},function(M){function R(v,m,p,c){this.type=v,this.text=m,this.comments_before=null,this.newlines=p||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}M.exports.Token=R},function(M,R){var v="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09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\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",c="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+v+p+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+m+p+c+"])*";R.identifier=new RegExp(o+h,"g"),R.identifierStart=new RegExp(o),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+p+c+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|
|
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(M,R,v){var m=v(6).Options,p=["before-newline","after-newline","preserve-newline"];function c(o){m.call(this,o,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var i=0;i<s.length;i++)s[i]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[i];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",p),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}c.prototype=new m,M.exports.Options=c},function(M){function R(p,c){this.raw_options=v(p,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(p,c){var o=this.raw_options[p],h=c||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},R.prototype._get_boolean=function(p,c){var o=this.raw_options[p],h=o===void 0?!!c:!!o;return h},R.prototype._get_characters=function(p,c){var o=this.raw_options[p],h=c||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},R.prototype._get_number=function(p,c){var o=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var h=parseInt(o,10);return isNaN(h)&&(h=c),h},R.prototype._get_selection=function(p,c,o){var h=this._get_selection_list(p,c,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[p]+"'");return h[0]},R.prototype._get_selection_list=function(p,c,o){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[c[0]],!this._is_valid_selection(o,c))throw new Error("Invalid Default Value!");var h=this._get_array(p,o);if(!this._is_valid_selection(h,c))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[p]+"'");return h},R.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(o){return c.indexOf(o)===-1})};function v(p,c){var o={};p=m(p);var h;for(h in p)h!==c&&(o[h]=p[h]);if(c&&p[c])for(h in p[c])o[h]=p[c][h];return o}function m(p){var c={},o;for(o in p){var h=o.replace(/-/g,"_");c[h]=p[o]}return c}M.exports.Options=R,M.exports.normalizeOpts=m,M.exports.mergeOpts=v},function(M,R,v){var m=v(8).InputScanner,p=v(9).Tokenizer,c=v(9).TOKEN,o=v(13).Directives,h=v(4),s=v(12).Pattern,i=v(14).TemplatablePattern;function l(L,B){return B.indexOf(L)!==-1}var f={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:c.START,RAW:c.RAW,EOF:c.EOF},O=new o(/\/\*/,/\*\//),A=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,T=/[0-9]/,w=/[^\d\.]/,S=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),x=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";x=x.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),x="\\?\\.(?!\\d) "+x,x=x.replace(/ /g,"|");var d=new RegExp(x),y="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),u=y.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),E=new RegExp("^(?:"+u.join("|")+")$"),g,b=function(L,B){p.call(this,L,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var U=new s(this._input),C=new i(this._input).read_options(this._options);this.__patterns={template:C,identifier:C.starting_with(h.identifier).matching(h.identifierMatch),number:U.matching(A),punct:U.matching(d),comment:U.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:U.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:U.matching(/<!--/),html_comment_end:U.matching(/-->/),include:U.starting_with(/#include/).until_after(h.lineBreak),shebang:U.starting_with(/#!/).until_after(h.lineBreak),xml:U.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:C.until(/['\\\n\r\u2028\u2029]/),double_quote:C.until(/["\\\n\r\u2028\u2029]/),template_text:C.until(/[`\\$]/),template_expression:C.until(/[`}\\]/)}};b.prototype=new p,b.prototype._is_comment=function(L){return L.type===f.COMMENT||L.type===f.BLOCK_COMMENT||L.type===f.UNKNOWN},b.prototype._is_opening=function(L){return L.type===f.START_BLOCK||L.type===f.START_EXPR},b.prototype._is_closing=function(L,B){return(L.type===f.END_BLOCK||L.type===f.END_EXPR)&&B&&(L.text==="]"&&B.text==="["||L.text===")"&&B.text==="("||L.text==="}"&&B.text==="{")},b.prototype._reset=function(){g=!1},b.prototype._get_next_token=function(L,B){var U=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(f.EOF,""):(U=U||this._read_non_javascript(C),U=U||this._read_string(C),U=U||this._read_word(L),U=U||this._read_singles(C),U=U||this._read_comment(C),U=U||this._read_regexp(C,L),U=U||this._read_xml(C,L),U=U||this._read_punctuation(),U=U||this._create_token(f.UNKNOWN,this._input.next()),U)},b.prototype._read_word=function(L){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(h.allLineBreaks,`
|
|
`),!(L.type===f.DOT||L.type===f.RESERVED&&(L.text==="set"||L.text==="get"))&&E.test(B)?(B==="in"||B==="of")&&(L.type===f.WORD||L.type===f.STRING)?this._create_token(f.OPERATOR,B):this._create_token(f.RESERVED,B):this._create_token(f.WORD,B);if(B=this.__patterns.number.read(),B!=="")return this._create_token(f.WORD,B)},b.prototype._read_singles=function(L){var B=null;return L==="("||L==="["?B=this._create_token(f.START_EXPR,L):L===")"||L==="]"?B=this._create_token(f.END_EXPR,L):L==="{"?B=this._create_token(f.START_BLOCK,L):L==="}"?B=this._create_token(f.END_BLOCK,L):L===";"?B=this._create_token(f.SEMICOLON,L):L==="."&&w.test(this._input.peek(1))?B=this._create_token(f.DOT,L):L===","&&(B=this._create_token(f.COMMA,L)),B&&this._input.next(),B},b.prototype._read_punctuation=function(){var L=this.__patterns.punct.read();if(L!=="")return L==="="?this._create_token(f.EQUALS,L):L==="?."?this._create_token(f.DOT,L):this._create_token(f.OPERATOR,L)},b.prototype._read_non_javascript=function(L){var B="";if(L==="#"){if(this._is_first_token()&&(B=this.__patterns.shebang.read(),B))return this._create_token(f.UNKNOWN,B.trim()+`
|
|
`);if(B=this.__patterns.include.read(),B)return this._create_token(f.UNKNOWN,B.trim()+`
|
|
`);L=this._input.next();var U="#";if(this._input.hasNext()&&this._input.testChar(T)){do L=this._input.next(),U+=L;while(this._input.hasNext()&&L!=="#"&&L!=="=");return L==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(U+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(U+="{}",this._input.next(),this._input.next())),this._create_token(f.WORD,U)}this._input.back()}else if(L==="<"&&this._is_first_token()){if(B=this.__patterns.html_comment_start.read(),B){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)B+=this._input.next();return g=!0,this._create_token(f.COMMENT,B)}}else if(g&&L==="-"&&(B=this.__patterns.html_comment_end.read(),B))return g=!1,this._create_token(f.COMMENT,B);return null},b.prototype._read_comment=function(L){var B=null;if(L==="/"){var U="";if(this._input.peek(1)==="*"){U=this.__patterns.block_comment.read();var C=O.get_directives(U);C&&C.ignore==="start"&&(U+=O.readIgnored(this._input)),U=U.replace(h.allLineBreaks,`
|
|
`),B=this._create_token(f.BLOCK_COMMENT,U),B.directives=C}else this._input.peek(1)==="/"&&(U=this.__patterns.comment.read(),B=this._create_token(f.COMMENT,U))}return B},b.prototype._read_string=function(L){if(L==="`"||L==="'"||L==='"'){var B=this._input.next();return this.has_char_escapes=!1,L==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(L),this.has_char_escapes&&this._options.unescape_strings&&(B=P(B)),this._input.peek()===L&&(B+=this._input.next()),B=B.replace(h.allLineBreaks,`
|
|
`),this._create_token(f.STRING,B)}return null},b.prototype._allow_regexp_or_xml=function(L){return L.type===f.RESERVED&&l(L.text,["return","case","throw","else","do","typeof","yield"])||L.type===f.END_EXPR&&L.text===")"&&L.opened.previous.type===f.RESERVED&&l(L.opened.previous.text,["if","while","for"])||l(L.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},b.prototype._read_regexp=function(L,B){if(L==="/"&&this._allow_regexp_or_xml(B)){for(var U=this._input.next(),C=!1,_=!1;this._input.hasNext()&&(C||_||this._input.peek()!==L)&&!this._input.testChar(h.newline);)U+=this._input.peek(),C?C=!1:(C=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===L&&(U+=this._input.next(),U+=this._input.read(h.identifier)),this._create_token(f.STRING,U)}return null},b.prototype._read_xml=function(L,B){if(this._options.e4x&&L==="<"&&this._allow_regexp_or_xml(B)){var U="",C=this.__patterns.xml.read_match();if(C){for(var _=C[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),j=_.indexOf("{")===0,K=0;C;){var q=!!C[1],te=C[2],_e=!!C[C.length-1]||te.slice(0,8)==="![CDATA[";if(!_e&&(te===_||j&&te.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--K:++K),U+=C[0],K<=0)break;C=this.__patterns.xml.read_match()}return C||(U+=this._input.match(/[\s\S]*/g)[0]),U=U.replace(h.allLineBreaks,`
|
|
`),this._create_token(f.STRING,U)}}return null};function P(L){for(var B="",U=0,C=new m(L),_=null;C.hasNext();)if(_=C.match(/([\s]|[^\\]|\\\\)+/g),_&&(B+=_[0]),C.peek()==="\\"){if(C.next(),C.peek()==="x")_=C.match(/x([0-9A-Fa-f]{2})/g);else if(C.peek()==="u")_=C.match(/u([0-9A-Fa-f]{4})/g);else{B+="\\",C.hasNext()&&(B+=C.next());continue}if(!_)return L;if(U=parseInt(_[1],16),U>126&&U<=255&&_[0].indexOf("x")===0)return L;if(U>=0&&U<32){B+="\\"+_[0];continue}else U===34||U===39||U===92?B+="\\"+String.fromCharCode(U):B+=String.fromCharCode(U)}return B}b.prototype._read_string_recursive=function(L,B,U){var C,_;L==="'"?_=this.__patterns.single_quote:L==='"'?_=this.__patterns.double_quote:L==="`"?_=this.__patterns.template_text:L==="}"&&(_=this.__patterns.template_expression);for(var j=_.read(),K="";this._input.hasNext();){if(K=this._input.next(),K===L||!B&&h.newline.test(K)){this._input.back();break}else K==="\\"&&this._input.hasNext()?(C=this._input.peek(),C==="x"||C==="u"?this.has_char_escapes=!0:C==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),K+=this._input.next()):U&&(U==="${"&&K==="$"&&this._input.peek()==="{"&&(K+=this._input.next()),U===K&&(L==="`"?K+=this._read_string_recursive("}",B,"`"):K+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(K+=this._input.next())));K+=_.read(),j+=K}return j},M.exports.Tokenizer=b,M.exports.TOKEN=f,M.exports.positionable_operators=S.slice(),M.exports.line_starters=y.slice()},function(M){var R=RegExp.prototype.hasOwnProperty("sticky");function v(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},v.prototype.peek=function(m){var p=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(p=this.__input.charAt(m)),p},v.prototype.__match=function(m,p){m.lastIndex=p;var c=m.exec(this.__input);return c&&!(R&&m.sticky)&&(c.index!==p&&(c=null)),c},v.prototype.test=function(m,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(m,p):!1},v.prototype.testChar=function(m,p){var c=this.peek(p);return m.lastIndex=0,c!==null&&m.test(c)},v.prototype.match=function(m){var p=this.__match(m,this.__position);return p?this.__position+=p[0].length:p=null,p},v.prototype.read=function(m,p,c){var o="",h;return m&&(h=this.match(m),h&&(o+=h[0])),p&&(h||!m)&&(o+=this.readUntil(p,c)),o},v.prototype.readUntil=function(m,p){var c="",o=this.__position;m.lastIndex=this.__position;var h=m.exec(this.__input);return h?(o=h.index,p&&(o+=h[0].length)):o=this.__input_length,c=this.__input.substring(this.__position,o),this.__position=o,c},v.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},v.prototype.get_regexp=function(m,p){var c=null,o="g";return p&&R&&(o="y"),typeof m=="string"&&m!==""?c=new RegExp(m,o):m&&(c=new RegExp(m.source,o)),c},v.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(m){var p=this.__position,c=this.readUntilAfter(m);return this.__position=p,c},v.prototype.lookBack=function(m){var p=this.__position-1;return p>=m.length&&this.__input.substring(p-m.length,p).toLowerCase()===m},M.exports.InputScanner=v},function(M,R,v){var m=v(8).InputScanner,p=v(3).Token,c=v(10).TokenStream,o=v(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(i,l){this._input=new m(i),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var i,l=new p(h.START,""),f=null,O=[],A=new c;l.type!==h.EOF;){for(i=this._get_next_token(l,f);this._is_comment(i);)A.add(i),i=this._get_next_token(l,f);A.isEmpty()||(i.comments_before=A,A=new c),i.parent=f,this._is_opening(i)?(O.push(f),f=i):f&&this._is_closing(i,f)&&(i.opened=f,f.closed=i,f=O.pop(),i.parent=f),i.previous=l,l.next=i,this.__tokens.add(i),l=i}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(i,l){this._readWhitespace();var f=this._input.read(/.+/g);return f?this._create_token(h.RAW,f):this._create_token(h.EOF,"")},s.prototype._is_comment=function(i){return!1},s.prototype._is_opening=function(i){return!1},s.prototype._is_closing=function(i,l){return!1},s.prototype._create_token=function(i,l){var f=new p(i,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return f},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},M.exports.Tokenizer=s,M.exports.TOKEN=h},function(M){function R(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position<this.__tokens_length},R.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},R.prototype.peek=function(v){var m=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(m=this.__tokens[v]),m},R.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},M.exports.TokenStream=R},function(M,R,v){var m=v(12).Pattern;function p(c,o){m.call(this,c,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}p.prototype=new m,p.prototype.__set_whitespace_patterns=function(c,o){c+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},p.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var c=this._input.read(this._match_pattern);if(c===" ")this.whitespace_before_token=" ";else if(c){var o=this.__split(this._newline_regexp,c);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return c},p.prototype.matching=function(c,o){var h=this._create();return h.__set_whitespace_patterns(c,o),h._update(),h},p.prototype._create=function(){return new p(this._input,this)},p.prototype.__split=function(c,o){c.lastIndex=0;for(var h=0,s=[],i=c.exec(o);i;)s.push(o.substring(h,i.index)),h=i.index+i[0].length,i=c.exec(o);return h<o.length?s.push(o.substring(h,o.length)):s.push(""),s},M.exports.WhitespacePattern=p},function(M){function R(v,m){this._input=v,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,m&&(this._starting_pattern=this._input.get_regexp(m._starting_pattern,!0),this._match_pattern=this._input.get_regexp(m._match_pattern,!0),this._until_pattern=this._input.get_regexp(m._until_pattern),this._until_after=m._until_after)}R.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},R.prototype.read_match=function(){return this._input.match(this._match_pattern)},R.prototype.until_after=function(v){var m=this._create();return m._until_after=!0,m._until_pattern=this._input.get_regexp(v),m._update(),m},R.prototype.until=function(v){var m=this._create();return m._until_after=!1,m._until_pattern=this._input.get_regexp(v),m._update(),m},R.prototype.starting_with=function(v){var m=this._create();return m._starting_pattern=this._input.get_regexp(v,!0),m._update(),m},R.prototype.matching=function(v){var m=this._create();return m._match_pattern=this._input.get_regexp(v,!0),m._update(),m},R.prototype._create=function(){return new R(this._input,this)},R.prototype._update=function(){},M.exports.Pattern=R},function(M){function R(v,m){v=typeof v=="string"?v:v.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+m,"g")}R.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(v);p;)m[p[1]]=p[2],p=this.__directive_pattern.exec(v);return m},R.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=R},function(M,R,v){var m=v(12).Pattern,p={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(o,h){m.call(this,o,h),this.__template_pattern=null,this._disabled=Object.assign({},p),this._excluded=Object.assign({},p),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var s=new m(o);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new m,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},c.prototype.read_options=function(o){var h=this._create();for(var s in p)h._disabled[s]=o.templating.indexOf(s)===-1;return h._update(),h},c.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},c.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},c.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},c.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},M.exports.TemplatablePattern=c}],k={};function W(M){var R=k[M];if(R!==void 0)return R.exports;var v=k[M]={exports:{}};return N[M](v,v.exports,W),v.exports}var F=W(0);D=F})();var z=D;!(ne=[],V=function(){return{js_beautify:z}}.apply(we,ne),V!==void 0&&(Pe.exports=V))})()},"7Cbv":function(Pe,we,Y){"use strict";var ne=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),V=new Uint8Array(16);function D(){if(!ne)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(V)}var z=/^(?:[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 N(p){return typeof p=="string"&&z.test(p)}for(var k=N,W=[],F=0;F<256;++F)W.push((F+256).toString(16).substr(1));function M(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(W[p[c+0]]+W[p[c+1]]+W[p[c+2]]+W[p[c+3]]+"-"+W[p[c+4]]+W[p[c+5]]+"-"+W[p[c+6]]+W[p[c+7]]+"-"+W[p[c+8]]+W[p[c+9]]+"-"+W[p[c+10]]+W[p[c+11]]+W[p[c+12]]+W[p[c+13]]+W[p[c+14]]+W[p[c+15]]).toLowerCase();if(!k(o))throw TypeError("Stringified UUID is invalid");return o}var R=M;function v(p,c,o){p=p||{};var h=p.random||(p.rng||D)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,c){o=o||0;for(var s=0;s<16;++s)c[o+s]=h[s];return c}return R(h)}var m=we.a=v},"7ZXX":function(Pe,we,Y){Pe.exports=Y.p+"static/err.6e7c5817.png"},"7ahc":function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return O});var ne=Y("k1fw"),V=Y("0Owb"),D=Y("+L6B"),z=Y("2/Rp"),N=Y("y8nQ"),k=Y("Vl3Y"),W=Y("tJVT"),F=Y("OaEy"),M=Y("2fM7"),R=Y("cDcd"),v=Y.n(R),m=Y("VrN/"),p=Y.n(m),c=Y("p77/"),o=Y.n(c),h=Y("c5Ni"),s=Y.n(h),i=M.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},f={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};we.b=function(A){var T=A.callback,w=A.onCancel,S=Object(R.useState)("python"),x=Object(W.a)(S,2),d=x[0],y=x[1];function u(g){y(f[g][1])}function E(g){T(g)}return v.a.createElement(k.a,Object(V.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),v.a.createElement(k.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},v.a.createElement(M.a,{onChange:u},Object.keys(f).map(function(g){return v.a.createElement(i,{key:g,value:g},f[g][0])}))),v.a.createElement(k.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},v.a.createElement(O,{mode:d})),v.a.createElement("div",{className:"flex-container flex-end"},v.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),v.a.createElement(z.a,{type:"ghost",onClick:w},"\u53D6\u6D88")))};function O(A){var T=A.value,w=A.onChange,S=A.mode,x=A.options,d=x===void 0?{}:x,y=Object(R.useRef)(),u=Object(R.useState)(),E=Object(W.a)(u,2),g=E[0],b=E[1];return Object(R.useEffect)(function(){if(g){function P(L){var B=L.getValue();w&&w(B)}return g.on("change",P),function(){g.off("change",P)}}},[g,w]),Object(R.useEffect)(function(){g&&g.setOption("mode",S)},[g,S]),Object(R.useEffect)(function(){g&&((T!==g.getValue()||T==="")&&setTimeout(function(){g.setValue(T||" ")},300))},[g,T]),Object(R.useEffect)(function(){if(y.current&&!g){var P=p.a.fromTextArea(y.current,Object(ne.a)({mode:S,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},d));b(P)}},[y.current,g]),v.a.createElement("div",{className:"my-codemirror-container"},v.a.createElement("textarea",{ref:y}))}},"7v3h":function(Pe,we,Y){Pe.exports=Y.p+"static/empty2.dd73f390.png"},"8/bI":function(Pe,we,Y){Pe.exports=Y.p+"static/empty.8918e228.png"},"8EBN":function(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){"use strict";ne.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 V=0;V<ne.modeInfo.length;V++){var D=ne.modeInfo[V];D.mimes&&(D.mime=D.mimes[0])}ne.findModeByMIME=function(z){z=z.toLowerCase();for(var N=0;N<ne.modeInfo.length;N++){var k=ne.modeInfo[N];if(k.mime==z)return k;if(k.mimes){for(var W=0;W<k.mimes.length;W++)if(k.mimes[W]==z)return k}}if(/\+xml$/.test(z))return ne.findModeByMIME("application/xml");if(/\+json$/.test(z))return ne.findModeByMIME("application/json")},ne.findModeByExtension=function(z){z=z.toLowerCase();for(var N=0;N<ne.modeInfo.length;N++){var k=ne.modeInfo[N];if(k.ext){for(var W=0;W<k.ext.length;W++)if(k.ext[W]==z)return k}}},ne.findModeByFileName=function(z){for(var N=0;N<ne.modeInfo.length;N++){var k=ne.modeInfo[N];if(k.file&&k.file.test(z))return k}var W=z.lastIndexOf("."),F=W>-1&&z.substring(W+1,z.length);if(F)return ne.findModeByExtension(F)},ne.findModeByName=function(z){z=z.toLowerCase();for(var N=0;N<ne.modeInfo.length;N++){var k=ne.modeInfo[N];if(k.name.toLowerCase()==z)return k;if(k.alias){for(var W=0;W<k.alias.length;W++)if(k.alias[W].toLowerCase()==z)return k}}}})},"8hTe":function(Pe,we,Y){Pe.exports={button:"button___1wy9m"}},"9Bee":function(Pe,we,Y){"use strict";var ne=Y("DYRE"),V=Y("zeV3"),D=Y("+L6B"),z=Y("2/Rp"),N=Y("k1fw"),k=Y("tJVT"),W=Y("cDcd"),F=Y.n(W),M=Y("vg9a"),R=Y("DlQD"),v=Y.n(R),m=Y("rUJ1");function p(me,fe){var le=me.match(/^(\s+)(?:```)/);if(le===null)return fe;var ie=le[1];return fe.split(`
|
|
`).map(function(he){var J=he.match(/^\s+/);if(J===null)return he;var ae=Object(k.a)(J,1),ee=ae[0];return ee.length>=ie.length?he.slice(ie.length):he}).join(`
|
|
`)}var c=[],o=["<ul>"],h=new v.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function i(){c.length=0,o=["<ul>"]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(me,fe,le,ie){if(fe>=me.length||me[fe].level<=le)return fe;var he=me[fe];ie.push("<li><a href='#"+he.anchor+"'>"+he.text+"</a>"),fe++;var J=[];return fe=f(me,fe,he.level,J),J.length>0&&(ie.push("<ul>"),J.forEach(function(ae){ie.push(ae)}),ie.push("</ul>")),ie.push("</li>"),fe=f(me,fe,le,ie),fe}function O(){return f(c,0,0,o),o.push("</ul>"),o.join("")}var A={heading:function(fe){var le=s.exec(fe);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},fences:function(fe){var le=this.rules.block.fences.exec(fe);if(le){var ie=le[0],he=p(ie,le[3]||""),J=le[2]?le[2].trim():le[2];if(["latex","katex","math"].indexOf(J)>=0){var ae=S(),ee=he;he=ae,x[ae]={type:"block",expression:ee}}return{type:"code",raw:ie,lang:J,text:he}}}},T=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,S=function(){return"__special_katext_id_".concat(w++,"__")},x={};function d(){return x}function y(){w=0,x={}}function u(me){return me=me.replace(T,function(fe,le){var ie=S();return x[ie]={type:"inline",expression:le},ie}),me}var E=h.listitem;h.listitem=function(me){return E(u(me))};var g=h.paragraph;h.paragraph=function(me){return g(u(me))};var b=h.tablecell;h.tablecell=function(me,fe){return b(u(me),fe)},h.code=function(me,fe,le){var ie=(fe||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"<p class='editormd-tex'>".concat(me,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(fe,'">').concat(le?me:Object(m.escape)(me,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(le?me:Object(m.escape)(me,!0))+"</code></pre>"},h.heading=function(me,fe,le){var ie=this.options.headerPrefix+le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ie,level:fe,text:me}),"<h"+fe+' id="'+ie+'">'+me+"</h"+fe+">"},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:A,renderer:h});var P=v.a,L=Y("SJMd"),B=Y("ulZh"),U=Y.n(B),C=Y("m3rI"),_=Y("Oy/b"),j=Y("p5ED"),K=Y("8hTe"),q=Y.n(K),te=/<pre[^>]*>/g;function _e(me){var fe=document.createElement("div");return fe.innerHTML=me,fe.childNodes.length===0?"":fe.childNodes[0].nodeValue}var ue=we.a=function(me){var fe=me.value,le=fe===void 0?"":fe,ie=me.edit,he=ie===void 0?!1:ie,J=me.className,ae=me.showTextOnly,ee=me.showLines,be=me.replaces,xe=me.zoomImg,ye=me.hasMask,Ae=me.style,Le=Ae===void 0?{}:Ae,Ne=me.stylesPrev,ke=Ne===void 0?{}:Ne,Oe=String(le),Ie=Object(W.useRef)(),Ge=Object(W.useRef)(),Je=Object(W.useState)(""),Ve=Object(k.a)(Je,2),Ke=Ve[0],nt=Ve[1],Qe=Object(W.useState)("office"),Ze=Object(k.a)(Qe,2),Re=Ze[0],tt=Ze[1],Xe=Object(W.useMemo)(function(){try{var pe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Z=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Oe=Oe.replace(pe,"("+C.a.API_SERVER+"/api/attachments/").replace(Z,'"'+C.a.API_SERVER+"/api/attachments/").replace($,'"'+C.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(Ce){}var re=P(Oe),oe=d();if(Oe.match(/\[TOC\]/)&&(re=re.replace("<p>[TOC]</p>",O()),i()),re=re.replace(/(__special_katext_id_\d+__)/g,function(Ce,Fe){var et=oe[Fe],rt=et.type,De=et.expression;return Object(_.renderToString)(_e(De)||"",{displayMode:rt==="block",throwOnError:!1,output:"html"})}),re=re.replace(/▁/g,"\u2581\u2581\u2581"),y(),ae){var ge=document.createElement("div");return ge.innerHTML=re,ge.innerText}return setTimeout(function(){return ve()},500),re},[Oe]),Se=Object(W.useRef)();l.WebkitLineClamp=ee,ee&&(Le=Object(N.a)(Object(N.a)({},Le),l));function je(pe){var Z=pe.target;if(Z.tagName.toUpperCase()==="IMG"){if(xe){var $=Z.getAttribute("src");nt($),tt("image")}}else if(Z.tagName.toUpperCase()==="A"){var re=Z.getAttribute("href");if(re.indexOf("office")>-1)pe.preventDefault(),nt(re),tt("office");else if(re.indexOf("application/pdf")>-1)pe.preventDefault(),nt(re),tt("pdf");else if(re.indexOf("text/html")>-1)pe.preventDefault(),nt(re),tt("html");else if(re.startsWith("#")){pe.preventDefault();var oe=document.getElementById(re.replace("#",""));oe&&oe.scrollIntoView(!0)}}}var ve=function(){var Z,$=(Z=Se.current)===null||Z===void 0?void 0:Z.querySelectorAll("video");$==null||$.forEach(function(re){if(re.oncontextmenu=function(){return!1},re.src.indexOf(".m3u8")>-1&&!re.canPlayType("application/vnd.apple.mpegurl")){if(U.a.isSupported()){var oe=new U.a;oe.loadSource(re.src),oe.attachMedia(re)}}})};Object(W.useEffect)(function(){if(Se.current&&Xe&&(Xe.match(te)&&window.PR.prettyPrint()),Se.current)return Se.current.addEventListener("click",je),function(){Se.current.removeEventListener("click",je),y(),i()}},[Xe,Se.current,je]);var ce=function(Z){if(!he)return;Z.target.nodeName==="IMG"?(Ie.current.style.display="flex",Ie.current.style.width=Z.target.clientWidth+"px",Ie.current.style.height=Z.target.clientHeight+"px",Ie.current.style.top=Z.target.offsetTop+"px",Ie.current.style.left=Z.target.offsetLeft+"px",Ge.current.src=Z.target.getAttribute("src")):Ie.current.style.display="none"};return F.a.createElement("div",{style:{position:"relative"}},F.a.createElement("div",{ref:Se,style:Object(N.a)({},Le),className:"".concat(J||""," markdown-body ").concat(q.a.mdBody),onMouseOver:ce,dangerouslySetInnerHTML:{__html:Xe}}),F.a.createElement("div",{ref:Ie,className:q.a.button},F.a.createElement(V.a,null,F.a.createElement(z.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),F.a.createElement(z.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),F.a.createElement("img",{ref:Ge,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),F.a.createElement(j.a,{close:!0,data:Ke,type:Ke!=null&&Ke.length?Re:"",style:Object(N.a)({},ke),onClose:function(){return nt("")}}))}},"9VGf":function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return D});var ne=Y("cDcd"),V=Y.n(ne);function D(z,N){var k=Object(ne.useRef)();Object(ne.useEffect)(function(){k.current=z}),Object(ne.useEffect)(function(){function W(){k.current()}if(N!==null){var F=setInterval(W,N);return function(){return clearInterval(F)}}},[N])}},"A/g1":function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodH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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(Pe,we,Y){"use strict";Y.d(we,"a",function(){return k});var ne=Y("MNnm"),V="rc-util-key";function D(W){if(W.attachTo)return W.attachTo;var F=document.querySelector("head");return F||document.body}function z(W){var F,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ne.a)())return null;var R=document.createElement("style");if((F=M.csp)===null||F===void 0?void 0:F.nonce){var v;R.nonce=(v=M.csp)===null||v===void 0?void 0:v.nonce}R.innerHTML=W;var m=D(M),p=m.firstChild;return M.prepend&&m.prepend?m.prepend(R):M.prepend&&p?m.insertBefore(R,p):m.appendChild(R),R}var N=new Map;function k(W,F){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=D(M);if(!N.has(R)){var v=z("",M),m=v.parentNode;N.set(R,m),m.removeChild(v)}var p=Array.from(N.get(R).children).find(function(i){return i.tagName==="STYLE"&&i[V]===F});if(p){var c,o;if(((c=M.csp)===null||c===void 0?void 0:c.nonce)&&p.nonce!==((o=M.csp)===null||o===void 0?void 0:o.nonce)){var h;p.nonce=(h=M.csp)===null||h===void 0?void 0:h.nonce}return p.innerHTML!==W&&(p.innerHTML=W),p}var s=z(W,M);return s[V]=F,s}},Bd2K:function(Pe,we,Y){(function(ne){ne(Y("VrN/"),Y("osHv"))})(function(ne){ne.defineOption("autoCloseTags",!1,function(M,R,v){if(v!=ne.Init&&v&&M.removeKeyMap("autoCloseTags"),!R)return;var m={name:"autoCloseTags"};(typeof R!="object"||R.whenClosing!==!1)&&(m["'/'"]=function(p){return k(p)}),(typeof R!="object"||R.whenOpening!==!1)&&(m["'>'"]=function(p){return z(p)}),M.addKeyMap(m)});var V=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],D=["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 z(M){if(M.getOption("disableInput"))return ne.Pass;for(var R=M.listSelections(),v=[],m=M.getOption("autoCloseTags"),p=0;p<R.length;p++){if(!R[p].empty())return ne.Pass;var c=R[p].head,o=M.getTokenAt(c),h=ne.innerMode(M.getMode(),o.state),s=h.state,i=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(s),l=i&&i.name;if(!l)return ne.Pass;var f=h.mode.configuration=="html",O=typeof m=="object"&&m.dontCloseTags||f&&V,A=typeof m=="object"&&m.indentTags||f&&D;o.end>c.ch&&(l=l.slice(0,l.length-o.end+c.ch));var T=l.toLowerCase();if(!l||o.type=="string"&&(o.end!=c.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&i.close||o.string.indexOf("/")==c.ch-o.start-1||O&&W(O,T)>-1||F(M,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(s)||[],l,c,!0))return ne.Pass;var w=typeof m=="object"&&m.emptyTags;if(w&&W(w,l)>-1){v[p]={text:"/>",newPos:ne.Pos(c.line,c.ch+2)};continue}var S=A&&W(A,T)>-1;v[p]={indent:S,text:">"+(S?`
|
|
|
|
`:"")+"</"+l+">",newPos:S?ne.Pos(c.line+1,0):ne.Pos(c.line,c.ch+1)}}for(var x=typeof m=="object"&&m.dontIndentOnAutoClose,p=R.length-1;p>=0;p--){var d=v[p];M.replaceRange(d.text,R[p].head,R[p].anchor,"+insert");var y=M.listSelections().slice(0);y[p]={head:d.newPos,anchor:d.newPos},M.setSelections(y),!x&&d.indent&&(M.indentLine(d.newPos.line,null,!0),M.indentLine(d.newPos.line+1,null,!0))}}function N(M,R){for(var v=M.listSelections(),m=[],p=R?"/":"</",c=M.getOption("autoCloseTags"),o=typeof c=="object"&&c.dontIndentOnSlash,h=0;h<v.length;h++){if(!v[h].empty())return ne.Pass;var s=v[h].head,i=M.getTokenAt(s),l=ne.innerMode(M.getMode(),i.state),f=l.state;if(R&&(i.type=="string"||i.string.charAt(0)!="<"||i.start!=s.ch-1))return ne.Pass;var O,A=l.mode.name!="xml"&&M.getMode().name=="htmlmixed";if(A&&l.mode.name=="javascript")O=p+"script";else if(A&&l.mode.name=="css")O=p+"style";else{var T=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(f);if(!T||T.length&&F(M,T,T[T.length-1],s))return ne.Pass;O=p+T[T.length-1]}M.getLine(s.line).charAt(i.end)!=">"&&(O+=">"),m[h]=O}if(M.replaceSelections(m),v=M.listSelections(),!o)for(var h=0;h<v.length;h++)(h==v.length-1||v[h].head.line<v[h+1].head.line)&&M.indentLine(v[h].head.line)}function k(M){return M.getOption("disableInput")?ne.Pass:N(M,!0)}ne.commands.closeTag=function(M){return N(M)};function W(M,R){if(M.indexOf)return M.indexOf(R);for(var v=0,m=M.length;v<m;++v)if(M[v]==R)return v;return-1}function F(M,R,v,m,p){if(!ne.scanForClosingTag)return!1;var c=Math.min(M.lastLine()+1,m.line+500),o=ne.scanForClosingTag(M,m,null,c);if(!o||o.tag!=v)return!1;for(var h=p?1:0,s=R.length-1;s>=0&&R[s]==v;s--)++h;m=o.to;for(var s=1;s<h;s++){var i=ne.scanForClosingTag(M,m,null,c);if(!i||i.tag!=v)return!1;m=i.to}return!0}})},BjJ7:function(Pe,we,Y){"use strict";Y.d(we,"d",function(){return V}),Y.d(we,"c",function(){return D}),Y.d(we,"e",function(){return z}),Y.d(we,"b",function(){return N}),Y.d(we,"a",function(){return W});var ne=Y("m3rI");function V(F){var M=!0;if(F.length>0){for(var R=0;R<F.length;R++)if(F[R].compile_success==0||!F[R].compile_success){M=!1;break}}else M=!1;return M}function D(F){for(var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",R=[],v=0;v<F.length;v++){var m=F[v],p=M?"".concat(M,"/").concat(m.name):"".concat(m.name);R.push({title:m.name,isLeaf:!(m.type==="tree"),key:p})}return R}function z(F,M,R){for(var v=0;v<F.length;v++){var m=F[v];if(m.key===M){m.children=R;break}m.children&&z(m.children,M,R)}return F}function N(F,M,R){var v;return function(){var m=this,p=arguments,c=function(){v=null,R||F.apply(m,p)},o=R&&!v;clearTimeout(v),v=setTimeout(c,M),o&&F.apply(m,p)}}var k=!0,W=ne.a.API_SERVER},"C+DQ":function(Pe,we,Y){},DlQD:function(Pe,we,Y){(function(ne,V){Pe.exports=V()})(this,function(){"use strict";function ne(ve,ce){for(var pe=0;pe<ce.length;pe++){var Z=ce[pe];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(ve,Z.key,Z)}}function V(ve,ce,pe){return ce&&ne(ve.prototype,ce),pe&&ne(ve,pe),ve}function D(ve,ce){if(!ve)return;if(typeof ve=="string")return z(ve,ce);var pe=Object.prototype.toString.call(ve).slice(8,-1);if(pe==="Object"&&ve.constructor&&(pe=ve.constructor.name),pe==="Map"||pe==="Set")return Array.from(ve);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return z(ve,ce)}function z(ve,ce){(ce==null||ce>ve.length)&&(ce=ve.length);for(var pe=0,Z=new Array(ce);pe<ce;pe++)Z[pe]=ve[pe];return Z}function N(ve,ce){var pe;if(typeof Symbol=="undefined"||ve[Symbol.iterator]==null){if(Array.isArray(ve)||(pe=D(ve))||ce&&ve&&typeof ve.length=="number"){pe&&(ve=pe);var Z=0;return function(){return Z>=ve.length?{done:!0}:{done:!1,value:ve[Z++]}}}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=ve[Symbol.iterator](),pe.next.bind(pe)}function k(ve,ce){return ce={exports:{}},ve(ce,ce.exports),ce.exports}var W=k(function(ve){function ce(){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(Z){ve.exports.defaults=Z}ve.exports={defaults:ce(),getDefaults:ce,changeDefaults:pe}}),F=W.defaults,M=W.getDefaults,R=W.changeDefaults,v=/[&<>"']/,m=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(ce){return o[ce]};function s(ve,ce){if(ce){if(v.test(ve))return ve.replace(m,h)}else if(p.test(ve))return ve.replace(c,h);return ve}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ve){return ve.replace(i,function(ce,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 f=/(^|[^\[])\^/g;function O(ve,ce){ve=ve.source||ve,ce=ce||"";var pe={replace:function($,re){return re=re.source||re,re=re.replace(f,"$1"),ve=ve.replace($,re),pe},getRegex:function(){return new RegExp(ve,ce)}};return pe}var A=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(ve,ce,pe){if(ve){var Z;try{Z=decodeURIComponent(l(pe)).replace(A,"").toLowerCase()}catch($){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}ce&&!T.test(pe)&&(pe=u(ce,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch($){return null}return pe}var S={},x=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(ve,ce){S[" "+ve]||(x.test(ve)?S[" "+ve]=ve+"/":S[" "+ve]=P(ve,"/",!0)),ve=S[" "+ve];var pe=ve.indexOf(":")===-1;return ce.substring(0,2)==="//"?pe?ce:ve.replace(d,"$1")+ce:ce.charAt(0)==="/"?pe?ce:ve.replace(y,"$1")+ce:ve+ce}var E={exec:function(){}};function g(ve){for(var ce=1,pe,Z;ce<arguments.length;ce++){pe=arguments[ce];for(Z in pe)Object.prototype.hasOwnProperty.call(pe,Z)&&(ve[Z]=pe[Z])}return ve}function b(ve,ce){var pe=ve.replace(/\|/g,function(re,oe,ge){for(var Ce=!1,Fe=oe;--Fe>=0&&ge[Fe]==="\\";)Ce=!Ce;return Ce?"|":" |"}),Z=pe.split(/ \|/),$=0;if(Z.length>ce)Z.splice(ce);else for(;Z.length<ce;)Z.push("");for(;$<Z.length;$++)Z[$]=Z[$].trim().replace(/\\\|/g,"|");return Z}function P(ve,ce,pe){var Z=ve.length;if(Z===0)return"";for(var $=0;$<Z;){var re=ve.charAt(Z-$-1);if(re===ce&&!pe)$++;else if(re!==ce&&pe)$++;else break}return ve.substr(0,Z-$)}function L(ve,ce){if(ve.indexOf(ce[1])===-1)return-1;for(var pe=ve.length,Z=0,$=0;$<pe;$++)if(ve[$]==="\\")$++;else if(ve[$]===ce[0])Z++;else if(ve[$]===ce[1]&&(Z--,Z<0))return $;return-1}function B(ve){ve&&ve.sanitize&&!ve.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 U={escape:s,unescape:l,edit:O,cleanUrl:w,resolveUrl:u,noopTest:E,merge:g,splitCells:b,rtrim:P,findClosingBracket:L,checkSanitizeDeprecation:B},C=W.defaults,_=U.rtrim,j=U.splitCells,K=U.escape,q=U.findClosingBracket;function te(ve,ce,pe){var Z=ce.href,$=ce.title?K(ce.title):null,re=ve[1].replace(/\\([\[\]])/g,"$1");return ve[0].charAt(0)!=="!"?{type:"link",raw:pe,href:Z,title:$,text:re}:{type:"image",raw:pe,href:Z,title:$,text:K(re)}}function _e(ve,ce){var pe=ve.match(/^(\s+)(?:```)/);if(pe===null)return ce;var Z=pe[1];return ce.split(`
|
|
`).map(function($){var re=$.match(/^\s+/);if(re===null)return $;var oe=re[0];return oe.length>=Z.length?$.slice(Z.length):$}).join(`
|
|
`)}var ue=function(){function ve(pe){this.options=pe||C}var ce=ve.prototype;return ce.space=function(Z){var $=this.rules.block.newline.exec(Z);if($)return $[0].length>1?{type:"space",raw:$[0]}:{raw:`
|
|
`}},ce.code=function(Z,$){var re=this.rules.block.code.exec(Z);if(re){var oe=$[$.length-1];if(oe&&oe.type==="paragraph")return{raw:re[0],text:re[0].trimRight()};var ge=re[0].replace(/^ {4}/gm,"");return{type:"code",raw:re[0],codeBlockStyle:"indented",text:this.options.pedantic?ge:_(ge,`
|
|
`)}}},ce.fences=function(Z){var $=this.rules.block.fences.exec(Z);if($){var re=$[0],oe=_e(re,$[3]||"");return{type:"code",raw:re,lang:$[2]?$[2].trim():$[2],text:oe}}},ce.heading=function(Z){var $=this.rules.block.heading.exec(Z);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},ce.nptable=function(Z){var $=this.rules.block.nptable.exec(Z);if($){var re={type:"table",header:j($[1].replace(/^ *| *\| *$/g,"")),align:$[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:$[3]?$[3].replace(/\n$/,"").split(`
|
|
`):[],raw:$[0]};if(re.header.length===re.align.length){var oe=re.align.length,ge;for(ge=0;ge<oe;ge++)/^ *-+: *$/.test(re.align[ge])?re.align[ge]="right":/^ *:-+: *$/.test(re.align[ge])?re.align[ge]="center":/^ *:-+ *$/.test(re.align[ge])?re.align[ge]="left":re.align[ge]=null;for(oe=re.cells.length,ge=0;ge<oe;ge++)re.cells[ge]=j(re.cells[ge],re.header.length);return re}}},ce.hr=function(Z){var $=this.rules.block.hr.exec(Z);if($)return{type:"hr",raw:$[0]}},ce.blockquote=function(Z){var $=this.rules.block.blockquote.exec(Z);if($){var re=$[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:$[0],text:re}}},ce.list=function(Z){var $=this.rules.block.list.exec(Z);if($){for(var re=$[0],oe=$[2],ge=oe.length>1,Ce=oe[oe.length-1]===")",Fe={type:"list",raw:re,ordered:ge,start:ge?+oe.slice(0,-1):"",loose:!1,items:[]},et=$[0].match(this.rules.block.item),rt=!1,De,St,ht,Me,yt,Et,$t,Yt=et.length,Tt=0;Tt<Yt;Tt++)De=et[Tt],re=De,St=De.length,De=De.replace(/^ *([*+-]|\d+[.)]) */,""),~De.indexOf(`
|
|
`)&&(St-=De.length,De=this.options.pedantic?De.replace(/^ {1,4}/gm,""):De.replace(new RegExp("^ {1,"+St+"}","gm"),"")),Tt!==Yt-1&&(ht=this.rules.block.bullet.exec(et[Tt+1])[0],(ge?ht.length===1||!Ce&&ht[ht.length-1]===")":ht.length>1||this.options.smartLists&&ht!==oe)&&(Me=et.slice(Tt+1).join(`
|
|
`),Fe.raw=Fe.raw.substring(0,Fe.raw.length-Me.length),Tt=Yt-1)),yt=rt||/\n\n(?!\s*$)/.test(De),Tt!==Yt-1&&(rt=De.charAt(De.length-1)===`
|
|
`,yt||(yt=rt)),yt&&(Fe.loose=!0),Et=/^\[[ xX]\] /.test(De),$t=void 0,Et&&($t=De[1]!==" ",De=De.replace(/^\[[ xX]\] +/,"")),Fe.items.push({type:"list_item",raw:re,task:Et,checked:$t,loose:yt,text:De});return Fe}},ce.html=function(Z){var $=this.rules.block.html.exec(Z);if($)return{type:this.options.sanitize?"paragraph":"html",raw:$[0],pre:!this.options.sanitizer&&($[1]==="pre"||$[1]==="script"||$[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer($[0]):K($[0]):$[0]}},ce.def=function(Z){var $=this.rules.block.def.exec(Z);if($){$[3]&&($[3]=$[3].substring(1,$[3].length-1));var re=$[1].toLowerCase().replace(/\s+/g," ");return{tag:re,raw:$[0],href:$[2],title:$[3]}}},ce.table=function(Z){var $=this.rules.block.table.exec(Z);if($){var re={type:"table",header:j($[1].replace(/^ *| *\| *$/g,"")),align:$[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:$[3]?$[3].replace(/\n$/,"").split(`
|
|
`):[]};if(re.header.length===re.align.length){re.raw=$[0];var oe=re.align.length,ge;for(ge=0;ge<oe;ge++)/^ *-+: *$/.test(re.align[ge])?re.align[ge]="right":/^ *:-+: *$/.test(re.align[ge])?re.align[ge]="center":/^ *:-+ *$/.test(re.align[ge])?re.align[ge]="left":re.align[ge]=null;for(oe=re.cells.length,ge=0;ge<oe;ge++)re.cells[ge]=j(re.cells[ge].replace(/^ *\| *| *\| *$/g,""),re.header.length);return re}}},ce.lheading=function(Z){var $=this.rules.block.lheading.exec(Z);if($)return{type:"heading",raw:$[0],depth:$[2].charAt(0)==="="?1:2,text:$[1]}},ce.paragraph=function(Z){var $=this.rules.block.paragraph.exec(Z);if($)return{type:"paragraph",raw:$[0],text:$[1].charAt($[1].length-1)===`
|
|
`?$[1].slice(0,-1):$[1]}},ce.text=function(Z,$){var re=this.rules.block.text.exec(Z);if(re){var oe=$[$.length-1];return oe&&oe.type==="text"?{raw:re[0],text:re[0]}:{type:"text",raw:re[0],text:re[0]}}},ce.escape=function(Z){var $=this.rules.inline.escape.exec(Z);if($)return{type:"escape",raw:$[0],text:K($[1])}},ce.tag=function(Z,$,re){var oe=this.rules.inline.tag.exec(Z);if(oe)return!$&&/^<a /i.test(oe[0])?$=!0:$&&/^<\/a>/i.test(oe[0])&&($=!1),!re&&/^<(pre|code|kbd|script)(\s|>)/i.test(oe[0])?re=!0:re&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(oe[0])&&(re=!1),{type:this.options.sanitize?"text":"html",raw:oe[0],inLink:$,inRawBlock:re,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):K(oe[0]):oe[0]}},ce.link=function(Z){var $=this.rules.inline.link.exec(Z);if($){var re=q($[2],"()");if(re>-1){var oe=$[0].indexOf("!")===0?5:4,ge=oe+$[1].length+re;$[2]=$[2].substring(0,re),$[0]=$[0].substring(0,ge).trim(),$[3]=""}var Ce=$[2],Fe="";if(this.options.pedantic){var et=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ce);et?(Ce=et[1],Fe=et[3]):Fe=""}else Fe=$[3]?$[3].slice(1,-1):"";Ce=Ce.trim().replace(/^<([\s\S]*)>$/,"$1");var rt=te($,{href:Ce&&Ce.replace(this.rules.inline._escapes,"$1"),title:Fe&&Fe.replace(this.rules.inline._escapes,"$1")},$[0]);return rt}},ce.reflink=function(Z,$){var re;if((re=this.rules.inline.reflink.exec(Z))||(re=this.rules.inline.nolink.exec(Z))){var oe=(re[2]||re[1]).replace(/\s+/g," ");if(oe=$[oe.toLowerCase()],!oe||!oe.href){var ge=re[0].charAt(0);return{type:"text",raw:ge,text:ge}}var Ce=te(re,oe,re[0]);return Ce}},ce.strong=function(Z,$,re){re===void 0&&(re="");var oe=this.rules.inline.strong.start.exec(Z);if(oe&&(!oe[1]||oe[1]&&(re===""||this.rules.inline.punctuation.exec(re)))){$=$.slice(-1*Z.length);var ge=oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ge.lastIndex=0;for(var Ce;(oe=ge.exec($))!=null;)if(Ce=this.rules.inline.strong.middle.exec($.slice(0,oe.index+3)),Ce)return{type:"strong",raw:Z.slice(0,Ce[0].length),text:Z.slice(2,Ce[0].length-2)}}},ce.em=function(Z,$,re){re===void 0&&(re="");var oe=this.rules.inline.em.start.exec(Z);if(oe&&(!oe[1]||oe[1]&&(re===""||this.rules.inline.punctuation.exec(re)))){$=$.slice(-1*Z.length);var ge=oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ge.lastIndex=0;for(var Ce;(oe=ge.exec($))!=null;)if(Ce=this.rules.inline.em.middle.exec($.slice(0,oe.index+2)),Ce)return{type:"em",raw:Z.slice(0,Ce[0].length),text:Z.slice(1,Ce[0].length-1)}}},ce.codespan=function(Z){var $=this.rules.inline.code.exec(Z);if($){var re=$[2].replace(/\n/g," "),oe=/[^ ]/.test(re),ge=re.startsWith(" ")&&re.endsWith(" ");return oe&&ge&&(re=re.substring(1,re.length-1)),re=K(re,!0),{type:"codespan",raw:$[0],text:re}}},ce.br=function(Z){var $=this.rules.inline.br.exec(Z);if($)return{type:"br",raw:$[0]}},ce.del=function(Z){var $=this.rules.inline.del.exec(Z);if($)return{type:"del",raw:$[0],text:$[1]}},ce.autolink=function(Z,$){var re=this.rules.inline.autolink.exec(Z);if(re){var oe,ge;return re[2]==="@"?(oe=K(this.options.mangle?$(re[1]):re[1]),ge="mailto:"+oe):(oe=K(re[1]),ge=oe),{type:"link",raw:re[0],text:oe,href:ge,tokens:[{type:"text",raw:oe,text:oe}]}}},ce.url=function(Z,$){var re;if(re=this.rules.inline.url.exec(Z)){var oe,ge;if(re[2]==="@")oe=K(this.options.mangle?$(re[0]):re[0]),ge="mailto:"+oe;else{var Ce;do Ce=re[0],re[0]=this.rules.inline._backpedal.exec(re[0])[0];while(Ce!==re[0]);oe=K(re[0]),re[1]==="www."?ge="http://"+oe:ge=oe}return{type:"link",raw:re[0],text:oe,href:ge,tokens:[{type:"text",raw:oe,text:oe}]}}},ce.inlineText=function(Z,$,re){var oe=this.rules.inline.text.exec(Z);if(oe){var ge;return $?ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):K(oe[0]):oe[0]:ge=K(this.options.smartypants?re(oe[0]):oe[0]),{type:"text",raw:oe[0],text:ge}}},ve}(),me=U.noopTest,fe=U.edit,le=U.merge,ie={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:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ie._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ie._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ie.def=fe(ie.def).replace("label",ie._label).replace("title",ie._title).getRegex(),ie.bullet=/(?:[*+-]|\d{1,9}[.)])/,ie.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ie.item=fe(ie.item,"gm").replace(/bull/g,ie.bullet).getRegex(),ie.list=fe(ie.list).replace(/bull/g,ie.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ie.def.source+")").getRegex(),ie._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",ie._comment=/<!--(?!-?>)[\s\S]*?-->/,ie.html=fe(ie.html,"i").replace("comment",ie._comment).replace("tag",ie._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie.paragraph=fe(ie._paragraph).replace("hr",ie.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",ie._tag).getRegex(),ie.blockquote=fe(ie.blockquote).replace("paragraph",ie.paragraph).getRegex(),ie.normal=le({},ie),ie.gfm=le({},ie.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*|$)"}),ie.gfm.nptable=fe(ie.gfm.nptable).replace("hr",ie.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",ie._tag).getRegex(),ie.gfm.table=fe(ie.gfm.table).replace("hr",ie.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",ie._tag).getRegex(),ie.pedantic=le({},ie.normal,{html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie._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:me,paragraph:fe(ie.normal._paragraph).replace("hr",ie.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ie.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,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:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};he._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",he.punctuation=fe(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",he._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",he.em.start=fe(he.em.start).replace(/punctuation/g,he._punctuation).getRegex(),he.em.middle=fe(he.em.middle).replace(/punctuation/g,he._punctuation).replace(/overlapSkip/g,he._overlapSkip).getRegex(),he.em.endAst=fe(he.em.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.em.endUnd=fe(he.em.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.start=fe(he.strong.start).replace(/punctuation/g,he._punctuation).getRegex(),he.strong.middle=fe(he.strong.middle).replace(/punctuation/g,he._punctuation).replace(/blockSkip/g,he._blockSkip).getRegex(),he.strong.endAst=fe(he.strong.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.endUnd=fe(he.strong.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=fe(he._blockSkip,"g").getRegex(),he.overlapSkip=fe(he._overlapSkip,"g").getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._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])?)+(?![-_])/,he.autolink=fe(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=fe(he.tag).replace("comment",ie._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=fe(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=fe(he.reflink).replace("label",he._label).getRegex(),he.reflinkSearch=fe(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=le({},he),he.pedantic=le({},he.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:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=le({},he.normal,{escape:fe(he.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),he.gfm.url=fe(he.gfm.url,"i").replace("email",he.gfm._extended_email).getRegex(),he.breaks=le({},he.gfm,{br:fe(he.br).replace("{2,}","*").getRegex(),text:fe(he.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var J={block:ie,inline:he},ae=W.defaults,ee=J.block,be=J.inline;function xe(ve){return ve.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 ye(ve){var ce="",pe,Z,$=ve.length;for(pe=0;pe<$;pe++)Z=ve.charCodeAt(pe),Math.random()>.5&&(Z="x"+Z.toString(16)),ce+="&#"+Z+";";return ce}var Ae=function(){function ve(pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=pe||ae,this.options.tokenizer=this.options.tokenizer||new ue,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Z={block:ee.normal,inline:be.normal};this.options.pedantic?(Z.block=ee.pedantic,Z.inline=be.pedantic):this.options.gfm&&(Z.block=ee.gfm,this.options.breaks?Z.inline=be.breaks:Z.inline=be.gfm),this.tokenizer.rules=Z}ve.lex=function(Z,$){var re=new ve($);return re.lex(Z)};var ce=ve.prototype;return ce.lex=function(Z){return Z=Z.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(Z,this.tokens,!0),this.inline(this.tokens),this.tokens},ce.blockTokens=function(Z,$,re){$===void 0&&($=[]),re===void 0&&(re=!0),Z=Z.replace(/^ +$/gm,"");for(var oe,ge,Ce,Fe;Z;){if(oe=this.tokenizer.space(Z)){Z=Z.substring(oe.raw.length),oe.type&&$.push(oe);continue}if(oe=this.tokenizer.code(Z,$)){Z=Z.substring(oe.raw.length),oe.type?$.push(oe):(Fe=$[$.length-1],Fe.raw+=`
|
|
`+oe.raw,Fe.text+=`
|
|
`+oe.text);continue}if(oe=this.tokenizer.fences(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.heading(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.nptable(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.hr(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.blockquote(Z)){Z=Z.substring(oe.raw.length),oe.tokens=this.blockTokens(oe.text,[],re),$.push(oe);continue}if(oe=this.tokenizer.list(Z)){for(Z=Z.substring(oe.raw.length),Ce=oe.items.length,ge=0;ge<Ce;ge++)oe.items[ge].tokens=this.blockTokens(oe.items[ge].text,[],!1);$.push(oe);continue}if(oe=this.tokenizer.html(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(re&&(oe=this.tokenizer.def(Z))){Z=Z.substring(oe.raw.length),this.tokens.links[oe.tag]||(this.tokens.links[oe.tag]={href:oe.href,title:oe.title});continue}if(oe=this.tokenizer.table(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.lheading(Z)){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(re&&(oe=this.tokenizer.paragraph(Z))){Z=Z.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.text(Z,$)){Z=Z.substring(oe.raw.length),oe.type?$.push(oe):(Fe=$[$.length-1],Fe.raw+=`
|
|
`+oe.raw,Fe.text+=`
|
|
`+oe.text);continue}if(Z){var et="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(et);break}else throw new Error(et)}}return $},ce.inline=function(Z){var $,re,oe,ge,Ce,Fe,et=Z.length;for($=0;$<et;$++){Fe=Z[$];switch(Fe.type){case"paragraph":case"text":case"heading":{Fe.tokens=[],this.inlineTokens(Fe.text,Fe.tokens);break}case"table":{for(Fe.tokens={header:[],cells:[]},ge=Fe.header.length,re=0;re<ge;re++)Fe.tokens.header[re]=[],this.inlineTokens(Fe.header[re],Fe.tokens.header[re]);for(ge=Fe.cells.length,re=0;re<ge;re++)for(Ce=Fe.cells[re],Fe.tokens.cells[re]=[],oe=0;oe<Ce.length;oe++)Fe.tokens.cells[re][oe]=[],this.inlineTokens(Ce[oe],Fe.tokens.cells[re][oe]);break}case"blockquote":{this.inline(Fe.tokens);break}case"list":{for(ge=Fe.items.length,re=0;re<ge;re++)this.inline(Fe.items[re].tokens);break}}}return Z},ce.inlineTokens=function(Z,$,re,oe,ge){$===void 0&&($=[]),re===void 0&&(re=!1),oe===void 0&&(oe=!1),ge===void 0&&(ge="");var Ce,Fe=Z,et;if(this.tokens.links){var rt=Object.keys(this.tokens.links);if(rt.length>0)for(;(et=this.tokenizer.rules.inline.reflinkSearch.exec(Fe))!=null;)rt.includes(et[0].slice(et[0].lastIndexOf("[")+1,-1))&&(Fe=Fe.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+Fe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(et=this.tokenizer.rules.inline.blockSkip.exec(Fe))!=null;)Fe=Fe.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+Fe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Z;){if(Ce=this.tokenizer.escape(Z)){Z=Z.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.tag(Z,re,oe)){Z=Z.substring(Ce.raw.length),re=Ce.inLink,oe=Ce.inRawBlock,$.push(Ce);continue}if(Ce=this.tokenizer.link(Z)){Z=Z.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,oe)),$.push(Ce);continue}if(Ce=this.tokenizer.reflink(Z,this.tokens.links)){Z=Z.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,oe)),$.push(Ce);continue}if(Ce=this.tokenizer.strong(Z,Fe,ge)){Z=Z.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],re,oe),$.push(Ce);continue}if(Ce=this.tokenizer.em(Z,Fe,ge)){Z=Z.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],re,oe),$.push(Ce);continue}if(Ce=this.tokenizer.codespan(Z)){Z=Z.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.br(Z)){Z=Z.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.del(Z)){Z=Z.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],re,oe),$.push(Ce);continue}if(Ce=this.tokenizer.autolink(Z,ye)){Z=Z.substring(Ce.raw.length),$.push(Ce);continue}if(!re&&(Ce=this.tokenizer.url(Z,ye))){Z=Z.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.inlineText(Z,oe,xe)){Z=Z.substring(Ce.raw.length),ge=Ce.raw.slice(-1),$.push(Ce);continue}if(Z){var De="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(De);break}else throw new Error(De)}}return $},V(ve,null,[{key:"rules",get:function(){return{block:ee,inline:be}}}]),ve}(),Le=W.defaults,Ne=U.cleanUrl,ke=U.escape,Oe=function(){function ve(pe){this.options=pe||Le}var ce=ve.prototype;return ce.code=function(Z,$,re){var oe=($||"").match(/\S*/)[0];if(this.options.highlight){var ge=this.options.highlight(Z,oe);ge!=null&&ge!==Z&&(re=!0,Z=ge)}return oe?'<pre><code class="'+this.options.langPrefix+ke(oe,!0)+'">'+(re?Z:ke(Z,!0))+`</code></pre>
|
|
`:"<pre><code>"+(re?Z:ke(Z,!0))+`</code></pre>
|
|
`},ce.blockquote=function(Z){return`<blockquote>
|
|
`+Z+`</blockquote>
|
|
`},ce.html=function(Z){return Z},ce.heading=function(Z,$,re,oe){return this.options.headerIds?"<h"+$+' id="'+this.options.headerPrefix+oe.slug(re)+'">'+Z+"</h"+$+`>
|
|
`:"<h"+$+">"+Z+"</h"+$+`>
|
|
`},ce.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ce.list=function(Z,$,re){var oe=$?"ol":"ul",ge=$&&re!==1?' start="'+re+'"':"";return"<"+oe+ge+`>
|
|
`+Z+"</"+oe+`>
|
|
`},ce.listitem=function(Z){return"<li>"+Z+`</li>
|
|
`},ce.checkbox=function(Z){return"<input "+(Z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ce.paragraph=function(Z){return"<p>"+Z+`</p>
|
|
`},ce.table=function(Z,$){return $&&($="<tbody>"+$+"</tbody>"),`<table>
|
|
<thead>
|
|
`+Z+`</thead>
|
|
`+$+`</table>
|
|
`},ce.tablerow=function(Z){return`<tr>
|
|
`+Z+`</tr>
|
|
`},ce.tablecell=function(Z,$){var re=$.header?"th":"td",oe=$.align?"<"+re+' align="'+$.align+'">':"<"+re+">";return oe+Z+"</"+re+`>
|
|
`},ce.strong=function(Z){return"<strong>"+Z+"</strong>"},ce.em=function(Z){return"<em>"+Z+"</em>"},ce.codespan=function(Z){return"<code>"+Z+"</code>"},ce.br=function(){return this.options.xhtml?"<br/>":"<br>"},ce.del=function(Z){return"<del>"+Z+"</del>"},ce.link=function(Z,$,re){if(Z=Ne(this.options.sanitize,this.options.baseUrl,Z),Z===null)return re;var oe='<a href="'+ke(Z)+'"';return $&&(oe+=' title="'+$+'"'),oe+=">"+re+"</a>",oe},ce.image=function(Z,$,re){if(Z=Ne(this.options.sanitize,this.options.baseUrl,Z),Z===null)return re;var oe='<img src="'+Z+'" alt="'+re+'"';return $&&(oe+=' title="'+$+'"'),oe+=this.options.xhtml?"/>":">",oe},ce.text=function(Z){return Z},ve}(),Ie=function(){function ve(){}var ce=ve.prototype;return ce.strong=function(Z){return Z},ce.em=function(Z){return Z},ce.codespan=function(Z){return Z},ce.del=function(Z){return Z},ce.html=function(Z){return Z},ce.text=function(Z){return Z},ce.link=function(Z,$,re){return""+re},ce.image=function(Z,$,re){return""+re},ce.br=function(){return""},ve}(),Ge=function(){function ve(){this.seen={}}var ce=ve.prototype;return ce.slug=function(Z){var $=Z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty($)){var re=$;do this.seen[re]++,$=re+"-"+this.seen[re];while(this.seen.hasOwnProperty($))}return this.seen[$]=0,$},ve}(),Je=W.defaults,Ve=U.unescape,Ke=function(){function ve(pe){this.options=pe||Je,this.options.renderer=this.options.renderer||new Oe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new Ge}ve.parse=function(Z,$){var re=new ve($);return re.parse(Z)};var ce=ve.prototype;return ce.parse=function(Z,$){$===void 0&&($=!0);var re="",oe,ge,Ce,Fe,et,rt,De,St,ht,Me,yt,Et,$t,Yt,Tt,_n,Bn,ft,gt=Z.length;for(oe=0;oe<gt;oe++){Me=Z[oe];switch(Me.type){case"space":continue;case"hr":{re+=this.renderer.hr();continue}case"heading":{re+=this.renderer.heading(this.parseInline(Me.tokens),Me.depth,Ve(this.parseInline(Me.tokens,this.textRenderer)),this.slugger);continue}case"code":{re+=this.renderer.code(Me.text,Me.lang,Me.escaped);continue}case"table":{for(St="",De="",Fe=Me.header.length,ge=0;ge<Fe;ge++)De+=this.renderer.tablecell(this.parseInline(Me.tokens.header[ge]),{header:!0,align:Me.align[ge]});for(St+=this.renderer.tablerow(De),ht="",Fe=Me.cells.length,ge=0;ge<Fe;ge++){for(rt=Me.tokens.cells[ge],De="",et=rt.length,Ce=0;Ce<et;Ce++)De+=this.renderer.tablecell(this.parseInline(rt[Ce]),{header:!1,align:Me.align[Ce]});ht+=this.renderer.tablerow(De)}re+=this.renderer.table(St,ht);continue}case"blockquote":{ht=this.parse(Me.tokens),re+=this.renderer.blockquote(ht);continue}case"list":{for(yt=Me.ordered,Et=Me.start,$t=Me.loose,Fe=Me.items.length,ht="",ge=0;ge<Fe;ge++)Tt=Me.items[ge],_n=Tt.checked,Bn=Tt.task,Yt="",Tt.task&&(ft=this.renderer.checkbox(_n),$t?Tt.tokens.length>0&&Tt.tokens[0].type==="text"?(Tt.tokens[0].text=ft+" "+Tt.tokens[0].text,Tt.tokens[0].tokens&&Tt.tokens[0].tokens.length>0&&Tt.tokens[0].tokens[0].type==="text"&&(Tt.tokens[0].tokens[0].text=ft+" "+Tt.tokens[0].tokens[0].text)):Tt.tokens.unshift({type:"text",text:ft}):Yt+=ft),Yt+=this.parse(Tt.tokens,$t),ht+=this.renderer.listitem(Yt,Bn,_n);re+=this.renderer.list(ht,yt,Et);continue}case"html":{re+=this.renderer.html(Me.text);continue}case"paragraph":{re+=this.renderer.paragraph(this.parseInline(Me.tokens));continue}case"text":{for(ht=Me.tokens?this.parseInline(Me.tokens):Me.text;oe+1<gt&&Z[oe+1].type==="text";)Me=Z[++oe],ht+=`
|
|
`+(Me.tokens?this.parseInline(Me.tokens):Me.text);re+=$?this.renderer.paragraph(ht):ht;continue}default:{var xt='Token with "'+Me.type+'" type was not found.';if(this.options.silent){console.error(xt);return}else throw new Error(xt)}}}return re},ce.parseInline=function(Z,$){$=$||this.renderer;var re="",oe,ge,Ce=Z.length;for(oe=0;oe<Ce;oe++){ge=Z[oe];switch(ge.type){case"escape":{re+=$.text(ge.text);break}case"html":{re+=$.html(ge.text);break}case"link":{re+=$.link(ge.href,ge.title,this.parseInline(ge.tokens,$));break}case"image":{re+=$.image(ge.href,ge.title,ge.text);break}case"strong":{re+=$.strong(this.parseInline(ge.tokens,$));break}case"em":{re+=$.em(this.parseInline(ge.tokens,$));break}case"codespan":{re+=$.codespan(ge.text);break}case"br":{re+=$.br();break}case"del":{re+=$.del(this.parseInline(ge.tokens,$));break}case"text":{re+=$.text(ge.text);break}default:{var Fe='Token with "'+ge.type+'" type was not found.';if(this.options.silent){console.error(Fe);return}else throw new Error(Fe)}}}return re},ve}(),nt=U.merge,Qe=U.checkSanitizeDeprecation,Ze=U.escape,Re=W.getDefaults,tt=W.changeDefaults,Xe=W.defaults;function Se(ve,ce,pe){if(typeof ve=="undefined"||ve===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ve!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ve)+", string expected");if(typeof ce=="function"&&(pe=ce,ce=null),ce=nt({},Se.defaults,ce||{}),Qe(ce),pe){var Z=ce.highlight,$;try{$=Ae.lex(ve,ce)}catch(Ce){return pe(Ce)}var re=function(Fe){var et;if(!Fe)try{et=Ke.parse($,ce)}catch(rt){Fe=rt}return ce.highlight=Z,Fe?pe(Fe):pe(null,et)};if(!Z||Z.length<3)return re();if(delete ce.highlight,!$.length)return re();var oe=0;Se.walkTokens($,function(Ce){Ce.type==="code"&&(oe++,setTimeout(function(){Z(Ce.text,Ce.lang,function(Fe,et){if(Fe)return re(Fe);et!=null&&et!==Ce.text&&(Ce.text=et,Ce.escaped=!0),oe--,oe===0&&re()})},0))}),oe===0&&re();return}try{var ge=Ae.lex(ve,ce);return ce.walkTokens&&Se.walkTokens(ge,ce.walkTokens),Ke.parse(ge,ce)}catch(Ce){if(Ce.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ce.silent)return"<p>An error occurred:</p><pre>"+Ze(Ce.message+"",!0)+"</pre>";throw Ce}}Se.options=Se.setOptions=function(ve){return nt(Se.defaults,ve),tt(Se.defaults),Se},Se.getDefaults=Re,Se.defaults=Xe,Se.use=function(ve){var ce=nt({},ve);if(ve.renderer&&function(){var Z=Se.defaults.renderer||new Oe,$=function(ge){var Ce=Z[ge];Z[ge]=function(){for(var Fe=arguments.length,et=new Array(Fe),rt=0;rt<Fe;rt++)et[rt]=arguments[rt];var De=ve.renderer[ge].apply(Z,et);return De===!1&&(De=Ce.apply(Z,et)),De}};for(var re in ve.renderer)$(re);ce.renderer=Z}(),ve.tokenizer&&function(){var Z=Se.defaults.tokenizer||new ue,$=function(ge){var Ce=Z[ge];Z[ge]=function(){for(var Fe=arguments.length,et=new Array(Fe),rt=0;rt<Fe;rt++)et[rt]=arguments[rt];var De=ve.tokenizer[ge].apply(Z,et);return De===!1&&(De=Ce.apply(Z,et)),De}};for(var re in ve.tokenizer)$(re);ce.tokenizer=Z}(),ve.walkTokens){var pe=Se.defaults.walkTokens;ce.walkTokens=function(Z){ve.walkTokens(Z),pe&&pe(Z)}}Se.setOptions(ce)},Se.walkTokens=function(ve,ce){for(var pe=N(ve),Z;!(Z=pe()).done;){var $=Z.value;ce($);switch($.type){case"table":{for(var re=N($.tokens.header),oe;!(oe=re()).done;){var ge=oe.value;Se.walkTokens(ge,ce)}for(var Ce=N($.tokens.cells),Fe;!(Fe=Ce()).done;)for(var et=Fe.value,rt=N(et),De;!(De=rt()).done;){var St=De.value;Se.walkTokens(St,ce)}break}case"list":{Se.walkTokens($.items,ce);break}default:$.tokens&&Se.walkTokens($.tokens,ce)}}},Se.Parser=Ke,Se.parser=Ke.parse,Se.Renderer=Oe,Se.TextRenderer=Ie,Se.Lexer=Ae,Se.lexer=Ae.lex,Se.Tokenizer=ue,Se.Slugger=Ge,Se.parse=Se;var je=Se;return je})},E7E6:function(Pe,we){Pe.exports="data:image/png;base64,iVB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7gCiL5E4XB4MZEMEdEdUsps9/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(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){var V={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},D=ne.Pos;ne.defineOption("autoCloseBrackets",!1,function(o,h,s){s&&s!=ne.Init&&(o.removeKeyMap(N),o.state.closeBrackets=null),h&&(k(z(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(N))});function z(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:V[h]}var N={Backspace:M,Enter:R};function k(o){for(var h=0;h<o.length;h++){var s=o.charAt(h),i="'"+s+"'";N[i]||(N[i]=W(s))}}k(V.pairs+"`");function W(o){return function(h){return m(h,o)}}function F(o){var h=o.state.closeBrackets;if(!h||h.override)return h;var s=o.getModeAt(o.getCursor());return s.closeBrackets||h}function M(o){var h=F(o);if(!h||o.getOption("disableInput"))return ne.Pass;for(var s=z(h,"pairs"),i=o.listSelections(),l=0;l<i.length;l++){if(!i[l].empty())return ne.Pass;var f=p(o,i[l].head);if(!f||s.indexOf(f)%2!=0)return ne.Pass}for(var l=i.length-1;l>=0;l--){var O=i[l].head;o.replaceRange("",D(O.line,O.ch-1),D(O.line,O.ch+1),"+delete")}}function R(o){var h=F(o),s=h&&z(h,"explode");if(!s||o.getOption("disableInput"))return ne.Pass;for(var i=o.listSelections(),l=0;l<i.length;l++){if(!i[l].empty())return ne.Pass;var f=p(o,i[l].head);if(!f||s.indexOf(f)%2!=0)return ne.Pass}o.operation(function(){var O=o.lineSeparator()||`
|
|
`;o.replaceSelection(O+O,null),o.execCommand("goCharLeft"),i=o.listSelections();for(var A=0;A<i.length;A++){var T=i[A].head.line;o.indentLine(T,null,!0),o.indentLine(T+1,null,!0)}})}function v(o){var h=ne.cmpPos(o.anchor,o.head)>0;return{anchor:new D(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new D(o.head.line,o.head.ch+(h?1:-1))}}function m(o,h){var s=F(o);if(!s||o.getOption("disableInput"))return ne.Pass;var i=z(s,"pairs"),l=i.indexOf(h);if(l==-1)return ne.Pass;for(var f=z(s,"closeBefore"),O=z(s,"triples"),A=i.charAt(l+1)==h,T=o.listSelections(),w=l%2==0,S,x=0;x<T.length;x++){var d=T[x],y=d.head,u,E=o.getRange(y,D(y.line,y.ch+1));if(w&&!d.empty())u="surround";else if((A||!w)&&E==h)A&&c(o,y)?u="both":O.indexOf(h)>=0&&o.getRange(y,D(y.line,y.ch+3))==h+h+h?u="skipThree":u="skip";else if(A&&y.ch>1&&O.indexOf(h)>=0&&o.getRange(D(y.line,y.ch-2),y)==h+h){if(y.ch>2&&/\bstring/.test(o.getTokenTypeAt(D(y.line,y.ch-2))))return ne.Pass;u="addFour"}else if(A){var g=y.ch==0?" ":o.getRange(D(y.line,y.ch-1),y);if(!ne.isWordChar(E)&&g!=h&&!ne.isWordChar(g))u="both";else return ne.Pass}else if(w&&(E.length===0||/\s/.test(E)||f.indexOf(E)>-1))u="both";else return ne.Pass;if(!S)S=u;else if(S!=u)return ne.Pass}var b=l%2?i.charAt(l-1):h,P=l%2?h:i.charAt(l+1);o.operation(function(){if(S=="skip")o.execCommand("goCharRight");else if(S=="skipThree")for(var L=0;L<3;L++)o.execCommand("goCharRight");else if(S=="surround"){for(var B=o.getSelections(),L=0;L<B.length;L++)B[L]=b+B[L]+P;o.replaceSelections(B,"around"),B=o.listSelections().slice();for(var L=0;L<B.length;L++)B[L]=v(B[L]);o.setSelections(B)}else S=="both"?(o.replaceSelection(b+P,null),o.triggerElectric(b+P),o.execCommand("goCharLeft")):S=="addFour"&&(o.replaceSelection(b+b+b+b,"before"),o.execCommand("goCharRight"))})}function p(o,h){var s=o.getRange(D(h.line,h.ch-1),D(h.line,h.ch+1));return s.length==2?s:null}function c(o,h){var s=o.getTokenAt(D(h.line,h.ch+1));return/\bstring/.test(s.type)&&s.start==h.ch&&(h.ch==0||!/\bstring/.test(o.getTokenTypeAt(h)))}})},FOrL:function(Pe,we,Y){Pe.exports=Y.p+"static/nodata.a6b3f948.png"},FPkq:function(Pe,we,Y){Pe.exports=Y.p+"static/qrCode.dd0fe9b2.png"},GABl:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1R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XBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GfqC:function(Pe,we,Y){"use strict";var ne=Y("cDcd"),V=Y.n(ne),D=Y("TSYQ"),z=Y.n(D);function N(U,C){var _="cannot "+U.method+" "+U.action+" "+C.status+"'",j=new Error(_);return j.status=C.status,j.method=U.method,j.url=U.action,j}function k(U){var C=U.responseText||U.response;if(!C)return C;try{return JSON.parse(C)}catch(_){return C}}function W(U){var C=new XMLHttpRequest;U.onProgress&&C.upload&&(C.upload.onprogress=function(q){q.total>0&&(q.percent=q.loaded/q.total*100),U.onProgress(q)});var _=new FormData;U.data&&Object.keys(U.data).forEach(function(K){var q=U.data[K];if(Array.isArray(q)){q.forEach(function(te){_.append(K+"[]",te)});return}_.append(K,U.data[K])}),U.file instanceof Blob?_.append(U.filename,U.file,U.file.name):_.append(U.filename,U.file),C.onerror=function(q){U.onError(q)},C.onload=function(){return C.status<200||C.status>=300?U.onError(N(U,C),k(C)):U.onSuccess(k(C),C)},C.open(U.method,U.action,!0),U.withCredentials&&"withCredentials"in C&&(C.withCredentials=!0);var j=U.headers||{};return j["X-Requested-With"]!==null&&C.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(j).forEach(function(K){j[K]!==null&&C.setRequestHeader(K,j[K])}),C.send(_),{abort:function(){C.abort()}}}var F=+new Date,M=0;function R(){return"rc-upload-"+F+"-"+ ++M}function v(U,C){return U.indexOf(C,U.length-C.length)!==-1}var m=function(U,C){if(U&&C){var _=Array.isArray(C)?C:C.split(","),j=U.name||"",K=U.type||"",q=K.replace(/\/.*$/,"");return _.some(function(te){var _e=te.trim();return _e.charAt(0)==="."?v(j.toLowerCase(),_e.toLowerCase()):/\/\*$/.test(_e)?q===_e.replace(/\/.*$/,""):K===_e})}return!0};function p(U,C){var _=U.createReader(),j=[];function K(){_.readEntries(function(q){var te=Array.prototype.slice.apply(q);j=j.concat(te);var _e=!te.length;_e?C(j):K()})}K()}var c=function(C,_,j){var K=function q(te,_e){_e=_e||"",te.isFile?te.file(function(ue){j(ue)&&(te.fullPath&&!ue.webkitRelativePath&&(Object.defineProperties(ue,{webkitRelativePath:{writable:!0}}),ue.webkitRelativePath=te.fullPath.replace(/^\//,""),Object.defineProperties(ue,{webkitRelativePath:{writable:!1}})),_([ue]))}):te.isDirectory&&p(te,function(ue){ue.forEach(function(me){q(me,""+_e+te.name+"/")})})};C.forEach(function(q){K(q.webkitGetAsEntry())})},o=c,h=Object.assign||function(U){for(var C=1;C<arguments.length;C++){var _=arguments[C];for(var j in _)Object.prototype.hasOwnProperty.call(_,j)&&(U[j]=_[j])}return U},s=function(){function U(C,_){var j=[],K=!0,q=!1,te=void 0;try{for(var _e=C[Symbol.iterator](),ue;!(K=(ue=_e.next()).done)&&!(j.push(ue.value),_&&j.length===_);K=!0);}catch(me){q=!0,te=me}finally{try{!K&&_e.return&&_e.return()}finally{if(q)throw te}}return j}return function(C,_){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return U(C,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function U(C,_){for(var j=0;j<_.length;j++){var K=_[j];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(C,K.key,K)}}return function(C,_,j){return _&&U(C.prototype,_),j&&U(C,j),C}}();function l(U,C,_){return C in U?Object.defineProperty(U,C,{value:_,enumerable:!0,configurable:!0,writable:!0}):U[C]=_,U}function f(U,C){var _={};for(var j in U){if(C.indexOf(j)>=0)continue;if(!Object.prototype.hasOwnProperty.call(U,j))continue;_[j]=U[j]}return _}function O(U,C){if(!(U instanceof C))throw new TypeError("Cannot call a class as a function")}function A(U,C){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:U}function T(U,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);U.prototype=Object.create(C&&C.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(U,C):U.__proto__=C)}var w=function(C){return Object.keys(C).reduce(function(_,j){return(j.substr(0,5)==="data-"||j.substr(0,5)==="aria-"||j==="role")&&(_[j]=C[j]),_},{})},S=function(U){T(C,U);function C(){var _,j,K,q;O(this,C);for(var te=arguments.length,_e=Array(te),ue=0;ue<te;ue++)_e[ue]=arguments[ue];return q=(j=(K=A(this,(_=C.__proto__||Object.getPrototypeOf(C)).call.apply(_,[this].concat(_e))),K),K.state={uid:R()},K.reqs={},K.onChange=function(me){var fe=me.target.files;K.uploadFiles(fe),K.reset()},K.onClick=function(me){var fe=K.fileInput;if(!fe)return;var le=K.props,ie=le.children,he=le.onClick;ie&&ie.type==="button"&&(fe.parentNode.focus(),fe.parentNode.querySelector("button").blur()),fe.click(),he&&he(me)},K.onKeyDown=function(me){me.key==="Enter"&&K.onClick()},K.onFileDrop=function(me){var fe=K.props.multiple;if(me.preventDefault(),me.type==="dragover")return;if(K.props.directory)o(Array.prototype.slice.call(me.dataTransfer.items),K.uploadFiles,function(ie){return m(ie,K.props.accept)});else{var le=Array.prototype.slice.call(me.dataTransfer.files).filter(function(ie){return m(ie,K.props.accept)});fe===!1&&(le=le.slice(0,1)),K.uploadFiles(le)}},K.uploadFiles=function(me){var fe=Array.prototype.slice.call(me);fe.map(function(le){return le.uid=R(),le}).forEach(function(le){K.upload(le,fe)})},K.saveFileInput=function(me){K.fileInput=me},j),A(K,q)}return i(C,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(j,K){var q=this,te=this.props;if(!te.beforeUpload)return setTimeout(function(){return q.post(j)},0);var _e=te.beforeUpload(j,K);_e&&_e.then?_e.then(function(ue){var me=Object.prototype.toString.call(ue);return me==="[object File]"||me==="[object Blob]"?q.post(ue):q.post(j)}).catch(function(ue){console.log(ue)}):_e!==!1&&setTimeout(function(){return q.post(j)},0);return}},{key:"post",value:function(j){var K=this;if(!this._isMounted)return;var q=this.props,te=q.onStart,_e=q.onProgress,ue=q.transformFile,me=ue===void 0?function(fe){return fe}:ue;new Promise(function(fe){var le=q.action;return typeof le=="function"&&(le=le(j)),fe(le)}).then(function(fe){var le=j.uid,ie=q.customRequest||W,he=Promise.resolve(me(j)).then(function(J){var ae=q.data;return typeof ae=="function"&&(ae=ae(J)),Promise.all([J,ae])}).catch(function(J){console.error(J)});he.then(function(J){var ae=s(J,2),ee=ae[0],be=ae[1],xe={action:fe,filename:q.name,data:be,file:ee,headers:q.headers,withCredentials:q.withCredentials,method:q.method||"post",onProgress:_e?function(ye){_e(ye,j)}:null,onSuccess:function(Ae,Le){delete K.reqs[le],q.onSuccess(Ae,j,Le)},onError:function(Ae,Le){delete K.reqs[le],q.onError(Ae,Le,j)}};te(j),K.reqs[le]=ie(xe)})})}},{key:"reset",value:function(){this.setState({uid:R()})}},{key:"abort",value:function(j){var K=this.reqs;if(j){var q=j;j&&j.uid&&(q=j.uid),K[q]&&K[q].abort&&K[q].abort(),delete K[q]}else Object.keys(K).forEach(function(te){K[te]&&K[te].abort&&K[te].abort(),delete K[te]})}},{key:"render",value:function(){var j,K=this.props,q=K.component,te=K.prefixCls,_e=K.className,ue=K.disabled,me=K.id,fe=K.style,le=K.multiple,ie=K.accept,he=K.children,J=K.directory,ae=K.openFileDialogOnClick,ee=K.onMouseEnter,be=K.onMouseLeave,xe=f(K,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ye=z()((j={},l(j,te,!0),l(j,te+"-disabled",ue),l(j,_e,_e),j)),Ae=ue?{}:{onClick:ae?this.onClick:function(){},onKeyDown:ae?this.onKeyDown:function(){},onMouseEnter:ee,onMouseLeave:be,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return V.a.createElement(q,h({},Ae,{className:ye,role:"button",style:fe}),V.a.createElement("input",h({},w(xe),{id:me,type:"file",ref:this.saveFileInput,onClick:function(Ne){return Ne.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ie,directory:J?"directory":null,webkitdirectory:J?"webkitdirectory":null,multiple:le,onChange:this.onChange})),he)}}]),C}(ne.Component),x=S,d=Object.assign||function(U){for(var C=1;C<arguments.length;C++){var _=arguments[C];for(var j in _)Object.prototype.hasOwnProperty.call(_,j)&&(U[j]=_[j])}return U},y=function(){function U(C,_){for(var j=0;j<_.length;j++){var K=_[j];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(C,K.key,K)}}return function(C,_,j){return _&&U(C.prototype,_),j&&U(C,j),C}}();function u(U,C){if(!(U instanceof C))throw new TypeError("Cannot call a class as a function")}function E(U,C){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:U}function g(U,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);U.prototype=Object.create(C&&C.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(U,C):U.__proto__=C)}function b(){}var P=function(U){g(C,U);function C(){var _,j,K,q;u(this,C);for(var te=arguments.length,_e=Array(te),ue=0;ue<te;ue++)_e[ue]=arguments[ue];return q=(j=(K=E(this,(_=C.__proto__||Object.getPrototypeOf(C)).call.apply(_,[this].concat(_e))),K),K.saveUploader=function(me){K.uploader=me},j),E(K,q)}return y(C,[{key:"abort",value:function(j){this.uploader.abort(j)}},{key:"render",value:function(){return V.a.createElement(x,d({},this.props,{ref:this.saveUploader}))}}]),C}(ne.Component);P.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:b,onError:b,onSuccess:b,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var L=P,B=we.a=L},HmJG:function(Pe,we,Y){},HpTS:function(Pe,we,Y){Pe.exports=Y.p+"static/small_program.f74069ec.png"},JWDV:function(Pe,we,Y){Pe.exports=Y.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ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yxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(Pe,we,Y){Pe.exports=Y.p+"static/qrcode.2267e4d5.png"},LdHM:function(Pe,we,Y){"use strict";Y.d(we,"b",function(){return f}),Y.d(we,"a",function(){return A});var ne=Y("1OyB"),V=Y("vuIU"),D=Y("Ji7U"),z=Y("LK+K"),N=Y("cDcd"),k=Y("rePB"),W=Y("Ff2n"),F=Y("ODXe"),M=Y("4IlW"),R=Y("bX4T"),v=Y("YrtM"),m=Y("TSYQ"),p=Y.n(m),c=Y("+nKL"),o=Y("8OUc"),h=function(j,K){var q=j.prefixCls,te=j.id,_e=j.flattenOptions,ue=j.childrenAsData,me=j.values,fe=j.searchValue,le=j.multiple,ie=j.defaultActiveFirstOption,he=j.height,J=j.itemHeight,ae=j.notFoundContent,ee=j.open,be=j.menuItemSelectedIcon,xe=j.virtual,ye=j.onSelect,Ae=j.onToggleOpen,Le=j.onActiveValue,Ne=j.onScroll,ke=j.onMouseEnter,Oe="".concat(q,"-item"),Ie=Object(v.a)(function(){return _e},[ee,_e],function(je,ve){return ve[0]&&je[1]!==ve[1]}),Ge=N.useRef(null),Je=function(ve){ve.preventDefault()},Ve=function(ve){Ge.current&&Ge.current.scrollTo({index:ve})},Ke=function(ve){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,pe=Ie.length,Z=0;Z<pe;Z+=1){var $=(ve+Z*ce+pe)%pe,re=Ie[$],oe=re.group,ge=re.data;if(!oe&&!ge.disabled)return $}return-1},nt=N.useState(function(){return Ke(0)}),Qe=Object(F.a)(nt,2),Ze=Qe[0],Re=Qe[1],tt=function(ve){Re(ve);var ce=Ie[ve];if(!ce){Le(null,-1);return}Le(ce.data.value,ve)};N.useEffect(function(){tt(ie!==!1?Ke(0):-1)},[Ie.length,fe]),N.useEffect(function(){var je=setTimeout(function(){if(!le&&ee&&me.size===1){var ve=Array.from(me)[0],ce=Ie.findIndex(function(pe){var Z=pe.data;return Z.value===ve});tt(ce),Ve(ce)}});return function(){return clearTimeout(je)}},[ee]);var Xe=function(ve){ve!==void 0&&ye(ve,{selected:!me.has(ve)}),le||Ae(!1)};if(N.useImperativeHandle(K,function(){return{onKeyDown:function(ve){var ce=ve.which;switch(ce){case M.a.UP:case M.a.DOWN:{var pe=0;if(ce===M.a.UP?pe=-1:ce===M.a.DOWN&&(pe=1),pe!==0){var Z=Ke(Ze+pe,pe);Ve(Z),tt(Z)}break}case M.a.ENTER:{var $=Ie[Ze];$&&!$.data.disabled?Xe($.data.value):Xe(void 0),ee&&ve.preventDefault();break}case M.a.ESC:Ae(!1)}},onKeyUp:function(){},scrollTo:function(ve){Ve(ve)}}}),Ie.length===0)return N.createElement("div",{role:"listbox",id:"".concat(te,"_list"),className:"".concat(Oe,"-empty"),onMouseDown:Je},ae);function Se(je){var ve=Ie[je];if(!ve)return null;var ce=ve.data||{},pe=ce.value,Z=ce.label,$=ce.children,re=Object(R.a)(ce,!0),oe=ue?$:Z;return ve?N.createElement("div",Object.assign({"aria-label":typeof oe=="string"?oe:null},re,{key:je,role:"option",id:"".concat(te,"_list_").concat(je),"aria-selected":me.has(pe)}),pe):null}return N.createElement(N.Fragment,null,N.createElement("div",{role:"listbox",id:"".concat(te,"_list"),style:{height:0,width:0,overflow:"hidden"}},Se(Ze-1),Se(Ze),Se(Ze+1)),N.createElement(c.a,{itemKey:"key",ref:Ge,data:Ie,height:he,itemHeight:J,fullHeight:!1,onMouseDown:Je,onScroll:Ne,virtual:xe,onMouseEnter:ke},function(je,ve){var ce,pe=je.group,Z=je.groupOption,$=je.data,re=$.label,oe=$.key;if(pe)return N.createElement("div",{className:p()(Oe,"".concat(Oe,"-group"))},re!==void 0?re:oe);var ge=$.disabled,Ce=$.value,Fe=$.title,et=$.children,rt=$.style,De=$.className,St=Object(W.a)($,["disabled","value","title","children","style","className"]),ht=me.has(Ce),Me="".concat(Oe,"-option"),yt=p()(Oe,Me,De,(ce={},Object(k.a)(ce,"".concat(Me,"-grouped"),Z),Object(k.a)(ce,"".concat(Me,"-active"),Ze===ve&&!ge),Object(k.a)(ce,"".concat(Me,"-disabled"),ge),Object(k.a)(ce,"".concat(Me,"-selected"),ht),ce)),Et=ue?et:re,$t=!be||typeof be=="function"||ht;return N.createElement("div",Object.assign({},St,{"aria-selected":ht,className:yt,title:Fe,onMouseMove:function(){if(Ze===ve||ge)return;tt(ve)},onClick:function(){ge||Xe(Ce)},style:rt}),N.createElement("div",{className:"".concat(Me,"-content")},Et||Ce),N.isValidElement(be)||ht,$t&&N.createElement(o.a,{className:"".concat(Oe,"-option-state"),customizeIcon:be,customizeIconProps:{isSelected:ht}},ht?"\u2713":null))}))},s=N.forwardRef(h);s.displayName="OptionList";var i=s,l=function(){return null};l.isSelectOption=!0;var f=l,O=function(){return null};O.isSelectOptGroup=!0;var A=O,T=Y("VTBJ"),w=Y("Zm9Q");function S(_){var j=_.key,K=_.props,q=K.children,te=K.value,_e=Object(W.a)(K,["children","value"]);return Object(T.a)({key:j,value:te!==void 0?te:j,children:q},_e)}function x(_){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(_).map(function(K,q){if(!N.isValidElement(K)||!K.type)return null;var te=K.type.isSelectOptGroup,_e=K.key,ue=K.props,me=ue.children,fe=Object(W.a)(ue,["children"]);return j||!te?S(K):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(_e===null?q:_e,"__"),label:_e},fe),{},{options:x(me)})}).filter(function(K){return K})}var d=Y("2Qr1"),y=Y("qNPg"),u=Y("U8pU"),E=Y("Kwbf"),g=Y("WKfj");function b(_){var j=_.mode,K=_.options,q=_.children,te=_.backfill,_e=_.allowClear,ue=_.placeholder,me=_.getInputElement,fe=_.showSearch,le=_.onSearch,ie=_.defaultOpen,he=_.autoFocus,J=_.labelInValue,ae=_.value,ee=_.inputValue,be=_.optionLabelProp,xe=j==="multiple"||j==="tags",ye=fe!==void 0?fe:xe||j==="combobox",Ae=K||x(q);if(Object(E.a)(j!=="tags"||Ae.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),j==="tags"||j==="combobox"){var Le=Ae.some(function(Oe){return Oe.options?Oe.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});Object(E.a)(!Le,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(j!=="combobox"||!be,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(j==="combobox"||!te,"`backfill` only works with `combobox` mode."),Object(E.a)(j==="combobox"||!me,"`getInputElement` only work with `combobox` mode."),Object(E.b)(j!=="combobox"||!me||!_e||!ue,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),le&&!ye&&j!=="combobox"&&j!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!ie||he,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ae!=null){var Ne=Object(g.d)(ae);Object(E.a)(!J||Ne.every(function(Oe){return Object(u.a)(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!xe||Array.isArray(ae),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var ke=null;Object(w.a)(q).some(function(Oe){if(!N.isValidElement(Oe)||!Oe.type)return!1;var Ie=Oe.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var Ge=Object(w.a)(Oe.props.children).every(function(Je){return!N.isValidElement(Je)||!Oe.type||Je.type.isSelectOption?!0:(ke=Je.type,!1)});return!Ge}return ke=Ie,!0}),ke&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ke.displayName||ke.name||ke,"`.")),Object(E.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=b,L=Object(y.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:x,flattenOptions:d.d,getLabeledValue:d.e,filterOptions:d.b,isValueDisabled:d.g,findValueOption:d.c,warningProps:P,fillOptionsWithMissingValue:d.a}),B=function(_){Object(D.a)(K,_);var j=Object(z.a)(K);function K(){var q;return Object(ne.a)(this,K),q=j.apply(this,arguments),q.selectRef=N.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(V.a)(K,[{key:"render",value:function(){return N.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),K}(N.Component);B.Option=f,B.OptGroup=A;var U=B,C=we.c=U},M8RZ:function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return M});var ne=Y("fWQN"),V=Y("mtLc"),D=Y("yKVA"),z=Y("879j"),N=Y("cDcd"),k=Y.n(N),W=Y("faye"),F=Y.n(W),M=function(R){Object(D.a)(m,R);var v=Object(z.a)(m);function m(p){var c;Object(ne.a)(this,m),c=v.call(this,p);var o=window.document;return c.node=o.createElement("div"),o.body.appendChild(c.node),c}return Object(V.a)(m,[{key:"render",value:function(){var c=this.props.children;return Object(W.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(k.a.Component)},Nmxd:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZ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n(v),p=Y("VrN/"),c=Y.n(p),o=Y("bdgK"),h=Y("p77/"),s=Y("Bd2K"),i=Y("ELLl"),l=Y("19Vz"),f=Y("lZu9"),O=Y("+NIl"),A=Y("kSUc"),T=Y("9Bee"),w=function(ge){var Ce=ge.value,Fe=Ce===void 0?"":Ce,et=ge.className,rt=ge.showTextOnly,De=ge.showLines,St=ge.style,ht=St===void 0?{}:St,Me=Object(v.useMemo)(function(){return""},[Fe]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:Me}}))},S=Y("0Owb"),x=Y("dejd"),d=Y("C+DQ"),y=Y("1vsH"),u=Y("m3rI"),E=[{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 g(ge){var Ce=ge.onActionCallback,Fe=ge.title,et=ge.icon,rt=ge.actionName,De=ge.className,St=De===void 0?"":De,ht=ge.children;function Me(){Ce(rt)}return m.a.createElement("a",{title:Fe,className:St,onClick:Me},m.a.createElement("i",{className:"md-iconfont ".concat(et)}),ht)}var b=function(ge){var Ce=ge.watch,Fe=ge.showNullButton,et=ge.onActionCallback,rt=ge.fullScreen,De=ge.insertTemp,St=ge.hidetoolBar,ht=ge.uuid,Me=ge.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(y.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(y.G)("_educoder_session"),"&key=").concat(ht,"&api=").concat(encodeURIComponent(u.a.PROXY_SERVER)));var yt=[].concat(E,[{title:"".concat(Ce?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ce?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&yt.map(function(Et,$t){return m.a.createElement("li",{key:$t},Et.actionName?m.a.createElement(g,Object(S.a)({},Et,{onActionCallback:et})):m.a.createElement("span",{className:"v-line"}))}),Fe?m.a.createElement("li",null,m.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:et},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,De&&m.a.createElement("li",null,m.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(De),onActionCallback:et},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(g,{icon:"".concat(rt?"icon-shrink":"icon-enlarge"),title:rt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:et})))},P=Y("M8RZ"),L=Y("+L6B"),B=Y("2/Rp"),U=Y("y8nQ"),C=Y("Vl3Y"),_=Y("5NDa"),j=Y("5rEg"),K={labelCol:{span:4},wrapperCol:{span:20}},q=function(ge){var Ce=ge.callback,Fe=ge.onCancel;function et(rt){Ce(rt)}return m.a.createElement(C.a,Object(S.a)({},K,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:et}),m.a.createElement(C.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(j.a,null)),m.a.createElement(C.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(j.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(B.a,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))},te=Y("7ahc"),_e=Y("HmJG"),ue=Y("BjJ7"),me=C.a.useForm,fe={width:280,marginRight:10},le={labelCol:{span:5},wrapperCol:{span:19}},ie=function(ge){var Ce=ge.callback,Fe=ge.onCancel,et=me(),rt=Object(W.a)(et,1),De=rt[0];function St(yt){Ce(yt)}function ht(yt,Et){if(yt.status===-1){N.b.error(yt.message);return}De.setFieldsValue({src:"/api/attachments/".concat(yt.id),type:Et.type})}function Me(yt){var Et=yt.target.files[0];J(Et,ht)}return m.a.createElement(C.a,Object(S.a)({form:De},le,{className:"upload-image-panel",onFinish:St}),m.a.createElement(C.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(C.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(j.a,{style:fe})),m.a.createElement(he,{onFileChange:Me}))),m.a.createElement(C.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(j.a,{style:{width:264}})),m.a.createElement(C.a.Item,{style:{textAlign:"right"}},m.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(B.a,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))};function he(ge){var Ce=ge.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Ce}))}function J(ge,Ce){if(!ge)throw new String("\u6CA1\u6709\u6587\u4EF6");var Fe=new FormData;Fe.append("editormd-image-file",ge),Fe.append("file_param_name","editormd-image-file"),Fe.append("byxhr","true");var et=new window.XMLHttpRequest;et.withCredentials=!0,et.addEventListener("load",function(rt){Ce(JSON.parse(rt.target.responseText),ge)},!1),et.addEventListener("error",function(rt){console.error(rt)},!1),et.open("POST","".concat(ue.a,"/api/attachments.json")),et.send(Fe)}var ae=Y("giR+"),ee=Y("fyUT"),be=Y("7Kak"),xe=Y("9yH6"),ye=xe.a.Group,Ae={margin:"0 8px"},Le=function(ge){var Ce=ge.callback,Fe=ge.onCancel;function et(rt){Ce(rt)}return m.a.createElement(C.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:et},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Ae},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Ae},"\u884C\u6570"),m.a.createElement(C.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(ee.a,null)),m.a.createElement("span",{style:Ae},"\u5217\u6570"),m.a.createElement(C.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(ee.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Ae},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(C.a.Item,{name:"align"},m.a.createElement(ye,null,m.a.createElement(xe.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(xe.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(xe.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(xe.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(B.a,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))},Ne=Y("ErOA"),ke=Y("7Cbv"),Oe="link",Ie="upload-image",Ge="code-block",Je="add-table",Ve="------------",Ke={default:Ve,left:":".concat(Ve),center:":".concat(Ve,":"),right:"".concat(Ve,":")},nt=Y("9VGf"),Qe,Ze;function Re(){}var tt=0,Xe=1e4,Se="\u2581",je=`
|
|
**\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 ve(ge){return/^\d+$/.test(ge)?"".concat(ge,"px"):ge}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0,pe=ce?"Cmd":"Ctrl",Z=["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"],$=(Qe={},Object(F.a)(Qe,pe+"-B","bold"),Object(F.a)(Qe,pe+"-I","italic"),Qe),re=(Ze={},Object(F.a)(Ze,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(F.a)(Ze,Ge,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(F.a)(Ze,Ie,"\u6DFB\u52A0\u6587\u4EF6"),Object(F.a)(Ze,Je,"\u6DFB\u52A0\u8868\u683C"),Ze),oe=we.a=function(ge){var Ce=ge.defaultValue,Fe=Ce===void 0?"":Ce,et=ge.onChange,rt=ge.width,De=rt===void 0?"100%":rt,St=ge.height,ht=St===void 0?400:St,Me=ge.miniToolbar,yt=Me===void 0?!1:Me,Et=ge.isFocus,$t=Et===void 0?!1:Et,Yt=ge.watch,Tt=ge.insertTemp,_n=ge.mode,Bn=_n===void 0?"markdown":_n,ft=ge.id,gt=ft===void 0?"markdown-editor-id":ft,xt=ge.showResizeBar,kt=xt===void 0?!1:xt,en=ge.noStorage,Zn=en===void 0?!1:en,pr=ge.showNullButton,Vt=pr===void 0?!1:pr,st=ge.hidetoolBar,Kn=st===void 0?!1:st,tn=ge.fullScreen,mn=tn===void 0?!1:tn,It=ge.onBlur,Dn=ge.onCMBeforeChange,Xt=ge.onFullScreen,ar=ge.className,He=ar===void 0?"":ar,mt=ge.disablePaste,qn=mt===void 0?!1:mt,mr=ge.placeholder,sr=mr===void 0?"":mr,or=ge.values,$n=or===void 0?"":or,vt=Object(v.useState)(null),Cr=Object(W.a)(vt,2),ze=Cr[0],gr=Cr[1],Mn=Object(v.useState)(Fe),vr=Object(W.a)(Mn,2),kn=vr[0],An=vr[1],_r=Object(v.useState)(Yt),Lt=Object(W.a)(_r,2),rn=Lt[0],Ir=Lt[1],yr=Object(v.useState)(mn),Lr=Object(W.a)(yr,2),Pn=Lr[0],Gr=Lr[1],Dr=Object(v.useState)(""),Be=Object(W.a)(Dr,2),ct=Be[0],Dt=Be[1],wt=Object(v.useState)(0),Gt=Object(W.a)(wt,2),Pt=Gt[0],Qt=Gt[1],Rt=Object(v.useState)(ht),ut=Object(W.a)(Rt,2),Bt=ut[0],Wt=ut[1],Ft=Object(v.useState)(!1),zt=Object(W.a)(Ft,2),an=zt[0],ln=zt[1],zn=Object(v.useRef)(Object(ke.a)()),Yn=Object(v.useRef)(!1),er=Object(v.useRef)(),Fn=Object(v.useRef)(),lr=Object(v.useRef)(),ur=Object(v.useRef)(),zr=Object(v.useRef)(),Bi=function(){var ot=Object(k.a)(R.a.mark(function _t(){var dt,At;return R.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,Object(Ne.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:zn.current}});case 2:At=Ht.sent,At!=null&&(dt=At.attachments)!==null&&dt!==void 0&&dt.length&&(console.log("cm:",ze,Fn),At.attachments.map(function(Ct){Ct.content_type.indexOf("image")>-1?ze.replaceSelection(".concat(Ct.content_type,")")):Ct.content_type.indexOf("video")>-1?ze.replaceSelection('<video width="100%" controls src="'.concat(u.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Ct.content_type.indexOf("pdf")>-1?ze.replaceSelection('<a href="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,'&disposition=inline" target="_blank">').concat(Ct.name,"</a>")):ze.replaceSelection("[".concat(Ct.name,"](").concat(u.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,")"))}));case 4:case"end":return Ht.stop()}},_t)}));return function(){return ot.apply(this,arguments)}}();Object(v.useEffect)(function(){An($n),ze==null||ze.setValue($n)},[$n]),Object(v.useEffect)(function(){Xt==null||Xt(Pn)},[Pn]),Object(v.useEffect)(function(){if(Fn.current){var ot=c.a.fromTextArea(Fn.current,{mode:Bn,lineNumbers:!yt,lineWrapping:!0,value:Fe,autoCloseTags:!0,autoCloseBrackets:!0});$t&&ot.focus();function _t(dt,At){if(qn){At.preventDefault();return}var Mt=At.clipboardData;if(Mt){var Ht=Mt.types.toString(),Ct=Mt.items;if(Ht==="Files"||Mt.types.indexOf("Files")>-1){if(At.preventDefault(),Bn=="stex")return;try{var un,Sn=Ct[1];((un=Ct[0])===null||un===void 0?void 0:un.kind)==="file"&&(Sn=Ct[0]);var Ot=Sn.getAsFile(),dr=Ot.name.split(".").pop();J(Ot,function(Nt){if(Nt.id){var wn,yn,Gn;(Ot==null||((wn=Ot.type)===null||wn===void 0)?void 0:wn.indexOf("image"))>-1?ot.replaceSelection(".concat(Nt.content_type,")")):(Ot==null||((yn=Ot.type)===null||yn===void 0)?void 0:yn.indexOf("video"))>-1?ot.replaceSelection('<video width="100%" controls src="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(Ot==null||((Gn=Ot.type)===null||Gn===void 0)?void 0:Gn.indexOf("pdf"))>-1?ot.replaceSelection('<a href="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Ot.type,'&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):Z.includes(dr)?ot.replaceSelection('<a href="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):ot.replaceSelection("[".concat(Ot.name,"](").concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})}catch(Nt){N.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ot.on("paste",_t),ot.on("dragleave",function(dt,At){lr.current.classList.remove("mouse-hover-md")}),ot.on("dragover",function(dt,At){lr.current.classList.add("mouse-hover-md")}),ot.on("drop",function(dt,At){lr.current.classList.add("mouse-hover-md");var Mt;if(Mt=At.dataTransfer.files,Mt.length>0){At.preventDefault(),At.stopPropagation();for(var Ht=function(Sn){var Ot=Mt[Sn],dr=Ot.name.split(".").pop();J(Ot,function(Nt){if(Nt.id){var wn,yn,Gn;(Ot==null||((wn=Ot.type)===null||wn===void 0)?void 0:wn.indexOf("image"))>-1?ot.replaceSelection(".concat(Nt.content_type,")")):(Ot==null||((yn=Ot.type)===null||yn===void 0)?void 0:yn.indexOf("video"))>-1?ot.replaceSelection('<video width="100%" controls src="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(Ot==null||((Gn=Ot.type)===null||Gn===void 0)?void 0:Gn.indexOf("pdf"))>-1?ot.replaceSelection('<a href="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Ot.type,'&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):Z.includes(dr)?ot.replaceSelection('<a href="'.concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(Ot.name,"</a>")):ot.replaceSelection("[".concat(Ot.name,"](").concat(u.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})},Ct=0;Ct<Mt.length;Ct++)Ht(Ct)}}),gr(ot),function(){ot.off("paste",_t)}}},[]);var jn=Object(v.useCallback)(function(){if(lr.current)try{}catch(ot){console.log(ot,"---- to set md editor body height")}},[Bt,lr,Pn]);Object(v.useEffect)(function(){function ot(){var dt=new o.default(function(At){var Mt=Object(D.a)(At),Ht;try{for(Mt.s();!(Ht=Mt.n()).done;){var Ct=Ht.value;(Ct.target.offsetHeight>0||Ct.target.offsetWidth>0)&&(jn(),ze.setSize("100%","100%"),ze.refresh())}}catch(un){Mt.e(un)}finally{Mt.f()}});return dt.observe(Fn.current.parentElement),dt}if(ze){var _t=ot();return function(){_t.unobserve(Fn.current.parentElement)}}},[ze,jn]),Object(v.useEffect)(function(){if(ze){for(var ot=[],_t=function(){var Ct=At[dt];Mt=Object(W.a)(Ct,2);var un=Mt[0],Sn=Mt[1],Ot=Object(F.a)({},un,function(){Fi(Sn)});ot.push(Ot),ze.addKeyMap(Ot)},dt=0,At=Object.entries($);dt<At.length;dt++){var Mt;_t()}return er.current=setInterval(function(){Yn.current&&Bi()},4e3),function(){clearInterval(er.current);var Ht=Object(D.a)(ot),Ct;try{for(Ht.s();!(Ct=Ht.n()).done;){var un=Ct.value;ze.removeKeyMap(un)}}catch(Sn){Ht.e(Sn)}finally{Ht.f()}}}},[ze]),Object(v.useEffect)(function(){mn!==Pn&&Gr(mn)},[mn]),Object(nt.a)(function(){if(!Zn&&Pt>0){var ot=new Date().getTime(),_t=window.sessionStorage.getItem(gt);ot>=Pt+Xe&&(!_t||_t!==kn)&&(window.sessionStorage.setItem(gt,kn),ln(!0))}},Xe),Object(v.useEffect)(function(){Ir(Yt)},[ze,Yt]),Object(v.useEffect)(function(){ze&&($t&&ze.focus())},[ze,$t]),Object(v.useEffect)(function(){if(rn&&ze){var ot=ze.getScrollerElement();function _t(dt){var At=dt.target;if(zr.current){var Mt=At.scrollTop/At.scrollHeight;zr.current.scrollTop=zr.current.scrollHeight*Mt}}return ot.addEventListener("scroll",_t),function(){ot.removeEventListener("scroll",_t)}}},[ze,rn]),Object(v.useEffect)(function(){if(ze&&Dn){function ot(_t,dt){Dn(_t,dt)}return ze.on("beforeChange",ot),function(){ze.off("beforeChange",ot)}}},[ze,Dn]),Object(v.useEffect)(function(){if(ze&&It){function ot(){It(ze.getValue())}return ze.on("blur",ot),function(){ze.off("blur",ot)}}},[ze,It]),Object(v.useEffect)(function(){if(ze){function ot(_t){var dt=_t.getValue();An(dt),Qt(new Date().getTime()),_t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),et&&et(dt)}return ze.on("change",ot),function(){ze.off("change",ot)}}},[ze,et]),Object(v.useEffect)(function(){ze&&(Fe==null?(ze.setValue(""),An("")):Fe!==ze.getValue()&&(ze.setValue(Fe),An(Fe),ze.setCursor(ze.lineCount(),0)))},[ze,Fe]);var Fi=Object(v.useCallback)(function(ot){var _t=ze.getCursor(),dt=ze.getSelection(),At=dt.split(`
|
|
`);switch(ot){case"bold":return ze.replaceSelection("**"+dt+"**"),dt===""&&ze.setCursor(_t.line,_t.ch+2),ze.focus();case"italic":return ze.replaceSelection("*"+dt+"*"),dt===""&&ze.setCursor(_t.line,_t.ch+1),ze.focus();case"code":return ze.replaceSelection("`"+dt+"`"),dt===""&&ze.setCursor(_t.line,_t.ch+1),ze.focus();case"inline-latex":return ze.replaceSelection("`$$"+dt+"$$`"),dt===""&&ze.setCursor(_t.line,_t.ch+3),ze.focus();case"latex":return ze.replaceSelection("```latex\n"+dt+"\n```"),ze.setCursor(_t.line+1,dt.length+1),ze.focus();case"line-break":return ze.replaceSelection(`<br/>
|
|
`),ze.focus();case"list-ul":return dt===""?ze.replaceSelection("- "+dt):ze.replaceSelection(At.map(function(Mt){return Mt===""?"":"- ".concat(Mt)}).join(`
|
|
`)),ze.focus();case"list-ol":return dt===""?ze.replaceSelection("1. "+dt):ze.replaceSelection(At.map(function(Mt,Ht){return Mt===""?"":"".concat(Ht+1,". ").concat(Mt)}).join(`
|
|
`)),ze.focus();case"add-null-ch":return dt===""&&ze.setCursor(_t.line,_t.ch+1),ze.replaceSelection(Se),ze.focus();case"inster-template-1":return dt===""&&ze.setCursor(_t.line,_t.ch),ze.replaceSelection(je),ze.focus();case"eraser":return ze.setValue(""),ze.focus();case"trigger-watch":return Ir(!rn),ze.focus();case"trigger-full-screen":return Gr(!Pn),ze.focus();case Oe:Dt(Oe);return;case Ge:Dt(Ge);return;case Ie:Dt(Ie);return;case Je:Dt(Je);return;default:throw new Error}},[ze,rn,Pn]),Yr=Object(v.useCallback)(function(ot){Dt("");switch(ct){case Oe:var _t=ot.title,dt=ot.link;return ze.replaceSelection("[".concat(_t,"](").concat(dt,")")),ze.focus();case Ge:var At=ot.language,Mt=ot.content;return ze.replaceSelection(["```"+At,Mt,"```"].join(`
|
|
`)),ze.focus();case Ie:var Ht=ot.src,Ct=ot.alt;return Ct?ze.replaceSelection(".concat(Ht,' "').concat(Ct,'" )')):ze.replaceSelection("")),ze.focus();case Je:for(var un=ot.row,Sn=ot.col,Ot=ot.align,dr=`
|
|
`,Nt=0;Nt<un;Nt++){for(var wn=[],yn=[],Gn=0;Gn<Sn;Gn++)Nt===1&&yn.push(Ke[Ot]),wn.push(" ");Nt===1&&(dr+="| ".concat(yn.join(" | "),` |
|
|
`)),dr+="| ".concat(wn.join(Sn===1?"":" | "),` |
|
|
`)}return ze.replaceSelection(dr+`
|
|
`),ze.focus();default:throw new Error}},[ze,ct]),di=Object(v.useMemo)(function(){switch(ct){case Oe:return m.a.createElement(q,{callback:Yr,onCancel:Er});case Ge:return m.a.createElement(te.b,{callback:Yr,onCancel:Er});case Ie:return m.a.createElement(ie,{callback:Yr,onCancel:Er});case Je:return m.a.createElement(Le,{callback:Yr,onCancel:Er});default:return null}},[ct]);function Er(){Dt("")}Object(v.useEffect)(function(){if(ur.current){var ot=ur.current,_t=!1,dt=0;function At(Ct){_t=!0,dt=Ct.pageY}function Mt(){_t=!1}function Ht(Ct){if(_t){var un=Ct.pageY-dt;un<0&&(un=0),un>300&&(un=300);var Sn=ht+un+"px";Wt(Sn)}}return ot.addEventListener("mousedown",At),document.addEventListener("mousemove",Ht),document.addEventListener("mouseup",Mt),function(){ot.removeEventListener("mousedown",At),document.removeEventListener("mousemove",Ht),document.removeEventListener("mouseup",Mt)}}},[ze,ur]),Object(v.useEffect)(function(){Wt(ht)},[ht]);var tr=ve(De),ci=ve(Bt),Vn={width:tr,height:ci},hi=Object(v.useMemo)(function(){if(Pt){var ot=new Date(Pt),_t=ot.getHours(),dt=ot.getMinutes(),At=ot.getSeconds();return _t=_t<10?"0"+_t:_t,dt=dt<10?"0"+dt:dt,At=At<10?"0"+At:At,"".concat(_t,":").concat(dt,":").concat(At)}return 0},[Pt]);function ji(){window.sessionStorage.removeItem(gt),ln(!1),Qt(0)}function Mr(){ln(!1),Qt(0),ze.setValue(window.sessionStorage.getItem(gt))}function ua(ot,_t){var dt=ze.getValue();dt=dt.replace(ot,_t),An(dt),ze==null||ze.setValue(dt)}return m.a.createElement(v.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:lr},m.a.createElement("div",{className:"markdown-editor-container ".concat(He," ").concat(rn?"on-preview":""," ").concat(yt?"mini":""," ").concat(Pn?"full-screen":""),style:Vn},m.a.createElement(b,{insertTemp:Tt,watch:rn,fullScreen:Pn,showNullButton:Vt,onActionCallback:Fi,hidetoolBar:Kn,uuid:zn.current,setOpenPhones:function(){Yn.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Fn,placeholder:sr})),rn?m.a.createElement("div",{ref:zr,className:"preview-container"},Bn==="stex"&&m.a.createElement(w,{value:kn}),Bn!=="stex"&&m.a.createElement(T.a,{edit:!0,value:kn,replaces:ua})):null))),kt?m.a.createElement("a",{ref:ur,className:"editor-resize"}):null,m.a.createElement(P.a,null,re[ct]?m.a.createElement(V.a,{centered:!0,title:re[ct],visible:!0,onCancel:Er,footer:null,className:"markdown-popup-form"},di):null))}},RMFE:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/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gQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},SJMd:function(Pe,we){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var Y,ne,V,D=!1,z,N;window.PR_SHOULD_USE_CONTINUATION=!0;var k,W;(function(){var F=window,M=["break,continue,do,else,for,if,return,while"],R=[M,"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=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[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"],p=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[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"],o="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",h=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="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=[M,"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"],l=[M,"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"],f=[M,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[m,c,p,h,s,i,l,f],A=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",w="kwd",S="com",x="typ",d="lit",y="pun",u="pln",E="tag",g="dec",b="src",P="atn",L="atv",B="nocode",U="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function C(ye){for(var Ae=0,Le=!1,Ne=!1,ke=0,Oe=ye.length;ke<Oe;++ke){var Ie=ye[ke];if(Ie.ignoreCase)Ne=!0;else if(/[a-z]/i.test(Ie.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Le=!0,Ne=!1;break}}var Ge={b:8,t:9,n:10,v:11,f:12,r:13};function Je(Ze){var Re=Ze.charCodeAt(0);if(Re!==92)return Re;var tt=Ze.charAt(1);return Re=Ge[tt],Re||("0"<=tt&&tt<="7"?parseInt(Ze.substring(1),8):tt==="u"||tt==="x"?parseInt(Ze.substring(2),16):Ze.charCodeAt(1))}function Ve(Ze){if(Ze<32)return(Ze<16?"\\x0":"\\x")+Ze.toString(16);var Re=String.fromCharCode(Ze);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function Ke(Ze){var Re=Ze.substring(1,Ze.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")),tt=[],Xe=Re[0]==="^",Se=["["];Xe&&Se.push("^");for(var je=Xe?1:0,ve=Re.length;je<ve;++je){var ce=Re[je];if(/\\[bdsw]/i.test(ce))Se.push(ce);else{var pe=Je(ce),Z;je+2<ve&&Re[je+1]==="-"?(Z=Je(Re[je+2]),je+=2):Z=pe,tt.push([pe,Z]),Z<65||pe>122||(Z<65||pe>90||tt.push([Math.max(65,pe)|32,Math.min(Z,90)|32]),Z<97||pe>122||tt.push([Math.max(97,pe)&~32,Math.min(Z,122)&~32]))}}tt.sort(function(ge,Ce){return ge[0]-Ce[0]||Ce[1]-ge[1]});for(var $=[],re=[],je=0;je<tt.length;++je){var oe=tt[je];oe[0]<=re[1]+1?re[1]=Math.max(re[1],oe[1]):$.push(re=oe)}for(var je=0;je<$.length;++je){var oe=$[je];Se.push(Ve(oe[0])),oe[1]>oe[0]&&(oe[1]+1>oe[0]&&Se.push("-"),Se.push(Ve(oe[1])))}return Se.push("]"),Se.join("")}function nt(Ze){for(var Re=Ze.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")),tt=Re.length,Xe=[],Se=0,je=0;Se<tt;++Se){var ve=Re[Se];if(ve==="(")++je;else if(ve.charAt(0)==="\\"){var ce=+ve.substring(1);ce&&(ce<=je?Xe[ce]=-1:Re[Se]=Ve(ce))}}for(var Se=1;Se<Xe.length;++Se)Xe[Se]===-1&&(Xe[Se]=++Ae);for(var Se=0,je=0;Se<tt;++Se){var ve=Re[Se];if(ve==="(")++je,Xe[je]||(Re[Se]="(?:");else if(ve.charAt(0)==="\\"){var ce=+ve.substring(1);ce&&ce<=je&&(Re[Se]="\\"+Xe[ce])}}for(var Se=0;Se<tt;++Se)Re[Se]==="^"&&Re[Se+1]!=="^"&&(Re[Se]="");if(Ze.ignoreCase&&Le)for(var Se=0;Se<tt;++Se){var ve=Re[Se],pe=ve.charAt(0);ve.length>=2&&pe==="["?Re[Se]=Ke(ve):pe!=="\\"&&(Re[Se]=ve.replace(/[a-zA-Z]/g,function(re){var oe=re.charCodeAt(0);return"["+String.fromCharCode(oe&~32,oe|32)+"]"}))}return Re.join("")}for(var Qe=[],ke=0,Oe=ye.length;ke<Oe;++ke){var Ie=ye[ke];if(Ie.global||Ie.multiline)throw new Error(""+Ie);Qe.push("(?:"+nt(Ie)+")")}return new RegExp(Qe.join("|"),Ne?"gi":"g")}function _(ye,Ae){var Le=/(?:^|\s)nocode(?:\s|$)/,Ne=[],ke=0,Oe=[],Ie=0;function Ge(Je){var Ve=Je.nodeType;if(Ve==1){if(Le.test(Je.className))return;for(var Ke=Je.firstChild;Ke;Ke=Ke.nextSibling)Ge(Ke);var nt=Je.nodeName.toLowerCase();(nt==="br"||nt==="li")&&(Ne[Ie]=`
|
|
`,Oe[Ie<<1]=ke++,Oe[Ie++<<1|1]=Je)}else if(Ve==3||Ve==4){var Qe=Je.nodeValue;Qe.length&&(Ae?Qe=Qe.replace(/\r\n?/g,`
|
|
`):Qe=Qe.replace(/[ \t\r\n]+/g," "),Ne[Ie]=Qe,Oe[Ie<<1]=ke,ke+=Qe.length,Oe[Ie++<<1|1]=Je)}}return Ge(ye),{sourceCode:Ne.join("").replace(/\n$/,""),spans:Oe}}function j(ye,Ae,Le,Ne,ke){if(!Le)return;var Oe={sourceNode:ye,pre:1,langExtension:null,numberLines:null,sourceCode:Le,spans:null,basePos:Ae,decorations:null};Ne(Oe),ke.push.apply(ke,Oe.decorations)}var K=/\S/;function q(ye){for(var Ae=void 0,Le=ye.firstChild;Le;Le=Le.nextSibling){var Ne=Le.nodeType;Ae=Ne===1?Ae?ye:Le:Ne===3&&K.test(Le.nodeValue)?ye:Ae}return Ae===ye?void 0:Ae}function te(ye,Ae){var Le={},Ne;(function(){for(var Ie=ye.concat(Ae),Ge=[],Je={},Ve=0,Ke=Ie.length;Ve<Ke;++Ve){var nt=Ie[Ve],Qe=nt[3];if(Qe)for(var Ze=Qe.length;--Ze>=0;)Le[Qe.charAt(Ze)]=nt;var Re=nt[1],tt=""+Re;Je.hasOwnProperty(tt)||(Ge.push(Re),Je[tt]=null)}Ge.push(/[\0-\uffff]/),Ne=C(Ge)})();var ke=Ae.length,Oe=function(Ie){for(var Ge=Ie.sourceCode,Je=Ie.basePos,Ve=Ie.sourceNode,Ke=[Je,u],nt=0,Qe=Ge.match(Ne)||[],Ze={},Re=0,tt=Qe.length;Re<tt;++Re){var Xe=Qe[Re],Se=Ze[Xe],je=void 0,ve;if(typeof Se=="string")ve=!1;else{var ce=Le[Xe.charAt(0)];if(ce)je=Xe.match(ce[1]),Se=ce[0];else{for(var pe=0;pe<ke;++pe)if(ce=Ae[pe],je=Xe.match(ce[1]),je){Se=ce[0];break}je||(Se=u)}ve=Se.length>=5&&Se.substring(0,5)==="lang-",ve&&!(je&&typeof je[1]=="string")&&(ve=!1,Se=b),ve||(Ze[Xe]=Se)}var Z=nt;if(nt+=Xe.length,!ve)Ke.push(Je+Z,Se);else{var $=je[1],re=Xe.indexOf($),oe=re+$.length;je[2]&&(oe=Xe.length-je[2].length,re=oe-$.length);var ge=Se.substring(5);j(Ve,Je+Z,Xe.substring(0,re),Oe,Ke),j(Ve,Je+Z+re,$,he(ge,$),Ke),j(Ve,Je+Z+oe,Xe.substring(oe),Oe,Ke)}}Ie.decorations=Ke};return Oe}function _e(ye){var Ae=[],Le=[];ye.tripleQuotedStrings?Ae.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ye.multiLineStrings?Ae.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ae.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ye.verbatimStrings&&Le.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ne=ye.hashComments;Ne&&(ye.cStyleComments?(Ne>1?Ae.push([S,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ae.push([S,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Le.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ae.push([S,/^#[^\r\n]*/,null,"#"])),ye.cStyleComments&&(Le.push([S,/^\/\/[^\r\n]*/,null]),Le.push([S,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ke=ye.regexLiterals;if(ke){var Oe=ke>1?"":`
|
|
\r`,Ie=Oe?".":"[\\S\\s]",Ge="/(?=[^/*"+Oe+"])(?:[^/\\x5B\\x5C"+Oe+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Oe+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";Le.push(["lang-regex",RegExp("^"+U+"("+Ge+")")])}var Je=ye.types;Je&&Le.push([x,Je]);var Ve=(""+ye.keywords).replace(/^ | $/g,"");Ve.length&&Le.push([w,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),Ae.push([u,/^\s+/,null,` \r
|
|
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return ye.regexLiterals&&(Ke+="(?!s*/)"),Le.push([d,/^@[a-z_$][a-z_$@0-9]*/i,null],[x,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[u,/^[a-z_$][a-z_$@0-9]*/i,null],[d,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[u,/^\\[\s\S]?/,null],[y,new RegExp(Ke),null]),te(Ae,Le)}var ue=_e({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function me(ye,Ae,Le){for(var Ne=/(?:^|\s)nocode(?:\s|$)/,ke=/\r\n?|\n/,Oe=ye.ownerDocument,Ie=Oe.createElement("li");ye.firstChild;)Ie.appendChild(ye.firstChild);var Ge=[Ie];function Je(Re){var tt=Re.nodeType;if(tt==1&&!Ne.test(Re.className))if(Re.nodeName==="br")Ve(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var Xe=Re.firstChild;Xe;Xe=Xe.nextSibling)Je(Xe);else if((tt==3||tt==4)&&Le){var Se=Re.nodeValue,je=Se.match(ke);if(je){var ve=Se.substring(0,je.index);Re.nodeValue=ve;var ce=Se.substring(je.index+je[0].length);if(ce){var pe=Re.parentNode;pe.insertBefore(Oe.createTextNode(ce),Re.nextSibling)}Ve(Re),ve||Re.parentNode.removeChild(Re)}}}function Ve(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function tt(je,ve){var ce=ve?je.cloneNode(!1):je,pe=je.parentNode;if(pe){var Z=tt(pe,1),$=je.nextSibling;Z.appendChild(ce);for(var re=$;re;re=$)$=re.nextSibling,Z.appendChild(re)}return ce}for(var Xe=tt(Re.nextSibling,0),Se;(Se=Xe.parentNode)&&Se.nodeType===1;)Xe=Se;Ge.push(Xe)}for(var Ke=0;Ke<Ge.length;++Ke)Je(Ge[Ke]);Ae===(Ae|0)&&Ge[0].setAttribute("value",Ae);var nt=Oe.createElement("ol");nt.className="linenums";for(var Qe=Math.max(0,Ae-1|0)||0,Ke=0,Ze=Ge.length;Ke<Ze;++Ke)Ie=Ge[Ke],Ie.className="L"+(Ke+Qe)%10,Ie.firstChild||Ie.appendChild(Oe.createTextNode("\xA0")),nt.appendChild(Ie);ye.appendChild(nt)}function fe(ye){var Ae=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ae=Ae&&+Ae[1]<=8;var Le=/\n/g,Ne=ye.sourceCode,ke=Ne.length,Oe=0,Ie=ye.spans,Ge=Ie.length,Je=0,Ve=ye.decorations,Ke=Ve.length,nt=0;Ve[Ke]=ke;var Qe,Ze;for(Ze=Qe=0;Ze<Ke;)Ve[Ze]!==Ve[Ze+2]?(Ve[Qe++]=Ve[Ze++],Ve[Qe++]=Ve[Ze++]):Ze+=2;for(Ke=Qe,Ze=Qe=0;Ze<Ke;){for(var Re=Ve[Ze],tt=Ve[Ze+1],Xe=Ze+2;Xe+2<=Ke&&Ve[Xe+1]===tt;)Xe+=2;Ve[Qe++]=Re,Ve[Qe++]=tt,Ze=Xe}Ke=Ve.length=Qe;var Se=ye.sourceNode,je="";Se&&(je=Se.style.display,Se.style.display="none");try{for(var ve=null;Je<Ge;){var ce=Ie[Je],pe=Ie[Je+2]||ke,Z=Ve[nt+2]||ke,Xe=Math.min(pe,Z),$=Ie[Je+1],re;if($.nodeType!==1&&(re=Ne.substring(Oe,Xe))){Ae&&(re=re.replace(Le,"\r")),$.nodeValue=re;var oe=$.ownerDocument,ge=oe.createElement("span");ge.className=Ve[nt+1];var Ce=$.parentNode;Ce.replaceChild(ge,$),ge.appendChild($),Oe<pe&&(Ie[Je+1]=$=oe.createTextNode(Ne.substring(Xe,pe)),Ce.insertBefore($,ge.nextSibling))}Oe=Xe,Oe>=pe&&(Je+=2),Oe>=Z&&(nt+=2)}}finally{Se&&(Se.style.display=je)}}var le={};function ie(ye,Ae){for(var Le=Ae.length;--Le>=0;){var Ne=Ae[Le];le.hasOwnProperty(Ne)?F.console&&console.warn("cannot override language handler %s",Ne):le[Ne]=ye}}function he(ye,Ae){return ye&&le.hasOwnProperty(ye)||(ye=/^\s*</.test(Ae)?"default-markup":"default-code"),le[ye]}ie(ue,["default-code"]),ie(te([],[[u,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[S,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["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"]),ie(te([[u,/^[\s]+/,null,` \r
|
|
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["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"]),ie(te([],[[L,/^[\s\S]+/]]),["uq.val"]),ie(_e({keywords:m,hashComments:!0,cStyleComments:!0,types:A}),["c","cc","cpp","cxx","cyc","m"]),ie(_e({keywords:"null,true,false"}),["json"]),ie(_e({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:A}),["cs"]),ie(_e({keywords:p,cStyleComments:!0}),["java"]),ie(_e({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ie(_e({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ie(_e({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ie(_e({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ie(_e({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ie(_e({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ie(te([],[[T,/^[\s\S]+/]]),["regex"]);function J(ye){var Ae=ye.langExtension;try{var Le=_(ye.sourceNode,ye.pre),Ne=Le.sourceCode;ye.sourceCode=Ne,ye.spans=Le.spans,ye.basePos=0,he(Ae,Ne)(ye),fe(ye)}catch(ke){F.console&&console.log(ke&&ke.stack||ke)}}function ae(ye,Ae,Le){var Ne=Le||!1,ke=Ae||null,Oe=document.createElement("div");Oe.innerHTML="<pre>"+ye+"</pre>",Oe=Oe.firstChild,Ne&&me(Oe,Ne,!0);var Ie={langExtension:ke,numberLines:Ne,sourceNode:Oe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return J(Ie),Oe.innerHTML}function ee(ye,Ae){var Le=Ae||document.body,Ne=Le.ownerDocument||document;function ke(ce){return Le.getElementsByTagName(ce)}for(var Oe=[ke("pre"),ke("code"),ke("xmp")],Ie=[],Ge=0;Ge<Oe.length;++Ge)for(var Je=0,Ve=Oe[Ge].length;Je<Ve;++Je)Ie.push(Oe[Ge][Je]);Oe=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var nt=0,Qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ze=/\bprettyprint\b/,Re=/\bprettyprinted\b/,tt=/pre|xmp/i,Xe=/^code$/i,Se=/^(?:pre|code|xmp)$/i,je={};function ve(){for(var ce=F.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;nt<Ie.length&&Ke.now()<ce;nt++){for(var pe=Ie[nt],Z=je,$=pe;$=$.previousSibling;){var re=$.nodeType,oe=(re===7||re===8)&&$.nodeValue;if(oe?!/^\??prettify\b/.test(oe):re!==3||/\S/.test($.nodeValue))break;if(oe){Z={},oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Yt,Tt,_n){Z[Tt]=_n});break}}var ge=pe.className;if((Z!==je||Ze.test(ge))&&!Re.test(ge)){for(var Ce=!1,Fe=pe.parentNode;Fe;Fe=Fe.parentNode){var et=Fe.tagName;if(Se.test(et)&&Fe.className&&Ze.test(Fe.className)){Ce=!0;break}}if(!Ce){pe.className+=" prettyprinted";var rt=Z.lang;if(!rt){rt=ge.match(Qe);var De;!rt&&(De=q(pe))&&Xe.test(De.tagName)&&(rt=De.className.match(Qe)),rt&&(rt=rt[1])}var St;if(tt.test(pe.tagName))St=1;else{var ht=pe.currentStyle,Me=Ne.defaultView,yt=ht?ht.whiteSpace:Me&&Me.getComputedStyle?Me.getComputedStyle(pe,null).getPropertyValue("white-space"):0;St=yt&&yt.substring(0,3)==="pre"}var Et=Z.linenums;(Et=Et==="true"||+Et)||(Et=ge.match(/\blinenums\b(?::(\d+))?/),Et=Et?Et[1]&&Et[1].length?+Et[1]:!0:!1),Et&&me(pe,Et,St);var $t={langExtension:rt,sourceNode:pe,numberLines:Et,pre:St,sourceCode:null,basePos:null,spans:null,decorations:null};J($t)}}}nt<Ie.length?F.setTimeout(ve,250):typeof ye=="function"&&ye()}ve()}var be=F.PR={createSimpleLexer:te,registerLangHandler:ie,sourceDecorator:_e,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:L,PR_COMMENT:S,PR_DECLARATION:g,PR_KEYWORD:w,PR_LITERAL:d,PR_NOCODE:B,PR_PLAIN:u,PR_PUNCTUATION:y,PR_SOURCE:b,PR_STRING:T,PR_TAG:E,PR_TYPE:x,prettyPrintOne:D?F.prettyPrintOne=ae:k=ae,prettyPrint:W=D?F.prettyPrint=ee:W=ee},xe=F.define;typeof xe=="function"&&xe.amd&&xe("google-code-prettify",[],function(){return be})})()},SMhR:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0z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W4AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3:function(Pe,we,Y){Pe.exports=Y.p+"static/lockclose.365036e8.svg"},TXwP:function(Pe,we,Y){var ne,V;(function(){var D;(function(){"use strict";var N=[,,function(M){function R(p){this.__parent=p,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}R.prototype.clone_empty=function(){var p=new R(this.__parent);return p.set_indent(this.__indent_count,this.__alignment_count),p},R.prototype.item=function(p){return p<0?this.__items[this.__items.length+p]:this.__items[p]},R.prototype.has_match=function(p){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(p))return!0;return!1},R.prototype.set_indent=function(p,c){this.is_empty()&&(this.__indent_count=p||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},R.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var p=this.__parent.current_line;return p.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),p.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),p.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,p.__items[0]===" "&&(p.__items.splice(0,1),p.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(p){this.__items.push(p);var c=p.lastIndexOf(`
|
|
`);c!==-1?this.__character_count=p.length-c:this.__character_count+=p.length},R.prototype.pop=function(){var p=null;return this.is_empty()||(p=this.__items.pop(),this.__character_count-=p.length),p},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var p="";return this.is_empty()?this.__parent.indent_empty_lines&&(p=this.__parent.get_indent_string(this.__indent_count)):(p=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),p+=this.__items.join("")),p};function v(p,c){this.__cache=[""],this.__indent_size=p.indent_size,this.__indent_string=p.indent_char,p.indent_with_tabs||(this.__indent_string=new Array(p.indent_size+1).join(p.indent_char)),c=c||"",p.indent_level>0&&(c=new Array(p.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}v.prototype.get_indent_size=function(p,c){var o=this.__base_string_length;return c=c||0,p<0&&(o=0),o+=p*this.__indent_size,o+=c,o},v.prototype.get_indent_string=function(p,c){var o=this.__base_string;return c=c||0,p<0&&(p=0,o=""),c+=p*this.__indent_size,this.__ensure_cache(c),o+=this.__cache[c],o},v.prototype.__ensure_cache=function(p){for(;p>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var p=this.__cache.length,c=0,o="";this.__indent_size&&p>=this.__indent_size&&(c=Math.floor(p/this.__indent_size),p-=c*this.__indent_size,o=new Array(c+1).join(this.__indent_string)),p&&(o+=new Array(p+1).join(" ")),this.__cache.push(o)};function m(p,c){this.__indent_cache=new v(p,c),this.raw=!1,this._end_with_newline=p.end_with_newline,this.indent_size=p.indent_size,this.wrap_line_length=p.wrap_line_length,this.indent_empty_lines=p.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(p,c){return this.__indent_cache.get_indent_string(p,c)},m.prototype.get_indent_size=function(p,c){return this.__indent_cache.get_indent_size(p,c)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(p){return this.is_empty()||!p&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(p){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
|
|
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return p!==`
|
|
`&&(o=o.replace(/[\n]/g,p)),o},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(p,c){return p=p||0,c=c||0,this.next_line.set_indent(p,c),this.__lines.length>1?(this.current_line.set_indent(p,c),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(p){for(var c=0;c<p.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(p.whitespace_before),this.current_line.push(p.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(p){this.__add_space_before_token(),this.current_line.push(p),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},m.prototype.remove_indent=function(p){for(var c=this.__lines.length;p<c;)this.__lines[p]._remove_indent(),p++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(p){for(p=p===void 0?!1:p,this.current_line.trim();p&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(p,c){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(p)!==0&&h.item(-1)!==c){this.__lines.splice(o+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},M.exports.Output=m},,,,function(M){function R(p,c){this.raw_options=v(p,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(p,c){var o=this.raw_options[p],h=c||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},R.prototype._get_boolean=function(p,c){var o=this.raw_options[p],h=o===void 0?!!c:!!o;return h},R.prototype._get_characters=function(p,c){var o=this.raw_options[p],h=c||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},R.prototype._get_number=function(p,c){var o=this.raw_options[p];c=parseInt(c,10),isNaN(c)&&(c=0);var h=parseInt(o,10);return isNaN(h)&&(h=c),h},R.prototype._get_selection=function(p,c,o){var h=this._get_selection_list(p,c,o);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+p+`' can only be one of the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[p]+"'");return h[0]},R.prototype._get_selection_list=function(p,c,o){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[c[0]],!this._is_valid_selection(o,c))throw new Error("Invalid Default Value!");var h=this._get_array(p,o);if(!this._is_valid_selection(h,c))throw new Error("Invalid Option Value: The option '"+p+`' can contain only the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[p]+"'");return h},R.prototype._is_valid_selection=function(p,c){return p.length&&c.length&&!p.some(function(o){return c.indexOf(o)===-1})};function v(p,c){var o={};p=m(p);var h;for(h in p)h!==c&&(o[h]=p[h]);if(c&&p[c])for(h in p[c])o[h]=p[c][h];return o}function m(p){var c={},o;for(o in p){var h=o.replace(/-/g,"_");c[h]=p[o]}return c}M.exports.Options=R,M.exports.normalizeOpts=m,M.exports.mergeOpts=v},,function(M){var R=RegExp.prototype.hasOwnProperty("sticky");function v(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},v.prototype.peek=function(m){var p=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(p=this.__input.charAt(m)),p},v.prototype.__match=function(m,p){m.lastIndex=p;var c=m.exec(this.__input);return c&&!(R&&m.sticky)&&(c.index!==p&&(c=null)),c},v.prototype.test=function(m,p){return p=p||0,p+=this.__position,p>=0&&p<this.__input_length?!!this.__match(m,p):!1},v.prototype.testChar=function(m,p){var c=this.peek(p);return m.lastIndex=0,c!==null&&m.test(c)},v.prototype.match=function(m){var p=this.__match(m,this.__position);return p?this.__position+=p[0].length:p=null,p},v.prototype.read=function(m,p,c){var o="",h;return m&&(h=this.match(m),h&&(o+=h[0])),p&&(h||!m)&&(o+=this.readUntil(p,c)),o},v.prototype.readUntil=function(m,p){var c="",o=this.__position;m.lastIndex=this.__position;var h=m.exec(this.__input);return h?(o=h.index,p&&(o+=h[0].length)):o=this.__input_length,c=this.__input.substring(this.__position,o),this.__position=o,c},v.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},v.prototype.get_regexp=function(m,p){var c=null,o="g";return p&&R&&(o="y"),typeof m=="string"&&m!==""?c=new RegExp(m,o):m&&(c=new RegExp(m.source,o)),c},v.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(m){var p=this.__position,c=this.readUntilAfter(m);return this.__position=p,c},v.prototype.lookBack=function(m){var p=this.__position-1;return p>=m.length&&this.__input.substring(p-m.length,p).toLowerCase()===m},M.exports.InputScanner=v},,,,,function(M){function R(v,m){v=typeof v=="string"?v:v.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+m,"g")}R.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var p=this.__directive_pattern.exec(v);p;)m[p[1]]=p[2],p=this.__directive_pattern.exec(v);return m},R.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},M.exports.Directives=R},,function(M,R,v){var m=v(16).Beautifier,p=v(17).Options;function c(o,h){var s=new m(o,h);return s.beautify()}M.exports=c,M.exports.defaultOptions=function(){return new p}},function(M,R,v){var m=v(17).Options,p=v(2).Output,c=v(8).InputScanner,o=v(13).Directives,h=new o(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,l=/\s/,f=/(?:\s|\n)+/g,O=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,A=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function T(w,S){this._source_text=w||"",this._options=new m(S),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}T.prototype.eatString=function(w){var S="";for(this._ch=this._input.next();this._ch;){if(S+=this._ch,this._ch==="\\")S+=this._input.next();else if(w.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return S},T.prototype.eatWhitespace=function(w){for(var S=l.test(this._input.peek()),x=0;l.test(this._input.peek());)this._ch=this._input.next(),w&&this._ch===`
|
|
`&&((x===0||x<this._options.max_preserve_newlines)&&(x++,this._output.add_new_line(!0)));return S},T.prototype.foundNestedPseudoClass=function(){for(var w=0,S=1,x=this._input.peek(S);x;){if(x==="{")return!0;if(x==="(")w+=1;else if(x===")"){if(w===0)return!1;w-=1}else if(x===";"||x==="}")return!1;S++,x=this._input.peek(S)}return!1},T.prototype.print_string=function(w){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(w)},T.prototype.preserveSingleSpace=function(w){w&&(this._output.space_before_token=!0)},T.prototype.indent=function(){this._indentLevel++},T.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,S=this._options.eol;S==="auto"&&(S=`
|
|
`,w&&s.test(w||"")&&(S=w.match(s)[0])),w=w.replace(i,`
|
|
`);var x=w.match(/^[\t ]*/)[0];this._output=new p(this._options,x),this._input=new c(w),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var d=0,y=!1,u=!1,E=!1,g=!1,b=!1,P=!1,L=this._ch,B=!1,U,C,_;U=this._input.read(f),C=U!=="",_=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var j=this._input.read(O),K=h.get_directives(j);K&&K.ignore==="start"&&(j+=h.readIgnored(this._input)),this.print_string(j),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(A)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(C),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s$/,""),this.print_string(q),this._output.space_before_token=!0),q=q.replace(/\s$/,""),q==="extend"?g=!0:q==="import"&&(b=!0),q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(E=!0)):!y&&d===0&&q.indexOf(":")!==-1&&(u=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(C),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")u&&(u=!1,this.outdent()),E?(E=!1,y=this._indentLevel>=this._nestedLevel):y=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&y&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(_==="("?this._output.space_before_token=!1:_!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),_==="{"&&this._output.trim(!0),b=!1,g=!1,u&&(this.outdent(),u=!1),this.print_string(this._ch),y=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var te=0;te<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;te++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[te])){B=!0;break}(y||E)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&d===0?(this.print_string(":"),u||(u=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var _e=_==='"'||_==="'";this.preserveSingleSpace(_e||C),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")B=!1,d===0?(u&&(this.outdent(),u=!1),g=!1,b=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),d++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),d&&(d--,this.outdent()));else{var ue=!1;this._input.lookBack("with")&&(ue=!0),this.preserveSingleSpace(C||ue),this.print_string(this._ch),u&&_==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),P=!0):(this.eatWhitespace(),d++,this.indent())}else if(this._ch===")")d&&(d--,this.outdent()),P&&this._input.peek()===";"&&this._options.selector_separator_newline&&(P=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!u||P)&&d===0&&!b&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!u&&d===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&l.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(C),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var me=_==='"'||_==="'";this.preserveSingleSpace(me||C),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&B&&this._output.add_new_line()}var fe=this._output.get_code(S);return fe},M.exports.Beautifier=T},function(M,R,v){var m=v(6).Options;function p(c){m.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<h.length;s++)h[s]!=="expand"?this.brace_style="collapse":this.brace_style=h[s]}p.prototype=new m,M.exports.Options=p}],k={};function W(M){var R=k[M];if(R!==void 0)return R.exports;var v=k[M]={exports:{}};return N[M](v,v.exports,W),v.exports}var F=W(15);D=F})();var z=D;!(ne=[],V=function(){return{css_beautify:z}}.apply(we,ne),V!==void 0&&(Pe.exports=V))})()},UZu5:function(Pe,we,Y){},"VrN/":function(Pe,we,Y){(function(ne,V){Pe.exports=V()})(this,function(){"use strict";var ne=navigator.userAgent,V=navigator.platform,D=/gecko\/\d/i.test(ne),z=/MSIE \d/.test(ne),N=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ne),k=/Edge\/(\d+)/.exec(ne),W=z||N||k,F=W&&(z?document.documentMode||6:+(k||N)[1]),M=!k&&/WebKit\//.test(ne),R=M&&/Qt\/\d+\.\d+/.test(ne),v=!k&&/Chrome\//.test(ne),m=/Opera\//.test(ne),p=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ne),o=/PhantomJS/.test(ne),h=!k&&/AppleWebKit/.test(ne)&&/Mobile\/\w+/.test(ne),s=/Android/.test(ne),i=h||s||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ne),l=h||/Mac/.test(V),f=/\bCrOS\b/.test(ne),O=/win/i.test(V),A=m&&ne.match(/Version\/(\d*\.\d*)/);A&&(A=Number(A[1])),A&&A>=15&&(m=!1,M=!0);var T=l&&(R||m&&(A==null||A<12.11)),w=D||W&&F>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var x=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var a=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(a?n[1]+a:"")}};function d(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function y(e,t){return d(e).appendChild(t)}function u(e,t,r,n){var a=document.createElement(e);if(r&&(a.className=r),n&&(a.style.cssText=n),typeof t=="string")a.appendChild(document.createTextNode(t));else if(t)for(var I=0;I<t.length;++I)a.appendChild(t[I]);return a}function E(e,t,r,n){var a=u(e,t,r,n);return a.setAttribute("role","presentation"),a}var g;document.createRange?g=function(e,t,r,n){var a=document.createRange();return a.setEnd(n||e,r),a.setStart(e,t),a}:g=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(a){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function b(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 P(){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 L(e,t){var r=e.className;S(t).test(r)||(e.className+=(r?" ":"")+t)}function B(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 U=function(e){e.select()};h?U=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:W&&(U=function(e){try{e.select()}catch(t){}});function C(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _(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 j(e,t,r,n,a){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var I=n||0,H=a||0;;){var G=e.indexOf(" ",I);if(G<0||G>=t)return H+(t-I);H+=G-I,H+=r-H%r,I=G+1}}var K=function(){this.id=null,this.f=null,this.time=0,this.handler=C(this.onTimeout,this)};K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.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 q(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var te=50,_e={toString:function(){return"CodeMirror.Pass"}},ue={scroll:!1},me={origin:"*mouse"},fe={origin:"+move"};function le(e,t,r){for(var n=0,a=0;;){var I=e.indexOf(" ",n);I==-1&&(I=e.length);var H=I-n;if(I==e.length||a+H>=t)return n+Math.min(H,t-a);if(a+=I-n,a+=r-a%r,n=I+1,a>=t)return n}}var ie=[""];function he(e){for(;ie.length<=e;)ie.push(J(ie)+" ");return ie[e]}function J(e){return e[e.length-1]}function ae(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ee(e,t,r){for(var n=0,a=r(t);n<e.length&&r(e[n])<=a;)n++;e.splice(n,0,t)}function be(){}function xe(e,t){var r;return Object.create?r=Object.create(e):(be.prototype=e,r=new be),t&&_(t,r),r}var ye=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ae(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ye.test(e))}function Le(e,t){return t?t.source.indexOf("\\w")>-1&&Ae(e)?!0:t.test(e):Ae(e)}function Ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ke=/[\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 Oe(e){return e.charCodeAt(0)>=768&&ke.test(e)}function Ie(e,t,r){for(;(r<0?t>0:t<e.length)&&Oe(e.charAt(t));)t+=r;return t}function Ge(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var a=(t+r)/2,I=n<0?Math.ceil(a):Math.floor(a);if(I==t)return e(I)?t:r;e(I)?r=I:t=I+n}}function Je(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var a=!1,I=0;I<e.length;++I){var H=e[I];(H.from<r&&H.to>t||t==r&&H.to==t)&&(n(Math.max(H.from,t),Math.min(H.to,r),H.level==1?"rtl":"ltr",I),a=!0)}a||n(t,r,"ltr")}var Ve=null;function Ke(e,t,r){var n;Ve=null;for(var a=0;a<e.length;++a){var I=e[a];if(I.from<t&&I.to>t)return a;I.to==t&&(I.from!=I.to&&r=="before"?n=a:Ve=a),I.from==t&&(I.from!=I.to&&r!="before"?n=a:Ve=a)}return n!=null?n:Ve}var nt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(Q){return Q<=247?e.charAt(Q):1424<=Q&&Q<=1524?"R":1536<=Q&&Q<=1785?t.charAt(Q-1536):1774<=Q&&Q<=2220?"r":8192<=Q&&Q<=8203?"w":Q==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,I=/[LRr]/,H=/[Lb1n]/,G=/[1n]/;function X(Q,se,de){this.level=Q,this.from=se,this.to=de}return function(Q,se){var de=se=="ltr"?"L":"R";if(Q.length==0||se=="ltr"&&!n.test(Q))return!1;for(var Te=Q.length,Ee=[],Ue=0;Ue<Te;++Ue)Ee.push(r(Q.charCodeAt(Ue)));for(var We=0,Ye=de;We<Te;++We){var qe=Ee[We];qe=="m"?Ee[We]=Ye:Ye=qe}for(var it=0,$e=de;it<Te;++it){var at=Ee[it];at=="1"&&$e=="r"?Ee[it]="n":I.test(at)&&($e=at,at=="r"&&(Ee[it]="R"))}for(var pt=1,lt=Ee[0];pt<Te-1;++pt){var bt=Ee[pt];bt=="+"&<=="1"&&Ee[pt+1]=="1"?Ee[pt]="1":bt==","&<==Ee[pt+1]&&(lt=="1"||lt=="n")&&(Ee[pt]=lt),lt=bt}for(var Kt=0;Kt<Te;++Kt){var fn=Ee[Kt];if(fn==",")Ee[Kt]="N";else if(fn=="%"){var Zt=void 0;for(Zt=Kt+1;Zt<Te&&Ee[Zt]=="%";++Zt);for(var Un=Kt&&Ee[Kt-1]=="!"||Zt<Te&&Ee[Zt]=="1"?"1":"N",Cn=Kt;Cn<Zt;++Cn)Ee[Cn]=Un;Kt=Zt-1}}for(var sn=0,In=de;sn<Te;++sn){var vn=Ee[sn];In=="L"&&vn=="1"?Ee[sn]="L":I.test(vn)&&(In=vn)}for(var dn=0;dn<Te;++dn)if(a.test(Ee[dn])){var on=void 0;for(on=dn+1;on<Te&&a.test(Ee[on]);++on);for(var qt=(dn?Ee[dn-1]:de)=="L",Ln=(on<Te?Ee[on]:de)=="L",li=qt==Ln?qt?"L":"R":de,Or=dn;Or<on;++Or)Ee[Or]=li;dn=on-1}for(var bn=[],ir,pn=0;pn<Te;)if(H.test(Ee[pn])){var Ya=pn;for(++pn;pn<Te&&H.test(Ee[pn]);++pn);bn.push(new X(0,Ya,pn))}else{var fr=pn,Hr=bn.length,Kr=se=="rtl"?1:0;for(++pn;pn<Te&&Ee[pn]!="L";++pn);for(var xn=fr;xn<pn;)if(G.test(Ee[xn])){fr<xn&&(bn.splice(Hr,0,new X(1,fr,xn)),Hr+=Kr);var ui=xn;for(++xn;xn<pn&&G.test(Ee[xn]);++xn);bn.splice(Hr,0,new X(2,ui,xn)),Hr+=Kr,fr=xn}else++xn;fr<pn&&bn.splice(Hr,0,new X(1,fr,pn))}return se=="ltr"&&(bn[0].level==1&&(ir=Q.match(/^\s+/))&&(bn[0].from=ir[0].length,bn.unshift(new X(0,0,ir[0].length))),J(bn).level==1&&(ir=Q.match(/\s+$/))&&(J(bn).to-=ir[0].length,bn.push(new X(0,Te-ir[0].length,Te)))),se=="rtl"?bn.reverse():bn}}();function Qe(e,t){var r=e.order;return r==null&&(r=e.order=nt(e.text,t)),r}var Ze=[],Re=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]||Ze).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Ze}function Xe(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,a=n&&n[t];if(a){var I=q(a,r);I>-1&&(n[t]=a.slice(0,I).concat(a.slice(I+1)))}}}function Se(e,t){var r=tt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),a=0;a<r.length;++a)r[a].apply(null,n)}function je(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Se(e,r||t.type,e,t),re(t)||t.codemirrorIgnore}function ve(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)q(r,t[n])==-1&&r.push(t[n])}function ce(e,t){return tt(e,t).length>0}function pe(e){e.prototype.on=function(t,r){Re(this,t,r)},e.prototype.off=function(t,r){Xe(this,t,r)}}function Z(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function $(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function re(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function oe(e){Z(e),$(e)}function ge(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),l&&e.ctrlKey&&t==1&&(t=3),t}var Fe=function(){if(W&&F<9)return!1;var e=u("div");return"draggable"in e||"dragDrop"in e}(),et;function rt(e){if(et==null){var t=u("span","\u200B");y(e,u("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(et=t.offsetWidth<=1&&t.offsetHeight>2&&!(W&&F<8))}var r=et?u("span","\u200B"):u("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var De;function St(e){if(De!=null)return De;var t=y(e,document.createTextNode("A\u062EA")),r=g(t,0,1).getBoundingClientRect(),n=g(t,1,2).getBoundingClientRect();return d(e),!r||r.left==r.right?!1:De=n.right-r.right<3}var ht=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var a=e.indexOf(`
|
|
`,t);a==-1&&(a=e.length);var I=e.slice(t,e.charAt(a-1)=="\r"?a-1:a),H=I.indexOf("\r");H!=-1?(r.push(I.slice(0,H)),t+=H+1):(r.push(I),t=a+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Me=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},yt=function(){var e=u("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Et=null;function $t(e){if(Et!=null)return Et;var t=y(e,u("span","x")),r=t.getBoundingClientRect(),n=g(t,0,1).getBoundingClientRect();return Et=Math.abs(r.left-n.left)>1}var Yt={},Tt={};function _n(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Yt[e]=t}function Bn(e,t){Tt[e]=t}function ft(e){if(typeof e=="string"&&Tt.hasOwnProperty(e))e=Tt[e];else if(e&&typeof e.name=="string"&&Tt.hasOwnProperty(e.name)){var t=Tt[e.name];typeof t=="string"&&(t={name:t}),e=xe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ft("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ft("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,t){t=ft(t);var r=Yt[t.name];if(!r)return gt(e,"text/plain");var n=r(e,t);if(xt.hasOwnProperty(t.name)){var a=xt[t.name];for(var I in a){if(!a.hasOwnProperty(I))continue;n.hasOwnProperty(I)&&(n["_"+I]=n[I]),n[I]=a[I]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var H in t.modeProps)n[H]=t.modeProps[H];return n}var xt={};function kt(e,t){var r=xt.hasOwnProperty(e)?xt[e]:xt[e]={};_(t,r)}function en(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var a=t[n];a instanceof Array&&(a=a.concat([])),r[n]=a}return r}function Zn(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 pr(e,t,r){return e.startState?e.startState(t,r):!0}var Vt=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};Vt.prototype.eol=function(){return this.pos>=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Vt.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},Vt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Vt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Vt.prototype.backUp=function(e){this.pos-=e},Vt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Vt.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Vt.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(H){return r?H.toLowerCase():H},a=this.string.substr(this.pos,e.length);if(n(a)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var I=this.string.slice(this.pos).match(e);return I&&I.index>0?null:(I&&t!==!1&&(this.pos+=I[0].length),I)}},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Vt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Vt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function st(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 a=r.children[n],I=a.chunkSize();if(t<I){r=a;break}t-=I}return r.lines[t]}function Kn(e,t,r){var n=[],a=t.line;return e.iter(t.line,r.line+1,function(I){var H=I.text;a==r.line&&(H=H.slice(0,r.ch)),a==t.line&&(H=H.slice(t.ch)),n.push(H),++a}),n}function tn(e,t,r){var n=[];return e.iter(t,r,function(a){n.push(a.text)}),n}function mn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function It(e){if(e.parent==null)return null;for(var t=e.parent,r=q(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var a=0;!(n.children[a]==t);++a)r+=n.children[a].chunkSize();return r+t.first}function Dn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var a=e.children[n],I=a.height;if(t<I){e=a;continue e}t-=I,r+=a.chunkSize()}return r}while(!e.lines);for(var H=0;H<e.lines.length;++H){var G=e.lines[H],X=G.height;if(t<X)break;t-=X}return r+H}function Xt(e,t){return t>=e.first&&t<e.first+e.size}function ar(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function He(e,t,r){if(r===void 0&&(r=null),!(this instanceof He))return new He(e,t,r);this.line=e,this.ch=t,this.sticky=r}function mt(e,t){return e.line-t.line||e.ch-t.ch}function qn(e,t){return e.sticky==t.sticky&&mt(e,t)==0}function mr(e){return He(e.line,e.ch)}function sr(e,t){return mt(e,t)<0?t:e}function or(e,t){return mt(e,t)<0?e:t}function $n(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return He(e.first,0);var r=e.first+e.size-1;return t.line>r?He(r,st(e,r).text.length):Cr(t,st(e,t.line).text.length)}function Cr(e,t){var r=e.ch;return r==null||r>t?He(e.line,t):r<0?He(e.line,0):e}function ze(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=vt(e,t[n]);return r}var gr=function(e,t){this.state=e,this.lookAhead=t},Mn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Mn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Mn.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}},Mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mn.fromSaved=function(e,t,r){return t instanceof gr?new Mn(e,en(e.mode,t.state),r,t.lookAhead):new Mn(e,en(e.mode,t),r)},Mn.prototype.save=function(e){var t=e!==!1?en(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gr(t,this.maxLookAhead):t};function vr(e,t,r,n){var a=[e.state.modeGen],I={};Pn(e,t.text,e.doc.mode,r,function(Q,se){return a.push(Q,se)},I,n);for(var H=r.state,G=function(Q){r.baseTokens=a;var se=e.state.overlays[Q],de=1,Te=0;r.state=!0,Pn(e,t.text,se.mode,r,function(Ee,Ue){for(var We=de;Te<Ee;){var Ye=a[de];Ye>Ee&&a.splice(de,1,Ee,a[de+1],Ye),de+=2,Te=Math.min(Ee,Ye)}if(!Ue)return;if(se.opaque)a.splice(We,de-We,Ee,"overlay "+Ue),de=We+2;else for(;We<de;We+=2){var qe=a[We+1];a[We+1]=(qe?qe+" ":"")+"overlay "+Ue}},I),r.state=H,r.baseTokens=null,r.baseTokenPos=1},X=0;X<e.state.overlays.length;++X)G(X);return{styles:a,classes:I.bgClass||I.textClass?I:null}}function kn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=An(e,It(t)),a=t.text.length>e.options.maxHighlightLength&&en(e.doc.mode,n.state),I=vr(e,t,n);a&&(n.state=a),t.stateAfter=n.save(!a),t.styles=I.styles,I.classes?t.styleClasses=I.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 An(e,t,r){var n=e.doc,a=e.display;if(!n.mode.startState)return new Mn(n,!0,t);var I=Gr(e,t,r),H=I>n.first&&st(n,I-1).stateAfter,G=H?Mn.fromSaved(n,H,I):new Mn(n,pr(n.mode),I);return n.iter(I,t,function(X){_r(e,X.text,G);var Q=G.line;X.stateAfter=Q==t-1||Q%5==0||Q>=a.viewFrom&&Q<a.viewTo?G.save():null,G.nextLine()}),r&&(n.modeFrontier=G.line),G}function _r(e,t,r,n){var a=e.doc.mode,I=new Vt(t,e.options.tabSize,r);for(I.start=I.pos=n||0,t==""&&Lt(a,r.state);!I.eol();)rn(a,I,r.state),I.start=I.pos}function Lt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Zn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function rn(e,t,r,n){for(var a=0;a<10;a++){n&&(n[0]=Zn(e,r).mode);var I=e.token(t,r);if(t.pos>t.start)return I}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ir=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yr(e,t,r,n){var a=e.doc,I=a.mode,H;t=vt(a,t);var G=st(a,t.line),X=An(e,t.line,r),Q=new Vt(G.text,e.options.tabSize,X),se;for(n&&(se=[]);(n||Q.pos<t.ch)&&!Q.eol();)Q.start=Q.pos,H=rn(I,Q,X.state),n&&se.push(new Ir(Q,H,en(a.mode,X.state)));return n?se:new Ir(Q,H,X.state)}function Lr(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 Pn(e,t,r,n,a,I,H){var G=r.flattenSpans;G==null&&(G=e.options.flattenSpans);var X=0,Q=null,se=new Vt(t,e.options.tabSize,n),de,Te=e.options.addModeClass&&[null];for(t==""&&Lr(Lt(r,n.state),I);!se.eol();){if(se.pos>e.options.maxHighlightLength?(G=!1,H&&_r(e,t,n,se.pos),se.pos=t.length,de=null):de=Lr(rn(r,se,n.state,Te),I),Te){var Ee=Te[0].name;Ee&&(de="m-"+(de?Ee+" "+de:Ee))}if(!G||Q!=de){for(;X<se.start;)X=Math.min(se.start,X+5e3),a(X,Q);Q=de}se.start=se.pos}for(;X<se.pos;){var Ue=Math.min(se.pos,X+5e3);a(Ue,Q),X=Ue}}function Gr(e,t,r){for(var n,a,I=e.doc,H=r?-1:t-(e.doc.mode.innerMode?1e3:100),G=t;G>H;--G){if(G<=I.first)return I.first;var X=st(I,G-1),Q=X.stateAfter;if(Q&&(!r||G+(Q instanceof gr?Q.lookAhead:0)<=I.modeFrontier))return G;var se=j(X.text,null,e.options.tabSize);(a==null||n>se)&&(a=G-1,n=se)}return a}function Dr(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 a=st(e,n).stateAfter;if(a&&(!(a instanceof gr)||n+a.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Be=!1,ct=!1;function Dt(){Be=!0}function wt(){ct=!0}function Gt(e,t,r){this.marker=e,this.from=t,this.to=r}function Pt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Qt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Rt(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ut(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var I=e[a],H=I.marker,G=I.from==null||(H.inclusiveLeft?I.from<=t:I.from<t);if(G||I.from==t&&H.type=="bookmark"&&(!r||!I.marker.insertLeft)){var X=I.to==null||(H.inclusiveRight?I.to>=t:I.to>t);(n||(n=[])).push(new Gt(H,I.from,X?null:I.to))}}return n}function Bt(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var I=e[a],H=I.marker,G=I.to==null||(H.inclusiveRight?I.to>=t:I.to>t);if(G||I.from==t&&H.type=="bookmark"&&(!r||I.marker.insertLeft)){var X=I.from==null||(H.inclusiveLeft?I.from<=t:I.from<t);(n||(n=[])).push(new Gt(H,X?null:I.from-t,I.to==null?null:I.to-t))}}return n}function Wt(e,t){if(t.full)return null;var r=Xt(e,t.from.line)&&st(e,t.from.line).markedSpans,n=Xt(e,t.to.line)&&st(e,t.to.line).markedSpans;if(!r&&!n)return null;var a=t.from.ch,I=t.to.ch,H=mt(t.from,t.to)==0,G=ut(r,a,H),X=Bt(n,I,H),Q=t.text.length==1,se=J(t.text).length+(Q?a:0);if(G)for(var de=0;de<G.length;++de){var Te=G[de];if(Te.to==null){var Ee=Pt(X,Te.marker);Ee?Q&&(Te.to=Ee.to==null?null:Ee.to+se):Te.to=a}}if(X)for(var Ue=0;Ue<X.length;++Ue){var We=X[Ue];if(We.to!=null&&(We.to+=se),We.from==null){var Ye=Pt(G,We.marker);Ye||(We.from=se,Q&&(G||(G=[])).push(We))}else We.from+=se,Q&&(G||(G=[])).push(We)}G&&(G=Ft(G)),X&&X!=G&&(X=Ft(X));var qe=[G];if(!Q){var it=t.text.length-2,$e;if(it>0&&G)for(var at=0;at<G.length;++at)G[at].to==null&&($e||($e=[])).push(new Gt(G[at].marker,null,null));for(var pt=0;pt<it;++pt)qe.push($e);qe.push(X)}return qe}function Ft(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 zt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(Ee){if(Ee.markedSpans)for(var Ue=0;Ue<Ee.markedSpans.length;++Ue){var We=Ee.markedSpans[Ue].marker;We.readOnly&&(!n||q(n,We)==-1)&&(n||(n=[])).push(We)}}),!n)return null;for(var a=[{from:t,to:r}],I=0;I<n.length;++I)for(var H=n[I],G=H.find(0),X=0;X<a.length;++X){var Q=a[X];if(mt(Q.to,G.from)<0||mt(Q.from,G.to)>0)continue;var se=[X,1],de=mt(Q.from,G.from),Te=mt(Q.to,G.to);(de<0||!H.inclusiveLeft&&!de)&&se.push({from:Q.from,to:G.from}),(Te>0||!H.inclusiveRight&&!Te)&&se.push({from:G.to,to:Q.to}),a.splice.apply(a,se),X+=se.length-3}return a}function an(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 ln(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function zn(e){return e.inclusiveLeft?-1:0}function Yn(e){return e.inclusiveRight?1:0}function er(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),a=t.find(),I=mt(n.from,a.from)||zn(e)-zn(t);if(I)return-I;var H=mt(n.to,a.to)||Yn(e)-Yn(t);return H||t.id-e.id}function Fn(e,t){var r=ct&&e.markedSpans,n;if(r)for(var a=void 0,I=0;I<r.length;++I)a=r[I],a.marker.collapsed&&(t?a.from:a.to)==null&&(!n||er(n,a.marker)<0)&&(n=a.marker);return n}function lr(e){return Fn(e,!0)}function ur(e){return Fn(e,!1)}function zr(e,t){var r=ct&&e.markedSpans,n;if(r)for(var a=0;a<r.length;++a){var I=r[a];I.marker.collapsed&&(I.from==null||I.from<t)&&(I.to==null||I.to>t)&&(!n||er(n,I.marker)<0)&&(n=I.marker)}return n}function Bi(e,t,r,n,a){var I=st(e,t),H=ct&&I.markedSpans;if(H)for(var G=0;G<H.length;++G){var X=H[G];if(!X.marker.collapsed)continue;var Q=X.marker.find(0),se=mt(Q.from,r)||zn(X.marker)-zn(a),de=mt(Q.to,n)||Yn(X.marker)-Yn(a);if(se>=0&&de<=0||se<=0&&de>=0)continue;if(se<=0&&(X.marker.inclusiveRight&&a.inclusiveLeft?mt(Q.to,r)>=0:mt(Q.to,r)>0)||se>=0&&(X.marker.inclusiveRight&&a.inclusiveLeft?mt(Q.from,n)<=0:mt(Q.from,n)<0))return!0}}function jn(e){for(var t;t=lr(e);)e=t.find(-1,!0).line;return e}function Fi(e){for(var t;t=ur(e);)e=t.find(1,!0).line;return e}function Yr(e){for(var t,r;t=ur(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function di(e,t){var r=st(e,t),n=jn(r);return r==n?t:It(n)}function Er(e,t){if(t>e.lastLine())return t;var r=st(e,t),n;if(!tr(e,r))return t;for(;n=ur(r);)r=n.find(1,!0).line;return It(r)+1}function tr(e,t){var r=ct&&t.markedSpans;if(r)for(var n=void 0,a=0;a<r.length;++a){if(n=r[a],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&ci(e,t,n))return!0}}function ci(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return ci(e,n.line,Pt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var a=void 0,I=0;I<t.markedSpans.length;++I)if(a=t.markedSpans[I],a.marker.collapsed&&!a.marker.widgetNode&&a.from==r.to&&(a.to==null||a.to!=r.from)&&(a.marker.inclusiveLeft||r.marker.inclusiveRight)&&ci(e,t,a))return!0}function Vn(e){e=jn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var a=r.lines[n];if(a==e)break;t+=a.height}for(var I=r.parent;I;r=I,I=r.parent)for(var H=0;H<I.children.length;++H){var G=I.children[H];if(G==r)break;t+=G.height}return t}function hi(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=lr(n);){var a=r.find(0,!0);n=a.from.line,t+=a.from.ch-a.to.ch}for(n=e;r=ur(n);){var I=r.find(0,!0);t-=n.text.length-I.from.ch,n=I.to.line,t+=n.text.length-I.to.ch}return t}function ji(e){var t=e.display,r=e.doc;t.maxLine=st(r,r.first),t.maxLineLength=hi(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var a=hi(n);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=n)})}var Mr=function(e,t,r){this.text=e,ln(this,t),this.height=r?r(this):1};Mr.prototype.lineNo=function(){return It(this)},pe(Mr);function ua(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),an(e),ln(e,r);var a=n?n(e):1;a!=e.height&&mn(e,a)}function ot(e){e.parent=null,an(e)}var _t={},dt={};function At(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Mt(e,t){var r=E("span",null,null,M?"padding-right: .1px":null),n={pre:E("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var I=a?t.rest[a-1]:t.line,H=void 0;n.pos=0,n.addToken=Ct,St(e.display.measure)&&(H=Qe(I,e.doc.direction))&&(n.addToken=Sn(n.addToken,H)),n.map=[];var G=t!=e.display.externalMeasured&&It(I);dr(I,n,kn(e,I,G)),I.styleClasses&&(I.styleClasses.bgClass&&(n.bgClass=B(I.styleClasses.bgClass,n.bgClass||"")),I.styleClasses.textClass&&(n.textClass=B(I.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(rt(e.display.measure))),a==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(M){var X=n.content.lastChild;(/\bcm-tab\b/.test(X.className)||X.querySelector&&X.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Se(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=B(n.pre.className,n.textClass||"")),n}function Ht(e){var t=u("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ct(e,t,r,n,a,I,H){if(!t)return;var G=e.splitSpaces?un(t,e.trailingSpace):t,X=e.cm.state.specialChars,Q=!1,se;if(!X.test(t))e.col+=t.length,se=document.createTextNode(G),e.map.push(e.pos,e.pos+t.length,se),W&&F<9&&(Q=!0),e.pos+=t.length;else{se=document.createDocumentFragment();for(var de=0;;){X.lastIndex=de;var Te=X.exec(t),Ee=Te?Te.index-de:t.length-de;if(Ee){var Ue=document.createTextNode(G.slice(de,de+Ee));W&&F<9?se.appendChild(u("span",[Ue])):se.appendChild(Ue),e.map.push(e.pos,e.pos+Ee,Ue),e.col+=Ee,e.pos+=Ee}if(!Te)break;de+=Ee+1;var We=void 0;if(Te[0]==" "){var Ye=e.cm.options.tabSize,qe=Ye-e.col%Ye;We=se.appendChild(u("span",he(qe),"cm-tab")),We.setAttribute("role","presentation"),We.setAttribute("cm-text"," "),e.col+=qe}else Te[0]=="\r"||Te[0]==`
|
|
`?(We=se.appendChild(u("span",Te[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),We.setAttribute("cm-text",Te[0]),e.col+=1):(We=e.cm.options.specialCharPlaceholder(Te[0]),We.setAttribute("cm-text",Te[0]),W&&F<9?se.appendChild(u("span",[We])):se.appendChild(We),e.col+=1);e.map.push(e.pos,e.pos+1,We),e.pos++}}if(e.trailingSpace=G.charCodeAt(t.length-1)==32,r||n||a||Q||I||H){var it=r||"";n&&(it+=n),a&&(it+=a);var $e=u("span",[se],it,I);if(H)for(var at in H)H.hasOwnProperty(at)&&at!="style"&&at!="class"&&$e.setAttribute(at,H[at]);return e.content.appendChild($e)}e.content.appendChild(se)}function un(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",a=0;a<e.length;a++){var I=e.charAt(a);I==" "&&r&&(a==e.length-1||e.charCodeAt(a+1)==32)&&(I="\xA0"),n+=I,r=I==" "}return n}function Sn(e,t){return function(r,n,a,I,H,G,X){a=a?a+" cm-force-border":"cm-force-border";for(var Q=r.pos,se=Q+n.length;;){for(var de=void 0,Te=0;Te<t.length&&!(de=t[Te],de.to>Q&&de.from<=Q);Te++);if(de.to>=se)return e(r,n,a,I,H,G,X);e(r,n.slice(0,de.to-Q),a,I,null,G,X),I=null,n=n.slice(de.to-Q),Q=de.to}}}function Ot(e,t,r,n){var a=!n&&r.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!n&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function dr(e,t,r){var n=e.markedSpans,a=e.text,I=0;if(!n){for(var H=1;H<r.length;H+=2)t.addToken(t,a.slice(I,I=r[H]),At(r[H+1],t.cm.options));return}for(var G=a.length,X=0,Q=1,se="",de,Te,Ee=0,Ue,We,Ye,qe,it;;){if(Ee==X){Ue=We=Ye=Te="",it=null,qe=null,Ee=Infinity;for(var $e=[],at=void 0,pt=0;pt<n.length;++pt){var lt=n[pt],bt=lt.marker;if(bt.type=="bookmark"&<.from==X&&bt.widgetNode)$e.push(bt);else if(lt.from<=X&&(lt.to==null||lt.to>X||bt.collapsed&<.to==X&<.from==X)){if(lt.to!=null&<.to!=X&&Ee>lt.to&&(Ee=lt.to,We=""),bt.className&&(Ue+=" "+bt.className),bt.css&&(Te=(Te?Te+";":"")+bt.css),bt.startStyle&<.from==X&&(Ye+=" "+bt.startStyle),bt.endStyle&<.to==Ee&&(at||(at=[])).push(bt.endStyle,lt.to),bt.title&&((it||(it={})).title=bt.title),bt.attributes)for(var Kt in bt.attributes)(it||(it={}))[Kt]=bt.attributes[Kt];bt.collapsed&&(!qe||er(qe.marker,bt)<0)&&(qe=lt)}else lt.from>X&&Ee>lt.from&&(Ee=lt.from)}if(at)for(var fn=0;fn<at.length;fn+=2)at[fn+1]==Ee&&(We+=" "+at[fn]);if(!qe||qe.from==X)for(var Zt=0;Zt<$e.length;++Zt)Ot(t,0,$e[Zt]);if(qe&&(qe.from||0)==X){if(Ot(t,(qe.to==null?G+1:qe.to)-X,qe.marker,qe.from==null),qe.to==null)return;qe.to==X&&(qe=!1)}}if(X>=G)break;for(var Un=Math.min(G,Ee);;){if(se){var Cn=X+se.length;if(!qe){var sn=Cn>Un?se.slice(0,Un-X):se;t.addToken(t,sn,de?de+Ue:Ue,Ye,X+sn.length==Ee?We:"",Te,it)}if(Cn>=Un){se=se.slice(Un-X),X=Un;break}X=Cn,Ye=""}se=a.slice(I,I=r[Q++]),de=At(r[Q++],t.cm.options)}}}function Nt(e,t,r){this.line=t,this.rest=Yr(t),this.size=this.rest?It(J(this.rest))-r+1:1,this.node=this.text=null,this.hidden=tr(e,t)}function wn(e,t,r){for(var n=[],a,I=t;I<r;I=a){var H=new Nt(e.doc,st(e.doc,I),I);a=I+H.size,n.push(H)}return n}var yn=null;function Gn(e){yn?yn.ops.push(e):e.ownsGroup=yn={ops:[e],delayedCallbacks:[]}}function Io(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 a=e.ops[n];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(r<t.length)}function Lo(e,t){var r=e.ownsGroup;if(!r)return;try{Io(r)}finally{yn=null,t(r)}}var fi=null;function gn(e,t){var r=tt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),a;yn?a=yn.delayedCallbacks:fi?a=fi:(a=fi=[],setTimeout(Do,0));for(var I=function(G){a.push(function(){return r[G].apply(null,n)})},H=0;H<r.length;++H)I(H)}function Do(){var e=fi;fi=null;for(var t=0;t<e.length;++t)e[t]()}function Xa(e,t,r,n){for(var a=0;a<t.changes.length;a++){var I=t.changes[a];I=="text"?ko(e,t):I=="gutter"?Ja(e,t,r,n):I=="class"?da(e,t):I=="widget"&&Po(e,t,n)}t.changes=null}function pi(e){return e.node==e.text&&(e.node=u("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),W&&F<8&&(e.node.style.zIndex=2)),e.node}function Mo(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=pi(t);t.background=n.insertBefore(u("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Qa(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Mt(e,t)}function ko(e,t){var r=t.text.className,n=Qa(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,da(e,t)):r&&(t.text.className=r)}function da(e,t){Mo(e,t),t.line.wrapClass?pi(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 Ja(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 a=pi(t);t.gutterBackground=u("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),a.insertBefore(t.gutterBackground,t.text)}var I=t.line.gutterMarkers;if(e.options.lineNumbers||I){var H=pi(t),G=t.gutter=u("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(G),H.insertBefore(G,t.text),t.line.gutterClass&&(G.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!I||!I["CodeMirror-linenumbers"])&&(t.lineNumber=G.appendChild(u("div",ar(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),I)for(var X=0;X<e.display.gutterSpecs.length;++X){var Q=e.display.gutterSpecs[X].className,se=I.hasOwnProperty(Q)&&I[Q];se&&G.appendChild(u("div",[se],"CodeMirror-gutter-elt","left: "+n.gutterLeft[Q]+"px; width: "+n.gutterWidth[Q]+"px"))}}}function Po(e,t,r){t.alignable&&(t.alignable=null);for(var n=S("CodeMirror-linewidget"),a=t.node.firstChild,I=void 0;a;a=I)I=a.nextSibling,n.test(a.className)&&t.node.removeChild(a);Za(e,t,r)}function No(e,t,r,n){var a=Qa(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),da(e,t),Ja(e,t,r,n),Za(e,t,n),t.node}function Za(e,t,r){if(qa(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)qa(e,t.rest[n],t,r,!1)}function qa(e,t,r,n,a){if(!t.widgets)return;for(var I=pi(r),H=0,G=t.widgets;H<G.length;++H){var X=G[H],Q=u("div",[X.node],"CodeMirror-linewidget"+(X.className?" "+X.className:""));X.handleMouseEvents||Q.setAttribute("cm-ignore-events","true"),Uo(X,Q,r,n),e.display.input.setUneditable(Q),a&&X.above?I.insertBefore(Q,r.gutter||r.text):I.appendChild(Q),gn(X,"redraw")}}function Uo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var a=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(a-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function mi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!b(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;"),y(t.display.measure,u("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function cr(e,t){for(var r=ge(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 Wi(e){return e.lineSpace.offsetTop}function ca(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=y(e.measure,u("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 nr(e){return te-e.display.nativeBarWidth}function kr(e){return e.display.scroller.clientWidth-nr(e)-e.display.barWidth}function ha(e){return e.display.scroller.clientHeight-nr(e)-e.display.barHeight}function Bo(e,t,r){var n=e.options.lineWrapping,a=n&&kr(e);if(!t.measure.heights||n&&t.measure.width!=a){var I=t.measure.heights=[];if(n){t.measure.width=a;for(var H=t.text.firstChild.getClientRects(),G=0;G<H.length-1;G++){var X=H[G],Q=H[G+1];Math.abs(X.bottom-Q.bottom)>2&&I.push((X.bottom+Q.top)/2-r.top)}}I.push(r.bottom-r.top)}}function es(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 a=0;a<e.rest.length;a++)if(It(e.rest[a])>r)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}function Fo(e,t){t=jn(t);var r=It(t),n=e.display.externalMeasured=new Nt(e.doc,t,r);n.lineN=r;var a=n.built=Mt(e,n);return n.text=a.pre,y(e.display.lineMeasure,a.pre),n}function ts(e,t,r,n){return rr(e,Vr(e,t),r,n)}function fa(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ur(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Vr(e,t){var r=It(t),n=fa(e,r);n&&!n.text?n=null:n&&n.changes&&(Xa(e,n,r,ya(e)),e.curOp.forceUpdate=!0),n||(n=Fo(e,t));var a=es(n,t,r);return{line:t,view:n,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function rr(e,t,r,n,a){t.before&&(r=-1);var I=r+(n||""),H;return t.cache.hasOwnProperty(I)?H=t.cache[I]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Bo(e,t.view,t.rect),t.hasHeights=!0),H=Wo(e,t,r,n),H.bogus||(t.cache[I]=H)),{left:H.left,right:H.right,top:a?H.rtop:H.top,bottom:a?H.rbottom:H.bottom}}var ns={left:0,right:0,top:0,bottom:0};function rs(e,t,r){for(var n,a,I,H,G,X,Q=0;Q<e.length;Q+=3)if(G=e[Q],X=e[Q+1],t<G?(a=0,I=1,H="left"):t<X?(a=t-G,I=a+1):(Q==e.length-3||t==X&&e[Q+3]>t)&&(I=X-G,a=I-1,t>=X&&(H="right")),a!=null){if(n=e[Q+2],G==X&&r==(n.insertLeft?"left":"right")&&(H=r),r=="left"&&a==0)for(;Q&&e[Q-2]==e[Q-3]&&e[Q-1].insertLeft;)n=e[(Q-=3)+2],H="left";if(r=="right"&&a==X-G)for(;Q<e.length-3&&e[Q+3]==e[Q+4]&&!e[Q+5].insertLeft;)n=e[(Q+=3)+2],H="right";break}return{node:n,start:a,end:I,collapse:H,coverStart:G,coverEnd:X}}function jo(e,t){var r=ns;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var a=e.length-1;a>=0&&!((r=e[a]).left!=r.right);a--);return r}function Wo(e,t,r,n){var a=rs(t.map,r,n),I=a.node,H=a.start,G=a.end,X=a.collapse,Q;if(I.nodeType==3){for(var se=0;se<4;se++){for(;H&&Oe(t.line.text.charAt(a.coverStart+H));)--H;for(;a.coverStart+G<a.coverEnd&&Oe(t.line.text.charAt(a.coverStart+G));)++G;if(W&&F<9&&H==0&&G==a.coverEnd-a.coverStart?Q=I.parentNode.getBoundingClientRect():Q=jo(g(I,H,G).getClientRects(),n),Q.left||Q.right||H==0)break;G=H,H=H-1,X="right"}W&&F<11&&(Q=Ho(e.display.measure,Q))}else{H>0&&(X=n="right");var de;e.options.lineWrapping&&(de=I.getClientRects()).length>1?Q=de[n=="right"?de.length-1:0]:Q=I.getBoundingClientRect()}if(W&&F<9&&!H&&(!Q||!Q.left&&!Q.right)){var Te=I.parentNode.getClientRects()[0];Te?Q={left:Te.left,right:Te.left+Qr(e.display),top:Te.top,bottom:Te.bottom}:Q=ns}for(var Ee=Q.top-t.rect.top,Ue=Q.bottom-t.rect.top,We=(Ee+Ue)/2,Ye=t.view.measure.heights,qe=0;qe<Ye.length-1&&!(We<Ye[qe]);qe++);var it=qe?Ye[qe-1]:0,$e=Ye[qe],at={left:(X=="right"?Q.right:Q.left)-t.rect.left,right:(X=="left"?Q.left:Q.right)-t.rect.left,top:it,bottom:$e};return!Q.left&&!Q.right&&(at.bogus=!0),e.options.singleCursorHeightPerLine||(at.rtop=Ee,at.rbottom=Ue),at}function Ho(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!$t(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 is(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 as(e){e.display.externalMeasure=null,d(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)is(e.display.view[t])}function gi(e){as(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ss(){return v&&s?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function os(){return v&&s?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=mi(e.widgets[r]));return t}function Hi(e,t,r,n,a){if(!a){var I=pa(t);r.top+=I,r.bottom+=I}if(n=="line")return r;n||(n="local");var H=Vn(t);if(n=="local"?H+=Wi(e.display):H-=e.display.viewOffset,n=="page"||n=="window"){var G=e.display.lineSpace.getBoundingClientRect();H+=G.top+(n=="window"?0:os());var X=G.left+(n=="window"?0:ss());r.left+=X,r.right+=X}return r.top+=H,r.bottom+=H,r}function ls(e,t,r){if(r=="div")return t;var n=t.left,a=t.top;if(r=="page")n-=ss(),a-=os();else if(r=="local"||!r){var I=e.display.sizer.getBoundingClientRect();n+=I.left,a+=I.top}var H=e.display.lineSpace.getBoundingClientRect();return{left:n-H.left,top:a-H.top}}function ma(e,t,r,n,a){return n||(n=st(e.doc,t.line)),Hi(e,n,ts(e,n,t.ch,a),r)}function Xn(e,t,r,n,a,I){n=n||st(e.doc,t.line),a||(a=Vr(e,n));function H(Ue,We){var Ye=rr(e,a,Ue,We?"right":"left",I);return We?Ye.left=Ye.right:Ye.right=Ye.left,Hi(e,n,Ye,r)}var G=Qe(n,e.doc.direction),X=t.ch,Q=t.sticky;if(X>=n.text.length?(X=n.text.length,Q="before"):X<=0&&(X=0,Q="after"),!G)return H(Q=="before"?X-1:X,Q=="before");function se(Ue,We,Ye){var qe=G[We],it=qe.level==1;return H(Ye?Ue-1:Ue,it!=Ye)}var de=Ke(G,X,Q),Te=Ve,Ee=se(X,de,Q=="before");return Te!=null&&(Ee.other=se(X,Te,Q!="before")),Ee}function us(e,t){var r=0;t=vt(e.doc,t),e.options.lineWrapping||(r=Qr(e.display)*t.ch);var n=st(e.doc,t.line),a=Vn(n)+Wi(e.display);return{left:r,right:r,top:a,bottom:a+n.height}}function ga(e,t,r,n,a){var I=He(e,t,r);return I.xRel=a,n&&(I.outside=n),I}function va(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ga(n.first,0,null,-1,-1);var a=Dn(n,r),I=n.first+n.size-1;if(a>I)return ga(n.first+n.size-1,st(n,I).text.length,null,1,1);t<0&&(t=0);for(var H=st(n,a);;){var G=Ko(e,H,a,t,r),X=zr(H,G.ch+(G.xRel>0||G.outside>0?1:0));if(!X)return G;var Q=X.find(1);if(Q.line==a)return Q;H=st(n,a=Q.line)}}function ds(e,t,r,n){n-=pa(t);var a=t.text.length,I=Ge(function(H){return rr(e,r,H-1).bottom<=n},a,0);return a=Ge(function(H){return rr(e,r,H).top>n},I,a),{begin:I,end:a}}function cs(e,t,r,n){r||(r=Vr(e,t));var a=Hi(e,t,rr(e,r,n),"line").top;return ds(e,t,r,a)}function _a(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Ko(e,t,r,n,a){a-=Vn(t);var I=Vr(e,t),H=pa(t),G=0,X=t.text.length,Q=!0,se=Qe(t,e.doc.direction);if(se){var de=(e.options.lineWrapping?zo:Go)(e,t,r,I,se,n,a);Q=de.level!=1,G=Q?de.from:de.to-1,X=Q?de.to:de.from-1}var Te=null,Ee=null,Ue=Ge(function(pt){var lt=rr(e,I,pt);return lt.top+=H,lt.bottom+=H,_a(lt,n,a,!1)?(lt.top<=a&<.left<=n&&(Te=pt,Ee=lt),!0):!1},G,X),We,Ye,qe=!1;if(Ee){var it=n-Ee.left<Ee.right-n,$e=it==Q;Ue=Te+($e?0:1),Ye=$e?"after":"before",We=it?Ee.left:Ee.right}else{!Q&&(Ue==X||Ue==G)&&Ue++,Ye=Ue==0?"after":Ue==t.text.length?"before":rr(e,I,Ue-(Q?1:0)).bottom+H<=a==Q?"after":"before";var at=Xn(e,He(r,Ue,Ye),"line",t,I);We=at.left,qe=a<at.top?-1:a>=at.bottom?1:0}return Ue=Ie(t.text,Ue,1),ga(r,Ue,Ye,qe,n-We)}function Go(e,t,r,n,a,I,H){var G=Ge(function(de){var Te=a[de],Ee=Te.level!=1;return _a(Xn(e,He(r,Ee?Te.to:Te.from,Ee?"before":"after"),"line",t,n),I,H,!0)},0,a.length-1),X=a[G];if(G>0){var Q=X.level!=1,se=Xn(e,He(r,Q?X.from:X.to,Q?"after":"before"),"line",t,n);_a(se,I,H,!0)&&se.top>H&&(X=a[G-1])}return X}function zo(e,t,r,n,a,I,H){var G=ds(e,t,n,H),X=G.begin,Q=G.end;/\s/.test(t.text.charAt(Q-1))&&Q--;for(var se=null,de=null,Te=0;Te<a.length;Te++){var Ee=a[Te];if(Ee.from>=Q||Ee.to<=X)continue;var Ue=Ee.level!=1,We=rr(e,n,Ue?Math.min(Q,Ee.to)-1:Math.max(X,Ee.from)).right,Ye=We<I?I-We+1e9:We-I;(!se||de>Ye)&&(se=Ee,de=Ye)}return se||(se=a[a.length-1]),se.from<X&&(se={from:X,to:se.to,level:se.level}),se.to>Q&&(se={from:se.from,to:Q,level:se.level}),se}var Pr;function Xr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Pr==null){Pr=u("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Pr.appendChild(document.createTextNode("x")),Pr.appendChild(u("br"));Pr.appendChild(document.createTextNode("x"))}y(e.measure,Pr);var r=Pr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),d(e.measure),r||1}function Qr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=u("span","xxxxxxxxxx"),r=u("pre",[t],"CodeMirror-line-like");y(e.measure,r);var n=t.getBoundingClientRect(),a=(n.right-n.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function ya(e){for(var t=e.display,r={},n={},a=t.gutters.clientLeft,I=t.gutters.firstChild,H=0;I;I=I.nextSibling,++H){var G=e.display.gutterSpecs[H].className;r[G]=I.offsetLeft+I.clientLeft+a,n[G]=I.clientWidth}return{fixedPos:Ea(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Ea(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function hs(e){var t=Xr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Qr(e.display)-3);return function(a){if(tr(e.doc,a))return 0;var I=0;if(a.widgets)for(var H=0;H<a.widgets.length;H++)a.widgets[H].height&&(I+=a.widgets[H].height);return r?I+(Math.ceil(a.text.length/n)||1)*t:I+t}}function ba(e){var t=e.doc,r=hs(e);t.iter(function(n){var a=r(n);a!=n.height&&mn(n,a)})}function Nr(e,t,r,n){var a=e.display;if(!r&&ge(t).getAttribute("cm-not-content")=="true")return null;var I,H,G=a.lineSpace.getBoundingClientRect();try{I=t.clientX-G.left,H=t.clientY-G.top}catch(de){return null}var X=va(e,I,H),Q;if(n&&X.xRel>0&&(Q=st(e.doc,X.line).text).length==X.ch){var se=j(Q,Q.length,e.options.tabSize)-Q.length;X=He(X.line,Math.max(0,Math.round((I-$a(e.display).left)/Qr(e.display))-se))}return X}function Ur(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 Rn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var a=e.display;if(n&&r<a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)ct&&di(e.doc,t)<a.viewTo&&Tr(e);else if(r<=a.viewFrom)ct&&Er(e.doc,r+n)>a.viewFrom?Tr(e):(a.viewFrom+=n,a.viewTo+=n);else if(t<=a.viewFrom&&r>=a.viewTo)Tr(e);else if(t<=a.viewFrom){var I=Ki(e,r,r+n,1);I?(a.view=a.view.slice(I.index),a.viewFrom=I.lineN,a.viewTo+=n):Tr(e)}else if(r>=a.viewTo){var H=Ki(e,t,t,-1);H?(a.view=a.view.slice(0,H.index),a.viewTo=H.lineN):Tr(e)}else{var G=Ki(e,t,t,-1),X=Ki(e,r,r+n,1);G&&X?(a.view=a.view.slice(0,G.index).concat(wn(e,G.lineN,X.lineN)).concat(a.view.slice(X.index)),a.viewTo+=n):Tr(e)}var Q=a.externalMeasured;Q&&(r<Q.lineN?Q.lineN+=n:t<Q.lineN+Q.size&&(a.externalMeasured=null))}function br(e,t,r){e.curOp.viewChanged=!0;var n=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var I=n.view[Ur(e,t)];if(I.node==null)return;var H=I.changes||(I.changes=[]);q(H,r)==-1&&H.push(r)}function Tr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ki(e,t,r,n){var a=Ur(e,t),I,H=e.display.view;if(!ct||r==e.doc.first+e.doc.size)return{index:a,lineN:r};for(var G=e.display.viewFrom,X=0;X<a;X++)G+=H[X].size;if(G!=t){if(n>0){if(a==H.length-1)return null;I=G+H[a].size-t,a++}else I=G-t;t+=I,r+=I}for(;di(e.doc,r)!=r;){if(a==(n<0?0:H.length-1))return null;r+=n*H[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:r}}function Yo(e,t,r){var n=e.display,a=n.view;a.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=wn(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wn(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Ur(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wn(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Ur(e,r)))),n.viewTo=r}function fs(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var a=t[n];!a.hidden&&(!a.node||a.changes)&&++r}return r}function vi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ps(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},a=n.cursors=document.createDocumentFragment(),I=n.selection=document.createDocumentFragment(),H=0;H<r.sel.ranges.length;H++){if(!t&&H==r.sel.primIndex)continue;var G=r.sel.ranges[H];if(G.from().line>=e.display.viewTo||G.to().line<e.display.viewFrom)continue;var X=G.empty();(X||e.options.showCursorWhenSelecting)&&ms(e,G.head,a),X||Vo(e,G,I)}return n}function ms(e,t,r){var n=Xn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=r.appendChild(u("div","\xA0","CodeMirror-cursor"));if(a.style.left=n.left+"px",a.style.top=n.top+"px",a.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var I=r.appendChild(u("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));I.style.display="",I.style.left=n.other.left+"px",I.style.top=n.other.top+"px",I.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Gi(e,t){return e.top-t.top||e.left-t.left}function Vo(e,t,r){var n=e.display,a=e.doc,I=document.createDocumentFragment(),H=$a(e.display),G=H.left,X=Math.max(n.sizerWidth,kr(e)-n.sizer.offsetLeft)-H.right,Q=a.direction=="ltr";function se($e,at,pt,lt){at<0&&(at=0),at=Math.round(at),lt=Math.round(lt),I.appendChild(u("div",null,"CodeMirror-selected","position: absolute; left: "+$e+`px;
|
|
top: `+at+"px; width: "+(pt==null?X-$e:pt)+`px;
|
|
height: `+(lt-at)+"px"))}function de($e,at,pt){var lt=st(a,$e),bt=lt.text.length,Kt,fn;function Zt(sn,In){return ma(e,He($e,sn),"div",lt,In)}function Un(sn,In,vn){var dn=cs(e,lt,null,sn),on=In=="ltr"==(vn=="after")?"left":"right",qt=vn=="after"?dn.begin:dn.end-(/\s/.test(lt.text.charAt(dn.end-1))?2:1);return Zt(qt,on)[on]}var Cn=Qe(lt,a.direction);return Je(Cn,at||0,pt==null?bt:pt,function(sn,In,vn,dn){var on=vn=="ltr",qt=Zt(sn,on?"left":"right"),Ln=Zt(In-1,on?"right":"left"),li=at==null&&sn==0,Or=pt==null&&In==bt,bn=dn==0,ir=!Cn||dn==Cn.length-1;if(Ln.top-qt.top<=3){var pn=(Q?li:Or)&&bn,Ya=(Q?Or:li)&&ir,fr=pn?G:(on?qt:Ln).left,Hr=Ya?X:(on?Ln:qt).right;se(fr,qt.top,Hr-fr,qt.bottom)}else{var Kr,xn,ui,Va;on?(Kr=Q&&li&&bn?G:qt.left,xn=Q?X:Un(sn,vn,"before"),ui=Q?G:Un(In,vn,"after"),Va=Q&&Or&&ir?X:Ln.right):(Kr=Q?Un(sn,vn,"before"):G,xn=!Q&&li&&bn?X:qt.right,ui=!Q&&Or&&ir?G:Ln.left,Va=Q?Un(In,vn,"after"):X),se(Kr,qt.top,xn-Kr,qt.bottom),qt.bottom<Ln.top&&se(G,qt.bottom,null,Ln.top),se(ui,Ln.top,Va-ui,Ln.bottom)}(!Kt||Gi(qt,Kt)<0)&&(Kt=qt),Gi(Ln,Kt)<0&&(Kt=Ln),(!fn||Gi(qt,fn)<0)&&(fn=qt),Gi(Ln,fn)<0&&(fn=Ln)}),{start:Kt,end:fn}}var Te=t.from(),Ee=t.to();if(Te.line==Ee.line)de(Te.line,Te.ch,Ee.ch);else{var Ue=st(a,Te.line),We=st(a,Ee.line),Ye=jn(Ue)==jn(We),qe=de(Te.line,Te.ch,Ye?Ue.text.length+1:null).end,it=de(Ee.line,Ye?0:null,Ee.ch).start;Ye&&(qe.top<it.top-2?(se(qe.right,qe.top,null,qe.bottom),se(G,it.top,it.left,it.bottom)):se(qe.right,qe.top,it.left-qe.right,qe.bottom)),qe.bottom<it.top&&se(G,qe.bottom,null,it.top)}r.appendChild(I)}function Ta(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()||Jr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gs(e){e.state.focused||(e.display.input.focus(),xa(e))}function vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Jr(e))},100)}function xa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Se(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),M&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ta(e)}function Jr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Se(e,"blur",e,t),e.state.focused=!1,x(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var a=t.view[n],I=e.options.lineWrapping,H=void 0,G=0;if(a.hidden)continue;if(W&&F<8){var X=a.node.offsetTop+a.node.offsetHeight;H=X-r,r=X}else{var Q=a.node.getBoundingClientRect();H=Q.bottom-Q.top,!I&&a.text.firstChild&&(G=a.text.firstChild.getBoundingClientRect().right-Q.left-1)}var se=a.line.height-H;if((se>.005||se<-.005)&&(mn(a.line,H),_s(a.line),a.rest))for(var de=0;de<a.rest.length;de++)_s(a.rest[de]);if(G>e.display.sizerWidth){var Te=Math.ceil(G/Qr(e.display));Te>e.display.maxLineLength&&(e.display.maxLineLength=Te,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}function _s(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-Wi(e));var a=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,I=Dn(t,n),H=Dn(t,a);if(r&&r.ensure){var G=r.ensure.from.line,X=r.ensure.to.line;G<I?(I=G,H=Dn(t,Vn(st(t,G))+e.wrapper.clientHeight)):Math.min(X,t.lastLine())>=H&&(I=Dn(t,Vn(st(t,X))-e.wrapper.clientHeight),H=X)}return{from:I,to:Math.max(H,I+1)}}function Xo(e,t){if(je(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),a=null;if(t.top+n.top<0?a=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),a!=null&&!o){var I=u("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Wi(e.display))+`px;
|
|
height: `+(t.bottom-t.top+nr(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(I),I.scrollIntoView(a),e.display.lineSpace.removeChild(I)}}function Qo(e,t,r,n){n==null&&(n=0);var a;!e.options.lineWrapping&&t==r&&(t=t.ch?He(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?He(t.line,t.ch+1,"before"):t);for(var I=0;I<5;I++){var H=!1,G=Xn(e,t),X=!r||r==t?G:Xn(e,r);a={left:Math.min(G.left,X.left),top:Math.min(G.top,X.top)-n,right:Math.max(G.left,X.left),bottom:Math.max(G.bottom,X.bottom)+n};var Q=Aa(e,a),se=e.doc.scrollTop,de=e.doc.scrollLeft;if(Q.scrollTop!=null&&(yi(e,Q.scrollTop),Math.abs(e.doc.scrollTop-se)>1&&(H=!0)),Q.scrollLeft!=null&&(Br(e,Q.scrollLeft),Math.abs(e.doc.scrollLeft-de)>1&&(H=!0)),!H)break}return a}function Jo(e,t){var r=Aa(e,t);r.scrollTop!=null&&yi(e,r.scrollTop),r.scrollLeft!=null&&Br(e,r.scrollLeft)}function Aa(e,t){var r=e.display,n=Xr(e.display);t.top<0&&(t.top=0);var a=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,I=ha(e),H={};t.bottom-t.top>I&&(t.bottom=t.top+I);var G=e.doc.height+ca(r),X=t.top<n,Q=t.bottom>G-n;if(t.top<a)H.scrollTop=X?0:t.top;else if(t.bottom>a+I){var se=Math.min(t.top,(Q?G:t.bottom)-I);se!=a&&(H.scrollTop=se)}var de=e.options.fixedGutter?0:r.gutters.offsetWidth,Te=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-de,Ee=kr(e)-r.gutters.offsetWidth,Ue=t.right-t.left>Ee;return Ue&&(t.right=t.left+Ee),t.left<10?H.scrollLeft=0:t.left<Te?H.scrollLeft=Math.max(0,t.left+de-(Ue?0:10)):t.right>Ee+Te-3&&(H.scrollLeft=t.right+(Ue?0:10)-Ee),H}function Sa(e,t){if(t==null)return;Vi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Zr(e){Vi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function _i(e,t,r){(t!=null||r!=null)&&Vi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zo(e,t){Vi(e),e.curOp.scrollToPos=t}function Vi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=us(e,t.from),n=us(e,t.to);ys(e,r,n,t.margin)}}function ys(e,t,r,n){var a=Aa(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});_i(e,a.scrollLeft,a.scrollTop)}function yi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;D||Ra(e,{top:t}),Es(e,t,!0),D&&Ra(e),Ti(e,100)}function Es(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 Br(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,Ss(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Ei(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ca(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+nr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fr=function(e,t,r){this.cm=r;var n=this.vert=u("div",[u("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=u("div",[u("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=a.tabIndex=-1,e(n),e(a),Re(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Re(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,W&&F<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.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 a=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"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 I=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+I)+"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}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=l&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new K,this.disableVert=new K},Fr.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var a=e.getBoundingClientRect(),I=r=="vert"?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1);I!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bi=function(){};bi.prototype.update=function(){return{bottom:0,right:0}},bi.prototype.setScrollLeft=function(){},bi.prototype.setScrollTop=function(){},bi.prototype.clear=function(){};function qr(e,t){t||(t=Ei(e));var r=e.display.barWidth,n=e.display.barHeight;bs(e,t);for(var a=0;a<4&&r!=e.display.barWidth||n!=e.display.barHeight;a++)r!=e.display.barWidth&&e.options.lineWrapping&&zi(e),bs(e,Ei(e)),r=e.display.barWidth,n=e.display.barHeight}function bs(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 Ts={native:Fr,null:bi};function xs(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ts[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Re(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"?Br(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var qo=0;function jr(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:++qo},Gn(e.curOp)}function Wr(e){var t=e.curOp;t&&Lo(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;$o(r)})}function $o(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var a=0;a<t.length;a++)nl(t[a]);for(var I=0;I<t.length;I++)rl(t[I]);for(var H=0;H<t.length;H++)il(t[H])}function el(e){var t=e.cm,r=t.display;sl(t),e.updateMaxLine&&ji(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 Xi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&wa(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&zi(t),e.barMeasure=Ei(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ts(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+nr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&qr(t,e.barMeasure),e.updatedDisplay&&Ca(t,e.barMeasure),e.selectionChanged&&Ta(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&gs(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&As(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Es(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Br(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=Qo(t,vt(n,e.scrollToPos.from),vt(n,e.scrollToPos.to),e.scrollToPos.margin);Xo(t,a)}var I=e.maybeHiddenMarkers,H=e.maybeUnhiddenMarkers;if(I)for(var G=0;G<I.length;++G)I[G].lines.length||Se(I[G],"hide");if(H)for(var X=0;X<H.length;++X)H[X].lines.length&&Se(H[X],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Se(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Nn(e,t){if(e.curOp)return t();jr(e);try{return t()}finally{Wr(e)}}function cn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);jr(e);try{return t.apply(e,arguments)}finally{Wr(e)}}}function Tn(e){return function(){if(this.curOp)return e.apply(this,arguments);jr(this);try{return e.apply(this,arguments)}finally{Wr(this)}}}function hn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);jr(t);try{return e.apply(this,arguments)}finally{Wr(t)}}}function Ti(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,C(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=An(e,t.highlightFrontier),a=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(I){if(n.line>=e.display.viewFrom){var H=I.styles,G=I.text.length>e.options.maxHighlightLength?en(t.mode,n.state):null,X=vr(e,I,n,!0);G&&(n.state=G),I.styles=X.styles;var Q=I.styleClasses,se=X.classes;se?I.styleClasses=se:Q&&(I.styleClasses=null);for(var de=!H||H.length!=I.styles.length||Q!=se&&(!Q||!se||Q.bgClass!=se.bgClass||Q.textClass!=se.textClass),Te=0;!de&&Te<H.length;++Te)de=H[Te]!=I.styles[Te];de&&a.push(n.line),I.stateAfter=n.save(),n.nextLine()}else I.text.length<=e.options.maxHighlightLength&&_r(e,I.text,n),I.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ti(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),a.length&&Nn(e,function(){for(var I=0;I<a.length;I++)br(e,a[I],"text")})}var Xi=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=kr(e),this.force=r,this.dims=ya(e),this.events=[]};Xi.prototype.signal=function(e,t){ce(e,t)&&this.events.push(arguments)},Xi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Se.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=nr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=nr(e)+"px",t.scrollbarsClipped=!0)}function ol(e){if(e.hasFocus())return null;var t=P();if(!t||!b(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&b(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==P())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&b(document.body,e.anchorNode)&&b(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 wa(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Tr(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&&fs(e)==0)return!1;ws(e)&&(Tr(e),t.dims=ya(e));var a=n.first+n.size,I=Math.max(t.visible.from-e.options.viewportMargin,n.first),H=Math.min(a,t.visible.to+e.options.viewportMargin);r.viewFrom<I&&I-r.viewFrom<20&&(I=Math.max(n.first,r.viewFrom)),r.viewTo>H&&r.viewTo-H<20&&(H=Math.min(a,r.viewTo)),ct&&(I=di(e.doc,I),H=Er(e.doc,H));var G=I!=r.viewFrom||H!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Yo(e,I,H),r.viewOffset=Vn(st(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var X=fs(e);if(!G&&X==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var Q=ol(e);return X>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),X>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(Q),d(r.cursorDiv),d(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,G&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ti(e,400)),r.updateLineNumbers=null,!0}function As(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==kr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ca(e.display)-ha(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(!wa(e,t))break;zi(e);var a=Ei(e);vi(e),qr(e,a),Ca(e,a),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 Ra(e,t){var r=new Xi(e,t);if(wa(e,r)){zi(e),As(e,r);var n=Ei(e);vi(e),qr(e,n),Ca(e,n),r.finish()}}function ul(e,t,r){var n=e.display,a=e.options.lineNumbers,I=n.lineDiv,H=I.firstChild;function G(Ue){var We=Ue.nextSibling;return M&&l&&e.display.currentWheelTarget==Ue?Ue.style.display="none":Ue.parentNode.removeChild(Ue),We}for(var X=n.view,Q=n.viewFrom,se=0;se<X.length;se++){var de=X[se];if(!de.hidden)if(!de.node||de.node.parentNode!=I){var Te=No(e,de,Q,r);I.insertBefore(Te,H)}else{for(;H!=de.node;)H=G(H);var Ee=a&&t!=null&&t<=Q&&de.lineNumber;de.changes&&(q(de.changes,"gutter")>-1&&(Ee=!1),Xa(e,de,Q,r)),Ee&&(d(de.lineNumber),de.lineNumber.appendChild(document.createTextNode(ar(e.options,Q)))),H=de.node.nextSibling}Q+=de.size}for(;H;)H=G(H)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ca(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+nr(e)+"px"}function Ss(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Ea(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,I=n+"px",H=0;H<r.length;H++)if(!r[H].hidden){e.options.fixedGutter&&(r[H].gutter&&(r[H].gutter.style.left=I),r[H].gutterBackground&&(r[H].gutterBackground.style.left=I));var G=r[H].alignable;if(G)for(var X=0;X<G.length;X++)G[X].style.left=I}e.options.fixedGutter&&(t.gutters.style.left=n+a+"px")}function ws(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ar(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var a=n.measure.appendChild(u("div",[u("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),I=a.firstChild.offsetWidth,H=a.offsetWidth-I;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(I,n.lineGutter.offsetWidth-H)+1,n.lineNumWidth=n.lineNumInnerWidth+H,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Oa(e.display),!0}return!1}function Ia(e,t){for(var r=[],n=!1,a=0;a<e.length;a++){var I=e[a],H=null;if(typeof I!="string"&&(H=I.style,I=I.className),I=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:I,style:H})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Rs(e){var t=e.gutters,r=e.gutterSpecs;d(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var a=r[n],I=a.className,H=a.style,G=t.appendChild(u("div",null,"CodeMirror-gutter "+I));H&&(G.style.cssText=H),I=="CodeMirror-linenumbers"&&(e.lineGutter=G,G.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Oa(e)}function xi(e){Rs(e.display),Rn(e),Ss(e)}function dl(e,t,r,n){var a=this;this.input=r,a.scrollbarFiller=u("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=u("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=E("div",null,"CodeMirror-code"),a.selectionDiv=u("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=u("div",null,"CodeMirror-cursors"),a.measure=u("div",null,"CodeMirror-measure"),a.lineMeasure=u("div",null,"CodeMirror-measure"),a.lineSpace=E("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var I=E("div",[a.lineSpace],"CodeMirror-lines");a.mover=u("div",[I],null,"position: relative"),a.sizer=u("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=u("div",null,null,"position: absolute; height: "+te+"px; width: 1px;"),a.gutters=u("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=u("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=u("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),W&&F<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!M&&!(D&&i)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Ia(n.gutters,n.lineNumbers),Rs(a),r.init(a)}var Qi=0,Wn=null;W?Wn=-.53:D?Wn=15:v?Wn=-.7:p&&(Wn=-1/3);function Os(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 cl(e){var t=Os(e);return t.x*=Wn,t.y*=Wn,t}function Cs(e,t){var r=Os(t),n=r.x,a=r.y,I=e.display,H=I.scroller,G=H.scrollWidth>H.clientWidth,X=H.scrollHeight>H.clientHeight;if(!(n&&G||a&&X))return;if(a&&l&&M){e:for(var Q=t.target,se=I.view;Q!=H;Q=Q.parentNode)for(var de=0;de<se.length;de++)if(se[de].node==Q){e.display.currentWheelTarget=Q;break e}}if(n&&!D&&!m&&Wn!=null){a&&X&&yi(e,Math.max(0,H.scrollTop+a*Wn)),Br(e,Math.max(0,H.scrollLeft+n*Wn)),(!a||a&&X)&&Z(t),I.wheelStartX=null;return}if(a&&Wn!=null){var Te=a*Wn,Ee=e.doc.scrollTop,Ue=Ee+I.wrapper.clientHeight;Te<0?Ee=Math.max(0,Ee+Te-50):Ue=Math.min(e.doc.height,Ue+Te+50),Ra(e,{top:Ee,bottom:Ue})}Qi<20&&(I.wheelStartX==null?(I.wheelStartX=H.scrollLeft,I.wheelStartY=H.scrollTop,I.wheelDX=n,I.wheelDY=a,setTimeout(function(){if(I.wheelStartX==null)return;var We=H.scrollLeft-I.wheelStartX,Ye=H.scrollTop-I.wheelStartY,qe=Ye&&I.wheelDY&&Ye/I.wheelDY||We&&I.wheelDX&&We/I.wheelDX;if(I.wheelStartX=I.wheelStartY=null,!qe)return;Wn=(Wn*Qi+qe)/(Qi+1),++Qi},200)):(I.wheelDX+=n,I.wheelDY+=a))}var Hn=function(e,t){this.ranges=e,this.primIndex=t};Hn.prototype.primary=function(){return this.ranges[this.primIndex]},Hn.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(!qn(r.anchor,n.anchor)||!qn(r.head,n.head))return!1}return!0},Hn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ut(mr(this.ranges[t].anchor),mr(this.ranges[t].head));return new Hn(e,this.primIndex)},Hn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Hn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(mt(t,n.from())>=0&&mt(e,n.to())<=0)return r}return-1};var Ut=function(e,t){this.anchor=e,this.head=t};Ut.prototype.from=function(){return or(this.anchor,this.head)},Ut.prototype.to=function(){return sr(this.anchor,this.head)},Ut.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qn(e,t,r){var n=e&&e.options.selectionsMayTouch,a=t[r];t.sort(function(Te,Ee){return mt(Te.from(),Ee.from())}),r=q(t,a);for(var I=1;I<t.length;I++){var H=t[I],G=t[I-1],X=mt(G.to(),H.from());if(n&&!H.empty()?X>0:X>=0){var Q=or(G.from(),H.from()),se=sr(G.to(),H.to()),de=G.empty()?H.from()==H.head:G.from()==G.head;I<=r&&--r,t.splice(--I,2,new Ut(de?se:Q,de?Q:se))}}return new Hn(t,r)}function xr(e,t){return new Hn([new Ut(e,t||e)],0)}function Ar(e){return e.text?He(e.from.line+e.text.length-1,J(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Is(e,t){if(mt(e,t.from)<0)return e;if(mt(e,t.to)<=0)return Ar(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+=Ar(t).ch-t.to.ch),He(r,n)}function La(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var a=e.sel.ranges[n];r.push(new Ut(Is(a.anchor,t),Is(a.head,t)))}return Qn(e.cm,r,e.sel.primIndex)}function Ls(e,t,r){return e.line==t.line?He(r.line,e.ch-t.ch+r.ch):He(r.line+(e.line-t.line),e.ch)}function hl(e,t,r){for(var n=[],a=He(e.first,0),I=a,H=0;H<t.length;H++){var G=t[H],X=Ls(G.from,a,I),Q=Ls(Ar(G),a,I);if(a=G.to,I=Q,r=="around"){var se=e.sel.ranges[H],de=mt(se.head,se.anchor)<0;n[H]=new Ut(de?Q:X,de?X:Q)}else n[H]=new Ut(X,X)}return new Hn(n,e.sel.primIndex)}function Da(e){e.doc.mode=gt(e.options,e.doc.modeOption),Ai(e)}function Ai(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,Ti(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function Ds(e,t){return t.from.ch==0&&t.to.ch==0&&J(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ma(e,t,r,n){function a(it){return r?r[it]:null}function I(it,$e,at){ua(it,$e,at,n),gn(it,"change",it,t)}function H(it,$e){for(var at=[],pt=it;pt<$e;++pt)at.push(new Mr(Q[pt],a(pt),n));return at}var G=t.from,X=t.to,Q=t.text,se=st(e,G.line),de=st(e,X.line),Te=J(Q),Ee=a(Q.length-1),Ue=X.line-G.line;if(t.full)e.insert(0,H(0,Q.length)),e.remove(Q.length,e.size-Q.length);else if(Ds(e,t)){var We=H(0,Q.length-1);I(de,de.text,Ee),Ue&&e.remove(G.line,Ue),We.length&&e.insert(G.line,We)}else if(se==de)if(Q.length==1)I(se,se.text.slice(0,G.ch)+Te+se.text.slice(X.ch),Ee);else{var Ye=H(1,Q.length-1);Ye.push(new Mr(Te+se.text.slice(X.ch),Ee,n)),I(se,se.text.slice(0,G.ch)+Q[0],a(0)),e.insert(G.line+1,Ye)}else if(Q.length==1)I(se,se.text.slice(0,G.ch)+Q[0]+de.text.slice(X.ch),a(0)),e.remove(G.line+1,Ue);else{I(se,se.text.slice(0,G.ch)+Q[0],a(0)),I(de,Te+de.text.slice(X.ch),Ee);var qe=H(1,Q.length-1);Ue>1&&e.remove(G.line+1,Ue-1),e.insert(G.line+1,qe)}gn(e,"change",e,t)}function Sr(e,t,r){function n(a,I,H){if(a.linked)for(var G=0;G<a.linked.length;++G){var X=a.linked[G];if(X.doc==I)continue;var Q=H&&X.sharedHist;if(r&&!Q)continue;t(X.doc,Q),n(X.doc,a,Q)}}n(e,null,!0)}function Ms(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ba(e),Da(e),ks(e),e.options.lineWrapping||ji(e),e.options.mode=t.modeOption,Rn(e)}function ks(e){(e.doc.direction=="rtl"?L:x)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Nn(e,function(){ks(e),Rn(e)})}function Ji(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 ka(e,t){var r={from:mr(t.from),to:Ar(t),text:Kn(e,t.from,t.to)};return Us(e,r,t.from.line,t.to.line+1),Sr(e,function(n){return Us(n,r,t.from.line,t.to.line+1)},!0),r}function Ps(e){for(;e.length;){var t=J(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Ps(e.done),J(e.done);if(e.done.length&&!J(e.done).ranges)return J(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),J(e.done)}function Ns(e,t,r,n){var a=e.history;a.undone.length=0;var I=+new Date,H,G;if((a.lastOp==n||a.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&a.lastModTime>I-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(H=pl(a,a.lastOp==n)))G=J(H.changes),mt(t.from,t.to)==0&&mt(t.from,G.to)==0?G.to=Ar(t):H.changes.push(ka(e,t));else{var X=J(a.done);for((!X||!X.ranges)&&Zi(e.sel,a.done),H={changes:[ka(e,t)],generation:a.generation},a.done.push(H);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(r),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=I,a.lastOp=a.lastSelOp=n,a.lastOrigin=a.lastSelOrigin=t.origin,G||Se(e,"historyAdded")}function ml(e,t,r,n){var a=t.charAt(0);return a=="*"||a=="+"&&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 a=e.history,I=n&&n.origin;r==a.lastSelOp||I&&a.lastSelOrigin==I&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==I||ml(e,I,J(a.done),t))?a.done[a.done.length-1]=t:Zi(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=I,a.lastSelOp=r,n&&n.clearRedo!==!1&&Ps(a.undone)}function Zi(e,t){var r=J(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Us(e,t,r,n){var a=t["spans_"+e.id],I=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(H){H.markedSpans&&((a||(a=t["spans_"+e.id]={}))[I]=H.markedSpans),++I})}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 _l(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],a=0;a<t.text.length;++a)n.push(vl(r[a]));return n}function Bs(e,t){var r=_l(e,t),n=Wt(e,t);if(!r)return n;if(!n)return r;for(var a=0;a<r.length;++a){var I=r[a],H=n[a];if(I&&H){e:for(var G=0;G<H.length;++G){for(var X=H[G],Q=0;Q<I.length;++Q)if(I[Q].marker==X.marker)continue e;I.push(X)}}else H&&(r[a]=H)}return r}function $r(e,t,r){for(var n=[],a=0;a<e.length;++a){var I=e[a];if(I.ranges){n.push(r?Hn.prototype.deepCopy.call(I):I);continue}var H=I.changes,G=[];n.push({changes:G});for(var X=0;X<H.length;++X){var Q=H[X],se=void 0;if(G.push({from:Q.from,to:Q.to,text:Q.text}),t)for(var de in Q)(se=de.match(/^spans_(\d+)$/))&&(q(t,Number(se[1]))>-1&&(J(G)[de]=Q[de],delete Q[de]))}}return n}function Pa(e,t,r,n){if(n){var a=e.anchor;if(r){var I=mt(t,a)<0;I!=mt(r,a)<0?(a=t,t=r):I!=mt(t,r)<0&&(t=r)}return new Ut(a,t)}else return new Ut(r||t,t)}function qi(e,t,r,n,a){a==null&&(a=e.cm&&(e.cm.display.shift||e.extend)),En(e,new Hn([Pa(e.sel.primary(),t,r,a)],0),n)}function Fs(e,t,r){for(var n=[],a=e.cm&&(e.cm.display.shift||e.extend),I=0;I<e.sel.ranges.length;I++)n[I]=Pa(e.sel.ranges[I],t[I],null,a);var H=Qn(e.cm,n,e.sel.primIndex);En(e,H,r)}function Na(e,t,r,n){var a=e.sel.ranges.slice(0);a[t]=r,En(e,Qn(e.cm,a,e.sel.primIndex),n)}function js(e,t,r,n){En(e,xr(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(a){this.ranges=[];for(var I=0;I<a.length;I++)this.ranges[I]=new Ut(vt(e,a[I].anchor),vt(e,a[I].head))},origin:r&&r.origin};return Se(e,"beforeSelectionChange",e,n),e.cm&&Se(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Qn(e.cm,n.ranges,n.ranges.length-1):t}function Ws(e,t,r){var n=e.history.done,a=J(n);a&&a.ranges?(n[n.length-1]=t,$i(e,t,r)):En(e,t,r)}function En(e,t,r){$i(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function $i(e,t,r){(ce(e,"beforeSelectionChange")||e.cm&&ce(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(mt(t.primary().head,e.sel.primary().head)<0?-1:1);Hs(e,Gs(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Zr(e.cm)}function Hs(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ve(e.cm)),gn(e,"cursorActivity",e)}function Ks(e){Hs(e,Gs(e,e.sel,null,!1))}function Gs(e,t,r,n){for(var a,I=0;I<t.ranges.length;I++){var H=t.ranges[I],G=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[I],X=ea(e,H.anchor,G&&G.anchor,r,n),Q=ea(e,H.head,G&&G.head,r,n);(a||X!=H.anchor||Q!=H.head)&&(a||(a=t.ranges.slice(0,I)),a[I]=new Ut(X,Q))}return a?Qn(e.cm,a,t.primIndex):t}function ei(e,t,r,n,a){var I=st(e,t.line);if(I.markedSpans)for(var H=0;H<I.markedSpans.length;++H){var G=I.markedSpans[H],X=G.marker,Q="selectLeft"in X?!X.selectLeft:X.inclusiveLeft,se="selectRight"in X?!X.selectRight:X.inclusiveRight;if((G.from==null||(Q?G.from<=t.ch:G.from<t.ch))&&(G.to==null||(se?G.to>=t.ch:G.to>t.ch))){if(a&&(Se(X,"beforeCursorEnter"),X.explicitlyCleared))if(I.markedSpans){--H;continue}else break;if(!X.atomic)continue;if(r){var de=X.find(n<0?1:-1),Te=void 0;if((n<0?se:Q)&&(de=zs(e,de,-n,de&&de.line==t.line?I:null)),de&&de.line==t.line&&(Te=mt(de,r))&&(n<0?Te<0:Te>0))return ei(e,de,t,n,a)}var Ee=X.find(n<0?-1:1);return(n<0?Q:se)&&(Ee=zs(e,Ee,n,Ee.line==t.line?I:null)),Ee?ei(e,Ee,t,n,a):null}}return t}function ea(e,t,r,n,a){var I=n||1,H=ei(e,t,r,I,a)||!a&&ei(e,t,r,I,!0)||ei(e,t,r,-I,a)||!a&&ei(e,t,r,-I,!0);return H||(e.cantEdit=!0,He(e.first,0))}function zs(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?vt(e,He(t.line-1)):null:r>0&&t.ch==(n||st(e,t.line)).text.length?t.line<e.first+e.size-1?He(t.line+1,0):null:new He(t.line,t.ch+r)}function Ys(e){e.setSelection(He(e.firstLine(),0),He(e.lastLine()),ue)}function Vs(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(a,I,H,G){a&&(n.from=vt(e,a)),I&&(n.to=vt(e,I)),H&&(n.text=H),G!==void 0&&(n.origin=G)}),Se(e,"beforeChange",e,n),e.cm&&Se(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 ti(e,t,r){if(e.cm){if(!e.cm.curOp)return cn(e.cm,ti)(e,t,r);if(e.cm.state.suppressEdits)return}if((ce(e,"beforeChange")||e.cm&&ce(e.cm,"beforeChange"))&&(t=Vs(e,t,!0),!t))return;var n=Be&&!r&&zt(e,t.from,t.to);if(n)for(var a=n.length-1;a>=0;--a)Xs(e,{from:n[a].from,to:n[a].to,text:a?[""]:t.text,origin:t.origin});else Xs(e,t)}function Xs(e,t){if(t.text.length==1&&t.text[0]==""&&mt(t.from,t.to)==0)return;var r=La(e,t);Ns(e,t,r,e.cm?e.cm.curOp.id:NaN),Si(e,t,r,Wt(e,t));var n=[];Sr(e,function(a,I){!I&&q(n,a.history)==-1&&(qs(a.history,t),n.push(a.history)),Si(a,t,null,Wt(a,t))})}function ta(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var a=e.history,I,H=e.sel,G=t=="undo"?a.done:a.undone,X=t=="undo"?a.undone:a.done,Q=0;Q<G.length&&!(I=G[Q],r?I.ranges&&!I.equals(e.sel):!I.ranges);Q++);if(Q==G.length)return;for(a.lastOrigin=a.lastSelOrigin=null;;)if(I=G.pop(),I.ranges){if(Zi(I,X),r&&!I.equals(e.sel)){En(e,I,{clearRedo:!1});return}H=I}else if(n){G.push(I);return}else break;var se=[];Zi(H,X),X.push({changes:se,generation:a.generation}),a.generation=I.generation||++a.maxGeneration;for(var de=ce(e,"beforeChange")||e.cm&&ce(e.cm,"beforeChange"),Te=function(We){var Ye=I.changes[We];if(Ye.origin=t,de&&!Vs(e,Ye,!1))return G.length=0,{};se.push(ka(e,Ye));var qe=We?La(e,Ye):J(G);Si(e,Ye,qe,Bs(e,Ye)),!We&&e.cm&&e.cm.scrollIntoView({from:Ye.from,to:Ar(Ye)});var it=[];Sr(e,function($e,at){!at&&q(it,$e.history)==-1&&(qs($e.history,Ye),it.push($e.history)),Si($e,Ye,null,Bs($e,Ye))})},Ee=I.changes.length-1;Ee>=0;--Ee){var Ue=Te(Ee);if(Ue)return Ue.v}}function Qs(e,t){if(t==0)return;if(e.first+=t,e.sel=new Hn(ae(e.sel.ranges,function(a){return new Ut(He(a.anchor.line+t,a.anchor.ch),He(a.head.line+t,a.head.ch))}),e.sel.primIndex),e.cm){Rn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)br(e.cm,n,"gutter")}}function Si(e,t,r,n){if(e.cm&&!e.cm.curOp)return cn(e.cm,Si)(e,t,r,n);if(t.to.line<e.first){Qs(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 a=t.text.length-1-(e.first-t.from.line);Qs(e,a),t={from:He(e.first,0),to:He(t.to.line+a,t.to.ch),text:[J(t.text)],origin:t.origin}}var I=e.lastLine();t.to.line>I&&(t={from:t.from,to:He(I,st(e,I).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Kn(e,t.from,t.to),r||(r=La(e,t)),e.cm?El(e.cm,t,n):Ma(e,t,n),$i(e,r,ue),e.cantEdit&&ea(e,He(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,r){var n=e.doc,a=e.display,I=t.from,H=t.to,G=!1,X=I.line;e.options.lineWrapping||(X=It(jn(st(n,I.line))),n.iter(X,H.line+1,function(Ee){if(Ee==a.maxLine)return G=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ve(e),Ma(n,t,r,hs(e)),e.options.lineWrapping||(n.iter(X,I.line+t.text.length,function(Ee){var Ue=hi(Ee);Ue>a.maxLineLength&&(a.maxLine=Ee,a.maxLineLength=Ue,a.maxLineChanged=!0,G=!1)}),G&&(e.curOp.updateMaxLine=!0)),Dr(n,I.line),Ti(e,400);var Q=t.text.length-(H.line-I.line)-1;t.full?Rn(e):I.line==H.line&&t.text.length==1&&!Ds(e.doc,t)?br(e,I.line,"text"):Rn(e,I.line,H.line+1,Q);var se=ce(e,"changes"),de=ce(e,"change");if(de||se){var Te={from:I,to:H,text:t.text,removed:t.removed,origin:t.origin};de&&gn(e,"change",e,Te),se&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Te)}e.display.selForContextMenu=null}function ni(e,t,r,n,a){var I;n||(n=r),mt(n,r)<0&&(I=[n,r],r=I[0],n=I[1]),typeof t=="string"&&(t=e.splitLines(t)),ti(e,{from:r,to:n,text:t,origin:a})}function Js(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Zs(e,t,r,n){for(var a=0;a<e.length;++a){var I=e[a],H=!0;if(I.ranges){I.copied||(I=e[a]=I.deepCopy(),I.copied=!0);for(var G=0;G<I.ranges.length;G++)Js(I.ranges[G].anchor,t,r,n),Js(I.ranges[G].head,t,r,n);continue}for(var X=0;X<I.changes.length;++X){var Q=I.changes[X];if(r<Q.from.line)Q.from=He(Q.from.line+n,Q.from.ch),Q.to=He(Q.to.line+n,Q.to.ch);else if(t<=Q.to.line){H=!1;break}}H||(e.splice(0,a+1),a=0)}}function qs(e,t){var r=t.from.line,n=t.to.line,a=t.text.length-(n-r)-1;Zs(e.done,r,n,a),Zs(e.undone,r,n,a)}function wi(e,t,r,n){var a=t,I=t;return typeof t=="number"?I=st(e,$n(e,t)):a=It(t),a==null?null:(n(I,a)&&e.cm&&br(e.cm,a,r),I)}function Ri(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}Ri.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var a=this.lines[r];this.height-=a.height,ot(a),gn(a,"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 Oi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var a=e[n];t+=a.chunkSize(),r+=a.height,a.parent=this}this.size=t,this.height=r,this.parent=null}Oi.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],a=n.chunkSize();if(e<a){var I=Math.min(t,a-e),H=n.height;if(n.removeInner(e,I),this.height-=H-n.height,a==I&&(this.children.splice(r--,1),n.parent=null),(t-=I)==0)break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ri))){var G=[];this.collapse(G),this.children=[new Ri(G)],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 a=this.children[n],I=a.chunkSize();if(e<=I){if(a.insertInner(e,t,r),a.lines&&a.lines.length>50){for(var H=a.lines.length%25+25,G=H;G<a.lines.length;){var X=new Ri(a.lines.slice(G,G+=25));a.height-=X.height,this.children.splice(++n,0,X),X.parent=this}a.lines=a.lines.slice(0,H),this.maybeSpill()}break}e-=I}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Oi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var a=q(e.parent.children,e);e.parent.children.splice(a+1,0,r)}else{var n=new Oi(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 a=this.children[n],I=a.chunkSize();if(e<I){var H=Math.min(t,I-e);if(a.iterN(e,H,r))return!0;if((t-=H)==0)break;e=0}else e-=I}}};var Ci=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Ci.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=It(r);if(n==null||!t)return;for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(r.widgets=null);var I=mi(this);mn(r,Math.max(0,r.height-I)),e&&(Nn(e,function(){$s(e,r,-I),br(e,n,"widget")}),gn(e,"lineWidgetCleared",e,this,n))},Ci.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var a=mi(this)-t;if(!a)return;tr(this.doc,n)||mn(n,n.height+a),r&&Nn(r,function(){r.curOp.forceUpdate=!0,$s(r,n,a),gn(r,"lineWidgetChanged",r,e,It(n))})},pe(Ci);function $s(e,t,r){Vn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,r)}function bl(e,t,r,n){var a=new Ci(e,r,n),I=e.cm;return I&&a.noHScroll&&(I.display.alignWidgets=!0),wi(e,t,"widget",function(H){var G=H.widgets||(H.widgets=[]);if(a.insertAt==null?G.push(a):G.splice(Math.min(G.length-1,Math.max(0,a.insertAt)),0,a),a.line=H,I&&!tr(e,H)){var X=Vn(H)<e.scrollTop;mn(H,H.height+mi(a)),X&&Sa(I,a.height),I.curOp.forceUpdate=!0}return!0}),I&&gn(I,"lineWidgetAdded",I,a,typeof t=="number"?t:It(t)),a}var eo=0,wr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++eo};wr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&jr(e),ce(this,"clear")){var r=this.find();r&&gn(this,"clear",r.from,r.to)}for(var n=null,a=null,I=0;I<this.lines.length;++I){var H=this.lines[I],G=Pt(H.markedSpans,this);e&&!this.collapsed?br(e,It(H),"text"):e&&(G.to!=null&&(a=It(H)),G.from!=null&&(n=It(H))),H.markedSpans=Qt(H.markedSpans,G),G.from==null&&this.collapsed&&!tr(this.doc,H)&&e&&mn(H,Xr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var X=0;X<this.lines.length;++X){var Q=jn(this.lines[X]),se=hi(Q);se>e.display.maxLineLength&&(e.display.maxLine=Q,e.display.maxLineLength=se,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Rn(e,n,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ks(e.doc)),e&&gn(e,"markerCleared",e,this,n,a),t&&Wr(e),this.parent&&this.parent.clear()},wr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,a=0;a<this.lines.length;++a){var I=this.lines[a],H=Pt(I.markedSpans,this);if(H.from!=null&&(r=He(t?I:It(I),H.from),e==-1))return r;if(H.to!=null&&(n=He(t?I:It(I),H.to),e==1))return n}return r&&{from:r,to:n}},wr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;Nn(n,function(){var a=t.line,I=It(t.line),H=fa(n,I);if(H&&(is(H),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!tr(r.doc,a)&&r.height!=null){var G=r.height;r.height=null;var X=mi(r)-G;X&&mn(a,a.height+X)}gn(n,"markerChanged",n,e)})},wr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||q(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wr.prototype.detachLine=function(e){if(this.lines.splice(q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},pe(wr);function ri(e,t,r,n,a){if(n&&n.shared)return Tl(e,t,r,n,a);if(e.cm&&!e.cm.curOp)return cn(e.cm,ri)(e,t,r,n,a);var I=new wr(e,a),H=mt(t,r);if(n&&_(n,I,!1),H>0||H==0&&I.clearWhenEmpty!==!1)return I;if(I.replacedWith&&(I.collapsed=!0,I.widgetNode=E("span",[I.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||I.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(I.widgetNode.insertLeft=!0)),I.collapsed){if(Bi(e,t.line,t,r,I)||t.line!=r.line&&Bi(e,r.line,t,r,I))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt()}I.addToHistory&&Ns(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var G=t.line,X=e.cm,Q;if(e.iter(G,r.line+1,function(de){X&&I.collapsed&&!X.options.lineWrapping&&jn(de)==X.display.maxLine&&(Q=!0),I.collapsed&&G!=t.line&&mn(de,0),Rt(de,new Gt(I,G==t.line?t.ch:null,G==r.line?r.ch:null)),++G}),I.collapsed&&e.iter(t.line,r.line+1,function(de){tr(e,de)&&mn(de,0)}),I.clearOnEnter&&Re(I,"beforeCursorEnter",function(){return I.clear()}),I.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),I.collapsed&&(I.id=++eo,I.atomic=!0),X){if(Q&&(X.curOp.updateMaxLine=!0),I.collapsed)Rn(X,t.line,r.line+1);else if(I.className||I.startStyle||I.endStyle||I.css||I.attributes||I.title)for(var se=t.line;se<=r.line;se++)br(X,se,"text");I.atomic&&Ks(X.doc),gn(X,"markerAdded",X,I)}return I}var Ii=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Ii.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();gn(this,"clear")},Ii.prototype.find=function(e,t){return this.primary.find(e,t)},pe(Ii);function Tl(e,t,r,n,a){n=_(n),n.shared=!1;var I=[ri(e,t,r,n,a)],H=I[0],G=n.widgetNode;return Sr(e,function(X){G&&(n.widgetNode=G.cloneNode(!0)),I.push(ri(X,vt(X,t),vt(X,r),n,a));for(var Q=0;Q<X.linked.length;++Q)if(X.linked[Q].isParent)return;H=J(I)}),new Ii(I,H)}function to(e){return e.findMarks(He(e.first,0),e.clipPos(He(e.lastLine())),function(t){return t.parent})}function xl(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=n.find(),I=e.clipPos(a.from),H=e.clipPos(a.to);if(mt(I,H)){var G=ri(e,I,H,n.primary,n.primary.type);n.markers.push(G),G.parent=n}}}function Al(e){for(var t=function(n){var a=e[n],I=[a.primary.doc];Sr(a.primary.doc,function(X){return I.push(X)});for(var H=0;H<a.markers.length;H++){var G=a.markers[H];q(I,G.doc)==-1&&(G.parent=null,a.markers.splice(H--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,On=function(e,t,r,n,a){if(!(this instanceof On))return new On(e,t,r,n,a);r==null&&(r=0),Oi.call(this,[new Ri([new Mr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var I=He(r,0);this.sel=xr(I),this.history=new Ji(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=a=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ma(this,{from:I,to:I,text:e}),En(this,xr(I),ue)};On.prototype=xe(Oi.prototype,{constructor:On,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=tn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:hn(function(e){var t=He(this.first,0),r=this.first+this.size-1;ti(this,{from:t,to:He(r,st(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&_i(this.cm,0,0),En(this,xr(t),ue)}),replaceRange:function(e,t,r,n){t=vt(this,t),r=r?vt(this,r):t,ni(this,e,t,r,n)},getRange:function(e,t,r){var n=Kn(this,vt(this,e),vt(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(Xt(this,e))return st(this,e)},getLineNumber:function(e){return It(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=st(this,e)),jn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var 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:hn(function(e,t,r){js(this,vt(this,typeof e=="number"?He(e,t||0):e),null,r)}),setSelection:hn(function(e,t,r){js(this,vt(this,e),vt(this,t||e),r)}),extendSelection:hn(function(e,t,r){qi(this,vt(this,e),t&&vt(this,t),r)}),extendSelections:hn(function(e,t){Fs(this,ze(this,e),t)}),extendSelectionsBy:hn(function(e,t){var r=ae(this.sel.ranges,e);Fs(this,ze(this,r),t)}),setSelections:hn(function(e,t,r){if(!e.length)return;for(var n=[],a=0;a<e.length;a++)n[a]=new Ut(vt(this,e[a].anchor),vt(this,e[a].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),En(this,Qn(this.cm,n,t),r)}),addSelection:hn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Ut(vt(this,e),vt(this,t||e))),En(this,Qn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var a=Kn(this,t[n].from(),t[n].to());r=r?r.concat(a):a}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 a=Kn(this,r[n].from(),r[n].to());e!==!1&&(a=a.join(e||this.lineSeparator())),t[n]=a}return t},replaceSelection:function(e,t,r){for(var n=[],a=0;a<this.sel.ranges.length;a++)n[a]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:hn(function(e,t,r){for(var n=[],a=this.sel,I=0;I<a.ranges.length;I++){var H=a.ranges[I];n[I]={from:H.from(),to:H.to(),text:this.splitLines(e[I]),origin:r}}for(var G=t&&t!="end"&&hl(this,n,t),X=n.length-1;X>=0;X--)ti(this,n[X]);G?Ws(this,G):this.cm&&Zr(this.cm)}),undo:hn(function(){ta(this,"undo")}),redo:hn(function(){ta(this,"redo")}),undoSelection:hn(function(){ta(this,"undo",!0)}),redoSelection:hn(function(){ta(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 a=0;a<e.undone.length;a++)e.undone[a].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ji(this.history.maxGeneration),Sr(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:$r(this.history.done),undone:$r(this.history.undone)}},setHistory:function(e){var t=this.history=new Ji(this.history.maxGeneration);t.done=$r(e.done.slice(0),null,!0),t.undone=$r(e.undone.slice(0),null,!0)},setGutterMarker:hn(function(e,t,r){return wi(this,e,"gutter",function(n){var a=n.gutterMarkers||(n.gutterMarkers={});return a[t]=r,!r&&Ne(a)&&(n.gutterMarkers=null),!0})}),clearGutter:hn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&wi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ne(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Xt(this,e))return null;if(t=e,e=st(this,e),!e)return null}else if(t=It(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:hn(function(e,t,r){return wi(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[a])n[a]=r;else{if(S(r).test(n[a]))return!1;n[a]+=" "+r}return!0})}),removeLineClass:hn(function(e,t,r){return wi(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",I=n[a];if(I)if(r==null)n[a]=null;else{var H=I.match(S(r));if(!H)return!1;var G=H.index+H[0].length;n[a]=I.slice(0,H.index)+(!H.index||G==I.length?"":" ")+I.slice(G)||null}else return!1;return!0})}),addLineWidget:hn(function(e,t,r){return bl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ri(this,vt(this,e),vt(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=vt(this,e),ri(this,e,e,r,"bookmark")},findMarksAt:function(e){e=vt(this,e);var t=[],r=st(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var a=r[n];(a.from==null||a.from<=e.ch)&&(a.to==null||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,r){e=vt(this,e),t=vt(this,t);var n=[],a=e.line;return this.iter(e.line,t.line+1,function(I){var H=I.markedSpans;if(H)for(var G=0;G<H.length;G++){var X=H[G];!(X.to!=null&&a==e.line&&e.ch>=X.to||X.from==null&&a!=e.line||X.from!=null&&a==t.line&&X.from>=t.ch)&&(!r||r(X.marker))&&n.push(X.marker.parent||X.marker)}++a}),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(a){var I=a.text.length+n;if(I>e)return t=e,!0;e-=I,++r}),vt(this,He(r,t))},indexFromPos:function(e){e=vt(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 On(tn(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 On(tn(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}],xl(n,to(this)),n},unlinkDoc:function(e){if(e instanceof Jt&&(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(to(this));break}if(e.history==this.history){var n=[e.id];Sr(e,function(a){return n.push(a.id)},!0),e.history=new Ji(null),e.history.done=$r(this.history.done,n),e.history.undone=$r(this.history.undone,n)}},iterLinkedDocs:function(e){Sr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ht(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:hn(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)})}),On.prototype.eachLine=On.prototype.iter;var no=0;function wl(e){var t=this;if(ro(t),je(t,e)||cr(t.display,e))return;Z(e),W&&(no=+new Date);var r=Nr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var a=n.length,I=Array(a),H=0,G=function(){++H==a&&cn(t,function(){r=vt(t.doc,r);var Ee={from:r,to:r,text:t.doc.splitLines(I.filter(function(Ue){return Ue!=null}).join(t.doc.lineSeparator())),origin:"paste"};ti(t.doc,Ee),Ws(t.doc,xr(vt(t.doc,r),vt(t.doc,Ar(Ee))))})()},X=function(Ee,Ue){if(t.options.allowDropFileTypes&&q(t.options.allowDropFileTypes,Ee.type)==-1){G();return}var We=new FileReader;We.onerror=function(){return G()},We.onload=function(){var Ye=We.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ye)){G();return}I[Ue]=Ye,G()},We.readAsText(Ee)},Q=0;Q<n.length;Q++)X(n[Q],Q);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 se=e.dataTransfer.getData("Text");if(se){var de;if(t.state.draggingText&&!t.state.draggingText.copy&&(de=t.listSelections()),$i(t.doc,xr(r,r)),de)for(var Te=0;Te<de.length;++Te)ni(t.doc,"",de[Te].anchor,de[Te].head,"drag");t.replaceSelection(se,"around","paste"),t.display.input.focus()}}catch(Ee){}}}function Rl(e,t){if(W&&(!e.state.draggingText||+new Date-no<100)){oe(t);return}if(je(e,t)||cr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p){var r=u("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),m&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=Nr(e,t);if(!r)return;var n=document.createDocumentFragment();ms(e,r,n),e.display.dragCursor||(e.display.dragCursor=u("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),y(e.display.dragCursor,n)}function ro(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function io(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var a=t[n].CodeMirror;a&&r.push(a)}r.length&&r[0].operation(function(){for(var I=0;I<r.length;I++)e(r[I])})}var ao=!1;function Cl(){if(ao)return;Il(),ao=!0}function Il(){var e;Re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,io(Ll)},100))}),Re(window,"blur",function(){return io(Jr)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Rr={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"},Li=0;Li<10;Li++)Rr[Li+48]=Rr[Li+96]=String(Li);for(var na=65;na<=90;na++)Rr[na]=String.fromCharCode(na);for(var Di=1;Di<=12;Di++)Rr[Di+111]=Rr[Di+63235]="F"+Di;var hr={};hr.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"},hr.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"},hr.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"},hr.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"]},hr.default=l?hr.macDefault:hr.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,a,I,H=0;H<t.length-1;H++){var G=t[H];if(/^(cmd|meta|m)$/i.test(G))I=!0;else if(/^a(lt)?$/i.test(G))r=!0;else if(/^(c|ctrl|control)$/i.test(G))n=!0;else if(/^s(hift)?$/i.test(G))a=!0;else throw new Error("Unrecognized modifier name: "+G)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),I&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function Ml(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 a=ae(r.split(" "),Dl),I=0;I<a.length;I++){var H=void 0,G=void 0;I==a.length-1?(G=a.join(" "),H=n):(G=a.slice(0,I+1).join(" "),H="...");var X=t[G];if(!X)t[G]=H;else if(X!=H)throw new Error("Inconsistent bindings for "+G)}delete e[r]}for(var Q in t)e[Q]=t[Q];return e}function ii(e,t,r,n){t=ra(t);var a=t.call?t.call(e,n):t[e];if(a===!1)return"nothing";if(a==="...")return"multi";if(a!=null&&r(a))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return ii(e,t.fallthrough,r,n);for(var I=0;I<t.fallthrough.length;I++){var H=ii(e,t.fallthrough[I],r,n);if(H)return H}}}function so(e){var t=typeof e=="string"?e:Rr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function oo(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(T?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(T?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function lo(e,t){if(m&&e.keyCode==34&&e.char)return!1;var r=Rr[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),oo(r,e,t))}function ra(e){return typeof e=="string"?hr[e]:e}function ai(e,t){for(var r=e.doc.sel.ranges,n=[],a=0;a<r.length;a++){for(var I=t(r[a]);n.length&&mt(I.from,J(n).to)<=0;){var H=n.pop();if(mt(H.from,I.from)<0){I.from=H.from;break}}n.push(I)}Nn(e,function(){for(var G=n.length-1;G>=0;G--)ni(e.doc,"",n[G].from,n[G].to,"+delete");Zr(e)})}function Ua(e,t,r){var n=Ie(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ba(e,t,r){var n=Ua(e,t.ch,r);return n==null?null:new He(t.line,n,r<0?"after":"before")}function Fa(e,t,r,n,a){if(e){t.doc.direction=="rtl"&&(a=-a);var I=Qe(r,t.doc.direction);if(I){var H=a<0?J(I):I[0],G=a<0==(H.level==1),X=G?"after":"before",Q;if(H.level>0||t.doc.direction=="rtl"){var se=Vr(t,r);Q=a<0?r.text.length-1:0;var de=rr(t,se,Q).top;Q=Ge(function(Te){return rr(t,se,Te).top==de},a<0==(H.level==1)?H.from:H.to-1,Q),X=="before"&&(Q=Ua(r,Q,1))}else Q=a<0?H.to:H.from;return new He(n,Q,X)}}return new He(n,a<0?r.text.length:0,a<0?"before":"after")}function kl(e,t,r,n){var a=Qe(t,e.doc.direction);if(!a)return Ba(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 I=Ke(a,r.ch,r.sticky),H=a[I];if(e.doc.direction=="ltr"&&H.level%2==0&&(n>0?H.to>r.ch:H.from<r.ch))return Ba(t,r,n);var G=function(qe,it){return Ua(t,qe instanceof He?qe.ch:qe,it)},X,Q=function(qe){return e.options.lineWrapping?(X=X||Vr(e,t),cs(e,t,X,qe)):{begin:0,end:t.text.length}},se=Q(r.sticky=="before"?G(r,-1):r.ch);if(e.doc.direction=="rtl"||H.level==1){var de=H.level==1==n<0,Te=G(r,de?1:-1);if(Te!=null&&(de?Te<=H.to&&Te<=se.end:Te>=H.from&&Te>=se.begin)){var Ee=de?"before":"after";return new He(r.line,Te,Ee)}}var Ue=function(qe,it,$e){for(var at=function(Kt,fn){return fn?new He(r.line,G(Kt,1),"before"):new He(r.line,Kt,"after")};qe>=0&&qe<a.length;qe+=it){var pt=a[qe],lt=it>0==(pt.level!=1),bt=lt?$e.begin:G($e.end,-1);if(pt.from<=bt&&bt<pt.to)return at(bt,lt);if(bt=lt?pt.from:G(pt.to,-1),$e.begin<=bt&&bt<$e.end)return at(bt,lt)}},We=Ue(I+n,n,se);if(We)return We;var Ye=n>0?se.end:G(se.begin,-1);return Ye!=null&&!(n>0&&Ye==t.text.length)&&(We=Ue(n>0?0:a.length-1,n,Q(Ye)),We)?We:null}var Mi={selectAll:Ys,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return ai(e,function(t){if(t.empty()){var r=st(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:He(t.head.line+1,0)}:{from:t.head,to:He(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ai(e,function(t){return{from:He(t.from().line,0),to:vt(e.doc,He(t.to().line+1,0))}})},delLineLeft:function(e){return ai(e,function(t){return{from:He(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ai(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 ai(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(He(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(He(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return uo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return co(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(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")},fe)},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")},fe)},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/)?co(e,t.head):n},fe)},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,a=0;a<r.length;a++){var I=r[a].from(),H=j(e.getLine(I.line),I.ch,n);t.push(he(n-H%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Nn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var a=t[n].head,I=st(e.doc,a.line).text;if(I){if(a.ch==I.length&&(a=new He(a.line,a.ch-1)),a.ch>0)a=new He(a.line,a.ch+1),e.replaceRange(I.charAt(a.ch-1)+I.charAt(a.ch-2),He(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var H=st(e.doc,a.line-1).text;H&&(a=new He(a.line,1),e.replaceRange(I.charAt(0)+e.doc.lineSeparator()+H.charAt(H.length-1),He(a.line-1,H.length-1),a,"+transpose"))}}r.push(new Ut(a,a))}e.setSelections(r)})},newlineAndIndent:function(e){return Nn(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);Zr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function uo(e,t){var r=st(e.doc,t),n=jn(r);return n!=r&&(t=It(n)),Fa(!0,e,n,t,1)}function Pl(e,t){var r=st(e.doc,t),n=Fi(r);return n!=r&&(t=It(n)),Fa(!0,e,r,t,-1)}function co(e,t){var r=uo(e,t.line),n=st(e.doc,r.line),a=Qe(n,e.doc.direction);if(!a||a[0].level==0){var I=Math.max(r.ch,n.text.search(/\S/)),H=t.line==r.line&&t.ch<=I&&t.ch;return He(r.line,H?0:I,r.sticky)}return r}function ia(e,t,r){if(typeof t=="string"&&(t=Mi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),a=t(e)!=_e}finally{e.display.shift=n,e.state.suppressEdits=!1}return a}function Nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var a=ii(t,e.state.keyMaps[n],r,e);if(a)return a}return e.options.extraKeys&&ii(t,e.options.extraKeys,r,e)||ii(t,e.options.keyMap,r,e)}var Ul=new K;function ki(e,t,r,n){var a=e.state.keySeq;if(a){if(so(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),ho(e,a+" "+t,r,n))return!0}return ho(e,t,r,n)}function ho(e,t,r,n){var a=Nl(e,t,n);return a=="multi"&&(e.state.keySeq=t),a=="handled"&&gn(e,"keyHandled",e,t,r),(a=="handled"||a=="multi")&&(Z(r),Ta(e)),!!a}function fo(e,t){var r=lo(t,!0);return r?t.shiftKey&&!e.state.keySeq?ki(e,"Shift-"+r,t,function(n){return ia(e,n,!0)})||ki(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return ia(e,n)}):ki(e,r,t,function(n){return ia(e,n)}):!1}function Bl(e,t,r){return ki(e,"'"+r+"'",t,function(n){return ia(e,n,!0)})}var ja=null;function po(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=P(),je(t,e))return;W&&F<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=fo(t,e);m&&(ja=n?r:null,!n&&r==88&&!yt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),D&&!l&&!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;L(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(x(t,"CodeMirror-crosshair"),Xe(document,"keyup",r),Xe(document,"mouseover",r))}Re(document,"keyup",r),Re(document,"mouseover",r)}function mo(e){e.keyCode==16&&(this.doc.sel.shift=!1),je(this,e)}function go(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(cr(t.display,e)||je(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(m&&r==ja){ja=null,Z(e);return}if(m&&(!e.which||e.which<10)&&fo(t,e))return;var a=String.fromCharCode(n==null?r:n);if(a=="\b")return;if(Bl(t,e,a))return;t.display.input.onKeyPress(e)}var jl=400,Wa=function(e,t,r){this.time=e,this.pos=t,this.button=r};Wa.prototype.compare=function(e,t,r){return this.time+jl>e&&mt(t,this.pos)==0&&r==this.button};var Pi,Ni;function Wl(e,t){var r=+new Date;return Ni&&Ni.compare(r,e,t)?(Pi=Ni=null,"triple"):Pi&&Pi.compare(r,e,t)?(Ni=new Wa(r,e,t),Pi=null,"double"):(Pi=new Wa(r,e,t),Ni=null,"single")}function vo(e){var t=this,r=t.display;if(je(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,cr(r,e)){M||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ha(t,e))return;var n=Nr(t,e),a=Ce(e),I=n?Wl(n,a):"single";if(window.focus(),a==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,a,n,I,e))return;a==1?n?Gl(t,n,I,e):ge(e)==r.scroller&&Z(e):a==2?(n&&qi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):a==3&&(w?t.display.input.onContextMenu(e):vs(t))}function Hl(e,t,r,n,a){var I="Click";return n=="double"?I="Double"+I:n=="triple"&&(I="Triple"+I),I=(t==1?"Left":t==2?"Middle":"Right")+I,ki(e,oo(I,a),a,function(H){if(typeof H=="string"&&(H=Mi[H]),!H)return!1;var G=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),G=H(e,r)!=_e}finally{e.state.suppressEdits=!1}return G})}function Kl(e,t,r){var n=e.getOption("configureMouse"),a=n?n(e,t,r):{};if(a.unit==null){var I=f?r.shiftKey&&r.metaKey:r.altKey;a.unit=I?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(a.extend==null||e.doc.extend)&&(a.extend=e.doc.extend||r.shiftKey),a.addNew==null&&(a.addNew=l?r.metaKey:r.ctrlKey),a.moveOnDrag==null&&(a.moveOnDrag=!(l?r.altKey:r.ctrlKey)),a}function Gl(e,t,r,n){W?setTimeout(C(gs,e),0):e.curOp.focus=P();var a=Kl(e,r,n),I=e.doc.sel,H;e.options.dragDrop&&Fe&&!e.isReadOnly()&&r=="single"&&(H=I.contains(t))>-1&&(mt((H=I.ranges[H]).from(),t)<0||t.xRel>0)&&(mt(H.to(),t)>0||t.xRel<0)?zl(e,n,t,a):Yl(e,n,t,a)}function zl(e,t,r,n){var a=e.display,I=!1,H=cn(e,function(Q){M&&(a.scroller.draggable=!1),e.state.draggingText=!1,Xe(a.wrapper.ownerDocument,"mouseup",H),Xe(a.wrapper.ownerDocument,"mousemove",G),Xe(a.scroller,"dragstart",X),Xe(a.scroller,"drop",H),I||(Z(Q),n.addNew||qi(e.doc,r,null,null,n.extend),M&&!p||W&&F==9?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),G=function(Q){I=I||Math.abs(t.clientX-Q.clientX)+Math.abs(t.clientY-Q.clientY)>=10},X=function(){return I=!0};M&&(a.scroller.draggable=!0),e.state.draggingText=H,H.copy=!n.moveOnDrag,a.scroller.dragDrop&&a.scroller.dragDrop(),Re(a.wrapper.ownerDocument,"mouseup",H),Re(a.wrapper.ownerDocument,"mousemove",G),Re(a.scroller,"dragstart",X),Re(a.scroller,"drop",H),vs(e),setTimeout(function(){return a.input.focus()},20)}function _o(e,t,r){if(r=="char")return new Ut(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Ut(He(t.line,0),vt(e.doc,He(t.line+1,0)));var n=r(e,t);return new Ut(n.from,n.to)}function Yl(e,t,r,n){var a=e.display,I=e.doc;Z(t);var H,G,X=I.sel,Q=X.ranges;if(n.addNew&&!n.extend?(G=I.sel.contains(r),G>-1?H=Q[G]:H=new Ut(r,r)):(H=I.sel.primary(),G=I.sel.primIndex),n.unit=="rectangle")n.addNew||(H=new Ut(r,r)),r=Nr(e,t,!0,!0),G=-1;else{var se=_o(e,r,n.unit);n.extend?H=Pa(H,se.anchor,se.head,n.extend):H=se}n.addNew?G==-1?(G=Q.length,En(I,Qn(e,Q.concat([H]),G),{scroll:!1,origin:"*mouse"})):Q.length>1&&Q[G].empty()&&n.unit=="char"&&!n.extend?(En(I,Qn(e,Q.slice(0,G).concat(Q.slice(G+1)),0),{scroll:!1,origin:"*mouse"}),X=I.sel):Na(I,G,H,me):(G=0,En(I,new Hn([H],0),me),X=I.sel);var de=r;function Te($e){if(mt(de,$e)==0)return;if(de=$e,n.unit=="rectangle"){for(var at=[],pt=e.options.tabSize,lt=j(st(I,r.line).text,r.ch,pt),bt=j(st(I,$e.line).text,$e.ch,pt),Kt=Math.min(lt,bt),fn=Math.max(lt,bt),Zt=Math.min(r.line,$e.line),Un=Math.min(e.lastLine(),Math.max(r.line,$e.line));Zt<=Un;Zt++){var Cn=st(I,Zt).text,sn=le(Cn,Kt,pt);Kt==fn?at.push(new Ut(He(Zt,sn),He(Zt,sn))):Cn.length>sn&&at.push(new Ut(He(Zt,sn),He(Zt,le(Cn,fn,pt))))}at.length||at.push(new Ut(r,r)),En(I,Qn(e,X.ranges.slice(0,G).concat(at),G),{origin:"*mouse",scroll:!1}),e.scrollIntoView($e)}else{var In=H,vn=_o(e,$e,n.unit),dn=In.anchor,on;mt(vn.anchor,dn)>0?(on=vn.head,dn=or(In.from(),vn.anchor)):(on=vn.anchor,dn=sr(In.to(),vn.head));var qt=X.ranges.slice(0);qt[G]=Vl(e,new Ut(vt(I,dn),on)),En(I,Qn(e,qt,G),me)}}var Ee=a.wrapper.getBoundingClientRect(),Ue=0;function We($e){var at=++Ue,pt=Nr(e,$e,!0,n.unit=="rectangle");if(!pt)return;if(mt(pt,de)!=0){e.curOp.focus=P(),Te(pt);var lt=Yi(a,I);(pt.line>=lt.to||pt.line<lt.from)&&setTimeout(cn(e,function(){Ue==at&&We($e)}),150)}else{var bt=$e.clientY<Ee.top?-20:$e.clientY>Ee.bottom?20:0;bt&&setTimeout(cn(e,function(){if(Ue!=at)return;a.scroller.scrollTop+=bt,We($e)}),50)}}function Ye($e){e.state.selectingText=!1,Ue=Infinity,$e&&(Z($e),a.input.focus()),Xe(a.wrapper.ownerDocument,"mousemove",qe),Xe(a.wrapper.ownerDocument,"mouseup",it),I.history.lastSelOrigin=null}var qe=cn(e,function($e){$e.buttons===0||!Ce($e)?Ye($e):We($e)}),it=cn(e,Ye);e.state.selectingText=it,Re(a.wrapper.ownerDocument,"mousemove",qe),Re(a.wrapper.ownerDocument,"mouseup",it)}function Vl(e,t){var r=t.anchor,n=t.head,a=st(e.doc,r.line);if(mt(r,n)==0&&r.sticky==n.sticky)return t;var I=Qe(a);if(!I)return t;var H=Ke(I,r.ch,r.sticky),G=I[H];if(G.from!=r.ch&&G.to!=r.ch)return t;var X=H+(G.from==r.ch==(G.level!=1)?0:1);if(X==0||X==I.length)return t;var Q;if(n.line!=r.line)Q=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var se=Ke(I,n.ch,n.sticky),de=se-H||(n.ch-r.ch)*(G.level==1?-1:1);se==X-1||se==X?Q=de<0:Q=de>0}var Te=I[X+(Q?-1:0)],Ee=Q==(Te.level==1),Ue=Ee?Te.from:Te.to,We=Ee?"after":"before";return r.ch==Ue&&r.sticky==We?t:new Ut(new He(r.line,Ue,We),n)}function yo(e,t,r,n){var a,I;if(t.touches)a=t.touches[0].clientX,I=t.touches[0].clientY;else try{a=t.clientX,I=t.clientY}catch(Te){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Z(t);var H=e.display,G=H.lineDiv.getBoundingClientRect();if(I>G.bottom||!ce(e,r))return re(t);I-=G.top-H.viewOffset;for(var X=0;X<e.display.gutterSpecs.length;++X){var Q=H.gutters.childNodes[X];if(Q&&Q.getBoundingClientRect().right>=a){var se=Dn(e.doc,I),de=e.display.gutterSpecs[X];return Se(e,r,e,se,de.className,t),re(t)}}}function Ha(e,t){return yo(e,t,"gutterClick",!0)}function Eo(e,t){if(cr(e.display,t)||Xl(e,t))return;if(je(e,t,"contextmenu"))return;w||e.display.input.onContextMenu(t)}function Xl(e,t){return ce(e,"gutterContextMenu")?yo(e,t,"gutterContextMenu",!1):!1}function bo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gi(e)}var si={toString:function(){return"CodeMirror.Init"}},To={},aa={};function Ql(e){var t=e.optionHandlers;function r(n,a,I,H){e.defaults[n]=a,I&&(t[n]=H?function(G,X,Q){Q!=si&&I(G,X,Q)}:I)}e.defineOption=r,e.Init=si,r("value","",function(n,a){return n.setValue(a)},!0),r("mode",null,function(n,a){n.doc.modeOption=a,Da(n)},!0),r("indentUnit",2,Da,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Ai(n),gi(n),Rn(n)},!0),r("lineSeparator",null,function(n,a){if(n.doc.lineSep=a,!a)return;var I=[],H=n.doc.first;n.doc.iter(function(X){for(var Q=0;;){var se=X.text.indexOf(a,Q);if(se==-1)break;Q=se+a.length,I.push(He(H,se))}H++});for(var G=I.length-1;G>=0;G--)ni(n.doc,a,I[G],He(I[G].line,I[G].ch+a.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,a,I){n.state.specialChars=new RegExp(a.source+(a.test(" ")?"":"| "),"g"),I!=si&&n.refresh()}),r("specialCharPlaceholder",Ht,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,a){return n.getInputField().spellcheck=a},!0),r("autocorrect",!1,function(n,a){return n.getInputField().autocorrect=a},!0),r("autocapitalize",!1,function(n,a){return n.getInputField().autocapitalize=a},!0),r("rtlMoveVisually",!O),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){bo(n),xi(n)},!0),r("keyMap","default",function(n,a,I){var H=ra(a),G=I!=si&&ra(I);G&&G.detach&&G.detach(n,H),H.attach&&H.attach(n,G||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,a){n.display.gutterSpecs=Ia(a,n.options.lineNumbers),xi(n)},!0),r("fixedGutter",!0,function(n,a){n.display.gutters.style.left=a?Ea(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return qr(n)},!0),r("scrollbarStyle","native",function(n){xs(n),qr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,a){n.display.gutterSpecs=Ia(n.options.gutters,a),xi(n)},!0),r("firstLineNumber",1,xi,!0),r("lineNumberFormatter",function(n){return n},xi,!0),r("showCursorWhenSelecting",!1,vi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,a){a=="nocursor"&&(Jr(n),n.display.input.blur()),n.display.input.readOnlyChanged(a)}),r("screenReaderLabel",null,function(n,a){a=a===""?null:a,n.display.input.screenReaderLabelChanged(a)}),r("disableInput",!1,function(n,a){a||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,vi,!0),r("singleCursorHeightPerLine",!0,vi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ai,!0),r("addModeClass",!1,Ai,!0),r("pollInterval",100),r("undoDepth",200,function(n,a){return n.doc.history.undoDepth=a}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,Ai,!0),r("moveInputWithCursor",!0,function(n,a){a||n.display.input.resetPosition()}),r("tabindex",null,function(n,a){return n.display.input.getField().tabIndex=a||""}),r("autofocus",null),r("direction","ltr",function(n,a){return n.doc.setDirection(a)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=si;if(!t!=!n){var a=e.display.dragFunctions,I=t?Re:Xe;I(e.display.scroller,"dragstart",a.start),I(e.display.scroller,"dragenter",a.enter),I(e.display.scroller,"dragover",a.over),I(e.display.scroller,"dragleave",a.leave),I(e.display.scroller,"drop",a.drop)}}function Zl(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(x(e.display.wrapper,"CodeMirror-wrap"),ji(e)),ba(e),Rn(e),gi(e),setTimeout(function(){return qr(e)},100)}function Jt(e,t){var r=this;if(!(this instanceof Jt))return new Jt(e,t);this.options=t=t?_(t):{},_(To,t,!1);var n=t.value;typeof n=="string"?n=new On(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var a=new Jt.inputStyles[t.inputStyle](this),I=this.display=new dl(e,n,a,t);I.wrapper.CodeMirror=this,bo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xs(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 K,keySeq:null,specialChars:null},t.autofocus&&!i&&I.input.focus(),W&&F<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Cl(),jr(this),this.curOp.forceUpdate=!0,Ms(this,n),t.autofocus&&!i||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&xa(r)},20):Jr(this);for(var H in aa)aa.hasOwnProperty(H)&&aa[H](this,t[H],si);ws(this),t.finishInit&&t.finishInit(this);for(var G=0;G<Ka.length;++G)Ka[G](this);Wr(this),M&&t.lineWrapping&&getComputedStyle(I.lineDiv).textRendering=="optimizelegibility"&&(I.lineDiv.style.textRendering="auto")}Jt.defaults=To,Jt.optionHandlers=aa;function ql(e){var t=e.display;Re(t.scroller,"mousedown",cn(e,vo)),W&&F<11?Re(t.scroller,"dblclick",cn(e,function(X){if(je(e,X))return;var Q=Nr(e,X);if(!Q||Ha(e,X)||cr(e.display,X))return;Z(X);var se=e.findWordAt(Q);qi(e.doc,se.anchor,se.head)})):Re(t.scroller,"dblclick",function(X){return je(e,X)||Z(X)}),Re(t.scroller,"contextmenu",function(X){return Eo(e,X)}),Re(t.input.getField(),"contextmenu",function(X){t.scroller.contains(X.target)||Eo(e,X)});var r,n={end:0};function a(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function I(X){if(X.touches.length!=1)return!1;var Q=X.touches[0];return Q.radiusX<=1&&Q.radiusY<=1}function H(X,Q){if(Q.left==null)return!0;var se=Q.left-X.left,de=Q.top-X.top;return se*se+de*de>20*20}Re(t.scroller,"touchstart",function(X){if(!je(e,X)&&!I(X)&&!Ha(e,X)){t.input.ensurePolled(),clearTimeout(r);var Q=+new Date;t.activeTouch={start:Q,moved:!1,prev:Q-n.end<=300?n:null},X.touches.length==1&&(t.activeTouch.left=X.touches[0].pageX,t.activeTouch.top=X.touches[0].pageY)}}),Re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Re(t.scroller,"touchend",function(X){var Q=t.activeTouch;if(Q&&!cr(t,X)&&Q.left!=null&&!Q.moved&&new Date-Q.start<300){var se=e.coordsChar(t.activeTouch,"page"),de;!Q.prev||H(Q,Q.prev)?de=new Ut(se,se):!Q.prev.prev||H(Q,Q.prev.prev)?de=e.findWordAt(se):de=new Ut(He(se.line,0),vt(e.doc,He(se.line+1,0))),e.setSelection(de.anchor,de.head),e.focus(),Z(X)}a()}),Re(t.scroller,"touchcancel",a),Re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),Br(e,t.scroller.scrollLeft,!0),Se(e,"scroll",e))}),Re(t.scroller,"mousewheel",function(X){return Cs(e,X)}),Re(t.scroller,"DOMMouseScroll",function(X){return Cs(e,X)}),Re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(X){je(e,X)||oe(X)},over:function(X){je(e,X)||(Ol(e,X),oe(X))},start:function(X){return Rl(e,X)},drop:cn(e,wl),leave:function(X){je(e,X)||ro(e)}};var G=t.input.getField();Re(G,"keyup",function(X){return mo.call(e,X)}),Re(G,"keydown",cn(e,po)),Re(G,"keypress",cn(e,go)),Re(G,"focus",function(X){return xa(e,X)}),Re(G,"blur",function(X){return Jr(e,X)})}var Ka=[];Jt.defineInitHook=function(e){return Ka.push(e)};function Ui(e,t,r,n){var a=e.doc,I;r==null&&(r="add"),r=="smart"&&(a.mode.indent?I=An(e,t).state:r="prev");var H=e.options.tabSize,G=st(a,t),X=j(G.text,null,H);G.stateAfter&&(G.stateAfter=null);var Q=G.text.match(/^\s*/)[0],se;if(!n&&!/\S/.test(G.text))se=0,r="not";else if(r=="smart"&&(se=a.mode.indent(I,G.text.slice(Q.length),G.text),se==_e||se>150)){if(!n)return;r="prev"}r=="prev"?t>a.first?se=j(st(a,t-1).text,null,H):se=0:r=="add"?se=X+e.options.indentUnit:r=="subtract"?se=X-e.options.indentUnit:typeof r=="number"&&(se=X+r),se=Math.max(0,se);var de="",Te=0;if(e.options.indentWithTabs)for(var Ee=Math.floor(se/H);Ee;--Ee)Te+=H,de+=" ";if(Te<se&&(de+=he(se-Te)),de!=Q)return ni(a,de,He(t,0),He(t,Q.length),"+input"),G.stateAfter=null,!0;for(var Ue=0;Ue<a.sel.ranges.length;Ue++){var We=a.sel.ranges[Ue];if(We.head.line==t&&We.head.ch<Q.length){var Ye=He(t,Q.length);Na(a,Ue,new Ut(Ye,Ye));break}}}var Jn=null;function sa(e){Jn=e}function Ga(e,t,r,n,a){var I=e.doc;e.display.shift=!1,n||(n=I.sel);var H=+new Date-200,G=a=="paste"||e.state.pasteIncoming>H,X=ht(t),Q=null;if(G&&n.ranges.length>1)if(Jn&&Jn.text.join(`
|
|
`)==t){if(n.ranges.length%Jn.text.length==0){Q=[];for(var se=0;se<Jn.text.length;se++)Q.push(I.splitLines(Jn.text[se]))}}else X.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(Q=ae(X,function(qe){return[qe]}));for(var de=e.curOp.updateInput,Te=n.ranges.length-1;Te>=0;Te--){var Ee=n.ranges[Te],Ue=Ee.from(),We=Ee.to();Ee.empty()&&(r&&r>0?Ue=He(Ue.line,Ue.ch-r):e.state.overwrite&&!G?We=He(We.line,Math.min(st(I,We.line).text.length,We.ch+J(X).length)):G&&Jn&&Jn.lineWise&&Jn.text.join(`
|
|
`)==X.join(`
|
|
`)&&(Ue=We=He(Ue.line,0)));var Ye={from:Ue,to:We,text:Q?Q[Te%Q.length]:X,origin:a||(G?"paste":e.state.cutIncoming>H?"cut":"+input")};ti(e.doc,Ye),gn(e,"inputRead",e,Ye)}t&&!G&&Ao(e,t),Zr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=de),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function xo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Nn(t,function(){return Ga(t,r,0,null,"paste")}),!0}function Ao(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 a=r.ranges[n];if(a.head.ch>100||n&&r.ranges[n-1].head.line==a.head.line)continue;var I=e.getModeAt(a.head),H=!1;if(I.electricChars){for(var G=0;G<I.electricChars.length;G++)if(t.indexOf(I.electricChars.charAt(G))>-1){H=Ui(e,a.head.line,"smart");break}}else I.electricInput&&(I.electricInput.test(st(e.doc,a.head.line).text.slice(0,a.head.ch))&&(H=Ui(e,a.head.line,"smart")));H&&gn(e,"electricInput",e,a.head.line)}}function So(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var a=e.doc.sel.ranges[n].head.line,I={anchor:He(a,0),head:He(a+1,0)};r.push(I),t.push(e.getRange(I.anchor,I.head))}return{text:t,ranges:r}}function wo(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ro(){var e=u("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=u("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return M?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),wo(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,a){var I=this.options,H=I[n];if(I[n]==a&&n!="mode")return;I[n]=a,t.hasOwnProperty(n)&&cn(this,t[n])(this,a,H),Se(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,a){this.state.keyMaps[a?"push":"unshift"](ra(n))},removeKeyMap:function(n){for(var a=this.state.keyMaps,I=0;I<a.length;++I)if(a[I]==n||a[I].name==n)return a.splice(I,1),!0},addOverlay:Tn(function(n,a){var I=n.token?n:e.getMode(this.options,n);if(I.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:I,modeSpec:n,opaque:a&&a.opaque,priority:a&&a.priority||0},function(H){return H.priority}),this.state.modeGen++,Rn(this)}),removeOverlay:Tn(function(n){for(var a=this.state.overlays,I=0;I<a.length;++I){var H=a[I].modeSpec;if(H==n||typeof n=="string"&&H.name==n){a.splice(I,1),this.state.modeGen++,Rn(this);return}}}),indentLine:Tn(function(n,a,I){typeof a!="string"&&typeof a!="number"&&(a==null?a=this.options.smartIndent?"smart":"prev":a=a?"add":"subtract"),Xt(this.doc,n)&&Ui(this,n,a,I)}),indentSelection:Tn(function(n){for(var a=this.doc.sel.ranges,I=-1,H=0;H<a.length;H++){var G=a[H];if(G.empty())G.head.line>I&&(Ui(this,G.head.line,n,!0),I=G.head.line,H==this.doc.sel.primIndex&&Zr(this));else{var X=G.from(),Q=G.to(),se=Math.max(I,X.line);I=Math.min(this.lastLine(),Q.line-(Q.ch?0:1))+1;for(var de=se;de<I;++de)Ui(this,de,n);var Te=this.doc.sel.ranges;X.ch==0&&a.length==Te.length&&Te[H].from().ch>0&&Na(this.doc,H,new Ut(X,Te[H].to()),ue)}}}),getTokenAt:function(n,a){return yr(this,n,a)},getLineTokens:function(n,a){return yr(this,He(n),a,!0)},getTokenTypeAt:function(n){n=vt(this.doc,n);var a=kn(this,st(this.doc,n.line)),I=0,H=(a.length-1)/2,G=n.ch,X;if(G==0)X=a[2];else for(;;){var Q=I+H>>1;if((Q?a[Q*2-1]:0)>=G)H=Q;else if(a[Q*2+1]<G)I=Q+1;else{X=a[Q*2+2];break}}var se=X?X.indexOf("overlay "):-1;return se<0?X:se==0?null:X.slice(0,se-1)},getModeAt:function(n){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(n).state).mode:a},getHelper:function(n,a){return this.getHelpers(n,a)[0]},getHelpers:function(n,a){var I=[];if(!r.hasOwnProperty(a))return I;var H=r[a],G=this.getModeAt(n);if(typeof G[a]=="string")H[G[a]]&&I.push(H[G[a]]);else if(G[a])for(var X=0;X<G[a].length;X++){var Q=H[G[a][X]];Q&&I.push(Q)}else G.helperType&&H[G.helperType]?I.push(H[G.helperType]):H[G.name]&&I.push(H[G.name]);for(var se=0;se<H._global.length;se++){var de=H._global[se];de.pred(G,this)&&q(I,de.val)==-1&&I.push(de.val)}return I},getStateAfter:function(n,a){var I=this.doc;return n=$n(I,n==null?I.first+I.size-1:n),An(this,n+1,a).state},cursorCoords:function(n,a){var I,H=this.doc.sel.primary();return n==null?I=H.head:typeof n=="object"?I=vt(this.doc,n):I=n?H.from():H.to(),Xn(this,I,a||"page")},charCoords:function(n,a){return ma(this,vt(this.doc,n),a||"page")},coordsChar:function(n,a){return n=ls(this,n,a||"page"),va(this,n.left,n.top)},lineAtHeight:function(n,a){return n=ls(this,{top:n,left:0},a||"page").top,Dn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,a,I){var H=!1,G;if(typeof n=="number"){var X=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>X&&(n=X,H=!0),G=st(this.doc,n)}else G=n;return Hi(this,G,{top:0,left:0},a||"page",I||H).top+(H?this.doc.height-Vn(G):0)},defaultTextHeight:function(){return Xr(this.display)},defaultCharWidth:function(){return Qr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,a,I,H,G){var X=this.display;n=Xn(this,vt(this.doc,n));var Q=n.bottom,se=n.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),X.sizer.appendChild(a),H=="over")Q=n.top;else if(H=="above"||H=="near"){var de=Math.max(X.wrapper.clientHeight,this.doc.height),Te=Math.max(X.sizer.clientWidth,X.lineSpace.clientWidth);(H=="above"||n.bottom+a.offsetHeight>de)&&n.top>a.offsetHeight?Q=n.top-a.offsetHeight:n.bottom+a.offsetHeight<=de&&(Q=n.bottom),se+a.offsetWidth>Te&&(se=Te-a.offsetWidth)}a.style.top=Q+"px",a.style.left=a.style.right="",G=="right"?(se=X.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):(G=="left"?se=0:G=="middle"&&(se=(X.sizer.clientWidth-a.offsetWidth)/2),a.style.left=se+"px"),I&&Jo(this,{left:se,top:Q,right:se+a.offsetWidth,bottom:Q+a.offsetHeight})},triggerOnKeyDown:Tn(po),triggerOnKeyPress:Tn(go),triggerOnKeyUp:mo,triggerOnMouseDown:Tn(vo),execCommand:function(n){if(Mi.hasOwnProperty(n))return Mi[n].call(null,this)},triggerElectric:Tn(function(n){Ao(this,n)}),findPosH:function(n,a,I,H){var G=1;a<0&&(G=-1,a=-a);for(var X=vt(this.doc,n),Q=0;Q<a&&!(X=za(this.doc,X,G,I,H),X.hitSide);++Q);return X},moveH:Tn(function(n,a){var I=this;this.extendSelectionsBy(function(H){return I.display.shift||I.doc.extend||H.empty()?za(I.doc,H.head,n,a,I.options.rtlMoveVisually):n<0?H.from():H.to()},fe)}),deleteH:Tn(function(n,a){var I=this.doc.sel,H=this.doc;I.somethingSelected()?H.replaceSelection("",null,"+delete"):ai(this,function(G){var X=za(H,G.head,n,a,!1);return n<0?{from:X,to:G.head}:{from:G.head,to:X}})}),findPosV:function(n,a,I,H){var G=1,X=H;a<0&&(G=-1,a=-a);for(var Q=vt(this.doc,n),se=0;se<a;++se){var de=Xn(this,Q,"div");if(X==null?X=de.left:de.left=X,Q=Oo(this,de,G,I),Q.hitSide)break}return Q},moveV:Tn(function(n,a){var I=this,H=this.doc,G=[],X=!this.display.shift&&!H.extend&&H.sel.somethingSelected();if(H.extendSelectionsBy(function(se){if(X)return n<0?se.from():se.to();var de=Xn(I,se.head,"div");se.goalColumn!=null&&(de.left=se.goalColumn),G.push(de.left);var Te=Oo(I,de,n,a);return a=="page"&&se==H.sel.primary()&&Sa(I,ma(I,Te,"div").top-de.top),Te},fe),G.length)for(var Q=0;Q<H.sel.ranges.length;Q++)H.sel.ranges[Q].goalColumn=G[Q]}),findWordAt:function(n){var a=this.doc,I=st(a,n.line).text,H=n.ch,G=n.ch;if(I){var X=this.getHelper(n,"wordChars");(n.sticky=="before"||G==I.length)&&H?--H:++G;for(var Q=I.charAt(H),se=Le(Q,X)?function(de){return Le(de,X)}:/\s/.test(Q)?function(de){return/\s/.test(de)}:function(de){return!/\s/.test(de)&&!Le(de)};H>0&&se(I.charAt(H-1));)--H;for(;G<I.length&&se(I.charAt(G));)++G}return new Ut(He(n.line,H),He(n.line,G))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):x(this.display.cursorDiv,"CodeMirror-overwrite"),Se(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Tn(function(n,a){_i(this,n,a)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-nr(this)-this.display.barHeight,width:n.scrollWidth-nr(this)-this.display.barWidth,clientHeight:ha(this),clientWidth:kr(this)}},scrollIntoView:Tn(function(n,a){n==null?(n={from:this.doc.sel.primary().head,to:null},a==null&&(a=this.options.cursorScrollMargin)):typeof n=="number"?n={from:He(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=a||0,n.from.line!=null?Zo(this,n):ys(this,n.from,n.to,n.margin)}),setSize:Tn(function(n,a){var I=this,H=function(X){return typeof X=="number"||/^\d+$/.test(String(X))?X+"px":X};n!=null&&(this.display.wrapper.style.width=H(n)),a!=null&&(this.display.wrapper.style.height=H(a)),this.options.lineWrapping&&as(this);var G=this.display.viewFrom;this.doc.iter(G,this.display.viewTo,function(X){if(X.widgets){for(var Q=0;Q<X.widgets.length;Q++)if(X.widgets[Q].noHScroll){br(I,G,"widget");break}}++G}),this.curOp.forceUpdate=!0,Se(this,"refresh",this)}),operation:function(n){return Nn(this,n)},startOperation:function(){return jr(this)},endOperation:function(){return Wr(this)},refresh:Tn(function(){var n=this.display.cachedTextHeight;Rn(this),this.curOp.forceUpdate=!0,gi(this),_i(this,this.doc.scrollLeft,this.doc.scrollTop),Oa(this.display),(n==null||Math.abs(n-Xr(this.display))>.5||this.options.lineWrapping)&&ba(this),Se(this,"refresh",this)}),swapDoc:Tn(function(n){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Ms(this,n),gi(this),this.display.input.reset(),_i(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,gn(this,"swapDoc",this,a),a}),phrase:function(n){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,n)?a[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,a,I){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][a]=I},e.registerGlobalHelper=function(n,a,I,H){e.registerHelper(n,a,H),r[n]._global.push({pred:I,val:H})}}function za(e,t,r,n,a){var I=t,H=r,G=st(e,t.line),X=a&&e.direction=="rtl"?-r:r;function Q(){var it=t.line+X;return it<e.first||it>=e.first+e.size?!1:(t=new He(it,t.ch,t.sticky),G=st(e,it))}function se(it){var $e;if(n=="codepoint"){var at=G.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(at)?$e=null:$e=new He(t.line,Math.max(0,Math.min(G.text.length,t.ch+r*(at>=55296&&at<56320?2:1))),-r)}else a?$e=kl(e.cm,G,t,r):$e=Ba(G,t,r);if($e==null)if(!it&&Q())t=Fa(a,e.cm,G,t.line,X);else return!1;else t=$e;return!0}if(n=="char"||n=="codepoint")se();else if(n=="column")se(!0);else if(n=="word"||n=="group")for(var de=null,Te=n=="group",Ee=e.cm&&e.cm.getHelper(t,"wordChars"),Ue=!0;!(r<0&&!se(!Ue));Ue=!1){var We=G.text.charAt(t.ch)||`
|
|
`,Ye=Le(We,Ee)?"w":Te&&We==`
|
|
`?"n":!Te||/\s/.test(We)?null:"p";if(Te&&!Ue&&!Ye&&(Ye="s"),de&&de!=Ye){r<0&&(r=1,se(),t.sticky="after");break}if(Ye&&(de=Ye),r>0&&!se(!Ue))break}var qe=ea(e,t,I,H,!0);return qn(I,qe)&&(qe.hitSide=!0),qe}function Oo(e,t,r,n){var a=e.doc,I=t.left,H;if(n=="page"){var G=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),X=Math.max(G-.5*Xr(e.display),3);H=(r>0?t.bottom:t.top)+r*X}else n=="line"&&(H=r>0?t.bottom+3:t.top-3);for(var Q;!(Q=va(e,I,H),!Q.outside);){if(r<0?H<=0:H>=a.height){Q.hitSide=!0;break}H+=r*5}return Q}var jt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};jt.prototype.init=function(e){var t=this,r=this,n=r.cm,a=r.div=e.lineDiv;wo(a,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function I(G){for(var X=G.target;X;X=X.parentNode){if(X==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(X.className))break}return!1}Re(a,"paste",function(G){if(!I(G)||je(n,G)||xo(G,n))return;F<=11&&setTimeout(cn(n,function(){return t.updateFromDOM()}),20)}),Re(a,"compositionstart",function(G){t.composing={data:G.data,done:!1}}),Re(a,"compositionupdate",function(G){t.composing||(t.composing={data:G.data,done:!1})}),Re(a,"compositionend",function(G){t.composing&&(G.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Re(a,"touchstart",function(){return r.forceCompositionEnd()}),Re(a,"input",function(){t.composing||t.readFromDOMSoon()});function H(G){if(!I(G)||je(n,G))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()}),G.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var X=So(n);sa({lineWise:!0,text:X.text}),G.type=="cut"&&n.operation(function(){n.setSelections(X.ranges,0,ue),n.replaceSelection("",null,"cut")})}else return;if(G.clipboardData){G.clipboardData.clearData();var Q=Jn.text.join(`
|
|
`);if(G.clipboardData.setData("Text",Q),G.clipboardData.getData("Text")==Q){G.preventDefault();return}}var se=Ro(),de=se.firstChild;n.display.lineSpace.insertBefore(se,n.display.lineSpace.firstChild),de.value=Jn.text.join(`
|
|
`);var Te=document.activeElement;U(de),setTimeout(function(){n.display.lineSpace.removeChild(se),Te.focus(),Te==a&&r.showPrimarySelection()},50)}Re(a,"copy",H),Re(a,"cut",H)},jt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},jt.prototype.prepareSelection=function(){var e=ps(this.cm,!1);return e.focus=document.activeElement==this.div,e},jt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},jt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},jt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var I=oa(t,e.anchorNode,e.anchorOffset),H=oa(t,e.focusNode,e.focusOffset);if(I&&!I.bad&&H&&!H.bad&&mt(or(I,H),n)==0&&mt(sr(I,H),a)==0)return;var G=t.display.view,X=n.line>=t.display.viewFrom&&Co(t,n)||{node:G[0].measure.map[2],offset:0},Q=a.line<t.display.viewTo&&Co(t,a);if(!Q){var se=G[G.length-1].measure,de=se.maps?se.maps[se.maps.length-1]:se.map;Q={node:de[de.length-1],offset:de[de.length-2]-de[de.length-3]}}if(!X||!Q){e.removeAllRanges();return}var Te=e.rangeCount&&e.getRangeAt(0),Ee;try{Ee=g(X.node,X.offset,Q.offset,Q.node)}catch(Ue){}Ee&&(!D&&t.state.focused?(e.collapse(X.node,X.offset),Ee.collapsed||(e.removeAllRanges(),e.addRange(Ee))):(e.removeAllRanges(),e.addRange(Ee)),Te&&e.anchorNode==null?e.addRange(Te):D&&this.startGracePeriod()),this.rememberSelection()},jt.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)},jt.prototype.showMultipleSelections=function(e){y(this.cm.display.cursorDiv,e.cursors),y(this.cm.display.selectionDiv,e.selection)},jt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},jt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return b(this.div,t)},jt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},jt.prototype.blur=function(){this.div.blur()},jt.prototype.getField=function(){return this.div},jt.prototype.supportsTouch=function(){return!0},jt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Nn(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)},jt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},jt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(s&&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=oa(t,e.anchorNode,e.anchorOffset),n=oa(t,e.focusNode,e.focusOffset);r&&n&&Nn(t,function(){En(t.doc,xr(r,n),ue),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},jt.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(),a=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=He(n.line-1,st(e.doc,n.line-1).length)),a.ch==st(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=He(a.line+1,0)),n.line<t.viewFrom||a.line>t.viewTo-1)return!1;var I,H,G;n.line==t.viewFrom||(I=Ur(e,n.line))==0?(H=It(t.view[0].line),G=t.view[0].node):(H=It(t.view[I].line),G=t.view[I-1].node.nextSibling);var X=Ur(e,a.line),Q,se;if(X==t.view.length-1?(Q=t.viewTo-1,se=t.lineDiv.lastChild):(Q=It(t.view[X+1].line)-1,se=t.view[X+1].node.previousSibling),!G)return!1;for(var de=e.doc.splitLines(tu(e,G,se,H,Q)),Te=Kn(e.doc,He(H,0),He(Q,st(e.doc,Q).text.length));de.length>1&&Te.length>1;)if(J(de)==J(Te))de.pop(),Te.pop(),Q--;else if(de[0]==Te[0])de.shift(),Te.shift(),H++;else break;for(var Ee=0,Ue=0,We=de[0],Ye=Te[0],qe=Math.min(We.length,Ye.length);Ee<qe&&We.charCodeAt(Ee)==Ye.charCodeAt(Ee);)++Ee;for(var it=J(de),$e=J(Te),at=Math.min(it.length-(de.length==1?Ee:0),$e.length-(Te.length==1?Ee:0));Ue<at&&it.charCodeAt(it.length-Ue-1)==$e.charCodeAt($e.length-Ue-1);)++Ue;if(de.length==1&&Te.length==1&&H==n.line)for(;Ee&&Ee>n.ch&&it.charCodeAt(it.length-Ue-1)==$e.charCodeAt($e.length-Ue-1);)Ee--,Ue++;de[de.length-1]=it.slice(0,it.length-Ue).replace(/^\u200b+/,""),de[0]=de[0].slice(Ee).replace(/\u200b+$/,"");var pt=He(H,Ee),lt=He(Q,Te.length?J(Te).length-Ue:0);if(de.length>1||de[0]||mt(pt,lt))return ni(e.doc,de,pt,lt,"+input"),!0},jt.prototype.ensurePolled=function(){this.forceCompositionEnd()},jt.prototype.reset=function(){this.forceCompositionEnd()},jt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},jt.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)},jt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Nn(this.cm,function(){return Rn(e.cm)})},jt.prototype.setUneditable=function(e){e.contentEditable="false"},jt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||cn(this.cm,Ga)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},jt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},jt.prototype.onContextMenu=function(){},jt.prototype.resetPosition=function(){},jt.prototype.needsContentAttribute=!0;function Co(e,t){var r=fa(e,t.line);if(!r||r.hidden)return null;var n=st(e.doc,t.line),a=es(r,n,t.line),I=Qe(n,e.doc.direction),H="left";if(I){var G=Ke(I,t.ch);H=G%2?"right":"left"}var X=rs(a.map,t.ch,H);return X.offset=X.collapse=="right"?X.end:X.start,X}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function oi(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,a){var I="",H=!1,G=e.doc.lineSeparator(),X=!1;function Q(Ee){return function(Ue){return Ue.id==Ee}}function se(){H&&(I+=G,X&&(I+=G),H=X=!1)}function de(Ee){Ee&&(se(),I+=Ee)}function Te(Ee){if(Ee.nodeType==1){var Ue=Ee.getAttribute("cm-text");if(Ue){de(Ue);return}var We=Ee.getAttribute("cm-marker"),Ye;if(We){var qe=e.findMarks(He(n,0),He(a+1,0),Q(+We));qe.length&&(Ye=qe[0].find(0))&&de(Kn(e.doc,Ye.from,Ye.to).join(G));return}if(Ee.getAttribute("contenteditable")=="false")return;var it=/^(pre|div|p|li|table|br)$/i.test(Ee.nodeName);if(!/^br$/i.test(Ee.nodeName)&&Ee.textContent.length==0)return;it&&se();for(var $e=0;$e<Ee.childNodes.length;$e++)Te(Ee.childNodes[$e]);/^(pre|p)$/i.test(Ee.nodeName)&&(X=!0),it&&(H=!0)}else Ee.nodeType==3&&de(Ee.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Te(t),t==r);)t=t.nextSibling,X=!1;return I}function oa(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return oi(e.clipPos(He(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 a=0;a<e.display.view.length;a++){var I=e.display.view[a];if(I.node==n)return nu(I,t,r)}}function nu(e,t,r){var n=e.text.firstChild,a=!1;if(!t||!b(n,t))return oi(He(It(e.line),0),!0);if(t==n&&(a=!0,t=n.childNodes[r],r=0,!t)){var I=e.rest?J(e.rest):e.line;return oi(He(It(I),I.text.length),a)}var H=t.nodeType==3?t:null,G=t;for(!H&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(H=t.firstChild,r&&(r=H.nodeValue.length));G.parentNode!=n;)G=G.parentNode;var X=e.measure,Q=X.maps;function se(Ye,qe,it){for(var $e=-1;$e<(Q?Q.length:0);$e++)for(var at=$e<0?X.map:Q[$e],pt=0;pt<at.length;pt+=3){var lt=at[pt+2];if(lt==Ye||lt==qe){var bt=It($e<0?e.line:e.rest[$e]),Kt=at[pt]+it;return(it<0||lt!=Ye)&&(Kt=at[pt+(it?1:0)]),He(bt,Kt)}}}var de=se(H,G,r);if(de)return oi(de,a);for(var Te=G.nextSibling,Ee=H?H.nodeValue.length-r:0;Te;Te=Te.nextSibling){if(de=se(Te,Te.firstChild,0),de)return oi(He(de.line,de.ch-Ee),a);Ee+=Te.textContent.length}for(var Ue=G.previousSibling,We=r;Ue;Ue=Ue.previousSibling){if(de=se(Ue,Ue.firstChild,-1),de)return oi(He(de.line,de.ch+We),a);We+=Ue.textContent.length}}var nn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null};nn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var a=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(a.style.width="0px"),Re(a,"input",function(){W&&F>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Re(a,"paste",function(H){if(je(n,H)||xo(H,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function I(H){if(je(n,H))return;if(n.somethingSelected())sa({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var G=So(n);sa({lineWise:!0,text:G.text}),H.type=="cut"?n.setSelections(G.ranges,null,ue):(r.prevInput="",a.value=G.text.join(`
|
|
`),U(a))}else return;H.type=="cut"&&(n.state.cutIncoming=+new Date)}Re(a,"cut",I),Re(a,"copy",I),Re(e.scroller,"paste",function(H){if(cr(e,H)||je(n,H))return;if(!a.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var G=new Event("paste");G.clipboardData=H.clipboardData,a.dispatchEvent(G)}),Re(e.lineSpace,"selectstart",function(H){cr(e,H)||Z(H)}),Re(a,"compositionstart",function(){var H=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:H,range:n.markText(H,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},nn.prototype.createField=function(e){this.wrapper=Ro(),this.textarea=this.wrapper.firstChild},nn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},nn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=ps(e);if(e.options.moveInputWithCursor){var a=Xn(e,r.sel.primary().head,"div"),I=t.wrapper.getBoundingClientRect(),H=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+H.top-I.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+H.left-I.left))}return n},nn.prototype.showSelection=function(e){var t=this.cm,r=t.display;y(r.cursorDiv,e.cursors),y(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nn.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&&U(this.textarea),W&&F>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",W&&F>=9&&(this.hasSelection=null))},nn.prototype.getField=function(){return this.textarea},nn.prototype.supportsTouch=function(){return!1},nn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!i||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},nn.prototype.blur=function(){this.textarea.blur()},nn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nn.prototype.receivedFocus=function(){this.slowPoll()},nn.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()})},nn.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)},nn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Me(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=r.value;if(a==n&&!t.somethingSelected())return!1;if(W&&F>=9&&this.hasSelection===a||l&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var I=a.charCodeAt(0);if(I==8203&&!n&&(n="\u200B"),I==8666)return this.reset(),this.cm.execCommand("undo")}for(var H=0,G=Math.min(n.length,a.length);H<G&&n.charCodeAt(H)==a.charCodeAt(H);)++H;return Nn(t,function(){Ga(t,a.slice(H),n.length-H,null,e.composing?"*compose":null),a.length>1e3||a.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nn.prototype.onKeyPress=function(){W&&F>=9&&(this.hasSelection=null),this.fastPoll()},nn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var I=Nr(r,e),H=n.scroller.scrollTop;if(!I||m)return;var G=r.options.resetSelectionOnContextMenu;G&&r.doc.sel.contains(I)==-1&&cn(r,En)(r.doc,xr(I),ue);var X=a.style.cssText,Q=t.wrapper.style.cssText,se=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",a.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-se.top-5)+"px; left: "+(e.clientX-se.left-5)+`px;
|
|
z-index: 1000; background: `+(W?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var de;M&&(de=window.scrollY),n.input.focus(),M&&window.scrollTo(null,de),n.input.reset(),r.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=Ee,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Te(){if(a.selectionStart!=null){var We=r.somethingSelected(),Ye="\u200B"+(We?a.value:"");a.value="\u21DA",a.value=Ye,t.prevInput=We?"":"\u200B",a.selectionStart=1,a.selectionEnd=Ye.length,n.selForContextMenu=r.doc.sel}}function Ee(){if(t.contextMenuPending!=Ee)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=Q,a.style.cssText=X,W&&F<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=H),a.selectionStart!=null){(!W||W&&F<9)&&Te();var We=0,Ye=function(){n.selForContextMenu==r.doc.sel&&a.selectionStart==0&&a.selectionEnd>0&&t.prevInput=="\u200B"?cn(r,Ys)(r):We++<10?n.detectingSelectAll=setTimeout(Ye,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ye,200)}}if(W&&F>=9&&Te(),w){oe(e);var Ue=function(){Xe(window,"mouseup",Ue),setTimeout(Ee,20)};Re(window,"mouseup",Ue)}else setTimeout(Ee,50)},nn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},nn.prototype.setUneditable=function(){},nn.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?_(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=P();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=G.getValue()}var a;if(e.form&&(Re(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var I=e.form;a=I.submit;try{var H=I.submit=function(){n(),I.submit=a,I.submit(),I.submit=H}}catch(X){}}t.finishInit=function(X){X.save=n,X.getTextArea=function(){return e},X.toTextArea=function(){X.toTextArea=isNaN,n(),e.parentNode.removeChild(X.getWrapperElement()),e.style.display="",e.form&&(Xe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=a))}},e.style.display="none";var G=Jt(function(X){return e.parentNode.insertBefore(X,e.nextSibling)},t);return G}function iu(e){e.off=Xe,e.on=Re,e.wheelEventPixels=cl,e.Doc=On,e.splitLines=ht,e.countColumn=j,e.findColumn=le,e.isWordChar=Ae,e.Pass=_e,e.signal=Se,e.Line=Mr,e.changeEnd=Ar,e.scrollbarModel=Ts,e.Pos=He,e.cmpPos=mt,e.modes=Yt,e.mimeModes=Tt,e.resolveMode=ft,e.getMode=gt,e.modeExtensions=xt,e.extendMode=kt,e.copyState=en,e.startState=pr,e.innerMode=Zn,e.commands=Mi,e.keyMap=hr,e.keyName=lo,e.isModifierKey=so,e.lookupKey=ii,e.normalizeKeyMap=Ml,e.StringStream=Vt,e.SharedTextMarker=Ii,e.TextMarker=wr,e.LineWidget=Ci,e.e_preventDefault=Z,e.e_stopPropagation=$,e.e_stop=oe,e.addClass=L,e.contains=b,e.rmClass=x,e.keyNames=Rr}Ql(Jt),$l(Jt);var au="iter insert remove copy getEditor constructor".split(" ");for(var la in On.prototype)On.prototype.hasOwnProperty(la)&&q(au,la)<0&&(Jt.prototype[la]=function(e){return function(){return e.apply(this.doc,arguments)}}(On.prototype[la]));return pe(On),Jt.inputStyles={textarea:nn,contenteditable:jt},Jt.defineMode=function(e){!Jt.defaults.mode&&e!="null"&&(Jt.defaults.mode=e),_n.apply(this,arguments)},Jt.defineMIME=Bn,Jt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Jt.defineMIME("text/plain","null"),Jt.defineExtension=function(e,t){Jt.prototype[e]=t},Jt.defineDocExtension=function(e,t){On.prototype[e]=t},Jt.fromTextArea=ru,iu(Jt),Jt.version="5.58.2",Jt})},W6BS:function(Pe,we){Pe.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+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMt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Q0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},Xsq0:function(Pe,we,Y){Pe.exports=Y.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(Pe,we,Y){"use strict";Y.r(we),Y.d(we,"ResizableTextArea",function(){return q});var ne=Y("wx14"),V=Y("1OyB"),D=Y("vuIU"),z=Y("Ji7U"),N=Y("LK+K"),k=Y("cDcd"),W=Y("VTBJ"),F=Y("rePB"),M=Y("Zm9Q"),R=Y("Kwbf"),v=Y("c+Xe"),m=Y("m+aA"),p=Y("bdgK"),c=new Map;function o(ue){ue.forEach(function(me){var fe,le=me.target;(fe=c.get(le))===null||fe===void 0||fe.forEach(function(ie){return ie(le)})})}var h=new p.default(o),s=null,i=null;function l(ue,me){c.has(ue)||(c.set(ue,new Set),h.observe(ue)),c.get(ue).add(me)}function f(ue,me){c.has(ue)&&(c.get(ue).delete(me),c.get(ue).size||(h.unobserve(ue),c.delete(ue)))}var O=function(ue){Object(z.a)(fe,ue);var me=Object(N.a)(fe);function fe(){return Object(V.a)(this,fe),me.apply(this,arguments)}return Object(D.a)(fe,[{key:"render",value:function(){return this.props.children}}]),fe}(k.Component),A=k.createContext(null);function T(ue){var me=ue.children,fe=ue.onBatchResize,le=k.useRef(0),ie=k.useRef([]),he=k.useContext(A),J=k.useCallback(function(ae,ee,be){le.current+=1;var xe=le.current;ie.current.push({size:ae,element:ee,data:be}),Promise.resolve().then(function(){xe===le.current&&(fe==null||fe(ie.current),ie.current=[])}),he==null||he(ae,ee,be)},[fe,he]);return k.createElement(A.Provider,{value:J},me)}function w(ue){var me=ue.children,fe=ue.disabled,le=k.useRef(null),ie=k.useRef(null),he=k.useContext(A),J=k.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ae=k.isValidElement(me)&&Object(v.c)(me),ee=ae?me.ref:null,be=k.useMemo(function(){return Object(v.a)(ee,le)},[ee,le]),xe=k.useRef(ue);xe.current=ue;var ye=k.useCallback(function(Ae){var Le=xe.current,Ne=Le.onResize,ke=Le.data,Oe=Ae.getBoundingClientRect(),Ie=Oe.width,Ge=Oe.height,Je=Ae.offsetWidth,Ve=Ae.offsetHeight,Ke=Math.floor(Ie),nt=Math.floor(Ge);if(J.current.width!==Ke||J.current.height!==nt||J.current.offsetWidth!==Je||J.current.offsetHeight!==Ve){var Qe={width:Ke,height:nt,offsetWidth:Je,offsetHeight:Ve};J.current=Qe;var Ze=Je===Math.round(Ie)?Ie:Je,Re=Ve===Math.round(Ge)?Ge:Ve,tt=Object(W.a)(Object(W.a)({},Qe),{},{offsetWidth:Ze,offsetHeight:Re});he==null||he(tt,Ae,ke),Ne&&Promise.resolve().then(function(){Ne(tt,Ae)})}},[]);return k.useEffect(function(){var Ae=Object(m.a)(le.current)||Object(m.a)(ie.current);return Ae&&!fe&&l(Ae,ye),function(){return f(Ae,ye)}},[le.current,fe]),k.createElement(O,{ref:ie},ae?k.cloneElement(me,{ref:be}):me)}var S="rc-observer-key";function x(ue){var me=ue.children,fe=Object(M.a)(me);return fe.map(function(le,ie){var he=(le==null?void 0:le.key)||"".concat(S,"-").concat(ie);return k.createElement(w,Object(ne.a)({},ue,{key:he}),le)})}x.Collection=T;var d=x,y=Y("bT9E"),u=Y("TSYQ"),E=Y.n(u),g=`
|
|
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
|
|
`,b=["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"],P={},L;function B(ue){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=ue.getAttribute("id")||ue.getAttribute("data-reactid")||ue.getAttribute("name");if(me&&P[fe])return P[fe];var le=window.getComputedStyle(ue),ie=le.getPropertyValue("box-sizing")||le.getPropertyValue("-moz-box-sizing")||le.getPropertyValue("-webkit-box-sizing"),he=parseFloat(le.getPropertyValue("padding-bottom"))+parseFloat(le.getPropertyValue("padding-top")),J=parseFloat(le.getPropertyValue("border-bottom-width"))+parseFloat(le.getPropertyValue("border-top-width")),ae=b.map(function(be){return"".concat(be,":").concat(le.getPropertyValue(be))}).join(";"),ee={sizingStyle:ae,paddingSize:he,borderSize:J,boxSizing:ie};return me&&fe&&(P[fe]=ee),ee}function U(ue){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;L||(L=document.createElement("textarea"),L.setAttribute("tab-index","-1"),L.setAttribute("aria-hidden","true"),document.body.appendChild(L)),ue.getAttribute("wrap")?L.setAttribute("wrap",ue.getAttribute("wrap")):L.removeAttribute("wrap");var ie=B(ue,me),he=ie.paddingSize,J=ie.borderSize,ae=ie.boxSizing,ee=ie.sizingStyle;L.setAttribute("style","".concat(ee,";").concat(g)),L.value=ue.value||ue.placeholder||"";var be=Number.MIN_SAFE_INTEGER,xe=Number.MAX_SAFE_INTEGER,ye=L.scrollHeight,Ae;if(ae==="border-box"?ye+=J:ae==="content-box"&&(ye-=he),fe!==null||le!==null){L.value=" ";var Le=L.scrollHeight-he;fe!==null&&(be=Le*fe,ae==="border-box"&&(be=be+he+J),ye=Math.max(be,ye)),le!==null&&(xe=Le*le,ae==="border-box"&&(xe=xe+he+J),Ae=ye>xe?"":"hidden",ye=Math.min(xe,ye))}return{height:ye,minHeight:be,maxHeight:xe,overflowY:Ae,resize:"none"}}var C=Y("Gytx"),_=Y.n(C),j;(function(ue){ue[ue.NONE=0]="NONE",ue[ue.RESIZING=1]="RESIZING",ue[ue.RESIZED=2]="RESIZED"})(j||(j={}));var K=function(ue){Object(z.a)(fe,ue);var me=Object(N.a)(fe);function fe(le){var ie;return Object(V.a)(this,fe),ie=me.call(this,le),ie.nextFrameActionId=void 0,ie.resizeFrameId=void 0,ie.textArea=void 0,ie.saveTextArea=function(he){ie.textArea=he},ie.handleResize=function(he){var J=ie.state.resizeStatus,ae=ie.props,ee=ae.autoSize,be=ae.onResize;if(J!==j.NONE)return;typeof be=="function"&&be(he),ee&&ie.resizeOnNextFrame()},ie.resizeOnNextFrame=function(){cancelAnimationFrame(ie.nextFrameActionId),ie.nextFrameActionId=requestAnimationFrame(ie.resizeTextarea)},ie.resizeTextarea=function(){var he=ie.props.autoSize;if(!he||!ie.textArea)return;var J=he.minRows,ae=he.maxRows,ee=U(ie.textArea,!1,J,ae);ie.setState({textareaStyles:ee,resizeStatus:j.RESIZING},function(){cancelAnimationFrame(ie.resizeFrameId),ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:j.RESIZED},function(){ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:j.NONE}),ie.fixFirefoxAutoScroll()})})})})},ie.renderTextArea=function(){var he=ie.props,J=he.prefixCls,ae=J===void 0?"rc-textarea":J,ee=he.autoSize,be=he.onResize,xe=he.className,ye=he.disabled,Ae=ie.state,Le=Ae.textareaStyles,Ne=Ae.resizeStatus,ke=Object(y.a)(ie.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Oe=E()(ae,xe,Object(F.a)({},"".concat(ae,"-disabled"),ye));"value"in ke&&(ke.value=ke.value||"");var Ie=Object(W.a)(Object(W.a)(Object(W.a)({},ie.props.style),Le),Ne===j.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return k.createElement(d,{onResize:ie.handleResize,disabled:!(ee||be)},k.createElement("textarea",Object(ne.a)({},ke,{className:Oe,style:Ie,ref:ie.saveTextArea})))},ie.state={textareaStyles:{},resizeStatus:j.NONE},ie}return Object(D.a)(fe,[{key:"componentDidUpdate",value:function(ie){(ie.value!==this.props.value||!_()(ie.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 ie=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(ie,he)}}catch(J){}}},{key:"render",value:function(){return this.renderTextArea()}}]),fe}(k.Component),q=K,te=function(ue){Object(z.a)(fe,ue);var me=Object(N.a)(fe);function fe(le){var ie;Object(V.a)(this,fe),ie=me.call(this,le),ie.resizableTextArea=void 0,ie.focus=function(){ie.resizableTextArea.textArea.focus()},ie.saveTextArea=function(J){ie.resizableTextArea=J},ie.handleChange=function(J){var ae=ie.props.onChange;ie.setValue(J.target.value,function(){ie.resizableTextArea.resizeTextarea()}),ae&&ae(J)},ie.handleKeyDown=function(J){var ae=ie.props,ee=ae.onPressEnter,be=ae.onKeyDown;J.keyCode===13&&ee&&ee(J),be&&be(J)};var he=typeof le.value=="undefined"||le.value===null?le.defaultValue:le.value;return ie.state={value:he},ie}return Object(D.a)(fe,[{key:"setValue",value:function(ie,he){"value"in this.props||this.setState({value:ie},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return k.createElement(q,Object(ne.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ie){return"value"in ie?{value:ie.value}:null}}]),fe}(k.Component),_e=we.default=te},ZW9T:function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return U});var ne=Y("k1fw"),V=Y("miYZ"),D=Y("tsqr"),z=Y("rAM+"),N=Y("tJVT"),k=Y("PpiC"),W=Y("cDcd"),F=Y.n(W),M=Y("bdgK"),R=Y("oBTY"),v=Y("9og8"),m=Y("WmNS"),p=Y.n(m),c={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},h={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"#include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},i=Y("5VLF"),l=Y.n(i),f={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},O=function(_,j){return j.map(function(K){return{label:K,kind:_.languages.CompletionItemKind.Keyword,insertText:K}})},A=function(_){return Object.keys(f.tables).map(function(j){return{label:j,kind:_.languages.CompletionItemKind.Variable,insertText:j}})},T=function(_,j){var K=f.tables[_];return K?K.map(function(q){return{label:q,kind:j.languages.CompletionItemKind.Field,insertText:q}}):[]};function w(C,_,j,K,q){var te=_.getWordUntilPosition(j),_e={startLineNumber:j.lineNumber,endLineNumber:j.lineNumber,startColumn:te.startColumn,endColumn:te.endColumn},ue=K.map(function(me){return{label:me,kind:C.languages.CompletionItemKind.Keyword,insertText:me,insertTextRules:C.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return q.map(function(me){ue.push(Object(ne.a)(Object(ne.a)({},me),{},{range:_e}))}),ue}var S=function(C){f.languages.map(function(q){return C.languages.registerDocumentFormattingEditProvider(q,{provideDocumentFormattingEdits:function(_e,ue,me){return Object(v.a)(p.a.mark(function fe(){var le;return p.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return le=l()(_e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),he.abrupt("return",[{range:_e.getFullModelRange(),text:le}]);case 2:case"end":return he.stop()}},fe)}))()}}),q});var _=h.quickKey.map(function(q){return{label:q.label,kind:C.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:C.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),j=s.quickKey.map(function(q){return{label:q.label,kind:C.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:C.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),K=o.quickKey.map(function(q){return{label:q.label,kind:C.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:C.languages.CompletionItemInsertTextRule.InsertAsSnippet}});C.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(R.a)(h.keywords),Object(R.a)(h.quickKey.map(function(q){return q.label}))),provideCompletionItems:function(te,_e){var ue=te.getValueInRange({startLineNumber:_e.lineNumber,startColumn:1,endLineNumber:_e.lineNumber,endColumn:_e.column}),me=ue.match(/cu/gim);console.log("match:",me,_e,ue,te);var fe=[],le=_e.lineNumber,ie=_e.column,he=te.getValueInRange({startLineNumber:le,startColumn:0,endLineNumber:le,endColumn:ie}),J=he.trim().split(/\s+/),ae=J[J.length-1];if(ae.endsWith(".")){var ee=ae.slice(0,ae.length-1);Object.keys(f.tables).includes(ee)&&(fe=Object(R.a)(T(ee,C)))}else ae==="."?fe=[]:fe=[].concat(Object(R.a)(A(C)),Object(R.a)(O(C,h.keywords)),Object(R.a)(_));return{suggestions:fe}}}),C.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(R.a)(c.keywords)),provideCompletionItems:function(te,_e){var ue=te.getValueInRange({startLineNumber:_e.lineNumber,startColumn:1,endLineNumber:_e.lineNumber,endColumn:_e.column}),me=ue.match(/cu/gim);console.log("match:",me,_e,ue,te);var fe=[],le=_e.lineNumber,ie=_e.column,he=te.getValueInRange({startLineNumber:le,startColumn:0,endLineNumber:le,endColumn:ie}),J=he.trim().split(/\s+/),ae=J[J.length-1];if(ae.endsWith(".")){var ee=ae.slice(0,ae.length-1);Object.keys(f.tables).includes(ee)&&(fe=Object(R.a)(T(ee,C)))}else ae==="."?fe=[]:fe=[].concat(Object(R.a)(A(C)),Object(R.a)(O(C,c.keywords)));return{suggestions:fe}}}),C.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(R.a)(o.keywords)),provideCompletionItems:function(te,_e){var ue=[],me=_e.lineNumber,fe=_e.column,le=te.getValueInRange({startLineNumber:me,startColumn:0,endLineNumber:me,endColumn:fe}),ie=le.trim().split(/\s+/),he=ie[ie.length-1];if(he.endsWith(".")){var J=he.slice(0,he.length-1);Object.keys(f.tables).includes(J)&&(ue=Object(R.a)(T(J,C)))}else he==="."?ue=[]:ue=[].concat(Object(R.a)(A(C)),Object(R.a)(O(C,o.keywords)),Object(R.a)(K));return{suggestions:ue}}}),C.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(R.a)(s.keywords)),provideCompletionItems:function(te,_e){var ue=[],me=_e.lineNumber,fe=_e.column,le=te.getValueInRange({startLineNumber:me,startColumn:0,endLineNumber:me,endColumn:fe}),ie=le.trim().split(/\s+/),he=ie[ie.length-1];if(he.endsWith(".")){var J=he.slice(0,he.length-1);Object.keys(f.tables).includes(J)&&(ue=Object(R.a)(T(J,C)))}else he==="."?ue=[]:ue=[].concat(Object(R.a)(A(C)),Object(R.a)(O(C,s.keywords)),Object(R.a)(j));return{suggestions:ue}}})},x="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",d=Y("LvDl"),y=Y("+ua5");function u(C){return/^\d+$/.test(C)?"".concat(C,"px"):C}function E(){}var g=!1,b={"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 P(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=C;if(Array.isArray(C)){for(var j=0;j<C.length;j++){var K=b[C[j]];if(K)return K}return _[0]}return b[_]||_}var L=null,B=we.b=function(C){var _=C.width,j=_===void 0?"100%":_,K=C.height,q=K===void 0?"100%":K,te=C.value,_e=C.language,ue=_e===void 0?"javascript":_e,me=C.style,fe=me===void 0?{}:me,le=C.options,ie=le===void 0?{}:le,he=C.overrideServices,J=he===void 0?{}:he,ae=C.theme,ee=ae===void 0?"vs-dark":ae,be=C.onEditBlur,xe=C.onSave,ye=C.autoHeight,Ae=ye===void 0?!1:ye,Le=C.forbidCopy,Ne=Le===void 0?!1:Le,ke=C.onChange,Oe=ke===void 0?E:ke,Ie=C.editorDidMount,Ge=Ie===void 0?E:Ie,Je=C.onFocus,Ve=Je===void 0?E:Je,Ke=C.filename,nt=Ke===void 0?"educoder.txt":Ke,Qe=C.errorLine,Ze=C.errorContent,Re=Ze===void 0?"":Ze,tt=Object(k.a)(C,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Xe=Object(W.useRef)(),Se=Object(W.useRef)({}),je=Object(W.useRef)(),ve=Object(W.useRef)(!1),ce=Object(W.useRef)(),pe=Object(W.useState)(!1),Z=Object(N.a)(pe,2),$=Z[0],re=Z[1];function oe(){var ft;return Xe.current&&(ft=new M.default(function(gt){var xt=Object(z.a)(gt),kt;try{for(xt.s();!(kt=xt.n()).done;){var en=kt.value;(en.target.offsetHeight>0||en.target.offsetWidth>0)&&Se.current.instance.layout()}}catch(Zn){xt.e(Zn)}finally{xt.f()}}),ft.observe(Xe.current)),ft}function ge(){D.b.warn(decodeURIComponent(x))}var Ce=function(){var gt=Se.current.instance;if(te!=null&>&&$){var xt=gt.getModel();xt&&te!==xt.getValue()&&(g=!0,xt.setValue(te),gt.layout(),g=!1)}};Object(W.useEffect)(function(){je.current&&clearTimeout(je.current),je.current=setTimeout(function(){Ce()},500)},[te,$,Se.current]),Object(W.useEffect)(function(){if(Qe&&Se.current&&Se.current.instance){var ft=Se.current.instance;ft.changeViewZones(function(xt){var kt=document.createElement("div");kt.style.padding="10px 20px",kt.style.width="calc(100% - 20px)",kt.className="my-error-line-wrp",kt.innerHTML=Re,xt.addZone({afterLineNumber:Qe||11,heightInLines:3,domNode:kt})});var gt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};ft.addOverlayWidget(gt),ft.revealPositionInCenter({lineNumber:20,column:1})}},[Qe,Se.current,$]);function Fe(){var ft=Se.current.instance;if(ft){var gt=ft.getSelection(),xt=Se.current.pastePos||{},kt=new L.Range(xt.startLineNumber||gt.endLineNumber,xt.startColumn||gt.endColumn,xt.endLineNumber||gt.endLineNumber,xt.endColumn||gt.endColumn);setTimeout(function(){ft.executeEdits("",[{range:kt,text:""}])},300)}}function et(ft){(window.navigator.platform.match("Mac")?ft.metaKey:ft.ctrlKey)&&ft.keyCode==83&&(ft.preventDefault(),xe())}var rt=function(){if(Ae&&Se.current.instance){var gt=Se.current.instance.getContentHeight();_n(gt<q?q:gt)}else _n(q)};function De(ft){var gt=document.createEvent("MouseEvents");gt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ft.dispatchEvent(gt)}function St(ft,gt){var xt=window.URL||window.webkitURL||window,kt=new Blob([gt]),en=document.createElementNS("http://www.w3.org/1999/xhtml","a");en.href=xt.createObjectURL(kt),en.download=ft,De(en)}Object(W.useEffect)(function(){rt()},[rt]),Object(W.useEffect)(function(){Xe.current&&!$&&Y.e(27).then(Y.t.bind(null,"M/lh",7)).then(function(ft){try{L=ft,Se.current.instance=L.editor.create(Xe.current,{value:te,language:P(ue),theme:ee,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},J);var gt=Se.current.instance;if(Ge(gt,L),setTimeout(function(){rt(),Se.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){St(nt||"educoder.txt",gt.getValue())}})},500),Se.current.subscription=gt.onDidChangeModelContent(function(kt){ve.current?clearTimeout(ce.current):(rt(),Oe(gt.getValue(),kt)),ce.current=setTimeout(function(){ve.current=!1},500)}),window.Monaco||S(L),Ne&&(gt.addCommand(L.KeyMod.CtrlCmd|L.KeyMod.Shift|L.KeyCode.KEY_V,function(){return ge(),null}),gt.addCommand(L.KeyMod.CtrlCmd|L.KeyCode.KEY_C,function(){return ge(),null})),window.Monaco=L,be&>.onDidBlurEditorWidget(function(){be(gt.getValue())}),Ve&>.onDidFocusEditorText(function(){Ve(gt.getValue())}),Ne){gt.addCommand(L.KeyMod.CtrlCmd|L.KeyCode.KEY_V,function(){return ge(),null}),gt.onDidPaste(function(kt){Se.current.pastePos=kt});try{window.addEventListener("paste",Fe)}catch(kt){}}var xt=oe();return re(!0),function(){var kt=Se.current.instance;kt.dispose();var en=kt.getModel();en&&en.dispose(),Se.current.subscription&&Se.current.subscription.dispose(),Ne&&window.removeEventListener("paste",Fe),xt.unobserve(Xe.current)}}catch(kt){}})},[]),Object(W.useEffect)(function(){var ft=Se.current.instance;if(ft&&$)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}},[xe,$]),Object(W.useEffect)(function(){var ft=Se.current.instance;if(ft&&$){var gt=P(ue);L.editor.setModelLanguage(ft.getModel(),gt),console.log("language:",ue,ft.getModel(),gt)}},[ue,$]),Object(W.useEffect)(function(){var ft=Se.current.instance;ft&&$&&L.editor.setTheme(ee)},[ee,$]),Object(W.useEffect)(function(){var ft=Se.current.instance;ft&&$&&(ft.updateOptions(Object(ne.a)({},ie)),setTimeout(function(){ft.getModel().updateOptions(Object(ne.a)({},ie))},200))},[JSON.stringify(ie),$]),Object(W.useEffect)(function(){var ft=Se.current.instance;ft&&$&&ft.layout()},[j,q,$]);var ht=Object(W.useState)(u(j)),Me=Object(N.a)(ht,2),yt=Me[0],Et=Me[1],$t=Object(W.useState)(u(q)),Yt=Object(N.a)($t,2),Tt=Yt[0],_n=Yt[1],Bn=Object(ne.a)(Object(ne.a)({},fe),{},{width:yt,height:Tt});return F.a.createElement("div",{className:"my-monaco-editor",ref:Xe,style:Bn})};function U(C){var _=C.width,j=_===void 0?"100%":_,K=C.height,q=K===void 0?"100%":K,te=C.original,_e=C.modified,ue=C.language,me=C.options,fe=me===void 0?{}:me,le=Object(W.useRef)(),ie=Object(W.useState)(null),he=Object(N.a)(ie,2),J=he[0],ae=he[1];function ee(Ae){var Le;return le.current&&(Le=new M.default(function(Ne){var ke=Object(z.a)(Ne),Oe;try{for(ke.s();!(Oe=ke.n()).done;){var Ie=Oe.value;(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&Ae.layout()}}catch(Ge){ke.e(Ge)}finally{ke.f()}}),Le.observe(le.current)),Le}Object(W.useEffect)(function(){le.current&&Y.e(27).then(Y.t.bind(null,"M/lh",7)).then(function(Ae){L=Ae;var Le=L.editor.createDiffEditor(le.current,Object(ne.a)(Object(ne.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},fe),{},{wordWrap:!0}));ae(Le);var Ne=ee(Le);return function(){Le.dispose();var ke=Le.getModel();ke&&ke.dispose(),Ne.unobserve(le.current)}})},[]),Object(W.useEffect)(function(){J&&J.setModel({original:L.editor.createModel(te,ue),modified:L.editor.createModel(_e,ue)})},[te,_e,ue,J]);var be=u(j),xe=u(q),ye={width:be,height:xe};return F.a.createElement("div",{className:"my-diff-editor",ref:le,style:ye})}},ZpRC:function(Pe,we,Y){"use strict";function ne(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function V(v,m){return(!m||v!=="hidden")&&v!=="visible"&&v!=="clip"}function D(v,m){if(v.clientHeight<v.scrollHeight||v.clientWidth<v.scrollWidth){var p=getComputedStyle(v,null);return V(p.overflowY,m)||V(p.overflowX,m)||function(c){var o=function(h){if(!h.ownerDocument||!h.ownerDocument.defaultView)return null;try{return h.ownerDocument.defaultView.frameElement}catch(s){return null}}(c);return!!o&&(o.clientHeight<c.scrollHeight||o.clientWidth<c.scrollWidth)}(v)}return!1}function z(v,m,p,c,o,h,s,i){return h<v&&s>m||h>v&&s<m?0:h<=v&&i<=p||s>=m&&i>=p?h-v-c:s>m&&i<p||h<v&&i>p?s-m+o:0}var N=function(v,m){var p=window,c=m.scrollMode,o=m.block,h=m.inline,s=m.boundary,i=m.skipOverflowHiddenElements,l=typeof s=="function"?s:function(Le){return Le!==s};if(!ne(v))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,O=[],A=v;ne(A)&&l(A);){if((A=A.parentElement)===f){O.push(A);break}A!=null&&A===document.body&&D(A)&&!D(document.documentElement)||A!=null&&D(A,i)&&O.push(A)}for(var T=p.visualViewport?p.visualViewport.width:innerWidth,w=p.visualViewport?p.visualViewport.height:innerHeight,S=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,d=v.getBoundingClientRect(),y=d.height,u=d.width,E=d.top,g=d.right,b=d.bottom,P=d.left,L=o==="start"||o==="nearest"?E:o==="end"?b:E+y/2,B=h==="center"?P+u/2:h==="end"?g:P,U=[],C=0;C<O.length;C++){var _=O[C],j=_.getBoundingClientRect(),K=j.height,q=j.width,te=j.top,_e=j.right,ue=j.bottom,me=j.left;if(c==="if-needed"&&E>=0&&P>=0&&b<=w&&g<=T&&E>=te&&b<=ue&&P>=me&&g<=_e)return U;var fe=getComputedStyle(_),le=parseInt(fe.borderLeftWidth,10),ie=parseInt(fe.borderTopWidth,10),he=parseInt(fe.borderRightWidth,10),J=parseInt(fe.borderBottomWidth,10),ae=0,ee=0,be="offsetWidth"in _?_.offsetWidth-_.clientWidth-le-he:0,xe="offsetHeight"in _?_.offsetHeight-_.clientHeight-ie-J:0;if(f===_)ae=o==="start"?L:o==="end"?L-w:o==="nearest"?z(x,x+w,w,ie,J,x+L,x+L+y,y):L-w/2,ee=h==="start"?B:h==="center"?B-T/2:h==="end"?B-T:z(S,S+T,T,le,he,S+B,S+B+u,u),ae=Math.max(0,ae+x),ee=Math.max(0,ee+S);else{ae=o==="start"?L-te-ie:o==="end"?L-ue+J+xe:o==="nearest"?z(te,ue,K,ie,J+xe,L,L+y,y):L-(te+K/2)+xe/2,ee=h==="start"?B-me-le:h==="center"?B-(me+q/2)+be/2:h==="end"?B-_e+he+be:z(me,_e,q,le,he+be,B,B+u,u);var ye=_.scrollLeft,Ae=_.scrollTop;L+=Ae-(ae=Math.max(0,Math.min(Ae+ae,_.scrollHeight-K+xe))),B+=ye-(ee=Math.max(0,Math.min(ye+ee,_.scrollWidth-q+be)))}U.push({el:_,top:ae,left:ee})}return U};function k(v){return v===Object(v)&&Object.keys(v).length!==0}function W(v,m){m===void 0&&(m="auto");var p="scrollBehavior"in document.body.style;v.forEach(function(c){var o=c.el,h=c.top,s=c.left;o.scroll&&p?o.scroll({top:h,left:s,behavior:m}):(o.scrollTop=h,o.scrollLeft=s)})}function F(v){return v===!1?{block:"end",inline:"nearest"}:k(v)?v:{block:"start",inline:"nearest"}}function M(v,m){var p=!v.ownerDocument.documentElement.contains(v);if(k(m)&&typeof m.behavior=="function")return m.behavior(p?[]:N(v,m));if(p)return;var c=F(m);return W(N(v,c),c.behavior)}var R=we.a=M},Zss7:function(Pe,we,Y){var ne;(function(V){var D=/^\s+/,z=/\s+$/,N=0,k=V.round,W=V.min,F=V.max,M=V.random;function R(J,ae){if(J=J||"",ae=ae||{},J instanceof R)return J;if(!(this instanceof R))return new R(J,ae);var ee=v(J);this._originalInput=J,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=k(100*this._a)/100,this._format=ae.format||ee.format,this._gradientType=ae.gradientType,this._r<1&&(this._r=k(this._r)),this._g<1&&(this._g=k(this._g)),this._b<1&&(this._b=k(this._b)),this._ok=ee.ok,this._tc_id=N++}R.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 J=this.toRgb();return(J.r*299+J.g*587+J.b*114)/1e3},getLuminance:function(){var J=this.toRgb(),ae,ee,be,xe,ye,Ae;return ae=J.r/255,ee=J.g/255,be=J.b/255,ae<=.03928?xe=ae/12.92:xe=V.pow((ae+.055)/1.055,2.4),ee<=.03928?ye=ee/12.92:ye=V.pow((ee+.055)/1.055,2.4),be<=.03928?Ae=be/12.92:Ae=V.pow((be+.055)/1.055,2.4),.2126*xe+.7152*ye+.0722*Ae},setAlpha:function(J){return this._a=U(J),this._roundA=k(100*this._a)/100,this},toHsv:function(){var J=o(this._r,this._g,this._b);return{h:J.h*360,s:J.s,v:J.v,a:this._a}},toHsvString:function(){var J=o(this._r,this._g,this._b),ae=k(J.h*360),ee=k(J.s*100),be=k(J.v*100);return this._a==1?"hsv("+ae+", "+ee+"%, "+be+"%)":"hsva("+ae+", "+ee+"%, "+be+"%, "+this._roundA+")"},toHsl:function(){var J=p(this._r,this._g,this._b);return{h:J.h*360,s:J.s,l:J.l,a:this._a}},toHslString:function(){var J=p(this._r,this._g,this._b),ae=k(J.h*360),ee=k(J.s*100),be=k(J.l*100);return this._a==1?"hsl("+ae+", "+ee+"%, "+be+"%)":"hsla("+ae+", "+ee+"%, "+be+"%, "+this._roundA+")"},toHex:function(J){return s(this._r,this._g,this._b,J)},toHexString:function(J){return"#"+this.toHex(J)},toHex8:function(J){return i(this._r,this._g,this._b,this._a,J)},toHex8String:function(J){return"#"+this.toHex8(J)},toRgb:function(){return{r:k(this._r),g:k(this._g),b:k(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+k(this._r)+", "+k(this._g)+", "+k(this._b)+")":"rgba("+k(this._r)+", "+k(this._g)+", "+k(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:k(C(this._r,255)*100)+"%",g:k(C(this._g,255)*100)+"%",b:k(C(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+k(C(this._r,255)*100)+"%, "+k(C(this._g,255)*100)+"%, "+k(C(this._b,255)*100)+"%)":"rgba("+k(C(this._r,255)*100)+"%, "+k(C(this._g,255)*100)+"%, "+k(C(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:L[s(this._r,this._g,this._b,!0)]||!1},toFilter:function(J){var ae="#"+l(this._r,this._g,this._b,this._a),ee=ae,be=this._gradientType?"GradientType = 1, ":"";if(J){var xe=R(J);ee="#"+l(xe._r,xe._g,xe._b,xe._a)}return"progid:DXImageTransform.Microsoft.gradient("+be+"startColorstr="+ae+",endColorstr="+ee+")"},toString:function(J){var ae=!!J;J=J||this._format;var ee=!1,be=this._a<1&&this._a>=0,xe=!ae&&be&&(J==="hex"||J==="hex6"||J==="hex3"||J==="hex4"||J==="hex8"||J==="name");return xe?J==="name"&&this._a===0?this.toName():this.toRgbString():(J==="rgb"&&(ee=this.toRgbString()),J==="prgb"&&(ee=this.toPercentageRgbString()),(J==="hex"||J==="hex6")&&(ee=this.toHexString()),J==="hex3"&&(ee=this.toHexString(!0)),J==="hex4"&&(ee=this.toHex8String(!0)),J==="hex8"&&(ee=this.toHex8String()),J==="name"&&(ee=this.toName()),J==="hsl"&&(ee=this.toHslString()),J==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return R(this.toString())},_applyModification:function(J,ae){var ee=J.apply(null,[this].concat([].slice.call(ae)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(O,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(J,ae){return J.apply(null,[this].concat([].slice.call(ae)))},analogous:function(){return this._applyCombination(g,arguments)},complement:function(){return this._applyCombination(d,arguments)},monochromatic:function(){return this._applyCombination(b,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(u,arguments)}},R.fromRatio=function(J,ae){if(typeof J=="object"){var ee={};for(var be in J)J.hasOwnProperty(be)&&(be==="a"?ee[be]=J[be]:ee[be]=_e(J[be]));J=ee}return R(J,ae)};function v(J){var ae={r:0,g:0,b:0},ee=1,be=null,xe=null,ye=null,Ae=!1,Le=!1;return typeof J=="string"&&(J=ie(J)),typeof J=="object"&&(le(J.r)&&le(J.g)&&le(J.b)?(ae=m(J.r,J.g,J.b),Ae=!0,Le=String(J.r).substr(-1)==="%"?"prgb":"rgb"):le(J.h)&&le(J.s)&&le(J.v)?(be=_e(J.s),xe=_e(J.v),ae=h(J.h,be,xe),Ae=!0,Le="hsv"):le(J.h)&&le(J.s)&&le(J.l)&&(be=_e(J.s),ye=_e(J.l),ae=c(J.h,be,ye),Ae=!0,Le="hsl"),J.hasOwnProperty("a")&&(ee=J.a)),ee=U(ee),{ok:Ae,format:J.format||Le,r:W(255,F(ae.r,0)),g:W(255,F(ae.g,0)),b:W(255,F(ae.b,0)),a:ee}}function m(J,ae,ee){return{r:C(J,255)*255,g:C(ae,255)*255,b:C(ee,255)*255}}function p(J,ae,ee){J=C(J,255),ae=C(ae,255),ee=C(ee,255);var be=F(J,ae,ee),xe=W(J,ae,ee),ye,Ae,Le=(be+xe)/2;if(be==xe)ye=Ae=0;else{var Ne=be-xe;Ae=Le>.5?Ne/(2-be-xe):Ne/(be+xe);switch(be){case J:ye=(ae-ee)/Ne+(ae<ee?6:0);break;case ae:ye=(ee-J)/Ne+2;break;case ee:ye=(J-ae)/Ne+4;break}ye/=6}return{h:ye,s:Ae,l:Le}}function c(J,ae,ee){var be,xe,ye;J=C(J,360),ae=C(ae,100),ee=C(ee,100);function Ae(ke,Oe,Ie){return Ie<0&&(Ie+=1),Ie>1&&(Ie-=1),Ie<1/6?ke+(Oe-ke)*6*Ie:Ie<1/2?Oe:Ie<2/3?ke+(Oe-ke)*(2/3-Ie)*6:ke}if(ae===0)be=xe=ye=ee;else{var Le=ee<.5?ee*(1+ae):ee+ae-ee*ae,Ne=2*ee-Le;be=Ae(Ne,Le,J+1/3),xe=Ae(Ne,Le,J),ye=Ae(Ne,Le,J-1/3)}return{r:be*255,g:xe*255,b:ye*255}}function o(J,ae,ee){J=C(J,255),ae=C(ae,255),ee=C(ee,255);var be=F(J,ae,ee),xe=W(J,ae,ee),ye,Ae,Le=be,Ne=be-xe;if(Ae=be===0?0:Ne/be,be==xe)ye=0;else{switch(be){case J:ye=(ae-ee)/Ne+(ae<ee?6:0);break;case ae:ye=(ee-J)/Ne+2;break;case ee:ye=(J-ae)/Ne+4;break}ye/=6}return{h:ye,s:Ae,v:Le}}function h(J,ae,ee){J=C(J,360)*6,ae=C(ae,100),ee=C(ee,100);var be=V.floor(J),xe=J-be,ye=ee*(1-ae),Ae=ee*(1-xe*ae),Le=ee*(1-(1-xe)*ae),Ne=be%6,ke=[ee,Ae,ye,ye,Le,ee][Ne],Oe=[Le,ee,ee,Ae,ye,ye][Ne],Ie=[ye,ye,Le,ee,ee,Ae][Ne];return{r:ke*255,g:Oe*255,b:Ie*255}}function s(J,ae,ee,be){var xe=[te(k(J).toString(16)),te(k(ae).toString(16)),te(k(ee).toString(16))];return be&&xe[0].charAt(0)==xe[0].charAt(1)&&xe[1].charAt(0)==xe[1].charAt(1)&&xe[2].charAt(0)==xe[2].charAt(1)?xe[0].charAt(0)+xe[1].charAt(0)+xe[2].charAt(0):xe.join("")}function i(J,ae,ee,be,xe){var ye=[te(k(J).toString(16)),te(k(ae).toString(16)),te(k(ee).toString(16)),te(ue(be))];return xe&&ye[0].charAt(0)==ye[0].charAt(1)&&ye[1].charAt(0)==ye[1].charAt(1)&&ye[2].charAt(0)==ye[2].charAt(1)&&ye[3].charAt(0)==ye[3].charAt(1)?ye[0].charAt(0)+ye[1].charAt(0)+ye[2].charAt(0)+ye[3].charAt(0):ye.join("")}function l(J,ae,ee,be){var xe=[te(ue(be)),te(k(J).toString(16)),te(k(ae).toString(16)),te(k(ee).toString(16))];return xe.join("")}R.equals=function(J,ae){return!J||!ae?!1:R(J).toRgbString()==R(ae).toRgbString()},R.random=function(){return R.fromRatio({r:M(),g:M(),b:M()})};function f(J,ae){ae=ae===0?0:ae||10;var ee=R(J).toHsl();return ee.s-=ae/100,ee.s=_(ee.s),R(ee)}function O(J,ae){ae=ae===0?0:ae||10;var ee=R(J).toHsl();return ee.s+=ae/100,ee.s=_(ee.s),R(ee)}function A(J){return R(J).desaturate(100)}function T(J,ae){ae=ae===0?0:ae||10;var ee=R(J).toHsl();return ee.l+=ae/100,ee.l=_(ee.l),R(ee)}function w(J,ae){ae=ae===0?0:ae||10;var ee=R(J).toRgb();return ee.r=F(0,W(255,ee.r-k(255*-(ae/100)))),ee.g=F(0,W(255,ee.g-k(255*-(ae/100)))),ee.b=F(0,W(255,ee.b-k(255*-(ae/100)))),R(ee)}function S(J,ae){ae=ae===0?0:ae||10;var ee=R(J).toHsl();return ee.l-=ae/100,ee.l=_(ee.l),R(ee)}function x(J,ae){var ee=R(J).toHsl(),be=(ee.h+ae)%360;return ee.h=be<0?360+be:be,R(ee)}function d(J){var ae=R(J).toHsl();return ae.h=(ae.h+180)%360,R(ae)}function y(J){var ae=R(J).toHsl(),ee=ae.h;return[R(J),R({h:(ee+120)%360,s:ae.s,l:ae.l}),R({h:(ee+240)%360,s:ae.s,l:ae.l})]}function u(J){var ae=R(J).toHsl(),ee=ae.h;return[R(J),R({h:(ee+90)%360,s:ae.s,l:ae.l}),R({h:(ee+180)%360,s:ae.s,l:ae.l}),R({h:(ee+270)%360,s:ae.s,l:ae.l})]}function E(J){var ae=R(J).toHsl(),ee=ae.h;return[R(J),R({h:(ee+72)%360,s:ae.s,l:ae.l}),R({h:(ee+216)%360,s:ae.s,l:ae.l})]}function g(J,ae,ee){ae=ae||6,ee=ee||30;var be=R(J).toHsl(),xe=360/ee,ye=[R(J)];for(be.h=(be.h-(xe*ae>>1)+720)%360;--ae;)be.h=(be.h+xe)%360,ye.push(R(be));return ye}function b(J,ae){ae=ae||6;for(var ee=R(J).toHsv(),be=ee.h,xe=ee.s,ye=ee.v,Ae=[],Le=1/ae;ae--;)Ae.push(R({h:be,s:xe,v:ye})),ye=(ye+Le)%1;return Ae}R.mix=function(J,ae,ee){ee=ee===0?0:ee||50;var be=R(J).toRgb(),xe=R(ae).toRgb(),ye=ee/100,Ae={r:(xe.r-be.r)*ye+be.r,g:(xe.g-be.g)*ye+be.g,b:(xe.b-be.b)*ye+be.b,a:(xe.a-be.a)*ye+be.a};return R(Ae)},R.readability=function(J,ae){var ee=R(J),be=R(ae);return(V.max(ee.getLuminance(),be.getLuminance())+.05)/(V.min(ee.getLuminance(),be.getLuminance())+.05)},R.isReadable=function(J,ae,ee){var be=R.readability(J,ae),xe,ye;ye=!1,xe=he(ee);switch(xe.level+xe.size){case"AAsmall":case"AAAlarge":ye=be>=4.5;break;case"AAlarge":ye=be>=3;break;case"AAAsmall":ye=be>=7;break}return ye},R.mostReadable=function(J,ae,ee){var be=null,xe=0,ye,Ae,Le,Ne;ee=ee||{},Ae=ee.includeFallbackColors,Le=ee.level,Ne=ee.size;for(var ke=0;ke<ae.length;ke++)ye=R.readability(J,ae[ke]),ye>xe&&(xe=ye,be=R(ae[ke]));return R.isReadable(J,be,{level:Le,size:Ne})||!Ae?be:(ee.includeFallbackColors=!1,R.mostReadable(J,["#fff","#000"],ee))};var P=R.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"},L=R.hexNames=B(P);function B(J){var ae={};for(var ee in J)J.hasOwnProperty(ee)&&(ae[J[ee]]=ee);return ae}function U(J){return J=parseFloat(J),(isNaN(J)||J<0||J>1)&&(J=1),J}function C(J,ae){K(J)&&(J="100%");var ee=q(J);return J=W(ae,F(0,parseFloat(J))),ee&&(J=parseInt(J*ae,10)/100),V.abs(J-ae)<1e-6?1:J%ae/parseFloat(ae)}function _(J){return W(1,F(0,J))}function j(J){return parseInt(J,16)}function K(J){return typeof J=="string"&&J.indexOf(".")!=-1&&parseFloat(J)===1}function q(J){return typeof J=="string"&&J.indexOf("%")!=-1}function te(J){return J.length==1?"0"+J:""+J}function _e(J){return J<=1&&(J=J*100+"%"),J}function ue(J){return V.round(parseFloat(J)*255).toString(16)}function me(J){return j(J)/255}var fe=function(){var J="[-\\+]?\\d+%?",ae="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+ae+")|(?:"+J+")",be="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",xe="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+xe),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+xe),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+xe),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 le(J){return!!fe.CSS_UNIT.exec(J)}function ie(J){J=J.replace(D,"").replace(z,"").toLowerCase();var ae=!1;if(P[J])J=P[J],ae=!0;else if(J=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=fe.rgb.exec(J))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=fe.rgba.exec(J))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=fe.hsl.exec(J))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=fe.hsla.exec(J))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=fe.hsv.exec(J))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=fe.hsva.exec(J))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=fe.hex8.exec(J))?{r:j(ee[1]),g:j(ee[2]),b:j(ee[3]),a:me(ee[4]),format:ae?"name":"hex8"}:(ee=fe.hex6.exec(J))?{r:j(ee[1]),g:j(ee[2]),b:j(ee[3]),format:ae?"name":"hex"}:(ee=fe.hex4.exec(J))?{r:j(ee[1]+""+ee[1]),g:j(ee[2]+""+ee[2]),b:j(ee[3]+""+ee[3]),a:me(ee[4]+""+ee[4]),format:ae?"name":"hex8"}:(ee=fe.hex3.exec(J))?{r:j(ee[1]+""+ee[1]),g:j(ee[2]+""+ee[2]),b:j(ee[3]+""+ee[3]),format:ae?"name":"hex"}:!1}function he(J){var ae,ee;return J=J||{level:"AA",size:"small"},ae=(J.level||"AA").toUpperCase(),ee=(J.size||"small").toLowerCase(),ae!=="AA"&&ae!=="AAA"&&(ae="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:ae,size:ee}}Pe.exports?Pe.exports=R:!(ne=function(){return R}.call(we,Y,we,Pe),ne!==void 0&&(Pe.exports=ne))})(Math)},bT9E:function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return V});var ne=Y("VTBJ");function V(D,z){var N=Object(ne.a)({},D);return Array.isArray(z)&&z.forEach(function(k){delete N[k]}),N}},c5Ni:function(Pe,we,Y){},cRFk:function(Pe,we,Y){Pe.exports=Y.p+"static/RepositoryNoneData.828085a8.png"},csWT:function(Pe,we,Y){Pe.exports=Y.p+"static/choose.4ad1045f.svg"},dejd:function(Pe,we,Y){},djh8:function(Pe,we,Y){Pe.exports=Y.p+"static/qrCode.42927872.png"},dmUQ:function(Pe,we,Y){"use strict";var ne=Y("Ff2n"),V=Y("rePB"),D=Y("1OyB"),z=Y("vuIU"),N=Y("Ji7U"),k=Y("md7G"),W=Y("foSv"),F=Y("cDcd"),M=Y.n(F),R=Y("TSYQ"),v=Y.n(R),m=Y("4IlW");function p(y,u){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(y);u&&(g=g.filter(function(b){return Object.getOwnPropertyDescriptor(y,b).enumerable})),E.push.apply(E,g)}return E}function c(y){for(var u=1;u<arguments.length;u++){var E=arguments[u]!=null?arguments[u]:{};u%2?p(Object(E),!0).forEach(function(g){Object(V.a)(y,g,E[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(E)):p(Object(E)).forEach(function(g){Object.defineProperty(y,g,Object.getOwnPropertyDescriptor(E,g))})}return y}function o(y){var u=h();return function(){var g=Object(W.a)(y),b;if(u){var P=Object(W.a)(this).constructor;b=Reflect.construct(g,arguments,P)}else b=g.apply(this,arguments);return Object(k.a)(this,b)}}function h(){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(y){return!1}}function s(){}function i(y){y.preventDefault()}var l=function(u){return u.replace(/[^\w.-]+/g,"")},f=200,O=600,A=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,T=function(u){return u!=null},w=function(u,E){return E===u||typeof E=="number"&&typeof u=="number"&&isNaN(E)&&isNaN(u)},S=function(y){Object(N.a)(E,y);var u=o(E);function E(g){var b;Object(D.a)(this,E),b=u.call(this,g),b.onKeyDown=function(B){var U=b.props,C=U.onKeyDown,_=U.onPressEnter;if(B.keyCode===m.a.UP){var j=b.getRatio(B);b.up(B,j,null),b.stop()}else if(B.keyCode===m.a.DOWN){var K=b.getRatio(B);b.down(B,K,null),b.stop()}else B.keyCode===m.a.ENTER&&_&&_(B);if(b.recordCursorPosition(),b.lastKeyCode=B.keyCode,C){for(var q=arguments.length,te=new Array(q>1?q-1:0),_e=1;_e<q;_e++)te[_e-1]=arguments[_e];C.apply(void 0,[B].concat(te))}},b.onKeyUp=function(B){var U=b.props.onKeyUp;if(b.stop(),b.recordCursorPosition(),U){for(var C=arguments.length,_=new Array(C>1?C-1:0),j=1;j<C;j++)_[j-1]=arguments[j];U.apply(void 0,[B].concat(_))}},b.onChange=function(B){var U=b.props.onChange;b.state.focused&&(b.inputting=!0),b.rawInput=b.props.parser(b.getValueFromEvent(B)),b.setState({inputValue:b.rawInput}),U(b.toNumber(b.rawInput))},b.onMouseUp=function(){var B=b.props.onMouseUp;b.recordCursorPosition(),B&&B.apply(void 0,arguments)},b.onFocus=function(){var B;b.setState({focused:!0}),(B=b.props).onFocus.apply(B,arguments)},b.onBlur=function(){var B=b.props.onBlur;b.inputting=!1,b.setState({focused:!1});var U=b.getCurrentValidValue(b.state.inputValue),C=b.setValue(U,s);if(B){var _=b.input.value,j=b.getInputDisplayValue({focus:!1,value:C});b.input.value=j&&Number(j),B.apply(void 0,arguments),b.input.value=_}},b.getRatio=function(B){var U=1;return B.metaKey||B.ctrlKey?U=.1:B.shiftKey&&(U=10),U},b.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},b.getPrecision=function(B){if(T(b.props.precision))return b.props.precision;var U=String(B);if(U.indexOf("e-")>=0)return parseInt(U.slice(U.indexOf("e-")+2),10);var C=0;return U.indexOf(".")>=0&&(C=U.length-U.indexOf(".")-1),C},b.getInputDisplayValue=function(B){var U=B||b.state,C=U.focused,_=U.inputValue,j=U.value,K;C?K=_:K=b.toPrecisionAsStep(j),K==null&&(K="");var q=b.formatWrapper(K);return T(b.props.decimalSeparator)&&(q=q.toString().replace(".",b.props.decimalSeparator)),q},b.recordCursorPosition=function(){try{b.cursorStart=b.input.selectionStart,b.cursorEnd=b.input.selectionEnd,b.currentValue=b.input.value,b.cursorBefore=b.input.value.substring(0,b.cursorStart),b.cursorAfter=b.input.value.substring(b.cursorEnd)}catch(B){}},b.restoreByAfter=function(B){if(B===void 0)return!1;var U=b.input.value,C=U.lastIndexOf(B);if(C===-1)return!1;var _=b.cursorBefore.length;return b.lastKeyCode===m.a.DELETE&&b.cursorBefore.charAt(_-1)===B[0]?(b.fixCaret(_,_),!0):C+B.length===U.length?(b.fixCaret(C,C),!0):!1},b.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(U,C){var _=B.substring(C);return b.restoreByAfter(_)})},b.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},b.stop=function(){b.autoStepTimer&&clearTimeout(b.autoStepTimer)},b.down=function(B,U,C){b.pressingUpOrDown=!0,b.step("down",B,U,C)},b.up=function(B,U,C){b.pressingUpOrDown=!0,b.step("up",B,U,C)},b.saveInput=function(B){b.input=B};var P=g.value;P===void 0&&(P=g.defaultValue),b.state={focused:g.autoFocus};var L=b.getValidValue(b.toNumber(P));return b.state=c(c({},b.state),{},{inputValue:b.toPrecisionAsStep(L),value:L}),b}return Object(z.a)(E,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(b){var P=this.props,L=P.value,B=P.onChange,U=P.max,C=P.min,_=this.state.focused;if(b){if(!w(b.value,L)||!w(b.max,U)||!w(b.min,C)){var j=_?L:this.getValidValue(L),K;this.pressingUpOrDown?K=j:this.inputting?K=this.rawInput:K=this.toPrecisionAsStep(j),this.setState({value:j,inputValue:K})}var q="value"in this.props?L:this.state.value;"max"in this.props&&b.max!==U&&typeof q=="number"&&q>U&&B&&B(U),"min"in this.props&&b.min!==C&&typeof q=="number"&&q<C&&B&&B(C)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var te=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===m.a.BACKSPACE?te=this.cursorStart-1:this.lastKeyCode===m.a.DELETE&&(te=this.cursorStart):te=this.input.value.length,this.fixCaret(te,te)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case m.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case m.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(_e){}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(b){var P=b;return P===""?P="":this.isNotCompleteNumber(parseFloat(P))?P=this.state.value:P=this.getValidValue(P),this.toNumber(P)}},{key:"getValueFromEvent",value:function(b){var P=b.target.value.trim().replace(/。/g,".");return T(this.props.decimalSeparator)&&(P=P.replace(this.props.decimalSeparator,".")),P}},{key:"getValidValue",value:function(b){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(b);return isNaN(B)?b:(B<P&&(B=P),B>L&&(B=L),B)}},{key:"setValue",value:function(b,P){var L=this.props.precision,B=this.isNotCompleteNumber(parseFloat(b))?null:parseFloat(b),U=this.state.value,C=U===void 0?null:U,_=this.state.inputValue,j=_===void 0?null:_,K=typeof B=="number"?B.toFixed(L):"".concat(B),q=B!==C||K!=="".concat(j);return"value"in this.props?(j=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:j},P)):this.setState({value:B,inputValue:this.toPrecisionAsStep(b)},P),q&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(b){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.props,B=L.precision,U=L.step;if(T(B))return B;var C=this.getPrecision(P),_=this.getPrecision(U),j=this.getPrecision(b);return b?Math.max(j,C+_):C+_}},{key:"getPrecisionFactor",value:function(b){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.getMaxPrecision(b,P);return Math.pow(10,L)}},{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(b){return this.props.formatter?this.props.formatter(b):b}},{key:"toPrecisionAsStep",value:function(b){if(this.isNotCompleteNumber(b)||b==="")return b;var P=Math.abs(this.getMaxPrecision(b));return isNaN(P)?b.toString():Number(b).toFixed(P)}},{key:"toNumber",value:function(b){var P=this.props.precision,L=this.state.focused,B=b&&b.length>16&&L;return this.isNotCompleteNumber(b)||B?b:T(P)?Math.round(b*Math.pow(10,P))/Math.pow(10,P):Number(b)}},{key:"upStep",value:function(b,P){var L=this.props.step,B=this.getPrecisionFactor(b,P),U=Math.abs(this.getMaxPrecision(b,P)),C=((B*b+B*L*P)/B).toFixed(U);return this.toNumber(C)}},{key:"downStep",value:function(b,P){var L=this.props.step,B=this.getPrecisionFactor(b,P),U=Math.abs(this.getMaxPrecision(b,P)),C=((B*b-B*L*P)/B).toFixed(U);return this.toNumber(C)}},{key:"step",value:function(b,P){var L=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,U=arguments.length>3?arguments[3]:void 0;this.stop(),P&&(P.persist(),P.preventDefault());var C=this.props;if(C.disabled)return;var _=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(_))return;var j=this["".concat(b,"Step")](_,B),K=j>C.max||j<C.min;if(j>C.max?j=C.max:j<C.min&&(j=C.min),this.setValue(j,null),this.setState({focused:!0},function(){L.pressingUpOrDown=!1}),K)return;this.autoStepTimer=setTimeout(function(){L[b](P,B,!0)},U?f:O)}},{key:"fixCaret",value:function(b,P){if(b===void 0||P===void 0||!this.input||!this.input.value)return;try{var L=this.input.selectionStart,B=this.input.selectionEnd;(b!==L||P!==B)&&this.input.setSelectionRange(b,P)}catch(U){}}},{key:"render",value:function(){var b,P=this.props,L=P.prefixCls,B=P.disabled,U=P.readOnly,C=P.useTouch,_=P.autoComplete,j=P.upHandler,K=P.downHandler,q=P.className,te=P.max,_e=P.min,ue=P.style,me=P.title,fe=P.onMouseEnter,le=P.onMouseLeave,ie=P.onMouseOver,he=P.onMouseOut,J=P.required,ae=P.onClick,ee=P.tabIndex,be=P.type,xe=P.placeholder,ye=P.id,Ae=P.inputMode,Le=P.pattern,Ne=P.step,ke=P.maxLength,Oe=P.autoFocus,Ie=P.name,Ge=P.onPaste,Je=P.onInput,Ve=Object(ne.a)(P,["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"]),Ke=this.state,nt=Ke.value,Qe=Ke.focused,Ze=v()(L,(b={},Object(V.a)(b,q,!!q),Object(V.a)(b,"".concat(L,"-disabled"),B),Object(V.a)(b,"".concat(L,"-focused"),Qe),b)),Re={};Object.keys(Ve).forEach(function(oe){(oe.substr(0,5)==="data-"||oe.substr(0,5)==="aria-"||oe==="role")&&(Re[oe]=Ve[oe])});var tt=!U&&!B,Xe=this.getInputDisplayValue(null),Se=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=te),je=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=_e),ve=Se||B||U,ce=je||B||U,pe=v()("".concat(L,"-handler"),"".concat(L,"-handler-up"),Object(V.a)({},"".concat(L,"-handler-up-disabled"),ve)),Z=v()("".concat(L,"-handler"),"".concat(L,"-handler-down"),Object(V.a)({},"".concat(L,"-handler-down-disabled"),ce)),$=C?{onTouchStart:ve?s:this.up,onTouchEnd:this.stop}:{onMouseDown:ve?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},re=C?{onTouchStart:ce?s:this.down,onTouchEnd:this.stop}:{onMouseDown:ce?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return M.a.createElement("div",{className:Ze,style:ue,title:me,onMouseEnter:fe,onMouseLeave:le,onMouseOver:ie,onMouseOut:he,onFocus:function(){return null},onBlur:function(){return null}},M.a.createElement("div",{className:"".concat(L,"-handler-wrap")},M.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":ve,className:pe}),j||M.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-up-inner"),onClick:i})),M.a.createElement("span",Object.assign({unselectable:"on"},re,{role:"button","aria-label":"Decrease Value","aria-disabled":ce,className:Z}),K||M.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-down-inner"),onClick:i}))),M.a.createElement("div",{className:"".concat(L,"-input-wrap")},M.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":_e,"aria-valuemax":te,"aria-valuenow":nt,required:J,type:be,placeholder:xe,onPaste:Ge,onClick:ae,onMouseUp:this.onMouseUp,className:"".concat(L,"-input"),tabIndex:ee,autoComplete:_,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:s,onKeyUp:tt?this.onKeyUp:s,autoFocus:Oe,maxLength:ke,readOnly:U,disabled:B,max:te,min:_e,step:Ne,name:Ie,title:me,id:ye,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Xe),pattern:Le,inputMode:Ae,onInput:Je},Re))))}}]),E}(M.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:A,min:-A,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:l,required:!1,autoComplete:"off"};var x=S,d=we.a=x},h78n:function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return b});var ne=Y("cDcd"),V=Y.n(ne),D=Y("TSYQ"),z=Y.n(D),N={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},k=function(B){var U=B.map(function(){return Object(ne.useRef)()}),C=Object(ne.useRef)();return Object(ne.useEffect)(function(){var _=Date.now(),j=!1;Object.keys(U).forEach(function(K){var q=U[K].current;if(!q)return;j=!0;var te=q.style;te.transitionDuration=".3s, .3s, .3s, .06s",C.current&&_-C.current<100&&(te.transitionDuration="0s, 0s")}),j&&(C.current=Date.now())}),[U]};function W(){return W=Object.assign||function(L){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var C in U)Object.prototype.hasOwnProperty.call(U,C)&&(L[C]=U[C])}return L},W.apply(this,arguments)}function F(L,B){return p(L)||m(L,B)||R(L,B)||M()}function M(){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(L,B){if(!L)return;if(typeof L=="string")return v(L,B);var U=Object.prototype.toString.call(L).slice(8,-1);if(U==="Object"&&L.constructor&&(U=L.constructor.name),U==="Map"||U==="Set")return Array.from(L);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return v(L,B)}function v(L,B){(B==null||B>L.length)&&(B=L.length);for(var U=0,C=new Array(B);U<B;U++)C[U]=L[U];return C}function m(L,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(L)))return;var U=[],C=!0,_=!1,j=void 0;try{for(var K=L[Symbol.iterator](),q;!(C=(q=K.next()).done)&&!(U.push(q.value),B&&U.length===B);C=!0);}catch(te){_=!0,j=te}finally{try{!C&&K.return!=null&&K.return()}finally{if(_)throw j}}return U}function p(L){if(Array.isArray(L))return L}function c(L,B){if(L==null)return{};var U=o(L,B),C,_;if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(L);for(_=0;_<j.length;_++){if(C=j[_],B.indexOf(C)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(L,C))continue;U[C]=L[C]}}return U}function o(L,B){if(L==null)return{};var U={},C=Object.keys(L),_,j;for(j=0;j<C.length;j++){if(_=C[j],B.indexOf(_)>=0)continue;U[_]=L[_]}return U}var h=function(B){var U=B.className,C=B.percent,_=B.prefixCls,j=B.strokeColor,K=B.strokeLinecap,q=B.strokeWidth,te=B.style,_e=B.trailColor,ue=B.trailWidth,me=B.transition,fe=c(B,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete fe.gapPosition;var le=Array.isArray(C)?C:[C],ie=Array.isArray(j)?j:[j],he=k(le),J=F(he,1),ae=J[0],ee=q/2,be=100-q/2,xe="M ".concat(K==="round"?ee:0,",").concat(ee,`
|
|
L `).concat(K==="round"?be:100,",").concat(ee),ye="0 0 100 ".concat(q),Ae=0;return V.a.createElement("svg",W({className:z()("".concat(_,"-line"),U),viewBox:ye,preserveAspectRatio:"none",style:te},fe),V.a.createElement("path",{className:"".concat(_,"-line-trail"),d:xe,strokeLinecap:K,stroke:_e,strokeWidth:ue||q,fillOpacity:"0"}),le.map(function(Le,Ne){var ke={strokeDasharray:"".concat(Le,"px, 100px"),strokeDashoffset:"-".concat(Ae,"px"),transition:me||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Oe=ie[Ne]||ie[ie.length-1];return Ae+=Le,V.a.createElement("path",{key:Ne,className:"".concat(_,"-line-path"),d:xe,strokeLinecap:K,stroke:Oe,strokeWidth:q,fillOpacity:"0",ref:ae[Ne],style:ke})}))};h.defaultProps=N;var s=h;function i(){return i=Object.assign||function(L){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var C in U)Object.prototype.hasOwnProperty.call(U,C)&&(L[C]=U[C])}return L},i.apply(this,arguments)}function l(L,B){return w(L)||T(L,B)||O(L,B)||f()}function f(){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 O(L,B){if(!L)return;if(typeof L=="string")return A(L,B);var U=Object.prototype.toString.call(L).slice(8,-1);if(U==="Object"&&L.constructor&&(U=L.constructor.name),U==="Map"||U==="Set")return Array.from(L);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return A(L,B)}function A(L,B){(B==null||B>L.length)&&(B=L.length);for(var U=0,C=new Array(B);U<B;U++)C[U]=L[U];return C}function T(L,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(L)))return;var U=[],C=!0,_=!1,j=void 0;try{for(var K=L[Symbol.iterator](),q;!(C=(q=K.next()).done)&&!(U.push(q.value),B&&U.length===B);C=!0);}catch(te){_=!0,j=te}finally{try{!C&&K.return!=null&&K.return()}finally{if(_)throw j}}return U}function w(L){if(Array.isArray(L))return L}function S(L,B){if(L==null)return{};var U=x(L,B),C,_;if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(L);for(_=0;_<j.length;_++){if(C=j[_],B.indexOf(C)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(L,C))continue;U[C]=L[C]}}return U}function x(L,B){if(L==null)return{};var U={},C=Object.keys(L),_,j;for(j=0;j<C.length;j++){if(_=C[j],B.indexOf(_)>=0)continue;U[_]=L[_]}return U}var d=0;function y(L){return+L.replace("%","")}function u(L){return Array.isArray(L)?L:[L]}function E(L,B,U,C){var _=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,j=arguments.length>5?arguments[5]:void 0,K=50-C/2,q=0,te=-K,_e=0,ue=-2*K;switch(j){case"left":q=-K,te=0,_e=2*K,ue=0;break;case"right":q=K,te=0,_e=-2*K,ue=0;break;case"bottom":te=K,ue=2*K;break;default:}var me="M 50,50 m ".concat(q,",").concat(te,`
|
|
a `).concat(K,",").concat(K," 0 1 1 ").concat(_e,",").concat(-ue,`
|
|
a `).concat(K,",").concat(K," 0 1 1 ").concat(-_e,",").concat(ue),fe=Math.PI*2*K,le={stroke:U,strokeDasharray:"".concat(B/100*(fe-_),"px ").concat(fe,"px"),strokeDashoffset:"-".concat(_/2+L/100*(fe-_),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:me,pathStyle:le}}var g=function(B){var U=B.prefixCls,C=B.strokeWidth,_=B.trailWidth,j=B.gapDegree,K=B.gapPosition,q=B.trailColor,te=B.strokeLinecap,_e=B.style,ue=B.className,me=B.strokeColor,fe=B.percent,le=S(B,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ie=Object(ne.useMemo)(function(){return d+=1,d},[]),he=E(0,100,q,C,j,K),J=he.pathString,ae=he.pathStyle,ee=u(fe),be=u(me),xe=be.find(function(ke){return Object.prototype.toString.call(ke)==="[object Object]"}),ye=k(ee),Ae=l(ye,1),Le=Ae[0],Ne=function(){var Oe=0;return ee.map(function(Ie,Ge){var Je=be[Ge]||be[be.length-1],Ve=Object.prototype.toString.call(Je)==="[object Object]"?"url(#".concat(U,"-gradient-").concat(ie,")"):"",Ke=E(Oe,Ie,Je,C,j,K);return Oe+=Ie,V.a.createElement("path",{key:Ge,className:"".concat(U,"-circle-path"),d:Ke.pathString,stroke:Ve,strokeLinecap:te,strokeWidth:C,opacity:Ie===0?0:1,fillOpacity:"0",style:Ke.pathStyle,ref:Le[Ge]})})};return V.a.createElement("svg",i({className:z()("".concat(U,"-circle"),ue),viewBox:"0 0 100 100",style:_e},le),xe&&V.a.createElement("defs",null,V.a.createElement("linearGradient",{id:"".concat(U,"-gradient-").concat(ie),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(xe).sort(function(ke,Oe){return y(ke)-y(Oe)}).map(function(ke,Oe){return V.a.createElement("stop",{key:Oe,offset:ke,stopColor:xe[ke]})}))),V.a.createElement("path",{className:"".concat(U,"-circle-trail"),d:J,stroke:q,strokeLinecap:te,strokeWidth:_||C,fillOpacity:"0",style:ae}),Ne().reverse())};g.defaultProps=N;var b=g,P={Line:s,Circle:b}},isY5:function(Pe,we,Y){"use strict";Y.r(we);var ne=Y("5Dmo"),V=Y("3S7+"),D=Y("giR+"),z=Y("fyUT"),N=Y("+L6B"),k=Y("2/Rp"),W=Y("/zsF"),F=Y("PArb"),M=Y("14J3"),R=Y("BMrR"),v=Y("jCWc"),m=Y("kPKH"),p=Y("sPJy"),c=Y("bE4q"),o=Y("miYZ"),h=Y("tsqr"),s=Y("9og8"),i=Y("k1fw"),l=Y("y8nQ"),f=Y("Vl3Y"),O=Y("2qtc"),A=Y("kLXV"),T=Y("tJVT"),w=Y("WmNS"),S=Y.n(w),x=Y("cDcd"),d=Y.n(x),y=Y("Ty5D"),u=Y("9kvl"),E=Y("55Ip"),g=Y("jhfD"),b=Y("/MfK"),P=Y("kaH+"),L=Y("ErOA"),B=Y("Ot1p"),U=Y("dhSg"),C=Y("p5ED"),_=Y("wd/R"),j=Y.n(_),K=Y("m3rI"),q=Y("XYT7"),te=Y("5NDa"),_e=Y("5rEg"),ue=function(ke){var Oe=ke.shixunHomeworks,Ie=ke.dispatch,Ge=Object(y.i)(),Je=Object(x.useState)(!0),Ve=Object(T.a)(Je,2),Ke=Ve[0],nt=Ve[1],Qe=f.a.useForm(),Ze=Object(T.a)(Qe,1),Re=Ze[0];return d.a.createElement(d.a.Fragment,null,d.a.createElement(A.a,{centered:!0,title:"\u8C03\u5206",visible:Oe.actionTabs.key==="\u8C03\u5206",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(s.a)(S.a.mark(function tt(){var Xe,Se;return S.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,Re.validateFields();case 2:return Xe=Re.getFieldsValue(),ve.next=5,Object(L.a)("/api/student_works/".concat(Oe.actionTabs.id,"/adjust_score.json"),{method:"post",body:Object(i.a)({},Xe)});case 5:Se=ve.sent,Se.status===0&&(h.b.success("\u8BC4\u9605\u6210\u529F"),Re.resetFields(),Ie({type:"shixunHomeworks/setActionTabs",payload:{}}),Ie({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(i.a)({},Ge)}));case 7:case"end":return ve.stop()}},tt)})),onCancel:function(){Ie({type:"shixunHomeworks/setActionTabs",payload:{}})}},d.a.createElement("p",{className:"tc"},"\u8BE5\u5B66\u751F\u7684\u6700\u7EC8\u6210\u7EE9\u5C06\u4E0D\u4F1A\u6309\u7167\u8BC4\u5206\u89C4\u5219\u8FDB\u884C\u8BA1\u7B97"),d.a.createElement(f.a,{form:Re,layout:"horizontal"},d.a.createElement("div",{style:{display:"flex",alignItems:"baseline"}},d.a.createElement(f.a.Item,{label:"\u6210\u7EE9",name:"score",rules:[{required:!0,message:"\u8BF7\u8F93\u5165!"}]},d.a.createElement(z.a,{min:0,placeholder:"\u8BF7\u586B\u5199\u5206\u6570"})),d.a.createElement("span",{className:"ml10"},"\u5206")),d.a.createElement("div",null,d.a.createElement(f.a.Item,{name:"comment"},d.a.createElement(_e.a.TextArea,{placeholder:"\u8BF7\u586B\u5199\u60A8\u5BF9\u4F5C\u54C1\u8C03\u5206\u7684\u539F\u56E0",rows:8}))))))},me=Object(u.a)(function(Ne){var ke=Ne.shixunHomeworks;return{shixunHomeworks:ke}})(ue),fe=Y("pAaK"),le=Y.n(fe),ie=Y("9Bee"),he=Y("LvDl"),J=Y("500L"),ae=function(ke){var Oe=ke.classroomList,Ie=ke.loading,Ge=ke.dispatch,Je=Object(y.i)(),Ve=f.a.useForm(),Ke=Object(T.a)(Ve,1),nt=Ke[0];return d.a.createElement(A.a,{centered:!0,title:"\u8865\u4EA4\u9644\u4EF6",visible:Oe.actionTabs.key==="\u8865\u4EA4\u9644\u4EF6",bodyStyle:{minHeight:200},onOk:Object(s.a)(S.a.mark(function Qe(){var Ze,Re,tt,Xe;return S.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,nt.validateFields();case 2:return Re=Object(i.a)({},nt.getFieldValue()),tt=Oe.actionTabs.selectArrs,Re.attachment_ids=(Ze=Re.attachment_ids)===null||Ze===void 0?void 0:Ze.map(function(ve){return ve.response.id}),je.next=7,Object(q.V)(Object(i.a)(Object(i.a)({},Re),{},{homeworkId:tt.work_id}));case 7:Xe=je.sent,Xe.status===0&&(nt.resetFields(),Ge({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(i.a)({},Oe.actionTabs.params)}),Ge({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return je.stop()}},Qe)})),onCancel:function(){nt.resetFields(),Ge({type:"classroomList/setActionTabs",payload:{}})}},d.a.createElement(f.a,{form:nt,initialValues:{}},d.a.createElement(f.a.Item,{name:"attachment_ids",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u9644\u4EF6"}]},d.a.createElement(J.b,null)),d.a.createElement(f.a.Item,{name:"description"},d.a.createElement(_e.a.TextArea,{placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u8865\u4EA4\u9644\u4EF6\u7684\u539F\u56E0\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26",rows:7}))))},ee=Object(u.a)(function(Ne){var ke=Ne.classroomList,Oe=Ne.loading;return{classroomList:ke,loading:Oe}})(ae),be=Y("1vsH"),xe=Y("xKgJ"),ye=Y("lzim"),Ae=function(ke){var Oe,Ie,Ge,Je,Ve,Ke,nt,Qe,Ze,Re,tt,Xe,Se,je,ve,ce,pe,Z,$,re,oe,ge=ke.shixunHomeworks,Ce=ke.globalSetting,Fe=ke.loading,et=ke.user,rt=ke.dispatch,De=Object(y.i)(),St=Object(x.useRef)(),ht=et.userInfo,Me=ge.studentWorkDetail,yt=ge.studentWorkCommon,Et=ge.studentWorkSupplyDetail,$t=ge.workList,Yt=Object(x.useState)(""),Tt=Object(T.a)(Yt,2),_n=Tt[0],Bn=Tt[1],ft=Object(x.useState)({show:!1,type:0,active:null}),gt=Object(T.a)(ft,2),xt=gt[0],kt=gt[1],en=A.a.useModal(),Zn=Object(T.a)(en,2),pr=Zn[0],Vt=Zn[1],st=Object(x.useState)({last:!1}),Kn=Object(T.a)(st,2),tn=Kn[0],mn=Kn[1],It=Object(x.useState)({last:!1}),Dn=Object(T.a)(It,2),Xt=Dn[0],ar=Dn[1],He=f.a.useForm(),mt=Object(T.a)(He,1),qn=mt[0],mr=Object(x.useState)(!1),sr=Object(T.a)(mr,2),or=sr[0],$n=sr[1],vt=Object(x.useState)(""),Cr=Object(T.a)(vt,2),ze=Cr[0],gr=Cr[1],Mn=Object(x.useState)({content:"",type:""}),vr=Object(T.a)(Mn,2),kn=vr[0],An=vr[1],_r=Object(x.useRef)(),Lt=Object(y.h)(),rn=function(){rt({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(i.a)({},De)})};Object(x.useEffect)(function(){rt({type:"shixunHomeworks/getStudentWorkDetail",payload:Object(i.a)({},De)}),rt({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(i.a)({},De)}),rn(),Ir(),St.current.onclick=function(Be){Be.target.nodeName==="IMG"&&Be.target.alt!==""&&U.a.publish("preview-image",Be.target.src)}},[De.categoryId,De.userId]);function Ir(){return yr.apply(this,arguments)}function yr(){return yr=Object(s.a)(S.a.mark(function Be(){var ct,Dt,wt,Gt,Pt,Qt,Rt,ut,Bt,Wt;return S.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return Gt=JSON.parse(sessionStorage.all_student_works_params||"{}"),Pt={},Lt!=null&&(ct=Lt.query)!==null&&ct!==void 0&&ct.ids&&(Pt.course_group=Lt==null||((Qt=Lt.query)===null||Qt===void 0)?void 0:Qt.ids.split(",")),zt.next=5,rt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(i.a)(Object(i.a)(Object(i.a)({},De),Gt),Pt)});case 5:Rt=zt.sent,ut=(Dt=Rt.all_student_works)===null||Dt===void 0?void 0:Dt.map(function(an){return String(an.student_work_id)}).indexOf(De.userId),ut===((wt=Rt.all_student_works)===null||wt===void 0?void 0:wt.length)-1?mn({last:!0}):mn((Bt=Rt.all_student_works)===null||Bt===void 0?void 0:Bt[ut+1]),ut===0?ar({last:!0}):ar((Wt=Rt.all_student_works)===null||Wt===void 0?void 0:Wt[ut-1]);case 9:case"end":return zt.stop()}},Be)})),yr.apply(this,arguments)}Object(x.useEffect)(function(){return rt({type:"globalSetting/footerToggle",payload:!1}),function(){rt({type:"globalSetting/footerToggle",payload:!0})}},[]);var Lr=function(ct){pr.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){var Dt=Object(s.a)(S.a.mark(function Gt(){var Pt;return S.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,rt({type:"shixunHomeworks/deleteReply",payload:{object_id:ct.id,object_type:"journals_for_message"}});case 2:Pt=Rt.sent,Pt.status===0&&(h.b.success("\u5220\u9664\u6210\u529F"),rn());case 4:case"end":return Rt.stop()}},Gt)}));function wt(){return Dt.apply(this,arguments)}return wt}()})},Pn=function(ct){pr.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){var Dt=Object(s.a)(S.a.mark(function Gt(){var Pt;return S.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,Object(q.k)({score_id:ct.comment_id,userId:De.userId});case 2:Pt=Rt.sent,Pt.status===0&&(h.b.success("\u5220\u9664\u6210\u529F"),rn());case 4:case"end":return Rt.stop()}},Gt)}));function wt(){return Dt.apply(this,arguments)}return wt}()})},Gr=function(){var Be=Object(s.a)(S.a.mark(function ct(Dt){var wt,Gt;return S.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Dt.attachment_ids=(wt=Dt.attachment_ids)===null||wt===void 0?void 0:wt.map(function(Rt){var ut;return Rt==null||((ut=Rt.response)===null||ut===void 0)?void 0:ut.id}),Qt.next=3,Object(q.e)(Object(i.a)(Object(i.a)({},Dt),{},{userId:De.userId}));case 3:Gt=Qt.sent,Gt.status===0&&(qn.resetFields(),h.b.success("\u63D0\u4EA4\u6210\u529F"),rn());case 5:case"end":return Qt.stop()}},ct)}));return function(Dt){return Be.apply(this,arguments)}}(),Dr=function(){var Be=Object(s.a)(S.a.mark(function ct(Dt){var wt,Gt,Pt,Qt,Rt,ut,Bt,Wt,Ft;return S.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(wt=qn.getFieldsValue(),Gt=wt.comment,Pt=wt.score,Qt=wt.attachment_ids,Rt=!Object(he.isNil)(Pt),!(Gt||Rt||Qt)){an.next=5;break}return A.a.confirm({centered:!0,okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:d.a.createElement("div",{className:"tc"},"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539"),onOk:function(){if(qn.resetFields(),Dt==="last"){var zn,Yn;u.d.push(Lt!=null&&(zn=Lt.query)!==null&&zn!==void 0&&zn.ids?"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(Xt==null?void 0:Xt.student_work_id,"?ids=").concat(Lt==null||((Yn=Lt.query)===null||Yn===void 0)?void 0:Yn.ids):"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(Xt==null?void 0:Xt.student_work_id))}else if(Dt==="read"){var er,Fn;u.d.push(Lt!=null&&(er=Lt.query)!==null&&er!==void 0&&er.ids?"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(tn==null?void 0:tn.student_work_id,"?ids=").concat(Lt==null||((Fn=Lt.query)===null||Fn===void 0)?void 0:Fn.ids):"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(tn==null?void 0:tn.student_work_id))}else u.d.push("/classrooms/".concat(De.coursesId,"/common_homework/").concat(De.categoryId,"/detail"))}}),an.abrupt("return");case 5:Dt==="last"?u.d.push(Lt!=null&&(ut=Lt.query)!==null&&ut!==void 0&&ut.ids?"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(Xt==null?void 0:Xt.student_work_id,"?ids=").concat(Lt==null||((Bt=Lt.query)===null||Bt===void 0)?void 0:Bt.ids):"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(Xt==null?void 0:Xt.student_work_id)):Dt==="read"?u.d.push(Lt!=null&&(Wt=Lt.query)!==null&&Wt!==void 0&&Wt.ids?"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(tn==null?void 0:tn.student_work_id,"?ids=").concat(Lt==null||((Ft=Lt.query)===null||Ft===void 0)?void 0:Ft.ids):"/classrooms/".concat(De==null?void 0:De.coursesId,"/common_homework/").concat(De==null?void 0:De.categoryId,"/review/").concat(tn==null?void 0:tn.student_work_id)):u.d.push("/classrooms/".concat(De.coursesId,"/common_homework/").concat(De.categoryId,"/detail"));case 6:case"end":return an.stop()}},ct)}));return function(Dt){return Be.apply(this,arguments)}}();return d.a.createElement("section",{className:"edu-container",ref:St},d.a.createElement("section",{className:"animated fadeIn"},d.a.createElement("aside",{className:"mt10"},ht&&d.a.createElement(c.a,{separator:">"},d.a.createElement(c.a.Item,null,d.a.createElement(E.a,{to:"/classrooms/".concat(De.coursesId,"/common_homework/").concat(Me!=null&&(Oe=Me.category)!==null&&Oe!==void 0&&Oe.main?"":Me==null||((Ie=Me.category)===null||Ie===void 0)?void 0:Ie.category_id)},ht==null||((Ge=ht.course)===null||Ge===void 0)?void 0:Ge.course_name)),d.a.createElement(c.a.Item,null,d.a.createElement(E.a,{to:"/classrooms/".concat(De.coursesId,"/common_homework/").concat(Me!=null&&(Je=Me.category)!==null&&Je!==void 0&&Je.main?"":Me==null||((Ve=Me.category)===null||Ve===void 0)?void 0:Ve.category_id)},Me==null||((Ke=Me.category)===null||Ke===void 0)?void 0:Ke.category_name)),d.a.createElement(c.a.Item,null,d.a.createElement(E.a,{to:"/classrooms/".concat(De.coursesId,"/common_homework/").concat(De.categoryId,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),d.a.createElement(c.a.Item,null,Me==null?void 0:Me.author_name))),d.a.createElement("aside",{className:[le.a.title,"mt20"].join(" ")},d.a.createElement(R.a,{style:{width:"100%"}},d.a.createElement(m.a,{flex:"1"},d.a.createElement(E.a,{to:"/classrooms/".concat(De.coursesId,"/common_homework")},d.a.createElement(g.a,{className:"font16 c-black"})),d.a.createElement("strong",{className:"font20 ml5"},Me==null?void 0:Me.homework_name),d.a.createElement(be.m,{status:Me==null?void 0:Me.homework_status})),d.a.createElement(m.a,null,Object(xe.s)()&&(Me==null||((nt=Me.homework_status)===null||nt===void 0)?void 0:nt.includes("\u8865\u4EA4\u4E2D"))&&d.a.createElement("span",{onClick:function(){rt({type:"classroomList/setActionTabs",payload:{key:"\u8865\u4EA4\u9644\u4EF6",params:De,selectArrs:{homework_id:De.commonHomeworkId,work_id:De.userId}}})},className:"c-blue current font14"},"\u8865\u4EA4\u9644\u4EF6"))))),d.a.createElement("ul",{className:le.a["nav-tab"]},d.a.createElement("li",{className:"active"},"\u4F5C\u4E1A\u8BE6\u60C5"),Object(xe.u)()&&d.a.createElement("li",null,d.a.createElement(E.a,{to:"/classrooms/".concat(De.coursesId,"/common_homework/").concat(De.categoryId,"/lab-report-view/").concat(De.userId)}," ","\u5B9E\u9A8C\u62A5\u544A"," "))),d.a.createElement("section",{className:[le.a.bg,"pt30","pl30","pr30","pb30"].join(" ")},(Me==null?void 0:Me.description)&&d.a.createElement("aside",null,d.a.createElement("div",{className:"font16"},"\u5185\u5BB9"),d.a.createElement("div",{className:"pl30 mt20"},d.a.createElement(ie.a,{value:(Me==null?void 0:Me.description)||"\u6682\u65E0\uFF5E"})),Me==null||((Qe=Me.attachments)===null||Qe===void 0)?void 0:Qe.map(function(Be,ct){return d.a.createElement("div",{className:"pl30",key:ct},d.a.createElement("a",{href:"".concat(K.a.API_SERVER).concat(Be.url),onClick:function(){var Dt=Object(s.a)(S.a.mark(function wt(Gt){var Pt;return S.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(Gt.preventDefault(),!(Be.file_type==="txt")){Rt.next=6;break}return Rt.next=4,Object(L.a)(Be.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:Pt=Rt.sent,_r.current=Pt;case 6:An({type:Be.file_type,content:K.a.API_SERVER+Be.url});case 7:case"end":return Rt.stop()}},wt)}));return function(wt){return Dt.apply(this,arguments)}}()},d.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.a.createElement("span",{className:"ml10 c-black"},Be.title),d.a.createElement("span",{className:"c-light-black ml20 font12"},Be.filesize),d.a.createElement("span",{onClick:function(wt){wt.stopPropagation(),Object(be.x)("","".concat(K.a.API_SERVER).concat(Be.url))},className:"ml10 c-light-primary current"},"\u4E0B\u8F7D")))}),d.a.createElement("aside",{className:"tr"},d.a.createElement("span",{className:" c-light-black"},j()(Me.commit_time).format("YYYY-MM-DD HH:mm")),d.a.createElement("span",{className:"ml10"},Me.commit_user_name),d.a.createElement("span",{className:"ml10 c-light-black"},"\u63D0\u4EA4"),d.a.createElement("span",{className:"ml30 c-light-black"},j()(Me.update_time).format("YYYY-MM-DD HH:mm")),d.a.createElement("span",{className:"ml10"},Me.update_user_name),d.a.createElement("span",{className:"ml10 c-light-black"},"\u66F4\u65B0"))),(Me==null?void 0:Me.redo_description)&&d.a.createElement("aside",null,d.a.createElement(F.a,null),d.a.createElement("div",{className:"font16"},"\u91CD\u505A\u8BB0\u5F55"),d.a.createElement("div",{className:"pl30 mt20"},d.a.createElement(ie.a,{value:(Me==null?void 0:Me.redo_description)||"\u6682\u65E0\uFF5E"})),Me==null||((Ze=Me.redo_attachments)===null||Ze===void 0)?void 0:Ze.map(function(Be,ct){return d.a.createElement("div",{className:"pl30",key:ct},d.a.createElement("a",{href:"".concat(K.a.API_SERVER).concat(Be.url)},d.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.a.createElement("span",{className:"ml10 c-black"},Be.title),d.a.createElement("span",{className:"c-light-black ml20 font12"},Be.filesize)))}),d.a.createElement("aside",{className:"tr"},d.a.createElement("span",{className:" c-light-black"},j()(Me.redo_commit_time).format("YYYY-MM-DD HH:mm")),d.a.createElement("span",{className:"ml10"},Me.commit_user_name),d.a.createElement("span",{className:"ml10 c-light-black"},"\u63D0\u4EA4"),d.a.createElement("span",{className:"ml30 c-light-black"},j()(Me.redo_update_time).format("YYYY-MM-DD HH:mm")),d.a.createElement("span",{className:"ml10"},Me.update_user_name),d.a.createElement("span",{className:"ml10 c-light-black"},"\u66F4\u65B0"))),(Et==null?void 0:Et.revise_reason)&&d.a.createElement("aside",null,d.a.createElement(F.a,null),d.a.createElement("div",{className:"font16"},"\u8865\u4EA4\u5185\u5BB9"),d.a.createElement("div",{className:"pl30 mt20"},d.a.createElement(ie.a,{value:(Et==null?void 0:Et.revise_reason)||"\u6682\u65E0\uFF5E"})),Et==null||((Re=Et.revise_attachments)===null||Re===void 0)?void 0:Re.map(function(Be,ct){return d.a.createElement("div",{className:"pl30",key:ct},d.a.createElement("a",{onClick:function(wt){wt.preventDefault(),An({type:Be.file_type,content:K.a.API_SERVER+Be.url})},href:"".concat(K.a.API_SERVER).concat(Be.url)},d.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.a.createElement("span",{className:"ml10 c-black"},Be.title),d.a.createElement("span",{className:"c-light-black ml20 font12"},Be.filesize)))}),d.a.createElement("aside",{className:"tr"},d.a.createElement("span",{className:"ml30 c-light-black"},j()(Et.atta_update_time).format("YYYY-MM-DD HH:mm")),d.a.createElement("span",{className:"ml10"},Et.atta_update_user),d.a.createElement("span",{className:"ml10 c-light-black"},"\u66F4\u65B0")))),(Me==null?void 0:Me.anonymous_comment)&&Object(xe.i)()&&d.a.createElement("section",{className:[le.a.bg,"mt30","pt30","pl30","pr30","pb30"].join(" ")},d.a.createElement("p",null,"\u533F\u8BC4\u5B66\u751F"),!!(Me!=null&&(tt=Me.no_commented_user_names)!==null&&tt!==void 0&&tt.length)&&d.a.createElement("p",null,"\u672A\u5B8C\u6210\u533F\u8BC4\uFF1A",Me.no_commented_user_names.join("\u3001")),d.a.createElement("div",null,"\u5DF2\u5B8C\u6210\u533F\u8BC4\uFF1A",(Xe=Me.commented_user_names)===null||Xe===void 0?void 0:Xe.join("\u3001"))),(Object(xe.h)()||(Me==null||((Se=Me.homework_status)===null||Se===void 0)?void 0:Se.includes("\u533F\u8BC4\u4E2D")))&&d.a.createElement("section",null,d.a.createElement("aside",{className:[le.a.replyList,"bg-white"].join(" ")},d.a.createElement(R.a,{gutter:[10,20]},d.a.createElement(m.a,{flex:1},!!(yt!=null&&(je=yt.comment_scores)!==null&&je!==void 0&&je.length)&&d.a.createElement("span",{className:"font-16"},"\u5168\u90E8\u8BC4\u9605(",yt==null?void 0:yt.comment_count,")")),d.a.createElement(m.a,{style:{lineHeight:"40px"}},Object(xe.c)()&&(yt==null?void 0:yt.ultimate)&&d.a.createElement("span",{className:"font-16 c-blue current",onClick:function(){rt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8C03\u5206",selectArrs:Me,id:De.userId,params:De}})}},"\u8C03\u5206")),d.a.createElement(m.a,null,Object(xe.i)()&&((Me==null||((ve=Me.homework_status)===null||ve===void 0)?void 0:ve.includes("\u63D0\u4EA4\u4E2D"))||(Me==null||((ce=Me.homework_status)===null||ce===void 0)?void 0:ce.includes("\u8865\u4EA4\u4E2D"))||(Me==null||((pe=Me.homework_status)===null||pe===void 0)?void 0:pe.includes("\u8FDB\u884C\u4E2D")))&&d.a.createElement(k.a,{style:{width:"124px",height:"40px"},type:"primary",onClick:function(){return $n(!0)}},"\u6253\u56DE\u91CD\u505A"))),!yt.is_author&&!(yt!=null&&yt.ultimate)&&(Object(xe.c)()||(Me==null||((Z=Me.homework_status)===null||Z===void 0)?void 0:Z.includes("\u533F\u8BC4\u4E2D")))&&d.a.createElement("aside",null,d.a.createElement(f.a,{layout:"vertical",form:qn,onFinish:function(ct){return Gr(ct)}},d.a.createElement(f.a.Item,{label:"\u8BC4\u8BED",name:"comment",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BC4\u8BED"}]},d.a.createElement(B.a,{defaultValue:"",height:250})),d.a.createElement("div",null,d.a.createElement(f.a.Item,{name:"attachment_ids"},d.a.createElement(J.b,null))),d.a.createElement("div",{className:"mt10"},d.a.createElement(R.a,null,d.a.createElement(m.a,{flex:"1"},d.a.createElement(R.a,{align:"middle",justify:"start"},d.a.createElement(m.a,null,d.a.createElement(f.a.Item,{noStyle:!0,name:"score",rules:[{required:!Object(xe.c)(),message:"\u8BF7\u586B\u5199\u5206\u6570"}]},d.a.createElement(z.a,{step:.1,min:0,style:{width:100},size:"large",placeholder:"\u8BF7\u586B\u5199\u5206\u6570"}))),d.a.createElement(m.a,null,d.a.createElement("span",{className:"ml5 mr20"},"\u5206")))),d.a.createElement(m.a,null))),d.a.createElement("aside",{className:"".concat(le.a.buttonFixed)},d.a.createElement("aside",{className:"edu-container"},d.a.createElement(R.a,{align:"middle"},d.a.createElement(m.a,{flex:"1"},d.a.createElement(k.a,{type:"default",onClick:function(){return Dr("list")}},"\u8FD4\u56DE\u5217\u8868")),d.a.createElement(m.a,{flex:"1",className:"tr"},!Object(xe.s)()&&d.a.createElement(k.a,{type:"default",onClick:function(){return Dr("last")},disabled:Xt==null?void 0:Xt.last},"\u4E0A\u4E00\u4E2A"),!Object(xe.s)()&&d.a.createElement(k.a,{type:"default",disabled:tn==null?void 0:tn.last,style:{marginLeft:"20px",marginRight:"20px"},onClick:function(){return Dr("read")}},"\u4E0B\u4E00\u4E2A"),d.a.createElement(k.a,{htmlType:"submit",type:"primary"},"\u63D0\u4EA4\u8BC4\u9605"))))))),d.a.createElement(F.a,null),(Object(xe.h)()||(Me==null||(($=Me.homework_status)===null||$===void 0)?void 0:$.includes("\u533F\u8BC4\u4E2D"))||(Me==null||((re=Me.homework_status)===null||re===void 0)?void 0:re.includes("\u7533\u8BC9\u4E2D")))&&(yt==null||((oe=yt.comment_scores)===null||oe===void 0)?void 0:oe.map(function(Be,ct){var Dt,wt,Gt,Pt,Qt,Rt;return d.a.createElement("aside",{key:ct},d.a.createElement(R.a,{gutter:[12,12],key:ct},d.a.createElement(m.a,{flex:"40px"},(Be==null?void 0:Be.user_image_url)==="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:ye.b}),(Be==null?void 0:Be.user_image_url)!=="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:"".concat(K.a.IMG_SERVER,"/images/").concat(Be==null?void 0:Be.user_image_url)})),d.a.createElement(m.a,{flex:"1"},d.a.createElement(R.a,{align:"middle"},d.a.createElement(m.a,{span:24},d.a.createElement(R.a,null,d.a.createElement(m.a,{flex:1},d.a.createElement("span",{className:"c-light-black"},Be==null?void 0:Be.user_name),d.a.createElement("span",{className:"c-light-black ml10"},j()(Be==null?void 0:Be.comment_time).format("YYYY-MM-DD HH:mm")),Be.score!==null&&d.a.createElement("span",{className:"ml30 c-orange"},Be.score,"\u5206")),d.a.createElement(m.a,null,ct===0?d.a.createElement("aside",null,Be.delete&&d.a.createElement("span",{className:"c-blue current",onClick:function(){Pn(Be)}},"\u5220\u9664"),Be.can_appeal&&d.a.createElement("span",{className:"c-blue current",onClick:function(){kt({show:!0,type:1,active:ct})}},"\u7533\u8BC9"),Be.can_reply&&d.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return kt({show:!0,type:0,active:ct})}},"\u56DE\u590D")):d.a.createElement("aside",null,Be.delete&&d.a.createElement("span",{className:"c-blue current",onClick:function(){Pn(Be)}},"\u5220\u9664"),Be.can_appeal&&d.a.createElement("span",{className:"c-blue current",onClick:function(){kt({show:!0,type:1,active:ct})}},"\u7533\u8BC9"),Be.can_reply&&d.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return kt({show:!0,type:0,active:ct})}},"\u56DE\u590D"),!Be.can_reply&&d.a.createElement("span",{className:"c-light-black ml10"},"\u5931\u6548"))))),d.a.createElement(m.a,{span:24},Be.content&&d.a.createElement(ie.a,{value:Be.content}),!Be.content&&d.a.createElement("span",{className:"c-light-black"},"\u6682\u672A\u5199\u8BC4\u8BED"),Be==null||((Dt=Be.attachments)===null||Dt===void 0)?void 0:Dt.map(function(ut,Bt){return d.a.createElement("div",{key:Bt},d.a.createElement("a",{href:"".concat(K.a.API_SERVER).concat(ut.url)},d.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),d.a.createElement("span",{className:"ml10 c-black"},ut.title),d.a.createElement("span",{className:"c-light-black ml20 font12"},ut.filesize)))})),d.a.createElement("div",{className:"w100"},d.a.createElement(F.a,null),d.a.createElement("aside",{className:[le.a.comment,"w100"].join(" ")},Be.appeal_info&&Be.appeal_info!=""&&d.a.createElement("aside",null,d.a.createElement(R.a,null,d.a.createElement(m.a,{span:24},d.a.createElement(R.a,null,d.a.createElement(m.a,{flex:"50px"},(Be==null||((wt=Be.appeal_info)===null||wt===void 0)?void 0:wt.user_image_url)==="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:ye.b}),(Be==null||((Gt=Be.appeal_info)===null||Gt===void 0)?void 0:Gt.user_image_url)!=="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:"".concat(K.a.IMG_SERVER,"/images/").concat(Be==null||((Pt=Be.appeal_info)===null||Pt===void 0)?void 0:Pt.user_image_url)})),d.a.createElement(m.a,{flex:"1"},d.a.createElement(R.a,null,d.a.createElement(m.a,{flex:"1"},Be==null||((Qt=Be.appeal_info)===null||Qt===void 0)?void 0:Qt.user_name,d.a.createElement("span",{className:"c-light-black ml10"},j()(Be==null||((Rt=Be.appeal_info)===null||Rt===void 0)?void 0:Rt.time).format("YYYY-MM-DD HH:mm")),(Be==null?void 0:Be.appeal_status)===1&&d.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u7533\u8BC9\u4E2D"),(Be==null?void 0:Be.appeal_status)===2&&d.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"\u7533\u8BC9\u5DF2\u64A4\u9500"),(Be==null?void 0:Be.appeal_status)===3&&d.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u7533\u8BC9\u6210\u529F"),(Be==null?void 0:Be.appeal_status)===4&&d.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(Be==null?void 0:Be.appeal_status)===5&&d.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"\u7533\u8BC9\u5931\u8D25")),d.a.createElement(m.a,null,(Be==null?void 0:Be.appeal_status)===1&&Be.can_appeal&&d.a.createElement("span",{onClick:function(){A.a.confirm({title:d.a.createElement("div",null,"\u64A4\u9500\u7533\u8BC9\u540E\uFF0C\u65E0\u6CD5\u518D\u5BF9\u672C\u8BC4\u9605\u8BB0\u5F55\u8FDB\u884C\u7533\u8BC9",d.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u7533\u8BC9"),onOk:function(){var Bt=Object(s.a)(S.a.mark(function Ft(){return S.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:rn();case 1:case"end":return an.stop()}},Ft)}));function Wt(){return Bt.apply(this,arguments)}return Wt}()})},className:"c-blue current"},"\u64A4\u9500\u7533\u8BC9"),(Be==null?void 0:Be.appeal_status)===1&&Object(xe.c)()&&d.a.createElement("span",{onClick:function(){A.a.confirm({title:d.a.createElement("div",null,"\u6B64\u533F\u8BC4\u6210\u7EE9\u5C06\u88AB\u5E9F\u5F03\uFF0C\u8BC4\u9605\u4EBA\u7684\u4F5C\u54C1\u5C06\u88AB\u8FDD\u89C4\u6263\u5206",d.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u63A5\u53D7\u7533\u8BC9"),onOk:function(){var Bt=Object(s.a)(S.a.mark(function Ft(){var zt;return S.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(L.a)("/api/student_works/".concat(De.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:Be.score_id,status:3}});case 2:zt=ln.sent,(zt==null?void 0:zt.status)===0&&rn();case 4:case"end":return ln.stop()}},Ft)}));function Wt(){return Bt.apply(this,arguments)}return Wt}()})},className:"c-red current"},"\u63A5\u53D7\u7533\u8BC9"),(Be==null?void 0:Be.appeal_status)===1&&Object(xe.c)()&&d.a.createElement("span",{onClick:function(){A.a.confirm({title:d.a.createElement("div",null,"\u6B64\u533F\u8BC4\u6210\u7EE9\u5C06\u88AB\u8BA4\u4E3A\u5408\u7406",d.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9"),onOk:function(){var Bt=Object(s.a)(S.a.mark(function Ft(){var zt;return S.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(L.a)("/api/student_works/".concat(De.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:Be.score_id,status:4}});case 2:zt=ln.sent,(zt==null?void 0:zt.status)===0&&rn();case 4:case"end":return ln.stop()}},Ft)}));function Wt(){return Bt.apply(this,arguments)}return Wt}()})},className:"c-light-black current ml10"},"\u62D2\u7EDD\u7533\u8BC9"))),d.a.createElement(ie.a,{value:Be==null?void 0:Be.appeal_info.content})),d.a.createElement(m.a,null))))),Be.journals.map(function(ut,Bt){var Wt,Ft,zt,an;return d.a.createElement("aside",{key:Bt},d.a.createElement(R.a,{key:Bt},d.a.createElement(m.a,{span:24},d.a.createElement(R.a,null,d.a.createElement(m.a,{flex:"50px"},(ut==null||((Wt=ut.user_info)===null||Wt===void 0)?void 0:Wt.user_image_url)==="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:ye.b}),(ut==null||((Ft=ut.user_info)===null||Ft===void 0)?void 0:Ft.user_image_url)!=="--"&&d.a.createElement("img",{className:le.a.headpic,width:"40",src:"".concat(K.a.IMG_SERVER,"/images/").concat(ut==null||((zt=ut.user_info)===null||zt===void 0)?void 0:zt.user_image_url)})),d.a.createElement(m.a,{flex:"1"},ut==null||((an=ut.user_info)===null||an===void 0)?void 0:an.user_name,d.a.createElement("span",{className:"c-light-black ml10"},j()(ut==null?void 0:ut.time).format("YYYY-MM-DD HH:mm")),d.a.createElement(ie.a,{value:ut.content})),d.a.createElement(m.a,null,(ut==null?void 0:ut.can_delete)&&d.a.createElement(V.a,{title:"\u5220\u9664"},d.a.createElement(b.a,{className:"current c-light-black",onClick:function(){Lr(ut)}})))))),Bt!==Be.journals.length-1&&d.a.createElement(F.a,null))})))),xt.show&&ct===xt.active&&d.a.createElement("aside",{className:["bg-white"].join(" ")},d.a.createElement(B.a,{onChange:function(Bt){Bn(Bt)},height:150,isFocus:!0,watch:!0}),d.a.createElement(R.a,null,d.a.createElement(m.a,{span:24,className:"tr"},d.a.createElement(k.a,{type:"default",size:"large",onClick:Object(s.a)(S.a.mark(function ut(){return S.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:kt({show:!1,type:0,active:ct});case 1:case"end":return Wt.stop()}},ut)}))},"\u53D6\u6D88"),d.a.createElement(k.a,{type:"primary",size:"large",className:"ml20",onClick:Object(s.a)(S.a.mark(function ut(){var Bt;return S.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(_n==="")){Ft.next=4;break}h.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Ft.next=14;break;case 4:if(!(xt.type===0)){Ft.next=10;break}return Ft.next=7,Object(q.f)({comment:_n,userId:De.userId,score_id:Be.score_id});case 7:Bt=Ft.sent,Ft.next=13;break;case 10:return Ft.next=12,Object(q.g)({comment:_n,score_id:Be.score_id,userId:De.userId});case 12:Bt=Ft.sent;case 13:Bt.status===0&&(h.b.success("\u64CD\u4F5C\u6210\u529F"),kt({show:!1,type:0,active:ct}),rn());case 14:case"end":return Ft.stop()}},ut)}))},xt.type===0?"\u56DE\u590D":"\u7533\u8BC9")))))),d.a.createElement(F.a,null))})))),d.a.createElement(me,null),d.a.createElement(ee,null),d.a.createElement(P.a,null),d.a.createElement(A.a,{title:"\u786E\u8BA4\u6253\u56DE\u91CD\u505A",visible:or,destroyOnClose:!0,forceRender:!0,onCancel:function(){$n(!1)},onOk:Object(s.a)(S.a.mark(function Be(){var ct;return S.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(ze){wt.next=3;break}return h.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),wt.abrupt("return");case 3:return wt.next=5,Object(L.a)("/api/student_works/".concat(De.userId,"/redo_modal.json"),{method:"post",body:{comment:ze,id:De.userId}});case 5:ct=wt.sent,(ct==null?void 0:ct.status)===0&&(h.b.info("\u6253\u56DE\u91CD\u505A\u6210\u529F"),$n(!1),rn());case 7:case"end":return wt.stop()}},Be)})),width:728},d.a.createElement("div",{style:{padding:"32px"}},d.a.createElement("span",null,"\u786E\u8BA4\u5C06",Me==null?void 0:Me.author_name,"\u7684\u4F5C\u4E1A\u6253\u56DE\u91CD\u505A\u5417"),d.a.createElement("div",{style:{marginTop:"20px"}},d.a.createElement("label",null,d.a.createElement("span",{style:{marginRight:"5px",color:"red"}},"*"),"\u8BC4\u8BED\uFF1A"),d.a.createElement(B.a,{className:le.a.MdEditor,onChange:function(ct){return gr(ct)},defaultValue:"",height:250})))),Vt,d.a.createElement(C.a,{close:!0,data:kn==null?void 0:kn.content,type:kn==null?void 0:kn.type,hasMask:!0,monacoEditor:{value:_r.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return An({content:"",type:""})}}))},Le=we.default=Object(u.a)(function(Ne){var ke=Ne.shixunHomeworks,Oe=Ne.loading,Ie=Ne.user,Ge=Ne.globalSetting;return{shixunHomeworks:ke,globalSetting:Ge,user:Ie,loading:Oe.effects}})(Ae)},ji0R:function(Pe,we,Y){Pe.exports=Y.p+"static/douyu.3e6df9ee.jpg"},kPWJ:function(Pe,we,Y){Pe.exports=Y.p+"static/question.cb52bef9.gif"},kPYp:function(Pe,we){Pe.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+eHCuf3MWgUjZ3w76kUZQeW8j4iOnadXmCUNQI3xvsIbl7bX70MEdKpFLutcCA7iz/BxvfrfY2hNVXDb2v2s/TkU/Lf8SZXrtOcUxFfF8P1AiNVSYj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HQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(Pe,we,Y){},"kaH+":function(Pe,we,Y){"use strict";var ne=Y("+L6B"),V=Y("2/Rp"),D=Y("tJVT"),z=Y("cDcd"),N=Y.n(z),k=Y("UZu5"),W=Y.n(k),F=Y("dhSg"),M=Y("rLCj"),R=Y("dF/Y"),v=Y("4i/N");we.a=function(){var m=Object(z.useState)(""),p=Object(D.a)(m,2),c=p[0],o=p[1],h=Object(z.useState)(0),s=Object(D.a)(h,2),i=s[0],l=s[1],f=Object(z.useRef)("");Object(z.useEffect)(function(){var d=F.a.subscribe("preview-image",function(y){o(y),document.body.style.overflow="hidden"});return d},[]),Object(z.useEffect)(function(){return document.addEventListener("keydown",O),function(){document.removeEventListener("keydown",O)}},[]),Object(z.useEffect)(function(){f.current=c},[c]);function O(d){d.keyCode==27&&f.current&&A()}function A(){document.body.style.overflow="auto",o("")}function T(){l(i+90)}var w=Object(z.useRef)(),S=Object(z.useRef)(),x=function(y){(y.nativeEvent.target===w.current||y.nativeEvent.target===S.current)&&A()};return N.a.createElement(z.Fragment,null,c?N.a.createElement("div",{className:"image-preview-container",ref:w,onClick:x},N.a.createElement("div",{className:"button-group"},N.a.createElement(V.a,{onClick:T},"\u65CB\u8F6C",N.a.createElement(M.a,null)),N.a.createElement(V.a,{href:c},"\u4E0B\u8F7D",N.a.createElement(R.a,null)),N.a.createElement(V.a,{onClick:A},"\u5173\u95ED",N.a.createElement(v.a,null))),N.a.createElement("div",{className:"preview-wrp-group",ref:S},N.a.createElement("img",{className:"image-preview",src:c,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(i,"deg)")}}))):null)}},l2Kq:function(Pe,we,Y){Pe.exports=Y.p+"static/match_ad.24dc22fd.jpg"},lZu9:function(Pe,we,Y){(function(ne){ne(Y("VrN/"),Y("1eCo"),Y("8EBN"))})(function(ne){"use strict";ne.defineMode("markdown",function(V,D){var z=ne.getMode(V,"text/html"),N=z.name=="null";function k(C){if(ne.findModeByName){var _=ne.findModeByName(C);_&&(C=_.mime||_.mimes[0])}var j=ne.getMode(V,C);return j.name=="null"?null:j}D.highlightFormatting===void 0&&(D.highlightFormatting=!1),D.maxBlockquoteDepth===void 0&&(D.maxBlockquoteDepth=0),D.taskLists===void 0&&(D.taskLists=!1),D.strikethrough===void 0&&(D.strikethrough=!1),D.emoji===void 0&&(D.emoji=!1),D.fencedCodeBlockHighlighting===void 0&&(D.fencedCodeBlockHighlighting=!0),D.fencedCodeBlockDefaultMode===void 0&&(D.fencedCodeBlockDefaultMode="text/plain"),D.xml===void 0&&(D.xml=!0),D.tokenTypeOverrides===void 0&&(D.tokenTypeOverrides={});var W={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 F in W)W.hasOwnProperty(F)&&D.tokenTypeOverrides[F]&&(W[F]=D.tokenTypeOverrides[F]);var M=/^([*\-_])(?:\s*\1){2,}\s*$/,R=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,v=/^\[(x| )\](?=\s)/i,m=D.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,s=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 l(C,_,j){return _.f=_.inline=j,j(C,_)}function f(C,_,j){return _.f=_.block=j,j(C,_)}function O(C){return!C||!/\S/.test(C.string)}function A(C){if(C.linkTitle=!1,C.linkHref=!1,C.linkText=!1,C.em=!1,C.strong=!1,C.strikethrough=!1,C.quote=0,C.indentedCode=!1,C.f==w){var _=N;if(!_){var j=ne.innerMode(z,C.htmlState);_=j.mode.name=="xml"&&j.state.tagStart===null&&!j.state.context&&j.state.tokenize.isInText}_&&(C.f=y,C.block=T,C.htmlState=null)}return C.trailingSpace=0,C.trailingSpaceNewLine=!1,C.prevLine=C.thisLine,C.thisLine={stream:null},null}function T(C,_){var j=C.column()===_.indentation,K=O(_.prevLine.stream),q=_.indentedCode,te=_.prevLine.hr,_e=_.list!==!1,ue=(_.listStack[_.listStack.length-1]||0)+3;_.indentedCode=!1;var me=_.indentation;if(_.indentationDiff===null&&(_.indentationDiff=_.indentation,_e)){for(_.list=null;me<_.listStack[_.listStack.length-1];)_.listStack.pop(),_.listStack.length?_.indentation=_.listStack[_.listStack.length-1]:_.list=!1;_.list!==!1&&(_.indentationDiff=me-_.listStack[_.listStack.length-1])}var fe=!K&&!te&&!_.prevLine.header&&(!_e||!q)&&!_.prevLine.fencedCodeEnd,le=(_.list===!1||te||K)&&_.indentation<=ue&&C.match(M),ie=null;if(_.indentationDiff>=4&&(q||_.prevLine.fencedCodeEnd||_.prevLine.header||K))return C.skipToEnd(),_.indentedCode=!0,W.code;if(C.eatSpace())return null;if(j&&_.indentation<=ue&&(ie=C.match(m))&&ie[1].length<=6)return _.quote=0,_.header=ie[1].length,_.thisLine.header=!0,D.highlightFormatting&&(_.formatting="header"),_.f=_.inline,x(_);if(_.indentation<=ue&&C.eat(">"))return _.quote=j?1:_.quote+1,D.highlightFormatting&&(_.formatting="quote"),C.eatSpace(),x(_);if(!le&&!_.setext&&j&&_.indentation<=ue&&(ie=C.match(R))){var he=ie[1]?"ol":"ul";return _.indentation=me+C.current().length,_.list=!0,_.quote=0,_.listStack.push(_.indentation),_.em=!1,_.strong=!1,_.code=!1,_.strikethrough=!1,D.taskLists&&C.match(v,!1)&&(_.taskList=!0),_.f=_.inline,D.highlightFormatting&&(_.formatting=["list","list-"+he]),x(_)}else{if(j&&_.indentation<=ue&&(ie=C.match(o,!0)))return _.quote=0,_.fencedEndRE=new RegExp(ie[1]+"+ *$"),_.localMode=D.fencedCodeBlockHighlighting&&k(ie[2]||D.fencedCodeBlockDefaultMode),_.localMode&&(_.localState=ne.startState(_.localMode)),_.f=_.block=S,D.highlightFormatting&&(_.formatting="code-block"),_.code=-1,x(_);if(_.setext||(!fe||!_e)&&!_.quote&&_.list===!1&&!_.code&&!le&&!h.test(C.string)&&(ie=C.lookAhead(1))&&(ie=ie.match(p)))return _.setext?(_.header=_.setext,_.setext=0,C.skipToEnd(),D.highlightFormatting&&(_.formatting="header")):(_.header=ie[0].charAt(0)=="="?1:2,_.setext=_.header),_.thisLine.header=!0,_.f=_.inline,x(_);if(le)return C.skipToEnd(),_.hr=!0,_.thisLine.hr=!0,W.hr;if(C.peek()==="[")return l(C,_,P)}return l(C,_,_.inline)}function w(C,_){var j=z.token(C,_.htmlState);if(!N){var K=ne.innerMode(z,_.htmlState);(K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText||_.md_inside&&C.current().indexOf(">")>-1)&&(_.f=y,_.block=T,_.htmlState=null)}return j}function S(C,_){var j=_.listStack[_.listStack.length-1]||0,K=_.indentation<j,q=j+3;if(_.fencedEndRE&&_.indentation<=q&&(K||C.match(_.fencedEndRE))){D.highlightFormatting&&(_.formatting="code-block");var te;return K||(te=x(_)),_.localMode=_.localState=null,_.block=T,_.f=y,_.fencedEndRE=null,_.code=0,_.thisLine.fencedCodeEnd=!0,K?f(C,_,_.block):te}else return _.localMode?_.localMode.token(C,_.localState):(C.skipToEnd(),W.code)}function x(C){var _=[];if(C.formatting){_.push(W.formatting),typeof C.formatting=="string"&&(C.formatting=[C.formatting]);for(var j=0;j<C.formatting.length;j++)_.push(W.formatting+"-"+C.formatting[j]),C.formatting[j]==="header"&&_.push(W.formatting+"-"+C.formatting[j]+"-"+C.header),C.formatting[j]==="quote"&&(!D.maxBlockquoteDepth||D.maxBlockquoteDepth>=C.quote?_.push(W.formatting+"-"+C.formatting[j]+"-"+C.quote):_.push("error"))}if(C.taskOpen)return _.push("meta"),_.length?_.join(" "):null;if(C.taskClosed)return _.push("property"),_.length?_.join(" "):null;if(C.linkHref?_.push(W.linkHref,"url"):(C.strong&&_.push(W.strong),C.em&&_.push(W.em),C.strikethrough&&_.push(W.strikethrough),C.emoji&&_.push(W.emoji),C.linkText&&_.push(W.linkText),C.code&&_.push(W.code),C.image&&_.push(W.image),C.imageAltText&&_.push(W.imageAltText,"link"),C.imageMarker&&_.push(W.imageMarker)),C.header&&_.push(W.header,W.header+"-"+C.header),C.quote&&(_.push(W.quote),!D.maxBlockquoteDepth||D.maxBlockquoteDepth>=C.quote?_.push(W.quote+"-"+C.quote):_.push(W.quote+"-"+D.maxBlockquoteDepth)),C.list!==!1){var K=(C.listStack.length-1)%3;K?K===1?_.push(W.list2):_.push(W.list3):_.push(W.list1)}return C.trailingSpaceNewLine?_.push("trailing-space-new-line"):C.trailingSpace&&_.push("trailing-space-"+(C.trailingSpace%2?"a":"b")),_.length?_.join(" "):null}function d(C,_){return C.match(c,!0)?x(_):void 0}function y(C,_){var j=_.text(C,_);if(typeof j!="undefined")return j;if(_.list)return _.list=null,x(_);if(_.taskList){var K=C.match(v,!0)[1]===" ";return K?_.taskOpen=!0:_.taskClosed=!0,D.highlightFormatting&&(_.formatting="task"),_.taskList=!1,x(_)}if(_.taskOpen=!1,_.taskClosed=!1,_.header&&C.match(/^#+$/,!0))return D.highlightFormatting&&(_.formatting="header"),x(_);var q=C.next();if(_.linkTitle){_.linkTitle=!1;var te=q;q==="("&&(te=")"),te=(te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var _e="^\\s*(?:[^"+te+"\\\\]+|\\\\\\\\|\\\\.)"+te;if(C.match(new RegExp(_e),!0))return W.linkHref}if(q==="`"){var ue=_.formatting;D.highlightFormatting&&(_.formatting="code"),C.eatWhile("`");var me=C.current().length;if(_.code==0&&(!_.quote||me==1))return _.code=me,x(_);if(me==_.code){var fe=x(_);return _.code=0,fe}else return _.formatting=ue,x(_)}else if(_.code)return x(_);if(q==="\\"&&(C.next(),D.highlightFormatting)){var le=x(_),ie=W.formatting+"-escape";return le?le+" "+ie:ie}if(q==="!"&&C.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return _.imageMarker=!0,_.image=!0,D.highlightFormatting&&(_.formatting="image"),x(_);if(q==="["&&_.imageMarker&&C.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return _.imageMarker=!1,_.imageAltText=!0,D.highlightFormatting&&(_.formatting="image"),x(_);if(q==="]"&&_.imageAltText){D.highlightFormatting&&(_.formatting="image");var le=x(_);return _.imageAltText=!1,_.image=!1,_.inline=_.f=E,le}if(q==="["&&!_.image)return _.linkText&&C.match(/^.*?\]/)||(_.linkText=!0,D.highlightFormatting&&(_.formatting="link")),x(_);if(q==="]"&&_.linkText){D.highlightFormatting&&(_.formatting="link");var le=x(_);return _.linkText=!1,_.inline=_.f=C.match(/\(.*?\)| ?\[.*?\]/,!1)?E:y,le}if(q==="<"&&C.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){_.f=_.inline=u,D.highlightFormatting&&(_.formatting="link");var le=x(_);return le?le+=" ":le="",le+W.linkInline}if(q==="<"&&C.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){_.f=_.inline=u,D.highlightFormatting&&(_.formatting="link");var le=x(_);return le?le+=" ":le="",le+W.linkEmail}if(D.xml&&q==="<"&&C.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var he=C.string.indexOf(">",C.pos);if(he!=-1){var J=C.string.substring(C.start,he);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(J)&&(_.md_inside=!0)}return C.backUp(1),_.htmlState=ne.startState(z),f(C,_,w)}if(D.xml&&q==="<"&&C.match(/^\/\w*?>/))return _.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var ae=1,ee=C.pos==1?" ":C.string.charAt(C.pos-2);ae<3&&C.eat(q);)ae++;var be=C.peek()||" ",xe=!/\s/.test(be)&&(!s.test(be)||/\s/.test(ee)||s.test(ee)),ye=!/\s/.test(ee)&&(!s.test(ee)||/\s/.test(be)||s.test(be)),Ae=null,Le=null;if(ae%2&&(!_.em&&xe&&(q==="*"||!ye||s.test(ee))?Ae=!0:_.em==q&&ye&&(q==="*"||!xe||s.test(be))&&(Ae=!1)),ae>1&&(!_.strong&&xe&&(q==="*"||!ye||s.test(ee))?Le=!0:_.strong==q&&ye&&(q==="*"||!xe||s.test(be))&&(Le=!1)),Le!=null||Ae!=null){D.highlightFormatting&&(_.formatting=Ae==null?"strong":Le==null?"em":"strong em"),Ae===!0&&(_.em=q),Le===!0&&(_.strong=q);var fe=x(_);return Ae===!1&&(_.em=!1),Le===!1&&(_.strong=!1),fe}}else if(q===" "&&(C.eat("*")||C.eat("_"))){if(C.peek()===" ")return x(_);C.backUp(1)}if(D.strikethrough){if(q==="~"&&C.eatWhile(q)){if(_.strikethrough){D.highlightFormatting&&(_.formatting="strikethrough");var fe=x(_);return _.strikethrough=!1,fe}else if(C.match(/^[^\s]/,!1))return _.strikethrough=!0,D.highlightFormatting&&(_.formatting="strikethrough"),x(_)}else if(q===" "&&C.match(/^~~/,!0)){if(C.peek()===" ")return x(_);C.backUp(2)}}if(D.emoji&&q===":"&&C.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){_.emoji=!0,D.highlightFormatting&&(_.formatting="emoji");var Ne=x(_);return _.emoji=!1,Ne}return q===" "&&(C.match(/^ +$/,!1)?_.trailingSpace++:_.trailingSpace&&(_.trailingSpaceNewLine=!0)),x(_)}function u(C,_){var j=C.next();if(j===">"){_.f=_.inline=y,D.highlightFormatting&&(_.formatting="link");var K=x(_);return K?K+=" ":K="",K+W.linkInline}return C.match(/^[^>]+/,!0),W.linkInline}function E(C,_){if(C.eatSpace())return null;var j=C.next();return j==="("||j==="["?(_.f=_.inline=b(j==="("?")":"]"),D.highlightFormatting&&(_.formatting="link-string"),_.linkHref=!0,x(_)):"error"}var g={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function b(C){return function(_,j){var K=_.next();if(K===C){j.f=j.inline=y,D.highlightFormatting&&(j.formatting="link-string");var q=x(j);return j.linkHref=!1,q}return _.match(g[C]),j.linkHref=!0,x(j)}}function P(C,_){return C.match(/^([^\]\\]|\\.)*\]:/,!1)?(_.f=L,C.next(),D.highlightFormatting&&(_.formatting="link"),_.linkText=!0,x(_)):l(C,_,y)}function L(C,_){if(C.match(/^\]:/,!0)){_.f=_.inline=B,D.highlightFormatting&&(_.formatting="link");var j=x(_);return _.linkText=!1,j}return C.match(/^([^\]\\]|\\.)+/,!0),W.linkText}function B(C,_){return C.eatSpace()?null:(C.match(/^[^\s]+/,!0),C.peek()===void 0?_.linkTitle=!0:C.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),_.f=_.inline=y,W.linkHref+" url")}var U={startState:function(){return{f:T,prevLine:{stream:null},thisLine:{stream:null},block:T,htmlState:null,indentation:0,inline:y,text:d,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(C){return{f:C.f,prevLine:C.prevLine,thisLine:C.thisLine,block:C.block,htmlState:C.htmlState&&ne.copyState(z,C.htmlState),indentation:C.indentation,localMode:C.localMode,localState:C.localMode?ne.copyState(C.localMode,C.localState):null,inline:C.inline,text:C.text,formatting:!1,linkText:C.linkText,linkTitle:C.linkTitle,linkHref:C.linkHref,code:C.code,em:C.em,strong:C.strong,strikethrough:C.strikethrough,emoji:C.emoji,header:C.header,setext:C.setext,hr:C.hr,taskList:C.taskList,list:C.list,listStack:C.listStack.slice(0),quote:C.quote,indentedCode:C.indentedCode,trailingSpace:C.trailingSpace,trailingSpaceNewLine:C.trailingSpaceNewLine,md_inside:C.md_inside,fencedEndRE:C.fencedEndRE}},token:function(C,_){if(_.formatting=!1,C!=_.thisLine.stream){if(_.header=0,_.hr=!1,C.match(/^\s*$/,!0))return A(_),null;if(_.prevLine=_.thisLine,_.thisLine={stream:C},_.taskList=!1,_.trailingSpace=0,_.trailingSpaceNewLine=!1,!_.localState&&(_.f=_.block,_.f!=w)){var j=C.match(/^\s*/,!0)[0].replace(/\t/g,i).length;if(_.indentation=j,_.indentationDiff=null,j>0)return null}}return _.f(C,_)},innerMode:function(C){return C.block==w?{state:C.htmlState,mode:z}:C.localState?{state:C.localState,mode:C.localMode}:{state:C,mode:U}},indent:function(C,_,j){return C.block==w&&z.indent?z.indent(C.htmlState,_,j):C.localState&&C.localMode.indent?C.localMode.indent(C.localState,_,j):ne.Pass},blankLine:A,getType:x,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return U},"xml"),ne.defineMIME("text/markdown","markdown"),ne.defineMIME("text/x-markdown","markdown")})},lzim:function(Pe,we,Y){"use strict";var ne=Y("E7E6"),V=Y.n(ne);Y.d(we,"y",function(){return V.a});var D=Y("/GNS"),z=Y.n(D);Y.d(we,"x",function(){return z.a});var N=Y("FOrL"),k=Y.n(N);Y.d(we,"r",function(){return k.a});var W=Y("HpTS"),F=Y.n(W);Y.d(we,"z",function(){return F.a});var M=Y("tWlo"),R=Y.n(M);Y.d(we,"b",function(){return R.a});var v=Y("7ZXX"),m=Y.n(v);Y.d(we,"m",function(){return m.a});var p=Y("GABl"),c=Y.n(p);Y.d(we,"f",function(){return c.a});var o=Y("onxn"),h=Y.n(o);Y.d(we,"o",function(){return h.a});var s=Y("nKGa"),i=Y.n(s);Y.d(we,"n",function(){return i.a});var l=Y("4qgm"),f=Y.n(l);Y.d(we,"B",function(){return f.a});var O=Y("JeFH"),A=Y.n(O);Y.d(we,"c",function(){return A.a});var T=Y("ji0R"),w=Y.n(T);Y.d(we,"j",function(){return w.a});var S=Y("W6BS"),x=Y.n(S);Y.d(we,"C",function(){return x.a});var d=Y("kPYp"),y=Y.n(d);Y.d(we,"D",function(){return y.a});var u=Y("nukY"),E=Y.n(u),g=Y("4u4S"),b=Y.n(g),P=Y("yslc"),L=Y.n(P),B=Y("l2Kq"),U=Y.n(B),C=Y("RMFE"),_=Y.n(C);Y.d(we,"p",function(){return _.a});var j=Y("TGq3"),K=Y.n(j),q=Y("SMhR"),te=Y.n(q);Y.d(we,"A",function(){return te.a});var _e=Y("8/bI"),ue=Y.n(_e);Y.d(we,"k",function(){return ue.a});var me=Y("JWDV"),fe=Y.n(me),le=Y("Xsq0"),ie=Y.n(le);Y.d(we,"q",function(){return ie.a});var he=Y("Ohmc"),J=Y.n(he);Y.d(we,"d",function(){return J.a});var ae=Y("csWT"),ee=Y.n(ae);Y.d(we,"e",function(){return ee.a});var be=Y("7v3h"),xe=Y.n(be);Y.d(we,"l",function(){return xe.a});var ye=Y("cRFk"),Ae=Y.n(ye);Y.d(we,"w",function(){return Ae.a});var Le=Y("kPWJ"),Ne=Y.n(Le);Y.d(we,"v",function(){return Ne.a});var ke=Y("qgvg"),Oe=Y.n(ke);Y.d(we,"s",function(){return Oe.a});var Ie=Y("FPkq"),Ge=Y.n(Ie);Y.d(we,"u",function(){return Ge.a});var Je=Y("A/g1"),Ve=Y.n(Je);Y.d(we,"g",function(){return Ve.a});var Ke=Y("Nmxd"),nt=Y.n(Ke);Y.d(we,"h",function(){return nt.a});var Qe=Y("5D2P"),Ze=Y.n(Qe);Y.d(we,"i",function(){return Ze.a});var Re=Y("djh8"),tt=Y.n(Re);Y.d(we,"t",function(){return tt.a});var Xe=Y("Jq4h"),Se=Y.n(Xe);Y.d(we,"a",function(){return Se.a})},nKGa:function(Pe,we,Y){Pe.exports=Y.p+"static/export_exercise-template.f7655c19.png"},nukY:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9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TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(Pe,we,Y){(function(ne){ne(Y("VrN/"))})(function(ne){"use strict";var V=ne.Pos;function D(s,i){return s.line-i.line||s.ch-i.ch}var z="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",N=z+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",k=new RegExp("<(/?)(["+z+"]["+N+"]*)","g");function W(s,i,l,f){this.line=i,this.ch=l,this.cm=s,this.text=s.getLine(i),this.min=f?Math.max(f.from,s.firstLine()):s.firstLine(),this.max=f?Math.min(f.to-1,s.lastLine()):s.lastLine()}function F(s,i){var l=s.cm.getTokenTypeAt(V(s.line,i));return l&&/\btag\b/.test(l)}function M(s){return s.line>=s.max?void 0:(s.ch=0,s.text=s.cm.getLine(++s.line),!0)}function R(s){return s.line<=s.min?void 0:(s.text=s.cm.getLine(--s.line),s.ch=s.text.length,!0)}function v(s){for(;;){var i=s.text.indexOf(">",s.ch);if(i==-1){if(M(s))continue;return}if(!F(s,i+1)){s.ch=i+1;continue}var l=s.text.lastIndexOf("/",i),f=l>-1&&!/\S/.test(s.text.slice(l+1,i));return s.ch=i+1,f?"selfClose":"regular"}}function m(s){for(;;){var i=s.ch?s.text.lastIndexOf("<",s.ch-1):-1;if(i==-1){if(R(s))continue;return}if(!F(s,i+1)){s.ch=i;continue}k.lastIndex=i,s.ch=i;var l=k.exec(s.text);if(l&&l.index==i)return l}}function p(s){for(;;){k.lastIndex=s.ch;var i=k.exec(s.text);if(!i){if(M(s))continue;return}if(!F(s,i.index+1)){s.ch=i.index+1;continue}return s.ch=i.index+i[0].length,i}}function c(s){for(;;){var i=s.ch?s.text.lastIndexOf(">",s.ch-1):-1;if(i==-1){if(R(s))continue;return}if(!F(s,i+1)){s.ch=i;continue}var l=s.text.lastIndexOf("/",i),f=l>-1&&!/\S/.test(s.text.slice(l+1,i));return s.ch=i+1,f?"selfClose":"regular"}}function o(s,i){for(var l=[];;){var f=p(s),O,A=s.line,T=s.ch-(f?f[0].length:0);if(!f||!(O=v(s)))return;if(O=="selfClose")continue;if(f[1]){for(var w=l.length-1;w>=0;--w)if(l[w]==f[2]){l.length=w;break}if(w<0&&(!i||i==f[2]))return{tag:f[2],from:V(A,T),to:V(s.line,s.ch)}}else l.push(f[2])}}function h(s,i){for(var l=[];;){var f=c(s);if(!f)return;if(f=="selfClose"){m(s);continue}var O=s.line,A=s.ch,T=m(s);if(!T)return;if(T[1])l.push(T[2]);else{for(var w=l.length-1;w>=0;--w)if(l[w]==T[2]){l.length=w;break}if(w<0&&(!i||i==T[2]))return{tag:T[2],from:V(s.line,s.ch),to:V(O,A)}}}}ne.registerHelper("fold","xml",function(s,i){for(var l=new W(s,i.line,0);;){var f=p(l);if(!f||l.line!=i.line)return;var O=v(l);if(!O)return;if(!f[1]&&O!="selfClose"){var A=V(l.line,l.ch),T=o(l,f[2]);return T&&D(T.from,A)>0?{from:A,to:T.from}:null}}}),ne.findMatchingTag=function(s,i,l){var f=new W(s,i.line,i.ch,l);if(f.text.indexOf(">")==-1&&f.text.indexOf("<")==-1)return;var O=v(f),A=O&&V(f.line,f.ch),T=O&&m(f);if(!O||!T||D(f,i)>0)return;var w={from:V(f.line,f.ch),to:A,tag:T[2]};return O=="selfClose"?{open:w,close:null,at:"open"}:T[1]?{open:h(f,T[2]),close:w,at:"close"}:(f=new W(s,A.line,A.ch,l),{open:w,close:o(f,T[2]),at:"open"})},ne.findEnclosingTag=function(s,i,l,f){for(var O=new W(s,i.line,i.ch,l);;){var A=h(O,f);if(!A)break;var T=new W(s,i.line,i.ch,l),w=o(T,A.tag);if(w)return{open:A,close:w}}},ne.scanForClosingTag=function(s,i,l,f){var O=new W(s,i.line,i.ch,f?{from:0,to:f}:null);return o(O,l)}})},p5ED:function(Pe,we,Y){"use strict";var ne=Y("+L6B"),V=Y("2/Rp"),D=Y("5Dmo"),z=Y("3S7+"),N=Y("k1fw"),k=Y("tJVT"),W=Y("cDcd"),F=Y.n(W),M=Y("vHTk"),R=Y.n(M),v=Y("yEEn"),m=Y("ZW9T"),p=Y("1vsH");we.a=function(c){var o=c.name,h=c.data,s=c.theme,i=c.type,l=c.filename,f=c.monacoEditor,O=c.className,A=c.style,T=c.close,w=c.onClose,S=c.hasMask,x=Object(W.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),d=Object(k.a)(x,2),y=d[0],u=d[1],E=Object(W.useState)(""),g=Object(k.a)(E,2),b=g[0],P=g[1],L,B=1024*1024,U=10*B,C=Object(W.useRef)();i==="office"&&(L=Object(p.V)(h).filesize,L>U&&(i="other")),l&&(f.filename=l),Object(W.useEffect)(function(){var K,q,te=(K=document.cookie)===null||K===void 0||((q=K.replace(/\s/g,""))===null||q===void 0)?void 0:q.split(";");te==null||te.map(function(_e){var ue=_e.split("=");ue[0]==="_educoder_session"&&P(ue[1])})},[]);var _=function(){if(h.startsWith("http")||h.startsWith("/")){j();return}Object(p.z)(l||"educoder",h,l)},j=function(){Object(p.x)(l||o,h)};return console.log("data:",h,"fileanme:",l," name:",o),F.a.createElement("div",{style:Object(N.a)({},A||{}),className:"".concat(S&&R.a.bgBlack," ").concat(i?R.a.wrp:"hide")},T&&F.a.createElement("div",{className:R.a.close,ref:C},F.a.createElement(z.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return C.current}},F.a.createElement("span",{onClick:j},F.a.createElement("i",{className:"icon-quxiaozhiding"}))),F.a.createElement(z.a,{title:"\u5173\u95ED",getPopupContainer:function(){return C.current}},F.a.createElement("span",{className:"",onClick:w},F.a.createElement("i",{className:"icon-guanbi1"})))),F.a.createElement("div",{className:"".concat(R.a[O]," ").concat(O," ").concat(R.a.monaco," ").concat(i==="txt"?"show":"hide")},i==="txt"&&F.a.createElement(m.b,f)),i==="audio"&&F.a.createElement("audio",{src:"".concat(h!=null&&h.startsWith("/")||(h==null?void 0:h.indexOf("https://"))>-1?h:"data:audio/mp3;base64,").concat(h),autoPlay:!0}),i==="video"&&F.a.createElement(F.a.Fragment,null,h!=null&&h.startsWith("/")?F.a.createElement("video",{controls:!0,src:"".concat(h),autoPlay:!0}):F.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(h),autoPlay:!0})),i==="html"&&F.a.createElement("iframe",{src:h+"&disposition=inline"}),i==="pdf"&&F.a.createElement("embed",{className:R.a.embed,src:h}),i==="image"&&F.a.createElement(F.a.Fragment,null,F.a.createElement("img",{src:"".concat(h!=null&&h.startsWith("/")||(h==null?void 0:h.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(h)})),i==="other"&&F.a.createElement("div",null,F.a.createElement(V.a,{type:"primary",size:"large",onClick:_},F.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(i==="download"||i==="office")&&F.a.createElement(V.a,{type:"primary",size:"large",onClick:_},F.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Pe,we,Y){},pAaK:function(Pe,we,Y){Pe.exports={flex_box_center:"flex_box_center___3d46B",flex_space_between:"flex_space_between___3a07p",flex_box_vertical_center:"flex_box_vertical_center___3U-TP",flex_box_center_end:"flex_box_center_end___2f78_",flex_box_column:"flex_box_column___2G3XJ",bg:"bg___1MTM3",title:"title___161Lo",replyList:"replyList___3TAxX","nav-tab":"nav-tab___2QveN",buttonFixed:"buttonFixed___3jsue",exitComment:"exitComment___2ZV_r",nextComment:"nextComment___1M4hZ",modal:"modal___14a4J",MdEditor:"MdEditor___2fxIJ"}},psGv:function(Pe,we,Y){var ne,V;(function(){var D;(function(){"use strict";var W=[,,function(v){function m(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var o=new m(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},m.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},m.prototype.has_match=function(o){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(o))return!0;return!1},m.prototype.set_indent=function(o,h){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},m.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(o){this.__items.push(o);var h=o.lastIndexOf(`
|
|
`);h!==-1?this.__character_count=o.length-h:this.__character_count+=o.length},m.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function p(o,h){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),h=h||"",o.indent_level>0&&(h=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}p.prototype.get_indent_size=function(o,h){var s=this.__base_string_length;return h=h||0,o<0&&(s=0),s+=o*this.__indent_size,s+=h,s},p.prototype.get_indent_string=function(o,h){var s=this.__base_string;return h=h||0,o<0&&(o=0,s=""),h+=o*this.__indent_size,this.__ensure_cache(h),s+=this.__cache[h],s},p.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var o=this.__cache.length,h=0,s="";this.__indent_size&&o>=this.__indent_size&&(h=Math.floor(o/this.__indent_size),o-=h*this.__indent_size,s=new Array(h+1).join(this.__indent_string)),o&&(s+=new Array(o+1).join(" ")),this.__cache.push(s)};function c(o,h){this.__indent_cache=new p(o,h),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,h){return this.__indent_cache.get_indent_string(o,h)},c.prototype.get_indent_size=function(o,h){return this.__indent_cache.get_indent_size(o,h)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
|
|
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return o!==`
|
|
`&&(s=s.replace(/[\n]/g,o)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,h){return o=o||0,h=h||0,this.next_line.set_indent(o,h),this.__lines.length>1?(this.current_line.set_indent(o,h),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var h=0;h<o.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(o){for(var h=this.__lines.length;o<h;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,h){for(var s=this.__lines.length-2;s>=0;){var i=this.__lines[s];if(i.is_empty())break;if(i.item(0).indexOf(o)!==0&&i.item(-1)!==h){this.__lines.splice(s+1,0,new m(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},v.exports.Output=c},function(v){function m(p,c,o,h){this.type=p,this.text=c,this.comments_before=null,this.newlines=o||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}v.exports.Token=m},,,function(v){function m(o,h){this.raw_options=p(o,h),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}m.prototype._get_array=function(o,h){var s=this.raw_options[o],i=h||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(i=s.concat()):typeof s=="string"&&(i=s.split(/[^a-zA-Z0-9_\/\-]+/)),i},m.prototype._get_boolean=function(o,h){var s=this.raw_options[o],i=s===void 0?!!h:!!s;return i},m.prototype._get_characters=function(o,h){var s=this.raw_options[o],i=h||"";return typeof s=="string"&&(i=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),i},m.prototype._get_number=function(o,h){var s=this.raw_options[o];h=parseInt(h,10),isNaN(h)&&(h=0);var i=parseInt(s,10);return isNaN(i)&&(i=h),i},m.prototype._get_selection=function(o,h,s){var i=this._get_selection_list(o,h,s);if(i.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[o]+"'");return i[0]},m.prototype._get_selection_list=function(o,h,s){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[h[0]],!this._is_valid_selection(s,h))throw new Error("Invalid Default Value!");var i=this._get_array(o,s);if(!this._is_valid_selection(i,h))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[o]+"'");return i},m.prototype._is_valid_selection=function(o,h){return o.length&&h.length&&!o.some(function(s){return h.indexOf(s)===-1})};function p(o,h){var s={};o=c(o);var i;for(i in o)i!==h&&(s[i]=o[i]);if(h&&o[h])for(i in o[h])s[i]=o[h][i];return s}function c(o){var h={},s;for(s in o){var i=s.replace(/-/g,"_");h[i]=o[s]}return h}v.exports.Options=m,v.exports.normalizeOpts=c,v.exports.mergeOpts=p},,function(v){var m=RegExp.prototype.hasOwnProperty("sticky");function p(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position<this.__input_length},p.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},p.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(o=this.__input.charAt(c)),o},p.prototype.__match=function(c,o){c.lastIndex=o;var h=c.exec(this.__input);return h&&!(m&&c.sticky)&&(h.index!==o&&(h=null)),h},p.prototype.test=function(c,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(c,o):!1},p.prototype.testChar=function(c,o){var h=this.peek(o);return c.lastIndex=0,h!==null&&c.test(h)},p.prototype.match=function(c){var o=this.__match(c,this.__position);return o?this.__position+=o[0].length:o=null,o},p.prototype.read=function(c,o,h){var s="",i;return c&&(i=this.match(c),i&&(s+=i[0])),o&&(i||!c)&&(s+=this.readUntil(o,h)),s},p.prototype.readUntil=function(c,o){var h="",s=this.__position;c.lastIndex=this.__position;var i=c.exec(this.__input);return i?(s=i.index,o&&(s+=i[0].length)):s=this.__input_length,h=this.__input.substring(this.__position,s),this.__position=s,h},p.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},p.prototype.get_regexp=function(c,o){var h=null,s="g";return o&&m&&(s="y"),typeof c=="string"&&c!==""?h=new RegExp(c,s):c&&(h=new RegExp(c.source,s)),h},p.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},p.prototype.peekUntilAfter=function(c){var o=this.__position,h=this.readUntilAfter(c);return this.__position=o,h},p.prototype.lookBack=function(c){var o=this.__position-1;return o>=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},v.exports.InputScanner=p},function(v,m,p){var c=p(8).InputScanner,o=p(3).Token,h=p(10).TokenStream,s=p(11).WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(f,O){this._input=new c(f),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var f,O=new o(i.START,""),A=null,T=[],w=new h;O.type!==i.EOF;){for(f=this._get_next_token(O,A);this._is_comment(f);)w.add(f),f=this._get_next_token(O,A);w.isEmpty()||(f.comments_before=w,w=new h),f.parent=A,this._is_opening(f)?(T.push(A),A=f):A&&this._is_closing(f,A)&&(f.opened=A,A.closed=f,A=T.pop(),f.parent=A),f.previous=O,O.next=f,this.__tokens.add(f),O=f}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(f,O){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(i.RAW,A):this._create_token(i.EOF,"")},l.prototype._is_comment=function(f){return!1},l.prototype._is_opening=function(f){return!1},l.prototype._is_closing=function(f,O){return!1},l.prototype._create_token=function(f,O){var A=new o(f,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},v.exports.Tokenizer=l,v.exports.TOKEN=i},function(v){function m(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}m.prototype.restart=function(){this.__position=0},m.prototype.isEmpty=function(){return this.__tokens_length===0},m.prototype.hasNext=function(){return this.__position<this.__tokens_length},m.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__tokens[this.__position],this.__position+=1),p},m.prototype.peek=function(p){var c=null;return p=p||0,p+=this.__position,p>=0&&p<this.__tokens_length&&(c=this.__tokens[p]),c},m.prototype.add=function(p){this.__parent_token&&(p.parent=this.__parent_token),this.__tokens.push(p),this.__tokens_length+=1},v.exports.TokenStream=m},function(v,m,p){var c=p(12).Pattern;function o(h,s){c.call(this,h,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new c,o.prototype.__set_whitespace_patterns=function(h,s){h+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var s=this.__split(this._newline_regexp,h);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return h},o.prototype.matching=function(h,s){var i=this._create();return i.__set_whitespace_patterns(h,s),i._update(),i},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(h,s){h.lastIndex=0;for(var i=0,l=[],f=h.exec(s);f;)l.push(s.substring(i,f.index)),i=f.index+f[0].length,f=h.exec(s);return i<s.length?l.push(s.substring(i,s.length)):l.push(""),l},v.exports.WhitespacePattern=o},function(v){function m(p,c){this._input=p,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}m.prototype.read=function(){var p=this._input.read(this._starting_pattern);return(!this._starting_pattern||p)&&(p+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),p},m.prototype.read_match=function(){return this._input.match(this._match_pattern)},m.prototype.until_after=function(p){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(p),c._update(),c},m.prototype.until=function(p){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(p),c._update(),c},m.prototype.starting_with=function(p){var c=this._create();return c._starting_pattern=this._input.get_regexp(p,!0),c._update(),c},m.prototype.matching=function(p){var c=this._create();return c._match_pattern=this._input.get_regexp(p,!0),c._update(),c},m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){},v.exports.Pattern=m},function(v){function m(p,c){p=typeof p=="string"?p:p.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(p+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(p+/\sbeautify\signore:end\s/.source+c,"g")}m.prototype.get_directives=function(p){if(!p.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(p);o;)c[o[1]]=o[2],o=this.__directive_pattern.exec(p);return c},m.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},v.exports.Directives=m},function(v,m,p){var c=p(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(s,i){c.call(this,s,i),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var l=new c(s);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new c,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(s){var i=this._create();return i._disabled[s]=!0,i._update(),i},h.prototype.read_options=function(s){var i=this._create();for(var l in o)i._disabled[l]=s.templating.indexOf(l)===-1;return i._update(),i},h.prototype.exclude=function(s){var i=this._create();return i._excluded[s]=!0,i._update(),i},h.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var i=this._read_template();i;)this._match_pattern?i+=this._input.read(this._match_pattern):i+=this._input.readUntil(this.__template_pattern),s+=i,i=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},h.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},h.prototype._read_template=function(){var s="",i=this._input.peek();if(i==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(s=s||this.__patterns.erb.read())}else i==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},v.exports.TemplatablePattern=h},,,,function(v,m,p){var c=p(19).Beautifier,o=p(20).Options;function h(s,i,l,f){var O=new c(s,i,l,f);return O.beautify()}v.exports=h,v.exports.defaultOptions=function(){return new o}},function(v,m,p){var c=p(20).Options,o=p(2).Output,h=p(21).Tokenizer,s=p(21).TOKEN,i=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,f=function(E,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=E.max_preserve_newlines,this.preserve_newlines=E.preserve_newlines,this._output=new o(E,g)};f.prototype.current_line_has_match=function(E){return this._output.current_line.has_match(E)},f.prototype.set_space_before_token=function(E,g){this._output.space_before_token=E,this._output.non_breaking_space=g},f.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},f.prototype.add_raw_token=function(E){this._output.add_raw_token(E)},f.prototype.print_preserved_newlines=function(E){var g=0;E.type!==s.TEXT&&E.previous.type!==s.TEXT&&(g=E.newlines?1:0),this.preserve_newlines&&(g=E.newlines<this.max_preserve_newlines+1?E.newlines:this.max_preserve_newlines+1);for(var b=0;b<g;b++)this.print_newline(b>0);return g!==0},f.prototype.traverse_whitespace=function(E){return E.whitespace_before||E.newlines?(this.print_preserved_newlines(E)||(this._output.space_before_token=!0),!0):!1},f.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},f.prototype.print_newline=function(E){this._output.add_new_line(E)},f.prototype.print_token=function(E){E.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(E.text))},f.prototype.indent=function(){this.indent_level++},f.prototype.get_full_indent=function(E){return E=this.indent_level+(E||0),E<1?"":this._output.get_indent_string(E)};var O=function(E){for(var g=null,b=E.next;b.type!==s.EOF&&E.closed!==b;){if(b.type===s.ATTRIBUTE&&b.text==="type"){b.next&&b.next.type===s.EQUALS&&b.next.next&&b.next.next.type===s.VALUE&&(g=b.next.next.text);break}b=b.next}return g},A=function(E,g){var b=null,P=null;return g.closed?(E==="script"?b="text/javascript":E==="style"&&(b="text/css"),b=O(g)||b,b.search("text/css")>-1?P="css":b.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?P="javascript":b.search(/(text|application|dojo)\/(x-)?(html)/)>-1?P="html":b.search(/test\/null/)>-1&&(P="null"),P):null};function T(E,g){return g.indexOf(E)!==-1}function w(E,g,b){this.parent=E||null,this.tag=g?g.tag_name:"",this.indent_level=b||0,this.parser_token=g||null}function S(E){this._printer=E,this._current_frame=null}S.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},S.prototype.record_tag=function(E){var g=new w(this._current_frame,E,this._printer.indent_level);this._current_frame=g},S.prototype._try_pop_frame=function(E){var g=null;return E&&(g=E.parser_token,this._printer.indent_level=E.indent_level,this._current_frame=E.parent),g},S.prototype._get_frame=function(E,g){for(var b=this._current_frame;b&&!(E.indexOf(b.tag)!==-1);){if(g&&g.indexOf(b.tag)!==-1){b=null;break}b=b.parent}return b},S.prototype.try_pop=function(E,g){var b=this._get_frame([E],g);return this._try_pop_frame(b)},S.prototype.indent_to_tag=function(E){var g=this._get_frame(E);g&&(this._printer.indent_level=g.indent_level)};function x(E,g,b,P){this._source_text=E||"",g=g||{},this._js_beautify=b,this._css_beautify=P,this._tag_stack=null;var L=new c(g,"html");this._options=L,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
|
|
`,E&&i.test(E)&&(g=E.match(i)[0])),E=E.replace(l,`
|
|
`);var b=E.match(/^[\t ]*/)[0],P={text:"",type:""},L=new d,B=new f(this._options,b),U=new h(E,this._options).tokenize();this._tag_stack=new S(B);for(var C=null,_=U.next();_.type!==s.EOF;)_.type===s.TAG_OPEN||_.type===s.COMMENT?(C=this._handle_tag_open(B,_,L,P),L=C):_.type===s.ATTRIBUTE||_.type===s.EQUALS||_.type===s.VALUE||_.type===s.TEXT&&!L.tag_complete?C=this._handle_inside_tag(B,_,L,U):_.type===s.TAG_CLOSE?C=this._handle_tag_close(B,_,L):_.type===s.TEXT?C=this._handle_text(B,_,L):B.add_raw_token(_),P=C,_=U.next();var j=B._output.get_code(g);return j},x.prototype._handle_tag_close=function(E,g,b){var P={text:g.text,type:g.type};return E.alignment_size=0,b.tag_complete=!0,E.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.is_unformatted?E.add_raw_token(g):(b.tag_start_char==="<"&&(E.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&b.has_wrapped_attrs&&E.print_newline(!1)),E.print_token(g)),b.indent_content&&!(b.is_unformatted||b.is_content_unformatted)&&(E.indent(),b.indent_content=!1),!b.is_inline_element&&!(b.is_unformatted||b.is_content_unformatted)&&E.set_wrap_point(),P},x.prototype._handle_inside_tag=function(E,g,b,P){var L=b.has_wrapped_attrs,B={text:g.text,type:g.type};if(E.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),b.is_unformatted)E.add_raw_token(g);else if(b.tag_start_char==="{"&&g.type===s.TEXT)E.print_preserved_newlines(g)?(g.newlines=0,E.add_raw_token(g)):E.print_token(g);else{if(g.type===s.ATTRIBUTE?(E.set_space_before_token(!0),b.attr_count+=1):(g.type===s.EQUALS||g.type===s.VALUE&&g.previous.type===s.EQUALS)&&E.set_space_before_token(!1),g.type===s.ATTRIBUTE&&b.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(E.traverse_whitespace(g),L=L||g.newlines!==0),this._is_wrap_attributes_force)){var U=b.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&b.attr_count===1){var C=!0,_=0,j;do{if(j=P.peek(_),j.type===s.ATTRIBUTE){C=!1;break}_+=1}while(_<4&&j.type!==s.EOF&&j.type!==s.TAG_CLOSE);U=!C}U&&(E.print_newline(!1),L=!0)}E.print_token(g),L=L||E.previous_token_wrapped(),b.has_wrapped_attrs=L}return B},x.prototype._handle_text=function(E,g,b){var P={text:g.text,type:"TK_CONTENT"};return b.custom_beautifier_name?this._print_custom_beatifier_text(E,g,b):b.is_unformatted||b.is_content_unformatted?E.add_raw_token(g):(E.traverse_whitespace(g),E.print_token(g)),P},x.prototype._print_custom_beatifier_text=function(E,g,b){var P=this;if(g.text!==""){var L=g.text,B,U=1,C="",_="";b.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:b.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:b.custom_beautifier_name==="html"&&(B=function(ue,me){var fe=new x(ue,me,P._js_beautify,P._css_beautify);return fe.beautify()}),this._options.indent_scripts==="keep"?U=0:this._options.indent_scripts==="separate"&&(U=-E.indent_level);var j=E.get_full_indent(U);if(L=L.replace(/\n[ \t]*$/,""),b.custom_beautifier_name!=="html"&&L[0]==="<"&&L.match(/^(<!--|<!\[CDATA\[)/)){var K=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(L);if(!K){E.add_raw_token(g);return}C=j+K[1]+`
|
|
`,L=K[4],K[5]&&(_=j+K[5]),L=L.replace(/\n[ \t]*$/,""),(K[2]||K[3].indexOf(`
|
|
`)!==-1)&&(K=K[3].match(/[ \t]+$/),K&&(g.whitespace_before=K[0]))}if(L)if(B){var q=function(){this.eol=`
|
|
`};q.prototype=this._options.raw_options;var te=new q;L=B(j+L,te)}else{var _e=g.whitespace_before;_e&&(L=L.replace(new RegExp(`
|
|
(`+_e+")?","g"),`
|
|
`)),L=j+L.replace(/\n/g,`
|
|
`+j)}C&&(L?L=C+L+`
|
|
`+_:L=C+_),E.print_newline(!1),L&&(g.text=L,g.whitespace_before="",g.newlines=0,E.add_raw_token(g),E.print_newline(!0))}},x.prototype._handle_tag_open=function(E,g,b,P){var L=this._get_tag_open_token(g);return(b.is_unformatted||b.is_content_unformatted)&&!b.is_empty_element&&g.type===s.TAG_OPEN&&g.text.indexOf("</")===0?(E.add_raw_token(g),L.start_tag_token=this._tag_stack.try_pop(L.tag_name)):(E.traverse_whitespace(g),this._set_tag_position(E,g,L,b,P),L.is_inline_element||E.set_wrap_point(),E.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(L.alignment_size=g.text.length+1),!L.tag_complete&&!L.is_unformatted&&(E.alignment_size=L.alignment_size),L};var d=function(E,g){if(this.parent=E||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var b;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(b=g.text.match(/^<([^\s>]*)/),this.tag_check=b?b[1]:""):(b=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=b?b[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var P=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(P=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(P)))}};x.prototype._get_tag_open_token=function(E){var g=new d(this._tag_stack.get_parser_token(),E);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||T(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&T(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&T(g.tag_check,this._options.content_unformatted),g.is_inline_element=T(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},x.prototype._set_tag_position=function(E,g,b,P,L){if(b.is_empty_element||(b.is_end_tag?b.start_tag_token=this._tag_stack.try_pop(b.tag_name):(this._do_optional_end_element(b)&&(b.is_inline_element||E.print_newline(!1)),this._tag_stack.record_tag(b),(b.tag_name==="script"||b.tag_name==="style")&&!(b.is_unformatted||b.is_content_unformatted)&&(b.custom_beautifier_name=A(b.tag_check,g)))),T(b.tag_check,this._options.extra_liners)&&(E.print_newline(!1),E._output.just_added_blankline()||E.print_newline(!0)),b.is_empty_element){if(b.tag_start_char==="{"&&b.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),b.indent_content=!0;var B=E.current_line_has_match(/{{#if/);B||E.print_newline(!1)}b.tag_name==="!--"&&L.type===s.TAG_CLOSE&&P.is_end_tag&&b.text.indexOf(`
|
|
`)===-1||(b.is_inline_element||b.is_unformatted||E.print_newline(!1),this._calcluate_parent_multiline(E,b))}else if(b.is_end_tag){var U=!1;U=b.start_tag_token&&b.start_tag_token.multiline_content,U=U||!b.is_inline_element&&!(P.is_inline_element||P.is_unformatted)&&!(L.type===s.TAG_CLOSE&&b.start_tag_token===P)&&L.type!=="TK_CONTENT",(b.is_content_unformatted||b.is_unformatted)&&(U=!1),U&&E.print_newline(!1)}else b.indent_content=!b.custom_beautifier_name,b.tag_start_char==="<"&&(b.tag_name==="html"?b.indent_content=this._options.indent_inner_html:b.tag_name==="head"?b.indent_content=this._options.indent_head_inner_html:b.tag_name==="body"&&(b.indent_content=this._options.indent_body_inner_html)),!(b.is_inline_element||b.is_unformatted)&&(L.type!=="TK_CONTENT"||b.is_content_unformatted)&&E.print_newline(!1),this._calcluate_parent_multiline(E,b)},x.prototype._calcluate_parent_multiline=function(E,g){g.parent&&E._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var y=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],u=["a","audio","del","ins","map","noscript","video"];x.prototype._do_optional_end_element=function(E){var g=null;if(E.is_empty_element||!E.is_start_tag||!E.parent)return;if(E.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(E.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(E.tag_name==="dd"||E.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(E.parent.tag_name==="p"&&y.indexOf(E.tag_name)!==-1){var b=E.parent.parent;(!b||u.indexOf(b.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else E.tag_name==="rp"||E.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):E.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):E.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):E.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):E.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):E.tag_name==="tbody"||E.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):E.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(E.tag_name==="th"||E.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return E.parent=this._tag_stack.get_parser_token(),g},v.exports.Beautifier=x},function(v,m,p){var c=p(6).Options;function o(h){c.call(this,h,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new c,v.exports.Options=o},function(v,m,p){var c=p(9).Tokenizer,o=p(9).TOKEN,h=p(13).Directives,s=p(14).TemplatablePattern,i=p(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},f=new h(/<\!--/,/-->/),O=function(A,T){c.call(this,A,T),this._current_tag_name="";var w=new s(this._input).read_options(this._options),S=new i(this._input);if(this.__patterns={word:w.until(/[\n\r\t <]/),single_quote:w.until_after(/'/),double_quote:w.until_after(/"/),attribute:w.until(/[\n\r\t =>]|\/>/),element_name:w.until(/[\n\r\t >\/]/),handlebars_comment:S.starting_with(/{{!--/).until_after(/--}}/),handlebars:S.starting_with(/{{/).until_after(/}}/),handlebars_open:S.until(/[\n\r\t }]/),handlebars_raw_close:S.until(/}}/),comment:S.starting_with(/<!--/).until_after(/-->/),cdata:S.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:S.starting_with(/<!\[/).until_after(/]>/),processing:S.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var x=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=S.matching(x).until_after(x)}};O.prototype=new c,O.prototype._is_comment=function(A){return!1},O.prototype._is_opening=function(A){return A.type===l.TAG_OPEN},O.prototype._is_closing=function(A,T){return A.type===l.TAG_CLOSE&&T&&((A.text===">"||A.text==="/>")&&T.text[0]==="<"||A.text==="}}"&&T.text[0]==="{"&&T.text[1]==="{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(A,T){var w=null;this._readWhitespace();var S=this._input.peek();return S===null?this._create_token(l.EOF,""):(w=w||this._read_open_handlebars(S,T),w=w||this._read_attribute(S,A,T),w=w||this._read_close(S,T),w=w||this._read_raw_content(S,A,T),w=w||this._read_content_word(S),w=w||this._read_comment_or_cdata(S),w=w||this._read_processing(S),w=w||this._read_open(S,T),w=w||this._create_token(l.UNKNOWN,this._input.next()),w)},O.prototype._read_comment_or_cdata=function(A){var T=null,w=null,S=null;if(A==="<"){var x=this._input.peek(1);x==="!"&&(w=this.__patterns.comment.read(),w?(S=f.get_directives(w),S&&S.ignore==="start"&&(w+=f.readIgnored(this._input))):w=this.__patterns.cdata.read()),w&&(T=this._create_token(l.COMMENT,w),T.directives=S)}return T},O.prototype._read_processing=function(A){var T=null,w=null,S=null;if(A==="<"){var x=this._input.peek(1);(x==="!"||x==="?")&&(w=this.__patterns.conditional_comment.read(),w=w||this.__patterns.processing.read()),w&&(T=this._create_token(l.COMMENT,w),T.directives=S)}return T},O.prototype._read_open=function(A,T){var w=null,S=null;return T||A==="<"&&(w=this._input.next(),this._input.peek()==="/"&&(w+=this._input.next()),w+=this.__patterns.element_name.read(),S=this._create_token(l.TAG_OPEN,w)),S},O.prototype._read_open_handlebars=function(A,T){var w=null,S=null;return T||this._options.indent_handlebars&&A==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(w=this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars.read(),S=this._create_token(l.COMMENT,w)):(w=this.__patterns.handlebars_open.read(),S=this._create_token(l.TAG_OPEN,w))),S},O.prototype._read_close=function(A,T){var w=null,S=null;return T&&(T.text[0]==="<"&&(A===">"||A==="/"&&this._input.peek(1)===">")?(w=this._input.next(),A==="/"&&(w+=this._input.next()),S=this._create_token(l.TAG_CLOSE,w)):T.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),S=this._create_token(l.TAG_CLOSE,"}}"))),S},O.prototype._read_attribute=function(A,T,w){var S=null,x="";if(w&&w.text[0]==="<")if(A==="=")S=this._create_token(l.EQUALS,this._input.next());else if(A==='"'||A==="'"){var d=this._input.next();A==='"'?d+=this.__patterns.double_quote.read():d+=this.__patterns.single_quote.read(),S=this._create_token(l.VALUE,d)}else x=this.__patterns.attribute.read(),x&&(T.type===l.EQUALS?S=this._create_token(l.VALUE,x):S=this._create_token(l.ATTRIBUTE,x));return S},O.prototype._is_content_unformatted=function(A){return this._options.void_elements.indexOf(A)===-1&&(this._options.content_unformatted.indexOf(A)!==-1||this._options.unformatted.indexOf(A)!==-1)},O.prototype._read_raw_content=function(A,T,w){var S="";if(w&&w.text[0]==="{")S=this.__patterns.handlebars_raw_close.read();else if(T.type===l.TAG_CLOSE&&T.opened.text[0]==="<"&&T.text[0]!=="/"){var x=T.opened.text.substr(1).toLowerCase();if(x==="script"||x==="style"){var d=this._read_comment_or_cdata(A);if(d)return d.type=l.TEXT,d;S=this._input.readUntil(new RegExp("</"+x+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(x)&&(S=this._input.readUntil(new RegExp("</"+x+"[\\n\\r\\t ]*?>","ig")))}return S?this._create_token(l.TEXT,S):null},O.prototype._read_content_word=function(A){var T="";if(this._options.unformatted_content_delimiter&&(A===this._options.unformatted_content_delimiter[0]&&(T=this.__patterns.unformatted_content_delimiter.read())),T||(T=this.__patterns.word.read()),T)return this._create_token(l.TEXT,T)},v.exports.Tokenizer=O,v.exports.TOKEN=l}],F={};function M(v){var m=F[v];if(m!==void 0)return m.exports;var p=F[v]={exports:{}};return W[v](p,p.exports,M),p.exports}var R=M(18);D=R})();var z=D;if(!0)!(ne=[Y,Y("6UM0"),Y("TXwP")],V=function(W){var F=Y("6UM0"),M=Y("TXwP");return{html_beautify:function(R,v){return z(R,v,F.js_beautify,M.css_beautify)}}}.apply(we,ne),V!==void 0&&(Pe.exports=V));else var N,k})()},qgvg:function(Pe,we){Pe.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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UNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+":function(Pe,we,Y){"use strict";Y.d(we,"a",function(){return V});var ne=Y("Qw5x");function V(D,z){var N;if(typeof Symbol=="undefined"||D[Symbol.iterator]==null){if(Array.isArray(D)||(N=Object(ne.a)(D))||z&&D&&typeof D.length=="number"){N&&(D=N);var k=0,W=function(){};return{s:W,n:function(){return k>=D.length?{done:!0}:{done:!1,value:D[k++]}},e:function(m){throw m},f:W}}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 F=!0,M=!1,R;return{s:function(){N=D[Symbol.iterator]()},n:function(){var m=N.next();return F=m.done,m},e:function(m){M=!0,R=m},f:function(){try{!F&&N.return!=null&&N.return()}finally{if(M)throw R}}}}},rUJ1:function(Pe,we){const Y=/[&<>"']/,ne=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,z={"&":"&","<":"<",">":">",'"':""","'":"'"},N=S=>z[S];function k(S,x){if(x){if(Y.test(S))return S.replace(ne,N)}else if(V.test(S))return S.replace(D,N);return S}const W=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(S){return S.replace(W,(x,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const M=/(^|[^\[])\^/g;function R(S,x){S=S.source||S,x=x||"";const d={replace:(y,u)=>(u=u.source||u,u=u.replace(M,"$1"),S=S.replace(y,u),d),getRegex:()=>new RegExp(S,x)};return d}const v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(S,x,d){if(S){let y;try{y=decodeURIComponent(F(d)).replace(v,"").toLowerCase()}catch(u){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}x&&!m.test(d)&&(d=i(x,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch(y){return null}return d}const c={},o=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(S,x){c[" "+S]||(o.test(S)?c[" "+S]=S+"/":c[" "+S]=A(S,"/",!0)),S=c[" "+S];const d=S.indexOf(":")===-1;return x.substring(0,2)==="//"?d?x:S.replace(h,"$1")+x:x.charAt(0)==="/"?d?x:S.replace(s,"$1")+x:S+x}const l={exec:function(){}};function f(S){let x=1,d,y;for(;x<arguments.length;x++){d=arguments[x];for(y in d)Object.prototype.hasOwnProperty.call(d,y)&&(S[y]=d[y])}return S}function O(S,x){const d=S.replace(/\|/g,(E,g,b)=>{let P=!1,L=g;for(;--L>=0&&b[L]==="\\";)P=!P;return P?"|":" |"}),y=d.split(/ \|/);let u=0;if(y.length>x)y.splice(x);else for(;y.length<x;)y.push("");for(;u<y.length;u++)y[u]=y[u].trim().replace(/\\\|/g,"|");return y}function A(S,x,d){const y=S.length;if(y===0)return"";let u=0;for(;u<y;){const E=S.charAt(y-u-1);if(E===x&&!d)u++;else if(E!==x&&d)u++;else break}return S.substr(0,y-u)}function T(S,x){if(S.indexOf(x[1])===-1)return-1;const d=S.length;let y=0,u=0;for(;u<d;u++)if(S[u]==="\\")u++;else if(S[u]===x[0])y++;else if(S[u]===x[1]&&(y--,y<0))return u;return-1}function w(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")}Pe.exports={escape:k,unescape:F,edit:R,cleanUrl:p,resolveUrl:i,noopTest:l,merge:f,splitCells:O,rtrim:A,findClosingBracket:T,checkSanitizeDeprecation:w}},tWlo:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMi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iQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},ulZh:function(Pe,we,Y){typeof window!="undefined"&&function(V,D){Pe.exports=D()}(this,function(){return function(ne){var V={};function D(z){if(V[z])return V[z].exports;var N=V[z]={i:z,l:!1,exports:{}};return ne[z].call(N.exports,N,N.exports,D),N.l=!0,N.exports}return D.m=ne,D.c=V,D.d=function(z,N,k){D.o(z,N)||Object.defineProperty(z,N,{enumerable:!0,get:k})},D.r=function(z){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},D.t=function(z,N){if(N&1&&(z=D(z)),N&8)return z;if(N&4&&typeof z=="object"&&z&&z.__esModule)return z;var k=Object.create(null);if(D.r(k),Object.defineProperty(k,"default",{enumerable:!0,value:z}),N&2&&typeof z!="string")for(var W in z)D.d(k,W,function(F){return z[F]}.bind(null,W));return k},D.n=function(z){var N=z&&z.__esModule?function(){return z.default}:function(){return z};return D.d(N,"a",N),N},D.o=function(z,N){return Object.prototype.hasOwnProperty.call(z,N)},D.p="/dist/",D(D.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ne,V,D){"use strict";var z=Object.prototype.hasOwnProperty,N="~";function k(){}Object.create&&(k.prototype=Object.create(null),new k().__proto__||(N=!1));function W(v,m,p){this.fn=v,this.context=m,this.once=p||!1}function F(v,m,p,c,o){if(typeof p!="function")throw new TypeError("The listener must be a function");var h=new W(p,c||v,o),s=N?N+m:m;return v._events[s]?v._events[s].fn?v._events[s]=[v._events[s],h]:v._events[s].push(h):(v._events[s]=h,v._eventsCount++),v}function M(v,m){--v._eventsCount===0?v._events=new k:delete v._events[m]}function R(){this._events=new k,this._eventsCount=0}R.prototype.eventNames=function(){var m=[],p,c;if(this._eventsCount===0)return m;for(c in p=this._events)z.call(p,c)&&m.push(N?c.slice(1):c);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(p)):m},R.prototype.listeners=function(m){var p=N?N+m:m,c=this._events[p];if(!c)return[];if(c.fn)return[c.fn];for(var o=0,h=c.length,s=new Array(h);o<h;o++)s[o]=c[o].fn;return s},R.prototype.listenerCount=function(m){var p=N?N+m:m,c=this._events[p];return c?c.fn?1:c.length:0},R.prototype.emit=function(m,p,c,o,h,s){var i=N?N+m:m;if(!this._events[i])return!1;var l=this._events[i],f=arguments.length,O,A;if(l.fn){l.once&&this.removeListener(m,l.fn,void 0,!0);switch(f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,p),!0;case 3:return l.fn.call(l.context,p,c),!0;case 4:return l.fn.call(l.context,p,c,o),!0;case 5:return l.fn.call(l.context,p,c,o,h),!0;case 6:return l.fn.call(l.context,p,c,o,h,s),!0}for(A=1,O=new Array(f-1);A<f;A++)O[A-1]=arguments[A];l.fn.apply(l.context,O)}else{var T=l.length,w;for(A=0;A<T;A++){l[A].once&&this.removeListener(m,l[A].fn,void 0,!0);switch(f){case 1:l[A].fn.call(l[A].context);break;case 2:l[A].fn.call(l[A].context,p);break;case 3:l[A].fn.call(l[A].context,p,c);break;case 4:l[A].fn.call(l[A].context,p,c,o);break;default:if(!O)for(w=1,O=new Array(f-1);w<f;w++)O[w-1]=arguments[w];l[A].fn.apply(l[A].context,O)}}}return!0},R.prototype.on=function(m,p,c){return F(this,m,p,c,!1)},R.prototype.once=function(m,p,c){return F(this,m,p,c,!0)},R.prototype.removeListener=function(m,p,c,o){var h=N?N+m:m;if(!this._events[h])return this;if(!p)return M(this,h),this;var s=this._events[h];if(s.fn)s.fn===p&&(!o||s.once)&&(!c||s.context===c)&&M(this,h);else{for(var i=0,l=[],f=s.length;i<f;i++)(s[i].fn!==p||o&&!s[i].once||c&&s[i].context!==c)&&l.push(s[i]);l.length?this._events[h]=l.length===1?l[0]:l:M(this,h)}return this},R.prototype.removeAllListeners=function(m){var p;return m?(p=N?N+m:m,this._events[p]&&M(this,p)):(this._events=new k,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=N,R.EventEmitter=R,ne.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(ne,V,D){(function(z){var N=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,k=/^([^\/?#]*)([^]*)$/,W=/(?:\/|^)\.(?=\/)/g,F=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,M={buildAbsoluteURL:function(R,v,m){if(m=m||{},R=R.trim(),v=v.trim(),!v){if(!m.alwaysNormalize)return R;var p=M.parseURL(R);if(!p)throw new Error("Error trying to parse base URL.");return p.path=M.normalizePath(p.path),M.buildURLFromParts(p)}var c=M.parseURL(v);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return m.alwaysNormalize?(c.path=M.normalizePath(c.path),M.buildURLFromParts(c)):v;var o=M.parseURL(R);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var h=k.exec(o.path);o.netLoc=h[1],o.path=h[2]}o.netLoc&&!o.path&&(o.path="/");var s={scheme:o.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(s.netLoc=o.netLoc,c.path[0]!=="/"))if(!c.path)s.path=o.path,c.params||(s.params=o.params,c.query||(s.query=o.query));else{var i=o.path,l=i.substring(0,i.lastIndexOf("/")+1)+c.path;s.path=M.normalizePath(l)}return s.path===null&&(s.path=m.alwaysNormalize?M.normalizePath(c.path):c.path),M.buildURLFromParts(s)},parseURL:function(R){var v=N.exec(R);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(W,"");R.length!==(R=R.replace(F,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};ne.exports=M})(this)},"./node_modules/webworkify-webpack/index.js":function(ne,V,D){function z(m){var p={};function c(h){if(p[h])return p[h].exports;var s=p[h]={i:h,l:!1,exports:{}};return m[h].call(s.exports,s,s.exports,c),s.l=!0,s.exports}c.m=m,c.c=p,c.i=function(h){return h},c.d=function(h,s,i){c.o(h,s)||Object.defineProperty(h,s,{configurable:!1,enumerable:!0,get:i})},c.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},c.n=function(h){var s=h&&h.__esModule?function(){return h.default}:function(){return h};return c.d(s,"a",s),s},c.o=function(h,s){return Object.prototype.hasOwnProperty.call(h,s)},c.p="/",c.oe=function(h){throw console.error(h),h};var o=c(c.s=ENTRY_MODULE);return o.default||o}var N="[\\.|\\-|\\+|\\w|/|@]+",k="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+N+").*?\\)";function W(m){return(m+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function F(m){return!isNaN(1*m)}function M(m,p,c){var o={};o[c]=[];var h=p.toString(),s=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var i=s[1],l=new RegExp("(\\\\n|\\W)"+W(i)+k,"g"),f;f=l.exec(h);){if(f[3]==="dll-reference")continue;o[c].push(f[3])}for(l=new RegExp("\\("+W(i)+'\\("(dll-reference\\s('+N+'))"\\)\\)'+k,"g");f=l.exec(h);)m[f[2]]||(o[c].push(f[1]),m[f[2]]=D(f[1]).m),o[f[2]]=o[f[2]]||[],o[f[2]].push(f[4]);for(var O=Object.keys(o),A=0;A<O.length;A++)for(var T=0;T<o[O[A]].length;T++)F(o[O[A]][T])&&(o[O[A]][T]=1*o[O[A]][T]);return o}function R(m){var p=Object.keys(m);return p.reduce(function(c,o){return c||m[o].length>0},!1)}function v(m,p){for(var c={main:[p]},o={main:[]},h={main:{}};R(c);)for(var s=Object.keys(c),i=0;i<s.length;i++){var l=s[i],f=c[l],O=f.pop();if(h[l]=h[l]||{},h[l][O]||!m[l][O])continue;h[l][O]=!0,o[l]=o[l]||[],o[l].push(O);for(var A=M(m,m[l][O],l),T=Object.keys(A),w=0;w<T.length;w++)c[T[w]]=c[T[w]]||[],c[T[w]]=c[T[w]].concat(A[T[w]])}return o}ne.exports=function(m,p){p=p||{};var c={main:D.m},o=p.all?{main:Object.keys(c.main)}:v(c,m),h="";Object.keys(o).filter(function(O){return O!=="main"}).forEach(function(O){for(var A=0;o[O][A];)A++;o[O].push(A),c[O][A]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+O+" = ("+z.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+o[O].map(function(T){return""+JSON.stringify(T)+": "+c[O][T].toString()}).join(",")+`});
|
|
`}),h=h+"new (("+z.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+o.main.map(function(O){return""+JSON.stringify(O)+": "+c.main[O].toString()}).join(",")+"}))(self);";var s=new window.Blob([h],{type:"text/javascript"});if(p.bare)return s;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,l=i.createObjectURL(s),f=new window.Worker(l);return f.objectURL=l,f}},"./src/config.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"hlsDefaultConfig",function(){return w}),D.d(V,"mergeConfig",function(){return x}),D.d(V,"enableStreamingMode",function(){return d});var z=D("./src/controller/abr-controller.ts"),N=D("./src/controller/audio-stream-controller.ts"),k=D("./src/controller/audio-track-controller.ts"),W=D("./src/controller/subtitle-stream-controller.ts"),F=D("./src/controller/subtitle-track-controller.ts"),M=D("./src/controller/buffer-controller.ts"),R=D("./src/controller/timeline-controller.ts"),v=D("./src/controller/cap-level-controller.ts"),m=D("./src/controller/fps-controller.ts"),p=D("./src/controller/eme-controller.ts"),c=D("./src/controller/cmcd-controller.ts"),o=D("./src/utils/xhr-loader.ts"),h=D("./src/utils/fetch-loader.ts"),s=D("./src/utils/cues.ts"),i=D("./src/utils/mediakeys-helper.ts"),l=D("./src/utils/logger.ts");function f(){return f=Object.assign||function(y){for(var u=1;u<arguments.length;u++){var E=arguments[u];for(var g in E)Object.prototype.hasOwnProperty.call(E,g)&&(y[g]=E[g])}return y},f.apply(this,arguments)}function O(y,u){var E=Object.keys(y);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(y);u&&(g=g.filter(function(b){return Object.getOwnPropertyDescriptor(y,b).enumerable})),E.push.apply(E,g)}return E}function A(y){for(var u=1;u<arguments.length;u++){var E=arguments[u]!=null?arguments[u]:{};u%2?O(Object(E),!0).forEach(function(g){T(y,g,E[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(E)):O(Object(E)).forEach(function(g){Object.defineProperty(y,g,Object.getOwnPropertyDescriptor(E,g))})}return y}function T(y,u,E){return u in y?Object.defineProperty(y,u,{value:E,enumerable:!0,configurable:!0,writable:!0}):y[u]=E,y}var w=A(A({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:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:z.default,bufferController:M.default,capLevelController:v.default,fpsController:m.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:W.SubtitleStreamController,subtitleTrackController:F.default,timelineController:R.TimelineController,audioStreamController:N.default,audioTrackController:k.default,emeController:p.default,cmcdController:c.default});function S(){return{cueHandler:s.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 x(y,u){if((u.liveSyncDurationCount||u.liveMaxLatencyDurationCount)&&(u.liveSyncDuration||u.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(u.liveMaxLatencyDurationCount!==void 0&&(u.liveSyncDurationCount===void 0||u.liveMaxLatencyDurationCount<=u.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(u.liveMaxLatencyDuration!==void 0&&(u.liveSyncDuration===void 0||u.liveMaxLatencyDuration<=u.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return f({},y,u)}function d(y){var u=y.loader;if(u!==h.default&&u!==o.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var E=Object(h.fetchSupported)();E&&(y.loader=h.default,y.progressive=!0,y.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/polyfills/number.ts"),N=D("./src/utils/ewma-bandwidth-estimator.ts"),k=D("./src/events.ts"),W=D("./src/utils/buffer-helper.ts"),F=D("./src/errors.ts"),M=D("./src/types/loader.ts"),R=D("./src/utils/logger.ts");function v(c,o){for(var h=0;h<o.length;h++){var s=o[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(c,s.key,s)}}function m(c,o,h){return o&&v(c.prototype,o),h&&v(c,h),c}var p=function(){function c(h){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=h;var s=h.config;this.bwEstimator=new N.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var o=c.prototype;return o.registerListeners=function(){var s=this.hls;s.on(k.Events.FRAG_LOADING,this.onFragLoading,this),s.on(k.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(k.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var s=this.hls;s.off(k.Events.FRAG_LOADING,this.onFragLoading,this),s.off(k.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(k.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(s,i){var l=i.frag;if(l.type===M.PlaylistLevelType.MAIN&&!this.timer){var f;this.fragCurrent=l,this.partCurrent=(f=i.part)!=null?f:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(s,i){var l=this.hls.config;i.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var s=this.fragCurrent,i=this.partCurrent,l=this.hls,f=l.autoLevelEnabled,O=l.config,A=l.media;if(!s||!A)return;var T=i?i.stats:s.stats,w=i?i.duration:s.duration;if(T.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!f||A.paused||!A.playbackRate||!A.readyState)return;var S=performance.now()-T.loading.start,x=Math.abs(A.playbackRate);if(S<=500*w/x)return;var d=l.levels,y=l.minAutoLevel,u=d[s.level],E=T.total||Math.max(T.loaded,Math.round(w*u.maxBitrate/8)),g=Math.max(1,T.bwEstimate?T.bwEstimate/8:T.loaded*1e3/S),b=(E-T.loaded)/g,P=A.currentTime,L=(W.BufferHelper.bufferInfo(A,P,O.maxBufferHole).end-P)/x;if(L>=2*w/x||b<=L)return;var B=Number.POSITIVE_INFINITY,U;for(U=s.level-1;U>y;U--){var C=d[U].maxBitrate;if(B=w*C/(8*.8*g),B<L)break}if(B>=b)return;var _=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+s.sn+(i?" part "+i.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+U+`
|
|
Current BW estimate: `+(Object(z.isFiniteNumber)(_)?(_/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+b.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
Time to underbuffer: `+L.toFixed(3)+" s"),l.nextLoadLevel=U,this.bwEstimator.sample(S,T.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),l.trigger(k.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:i,stats:T})},o.onFragLoaded=function(s,i){var l=i.frag,f=i.part;if(l.type===M.PlaylistLevelType.MAIN&&Object(z.isFiniteNumber)(l.sn)){var O=f?f.stats:l.stats,A=f?f.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var T=this.hls.levels[l.level],w=(T.loaded?T.loaded.bytes:0)+O.loaded,S=(T.loaded?T.loaded.duration:0)+A;T.loaded={bytes:w,duration:S},T.realBitrate=Math.round(8*w/S)}if(l.bitrateTest){var x={stats:O,frag:l,part:f,id:l.type};this.onFragBuffered(k.Events.FRAG_BUFFERED,x),l.bitrateTest=!1}}},o.onFragBuffered=function(s,i){var l=i.frag,f=i.part,O=f?f.stats:l.stats;if(O.aborted)return;if(l.type!==M.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var A=O.parsing.end-O.loading.start;this.bwEstimator.sample(A,O.loaded),O.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0},o.onError=function(s,i){switch(i.details){case F.ErrorDetails.FRAG_LOAD_ERROR:case F.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var s=this.fragCurrent,i=this.partCurrent,l=this.hls,f=l.maxAutoLevel,O=l.config,A=l.minAutoLevel,T=l.media,w=i?i.duration:s?s.duration:0,S=T?T.currentTime:0,x=T&&T.playbackRate!==0?Math.abs(T.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():O.abrEwmaDefaultEstimate,y=(W.BufferHelper.bufferInfo(T,S,O.maxBufferHole).end-S)/x,u=this.findBestLevel(d,A,f,y,O.abrBandWidthFactor,O.abrBandWidthUpFactor);if(u>=0)return u;R.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var E=w?Math.min(w,O.maxStarvationDelay):O.maxStarvationDelay,g=O.abrBandWidthFactor,b=O.abrBandWidthUpFactor;if(!y){var P=this.bitrateTestDelay;if(P){var L=w?Math.min(w,O.maxLoadingDelay):O.maxLoadingDelay;E=L-P,R.logger.trace("bitrate test took "+Math.round(1e3*P)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*E)+" ms"),g=b=1}}return u=this.findBestLevel(d,A,f,y+E,g,b),Math.max(u,0)},o.findBestLevel=function(s,i,l,f,O,A){for(var T,w=this.fragCurrent,S=this.partCurrent,x=this.lastLoadedFragLevel,d=this.hls.levels,y=d[x],u=!!(y!=null&&(T=y.details)!==null&&T!==void 0&&T.live),E=y==null?void 0:y.codecSet,g=S?S.duration:w?w.duration:0,b=l;b>=i;b--){var P=d[b];if(!P||E&&P.codecSet!==E)continue;var L=P.details,B=(S?L==null?void 0:L.partTarget:L==null?void 0:L.averagetargetduration)||g,U=void 0;b<=x?U=O*s:U=A*s;var C=d[b].maxBitrate,_=C*B/U;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+b+"/"+Math.round(U)+"/"+C+"/"+B+"/"+f+"/"+_),U>C&&(!_||u&&!this.bitrateTestDelay||_<f))return b}return-1},m(c,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,i=this.bwEstimator;if(s!==-1&&(!i||!i.canEstimate()))return s;var l=this.getNextABRAutoLevel();return s!==-1&&(l=Math.min(s,l)),l},set:function(s){this._nextAutoLevel=s}}]),c}();V.default=p},"./src/controller/audio-stream-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/polyfills/number.ts"),N=D("./src/controller/base-stream-controller.ts"),k=D("./src/events.ts"),W=D("./src/utils/buffer-helper.ts"),F=D("./src/controller/fragment-tracker.ts"),M=D("./src/types/level.ts"),R=D("./src/types/loader.ts"),v=D("./src/loader/fragment.ts"),m=D("./src/demux/chunk-cache.ts"),p=D("./src/demux/transmuxer-interface.ts"),c=D("./src/types/transmuxer.ts"),o=D("./src/controller/fragment-finders.ts"),h=D("./src/utils/discontinuities.ts"),s=D("./src/errors.ts"),i=D("./src/utils/logger.ts");function l(){return l=Object.assign||function(w){for(var S=1;S<arguments.length;S++){var x=arguments[S];for(var d in x)Object.prototype.hasOwnProperty.call(x,d)&&(w[d]=x[d])}return w},l.apply(this,arguments)}function f(w,S){w.prototype=Object.create(S.prototype),w.prototype.constructor=w,O(w,S)}function O(w,S){return O=Object.setPrototypeOf||function(d,y){return d.__proto__=y,d},O(w,S)}var A=100,T=function(w){f(S,w);function S(d,y){var u;return u=w.call(this,d,y,"[audio-stream-controller]")||this,u.videoBuffer=null,u.videoTrackCC=-1,u.waitingVideoCC=-1,u.audioSwitch=!1,u.trackId=-1,u.waitingData=null,u.mainDetails=null,u.bufferFlushed=!1,u._registerListeners(),u}var x=S.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var y=this.hls;y.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(k.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(k.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(k.Events.ERROR,this.onError,this),y.on(k.Events.BUFFER_RESET,this.onBufferReset,this),y.on(k.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(k.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var y=this.hls;y.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(k.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(k.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(k.Events.ERROR,this.onError,this),y.off(k.Events.BUFFER_RESET,this.onBufferReset,this),y.off(k.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(k.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(y,u){var E=u.frag,g=u.id,b=u.initPTS;if(g==="main"){var P=E.cc;this.initPTS[E.cc]=b,this.log("InitPTS for cc: "+P+" found from main: "+b),this.videoTrackCC=P,this.state===N.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=N.State.STOPPED;return}var u=this.lastCurrentTime;this.stopLoad(),this.setInterval(A),this.fragLoadError=0,u>0&&y===-1?(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),this.state=N.State.IDLE):(this.loadedmetadata=!1,this.state=N.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},x.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_TRACK:{var y,u=this.levels,E=this.trackId,g=u==null||((y=u[E])===null||y===void 0)?void 0:y.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=N.State.WAITING_INIT_PTS}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var b,P=performance.now(),L=this.retryDate;(!L||P>=L||(b=this.media)!==null&&b!==void 0&&b.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=N.State.IDLE);break}case N.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var U=B.frag,C=B.part,_=B.cache,j=B.complete;if(this.initPTS[U.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=N.State.FRAG_LOADING;var K=_.flush(),q={frag:U,part:C,payload:K,networkDetails:null};this._handleFragmentLoadProgress(q),j&&w.prototype._handleFragmentLoadComplete.call(this,q)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+U.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var te=this.getLoadPosition(),_e=W.BufferHelper.bufferInfo(this.mediaBuffer,te,this.config.maxBufferHole),ue=Object(o.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,U);ue<0&&(i.logger.log("Waiting fragment cc ("+U.cc+") @ "+U.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=N.State.IDLE}}this.onTickEnd()},x.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=N.State.IDLE)},x.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var u=this.mediaBuffer?this.mediaBuffer:y,E=u.buffered;!this.loadedmetadata&&E.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},x.doTickIdle=function(){var y,u,E=this.hls,g=this.levels,b=this.media,P=this.trackId,L=E.config;if(!g||!g[P])return;if(!b&&(this.startFragRequested||!L.startFragPrefetch))return;var B=g[P],U=B.details;if(!U||U.live&&this.levelLastLoaded!==P||this.waitForCdnTuneIn(U)){this.state=N.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,R.PlaylistLevelType.AUDIO));var C=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,R.PlaylistLevelType.AUDIO);if(C===null)return;var _=C.len,j=this.getMaxBufferLength(),K=this.audioSwitch;if(_>=j&&!K)return;if(!K&&this._streamEnded(C,U)){E.trigger(k.Events.BUFFER_EOS,{type:"audio"}),this.state=N.State.ENDED;return}var q=U.fragments,te=q[0].start,_e=C.end;if(K){var ue=this.getLoadPosition();_e=ue,U.PTSKnown&&ue<te&&((C.end>te||C.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),b.currentTime=te+.05))}var me=this.getNextFragment(_e,U);if(!me){this.bufferFlushed=!0;return}((y=me.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((u=me.decryptdata)!==null&&u!==void 0&&u.key)?this.loadKey(me,U):this.loadFragment(me,U,_e)},x.getMaxBufferLength=function(){var y=w.prototype.getMaxBufferLength.call(this),u=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return u===null?y:Math.max(y,u.len)},x.onMediaDetaching=function(){this.videoBuffer=null,w.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(y,u){var E=u.audioTracks;this.resetTransmuxer(),this.levels=E.map(function(g){return new M.Level(g)})},x.onAudioTrackSwitching=function(y,u){var E=!!u.url;this.trackId=u.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),E?this.setInterval(A):this.resetTransmuxer(),E?(this.audioSwitch=!0,this.state=N.State.IDLE):this.state=N.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(y,u){this.mainDetails=u.details},x.onAudioTrackLoaded=function(y,u){var E,g=this.levels,b=u.details,P=u.id;if(!g){this.warn("Audio tracks were reset while loading level "+P);return}this.log("Track "+P+" loaded ["+b.startSN+","+b.endSN+"],duration:"+b.totalduration);var L=g[P],B=0;if(b.live||(E=L.details)!==null&&E!==void 0&&E.live){var U=this.mainDetails;if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed||!U)return;!L.details&&b.hasProgramDateTime&&U.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(b,U),B=b.fragments[0].start):B=this.alignPlaylists(b,L.details)}L.details=b,this.levelLastLoaded=P,!this.startFragRequested&&(this.mainDetails||!b.live)&&this.setStartPosition(L.details,B),this.state===N.State.WAITING_TRACK&&!this.waitForCdnTuneIn(b)&&(this.state=N.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(y){var u,E=y.frag,g=y.part,b=y.payload,P=this.config,L=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+E.sn+" of level "+E.level+" will not be buffered");return}var U=B[L];console.assert(U,"Audio track is defined on fragment load progress");var C=U.details;console.assert(C,"Audio track details are defined on fragment load progress");var _=P.defaultAudioCodec||U.audioCodec||"mp4a.40.2",j=this.transmuxer;j||(j=this.transmuxer=new p.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var K=this.initPTS[E.cc],q=(u=E.initSegment)===null||u===void 0?void 0:u.data;if(K!==void 0){var te=!1,_e=g?g.index:-1,ue=_e!==-1,me=new c.ChunkMetadata(E.level,E.sn,E.stats.chunkCount,b.byteLength,_e,ue);j.push(b,q,_,"",E,g,C.totalduration,te,me,K)}else{i.logger.log("Unknown video PTS for cc "+E.cc+", waiting for video PTS before demuxing audio frag "+E.sn+" of ["+C.startSN+" ,"+C.endSN+"],track "+L);var fe=this.waitingData=this.waitingData||{frag:E,part:g,cache:new m.default,complete:!1},le=fe.cache;le.push(new Uint8Array(b)),this.waitingVideoCC=this.videoTrackCC,this.state=N.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}w.prototype._handleFragmentLoadComplete.call(this,y)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(y,u){var E=u.tracks.audio;E&&(this.mediaBuffer=E.buffer),u.tracks.video&&(this.videoBuffer=u.tracks.video.buffer)},x.onFragBuffered=function(y,u){var E=u.frag,g=u.part;if(E.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(E)){this.warn("Fragment "+E.sn+(g?" p: "+g.index:"")+" of level "+E.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}E.sn!=="initSegment"&&(this.fragPrevious=E,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(E,g)},x.onError=function(y,u){switch(u.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.AUDIO,u);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==N.State.ERROR&&this.state!==N.State.STOPPED&&(this.state=u.fatal?N.State.ERROR:N.State.IDLE,this.warn(u.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(u.parent==="audio"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var E=!0,g=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);g&&g.len>.5&&(E=!this.reduceMaxBufferLength(g.len)),E&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},x.onBufferFlushed=function(y,u){var E=u.type;E===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(y){var u,E="audio",g=this.hls,b=y.remuxResult,P=y.chunkMeta,L=this.getCurrentContext(P);if(!L){this.warn("The loading context changed while buffering fragment "+P.sn+" of level "+P.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(P.level);return}var B=L.frag,U=L.part,C=b.audio,_=b.text,j=b.id3,K=b.initSegment;if(this.fragContextChanged(B))return;if(this.state=N.State.PARSING,this.audioSwitch&&C&&this.completeAudioSwitch(),K!=null&&K.tracks&&(this._bufferInitSegment(K.tracks,B,P),g.trigger(k.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:E,tracks:K.tracks})),C){var q=C.startPTS,te=C.endPTS,_e=C.startDTS,ue=C.endDTS;U&&(U.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:q,endPTS:te,startDTS:_e,endDTS:ue}),B.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,q,te,_e,ue),this.bufferFragmentData(C,B,U,P)}if(j!=null&&(u=j.samples)!==null&&u!==void 0&&u.length){var me=l({frag:B,id:E},j);g.trigger(k.Events.FRAG_PARSING_METADATA,me)}if(_){var fe=l({frag:B,id:E},_);g.trigger(k.Events.FRAG_PARSING_USERDATA,fe)}},x._bufferInitSegment=function(y,u,E){if(this.state!==N.State.PARSING)return;y.video&&delete y.video;var g=y.audio;if(!g)return;g.levelCodec=g.codec,g.id="audio",this.log("Init audio buffer, container:"+g.container+", codecs[parsed]=["+g.codec+"]"),this.hls.trigger(k.Events.BUFFER_CODECS,y);var b=g.initSegment;if(b!=null&&b.byteLength){var P={type:"audio",frag:u,part:null,chunkMeta:E,parent:u.type,data:b};this.hls.trigger(k.Events.BUFFER_APPENDING,P)}this.tick()},x.loadFragment=function(y,u,E){var g=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||g===F.FragmentState.NOT_LOADED||g===F.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):u.live&&!Object(z.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=N.State.WAITING_INIT_PTS):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,y,u,E)))},x.completeAudioSwitch=function(){var y=this.hls,u=this.media,E=this.trackId;u&&(this.log("Switching audio track : flushing all audio"),w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,y.trigger(k.Events.AUDIO_TRACK_SWITCHED,{id:E})},S}(N.default);V.default=T},"./src/controller/audio-track-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts"),N=D("./src/errors.ts"),k=D("./src/controller/base-playlist-controller.ts"),W=D("./src/types/loader.ts");function F(p,c){for(var o=0;o<c.length;o++){var h=c[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(p,h.key,h)}}function M(p,c,o){return c&&F(p.prototype,c),o&&F(p,o),p}function R(p,c){p.prototype=Object.create(c.prototype),p.prototype.constructor=p,v(p,c)}function v(p,c){return v=Object.setPrototypeOf||function(h,s){return h.__proto__=s,h},v(p,c)}var m=function(p){R(c,p);function c(h){var s;return s=p.call(this,h,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var o=c.prototype;return o.registerListeners=function(){var s=this.hls;s.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(z.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var s=this.hls;s.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(z.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(s,i){this.tracks=i.audioTracks||[]},o.onAudioTrackLoaded=function(s,i){var l=i.id,f=i.details,O=this.tracksInGroup[l];if(!O){this.warn("Invalid audio track id "+l);return}var A=O.details;O.details=i.details,this.log("audioTrack "+l+" loaded ["+f.startSN+"-"+f.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,i,A))},o.onLevelLoading=function(s,i){this.switchLevel(i.level)},o.onLevelSwitching=function(s,i){this.switchLevel(i.level)},o.switchLevel=function(s){var i=this.hls.levels[s];if(!(i!=null&&i.audioGroupIds))return;var l=i.audioGroupIds[i.urlId];if(this.groupId!==l){this.groupId=l;var f=this.tracks.filter(function(A){return!l||A.groupId===l});this.selectDefaultTrack&&!f.some(function(A){return A.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=f;var O={audioTracks:f};this.log("Updating audio tracks, "+f.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(z.Events.AUDIO_TRACKS_UPDATED,O),this.selectInitialTrack()}},o.onError=function(s,i){if(p.prototype.onError.call(this,s,i),i.fatal||!i.context)return;i.context.type===W.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},o.setAudioTrack=function(s){var i=this.tracksInGroup;if(s<0||s>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=i[this.trackId];this.log("Now switching to audio-track index "+s);var f=i[s],O=f.id,A=f.groupId,T=A===void 0?"":A,w=f.name,S=f.type,x=f.url;if(this.trackId=s,this.trackName=w,this.selectDefaultTrack=!1,this.hls.trigger(z.Events.AUDIO_TRACK_SWITCHING,{id:O,groupId:T,name:w,type:S,url:x}),f.details&&!f.details.live)return;var d=this.switchParams(f.url,l==null?void 0:l.details);this.loadPlaylist(d)},o.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,l=this.findTrackId(i)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(s){for(var i=this.tracksInGroup,l=0;l<i.length;l++){var f=i[l];if((!this.selectDefaultTrack||f.default)&&(!s||s===f.name))return f.id}return-1},o.loadPlaylist=function(s){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var l=i.id,f=i.groupId,O=i.url;if(s)try{O=s.addDirectives(O)}catch(A){this.warn("Could not construct new URL with HLS Delivery Directives: "+A)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(z.Events.AUDIO_TRACK_LOADING,{url:O,id:l,groupId:f,deliveryDirectives:s||null})}},M(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),c}(k.default);V.default=m},"./src/controller/base-playlist-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return M});var z=D("./src/polyfills/number.ts"),N=D("./src/types/level.ts"),k=D("./src/controller/level-helper.ts"),W=D("./src/utils/logger.ts"),F=D("./src/errors.ts"),M=function(){function R(m,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=W.logger.log.bind(W.logger,p+":"),this.warn=W.logger.warn.bind(W.logger,p+":"),this.hls=m}var v=R.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(p,c){c.fatal&&c.type===F.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(p,c){var o=c==null?void 0:c.renditionReports;if(o)for(var h=0;h<o.length;h++){var s=o[h],i=""+s.URI;if(i===p.substr(-i.length)){var l=parseInt(s["LAST-MSN"]),f=parseInt(s["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var O=Math.min(c.age-c.partTarget,c.targetduration);f!==void 0&&O>c.partTarget&&(f+=1)}if(Object(z.isFiniteNumber)(l))return new N.HlsUrlParameters(l,Object(z.isFiniteNumber)(f)?f:void 0,N.HlsSkip.No)}}},v.loadPlaylist=function(p){},v.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},v.playlistLoaded=function(p,c,o){var h=this,s=c.details,i=c.stats,l=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(s.advancedDateTime=Date.now()-l,s.live||o!=null&&o.live){if(s.reloaded(o),o&&this.log("live playlist "+p+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),o&&s.fragments.length>0&&Object(k.mergeDetails)(o,s),!this.canLoad||!s.live)return;var f,O=void 0,A=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var T=this.hls.config.lowLatencyMode,w=s.lastPartSn,S=s.endSN,x=s.lastPartIndex,d=x!==-1,y=w===S,u=T?0:x;d?(O=y?S+1:w,A=y?u:x+1):O=S+1;var E=s.age,g=E+s.ageHeader,b=Math.min(g-s.partTarget,s.targetduration*1.5);if(b>0){if(o&&b>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+b+" with playlist age: "+s.age),b=0;else{var P=Math.floor(b/s.targetduration);if(O+=P,A!==void 0){var L=Math.round(b%s.targetduration/s.partTarget);A+=L}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+E.toFixed(2)+"s goal: "+b+" skip sn "+P+" to part "+A)}s.tuneInGoal=b}if(f=this.getDeliveryDirectives(s,c.deliveryDirectives,O,A),T||!y){this.loadPlaylist(f);return}}else f=this.getDeliveryDirectives(s,c.deliveryDirectives,O,A);var B=Object(k.computeReloadInterval)(s,i);O!==void 0&&s.canBlockReload&&(B-=s.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return h.loadPlaylist(f)},B)}else this.clearTimer()},v.getDeliveryDirectives=function(p,c,o,h){var s=Object(N.getSkipValue)(p,o);return c!=null&&c.skip&&p.deltaUpdateFailed&&(o=c.msn,h=c.part,s=N.HlsSkip.No),new N.HlsUrlParameters(o,h,s)},v.retryLoadingOrFail=function(p){var c=this,o=this.hls.config,h=this.retryCount<o.levelLoadingMaxRetry;if(h){var s;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(s=p.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return h},R}()},"./src/controller/base-stream-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"State",function(){return S}),D.d(V,"default",function(){return x});var z=D("./src/polyfills/number.ts"),N=D("./src/task-loop.ts"),k=D("./src/controller/fragment-tracker.ts"),W=D("./src/utils/buffer-helper.ts"),F=D("./src/utils/logger.ts"),M=D("./src/events.ts"),R=D("./src/errors.ts"),v=D("./src/types/transmuxer.ts"),m=D("./src/utils/mp4-tools.ts"),p=D("./src/utils/discontinuities.ts"),c=D("./src/controller/fragment-finders.ts"),o=D("./src/controller/level-helper.ts"),h=D("./src/loader/fragment-loader.ts"),s=D("./src/crypt/decrypter.ts"),i=D("./src/utils/time-ranges.ts"),l=D("./src/types/loader.ts");function f(d,y){for(var u=0;u<y.length;u++){var E=y[u];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(d,E.key,E)}}function O(d,y,u){return y&&f(d.prototype,y),u&&f(d,u),d}function A(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function T(d,y){d.prototype=Object.create(y.prototype),d.prototype.constructor=d,w(d,y)}function w(d,y){return w=Object.setPrototypeOf||function(E,g){return E.__proto__=g,E},w(d,y)}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"},x=function(d){T(y,d);function y(E,g,b){var P;return P=d.call(this)||this,P.hls=void 0,P.fragPrevious=null,P.fragCurrent=null,P.fragmentTracker=void 0,P.transmuxer=null,P._state=S.STOPPED,P.media=void 0,P.mediaBuffer=void 0,P.config=void 0,P.bitrateTest=!1,P.lastCurrentTime=0,P.nextLoadPosition=0,P.startPosition=0,P.loadedmetadata=!1,P.fragLoadError=0,P.retryDate=0,P.levels=null,P.fragmentLoader=void 0,P.levelLastLoaded=null,P.startFragRequested=!1,P.decrypter=void 0,P.initPTS=[],P.onvseeking=null,P.onvended=null,P.logPrefix="",P.log=void 0,P.warn=void 0,P.logPrefix=b,P.log=F.logger.log.bind(F.logger,b+":"),P.warn=F.logger.warn.bind(F.logger,b+":"),P.hls=E,P.fragmentLoader=new h.default(E.config),P.fragmentTracker=g,P.config=E.config,P.decrypter=new s.default(E,E.config),E.on(M.Events.KEY_LOADED,P.onKeyLoaded,A(P)),P}var u=y.prototype;return u.doTick=function(){this.onTickEnd()},u.onTickEnd=function(){},u.startLoad=function(g){},u.stopLoad=function(){this.fragmentLoader.abort();var g=this.fragCurrent;g&&this.fragmentTracker.removeFragment(g),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=S.STOPPED},u._streamEnded=function(g,b){var P=this.fragCurrent,L=this.fragmentTracker;if(!b.live&&P&&P.sn===b.endSN&&!g.nextStart){var B=L.getState(P);return B===k.FragmentState.PARTIAL||B===k.FragmentState.OK}return!1},u.onMediaAttached=function(g,b){var P=this.media=this.mediaBuffer=b.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),P.addEventListener("seeking",this.onvseeking),P.addEventListener("ended",this.onvended);var L=this.config;this.levels&&L.autoStartLoad&&this.state===S.STOPPED&&this.startLoad(L.startPosition)},u.onMediaDetaching=function(){var g=this.media;g!=null&&g.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),g&&(g.removeEventListener("seeking",this.onvseeking),g.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},u.onMediaSeeking=function(){var g=this.config,b=this.fragCurrent,P=this.media,L=this.mediaBuffer,B=this.state,U=P?P.currentTime:0,C=W.BufferHelper.bufferInfo(L||P,U,g.maxBufferHole);if(this.log("media seeking to "+(Object(z.isFiniteNumber)(U)?U.toFixed(3):U)+", state: "+B),B===S.ENDED)this.resetLoadingState();else if(b&&!C.len){var _=g.maxFragLookUpTolerance,j=b.start-_,K=b.start+b.duration+_,q=U>K;(U<j||q)&&(q&&b.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),b.loader.abort()),this.resetLoadingState())}P&&(this.lastCurrentTime=U),!this.loadedmetadata&&!C.len&&(this.nextLoadPosition=this.startPosition=U),this.tickImmediate()},u.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},u.onKeyLoaded=function(g,b){if(this.state!==S.KEY_LOADING||b.frag!==this.fragCurrent||!this.levels)return;this.state=S.IDLE;var P=this.levels[b.frag.level].details;P&&this.loadFragment(b.frag,P,b.frag.start)},u.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},u.onHandlerDestroyed=function(){this.state=S.STOPPED,this.hls.off(M.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,d.prototype.onHandlerDestroyed.call(this)},u.loadKey=function(g,b){this.log("Loading key for "+g.sn+" of ["+b.startSN+"-"+b.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=S.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(M.Events.KEY_LOADING,{frag:g})},u.loadFragment=function(g,b,P){this._loadFragForPlayback(g,b,P)},u._loadFragForPlayback=function(g,b,P){var L=this,B=function(C){if(L.fragContextChanged(g)){L.warn("Fragment "+g.sn+(C.part?" p: "+C.part.index:"")+" of level "+g.level+" was dropped during download."),L.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,L._handleFragmentLoadProgress(C)};this._doFragLoad(g,b,P,B).then(function(U){if(!U)return;L.fragLoadError=0;var C=L.state;if(L.fragContextChanged(g)){(C===S.FRAG_LOADING||C===S.BACKTRACKING||!L.fragCurrent&&C===S.PARSING)&&(L.fragmentTracker.removeFragment(g),L.state=S.IDLE);return}if("payload"in U&&(L.log("Loaded fragment "+g.sn+" of level "+g.level),L.hls.trigger(M.Events.FRAG_LOADED,U),L.state===S.BACKTRACKING)){L.fragmentTracker.backtrack(g,U),L.resetFragmentLoading(g);return}L._handleFragmentLoadComplete(U)}).catch(function(U){L.warn(U),L.resetFragmentLoading(g)})},u.flushMainBuffer=function(g,b,P){if(P===void 0&&(P=null),!(g-b))return;var L={startOffset:g,endOffset:b,type:P};this.fragLoadError=0,this.hls.trigger(M.Events.BUFFER_FLUSHING,L)},u._loadInitSegment=function(g){var b=this;this._doFragLoad(g).then(function(P){if(!P||b.fragContextChanged(g)||!b.levels)throw new Error("init load aborted");return P}).then(function(P){var L=b.hls,B=P.payload,U=g.decryptdata;if(B&&B.byteLength>0&&U&&U.key&&U.iv&&U.method==="AES-128"){var C=self.performance.now();return b.decrypter.webCryptoDecrypt(new Uint8Array(B),U.key.buffer,U.iv.buffer).then(function(_){var j=self.performance.now();return L.trigger(M.Events.FRAG_DECRYPTED,{frag:g,payload:_,stats:{tstart:C,tdecrypt:j}}),P.payload=_,P})}return P}).then(function(P){var L=b.fragCurrent,B=b.hls,U=b.levels;if(!U)throw new Error("init load aborted, missing levels");var C=U[g.level].details;console.assert(C,"Level details are defined when init segment is loaded");var _=g.stats;b.state=S.IDLE,b.fragLoadError=0,g.data=new Uint8Array(P.payload),_.parsing.start=_.buffering.start=self.performance.now(),_.parsing.end=_.buffering.end=self.performance.now(),P.frag===L&&B.trigger(M.Events.FRAG_BUFFERED,{stats:_,frag:L,part:null,id:g.type}),b.tick()}).catch(function(P){b.warn(P),b.resetFragmentLoading(g)})},u.fragContextChanged=function(g){var b=this.fragCurrent;return!g||!b||g.level!==b.level||g.sn!==b.sn||g.urlId!==b.urlId},u.fragBufferedComplete=function(g,b){var P=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(b?" part: "+b.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+i.default.toString(W.BufferHelper.getBuffered(P))),this.state=S.IDLE,this.tick()},u._handleFragmentLoadComplete=function(g){var b=this.transmuxer;if(!b)return;var P=g.frag,L=g.part,B=g.partsLoaded,U=!B||B.length===0||B.some(function(_){return!_}),C=new v.ChunkMetadata(P.level,P.sn,P.stats.chunkCount+1,0,L?L.index:-1,!U);b.flush(C)},u._handleFragmentLoadProgress=function(g){},u._doFragLoad=function(g,b,P,L){var B=this;if(P===void 0&&(P=null),!this.levels)throw new Error("frag load aborted, missing levels");if(P=Math.max(g.start,P||0),this.config.lowLatencyMode&&b){var U=b.partList;if(U&&L){P>g.end&&b.fragmentHint&&(g=b.fragmentHint);var C=this.getNextPart(U,g,P);if(C>-1){var _=U[C];return this.log("Loading part sn: "+g.sn+" p: "+_.index+" cc: "+g.cc+" of playlist ["+b.startSN+"-"+b.endSN+"] parts [0-"+C+"-"+(U.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(P.toFixed(3))),this.nextLoadPosition=_.start+_.duration,this.state=S.FRAG_LOADING,this.hls.trigger(M.Events.FRAG_LOADING,{frag:g,part:U[C],targetBufferTime:P}),this.doFragPartsLoad(g,U,C,L).catch(function(j){return B.handleFragLoadError(j)})}else if(!g.url||this.loadedEndOfParts(U,P))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(b?"of ["+b.startSN+"-"+b.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(P.toFixed(3))),Object(z.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=S.FRAG_LOADING,this.hls.trigger(M.Events.FRAG_LOADING,{frag:g,targetBufferTime:P}),this.fragmentLoader.load(g,L).catch(function(j){return B.handleFragLoadError(j)})},u.doFragPartsLoad=function(g,b,P,L){var B=this;return new Promise(function(U,C){var _=[],j=function K(q){var te=b[q];B.fragmentLoader.loadPart(g,te,L).then(function(_e){_[te.index]=_e;var ue=_e.part;B.hls.trigger(M.Events.FRAG_LOADED,_e);var me=b[q+1];if(me&&me.fragment===g)K(q+1);else return U({frag:g,part:ue,partsLoaded:_})}).catch(C)};j(P)})},u.handleFragLoadError=function(g){var b=g.data;return b&&b.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(b.frag,b.part):this.hls.trigger(M.Events.ERROR,b),null},u._handleTransmuxerFlush=function(g){var b=this.getCurrentContext(g);if(!b||this.state!==S.PARSING){this.fragCurrent||(this.state=S.IDLE);return}var P=b.frag,L=b.part,B=b.level,U=self.performance.now();P.stats.parsing.end=U,L&&(L.stats.parsing.end=U),this.updateLevelTiming(P,L,B,g.partial)},u.getCurrentContext=function(g){var b=this.levels,P=g.level,L=g.sn,B=g.part;if(!b||!b[P])return this.warn("Levels object was unset while buffering fragment "+L+" of level "+P+". The current chunk will not be buffered."),null;var U=b[P],C=B>-1?Object(o.getPartWith)(U,L,B):null,_=C?C.fragment:Object(o.getFragmentWithSN)(U,L,this.fragCurrent);return _?{frag:_,part:C,level:U}:null},u.bufferFragmentData=function(g,b,P,L){if(!g||this.state!==S.PARSING)return;var B=g.data1,U=g.data2,C=B;if(B&&U&&(C=Object(m.appendUint8Array)(B,U)),!C||!C.length)return;var _={type:g.type,frag:b,part:P,chunkMeta:L,parent:b.type,data:C};this.hls.trigger(M.Events.BUFFER_APPENDING,_),g.dropped&&g.independent&&!P&&this.flushBufferGap(b)},u.flushBufferGap=function(g){var b=this.media;if(!b)return;if(!W.BufferHelper.isBuffered(b,b.currentTime)){this.flushMainBuffer(0,g.start);return}var P=b.currentTime,L=W.BufferHelper.bufferInfo(b,P,0),B=g.duration,U=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),C=Math.max(Math.min(g.start-U,L.end-U),P+U);g.start-C>U&&this.flushMainBuffer(C,g.start)},u.getFwdBufferInfo=function(g,b){var P=this.config,L=this.getLoadPosition();if(!Object(z.isFiniteNumber)(L))return null;var B=W.BufferHelper.bufferInfo(g,L,P.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var U=this.fragmentTracker.getBufferedFrag(L,b);if(U&&B.nextStart<U.end)return W.BufferHelper.bufferInfo(g,L,Math.max(B.nextStart,P.maxBufferHole))}return B},u.getMaxBufferLength=function(g){var b=this.config,P;return g?P=Math.max(8*b.maxBufferSize/g,b.maxBufferLength):P=b.maxBufferLength,Math.min(P,b.maxMaxBufferLength)},u.reduceMaxBufferLength=function(g){var b=this.config,P=g||b.maxBufferLength;return b.maxMaxBufferLength>=P?(b.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+b.maxMaxBufferLength+"s"),!0):!1},u.getNextFragment=function(g,b){var P,L,B=b.fragments,U=B.length;if(!U)return null;var C=this.config,_=B[0].start,j;if(b.live){var K=C.initialLiveManifestSize;if(U<K)return this.warn("Not enough fragments to start playback (have: "+U+", need: "+K+")"),null;!b.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(j=this.getInitialLiveFragment(b,B),this.startPosition=j?this.hls.liveSyncPosition||j.start:g)}else g<=_&&(j=B[0]);if(!j){var q=C.lowLatencyMode?b.partEnd:b.fragmentEnd;j=this.getFragmentAtPosition(g,q,b)}return(P=j)!==null&&P!==void 0&&P.initSegment&&!((L=j)!==null&&L!==void 0&&L.initSegment.data)&&!this.bitrateTest&&(j=j.initSegment),j},u.getNextPart=function(g,b,P){for(var L=-1,B=!1,U=!0,C=0,_=g.length;C<_;C++){var j=g[C];if(U=U&&!j.independent,L>-1&&P<j.start)break;var K=j.loaded;!K&&(B||j.independent||U)&&j.fragment===b&&(L=C),B=K}return L},u.loadedEndOfParts=function(g,b){var P=g[g.length-1];return P&&b>P.start&&P.loaded},u.getInitialLiveFragment=function(g,b){var P=this.fragPrevious,L=null;if(P){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+P.programDateTime),L=Object(c.findFragmentByPDT)(b,P.endProgramDateTime,this.config.maxFragLookUpTolerance)),!L){var B=P.sn+1;if(B>=g.startSN&&B<=g.endSN){var U=b[B-g.startSN];P.cc===U.cc&&(L=U,this.log("Live playlist, switching playlist, load frag with next SN: "+L.sn))}L||(L=Object(c.findFragWithCC)(b,P.cc),L&&this.log("Live playlist, switching playlist, load frag with same CC: "+L.sn))}}else{var C=this.hls.liveSyncPosition;C!==null&&(L=this.getFragmentAtPosition(C,this.bitrateTest?g.fragmentEnd:g.edge,g))}return L},u.getFragmentAtPosition=function(g,b,P){var L=this.config,B=this.fragPrevious,U=P.fragments,C=P.endSN,_=P.fragmentHint,j=L.maxFragLookUpTolerance,K=!!(L.lowLatencyMode&&P.partList&&_);K&&_&&!this.bitrateTest&&(U=U.concat(_),C=_.sn);var q;if(g<b){var te=g>b-j?0:j;q=Object(c.findFragmentByPTS)(B,U,g,te)}else q=U[U.length-1];if(q){var _e=q.sn-P.startSN,ue=B&&q.level===B.level,me=U[_e+1],fe=this.fragmentTracker.getState(q);if(fe===k.FragmentState.BACKTRACKED){q=null;for(var le=_e;U[le]&&this.fragmentTracker.getState(U[le])===k.FragmentState.BACKTRACKED;)B?q=U[le--]:q=U[--le];q||(q=me)}else B&&q.sn===B.sn&&!K&&(ue&&(q.sn<C&&this.fragmentTracker.getState(me)!==k.FragmentState.OK?(this.log("SN "+q.sn+" just loaded, load next one: "+me.sn),q=me):q=null))}return q},u.synchronizeToLiveEdge=function(g){var b=this.config,P=this.media;if(!P)return;var L=this.hls.liveSyncPosition,B=P.currentTime,U=g.fragments[0].start,C=g.edge,_=B>=U-b.maxFragLookUpTolerance&&B<=C;if(L!==null&&P.duration>L&&(B<L||!_)){var j=b.liveMaxLatencyDuration!==void 0?b.liveMaxLatencyDuration:b.liveMaxLatencyDurationCount*g.targetduration;(!_&&P.readyState<4||B<C-j)&&(this.loadedmetadata||(this.nextLoadPosition=L),P.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+C+", reset currentTime to : "+L.toFixed(3)),P.currentTime=L))}},u.alignPlaylists=function(g,b){var P=this.levels,L=this.levelLastLoaded,B=this.fragPrevious,U=L!==null?P[L]:null,C=g.fragments.length;if(!C)return this.warn("No fragments in live playlist"),0;var _=g.fragments[0].start,j=!b,K=g.alignedSliding&&Object(z.isFiniteNumber)(_);if(j||!K&&!_){Object(p.alignStream)(B,U,g);var q=g.fragments[0].start;return this.log("Live playlist sliding: "+q.toFixed(2)+" start-sn: "+(b?b.startSN:"na")+"->"+g.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+C),q}return _},u.waitForCdnTuneIn=function(g){var b=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*b)},u.setStartPosition=function(g,b){var P=this.startPosition;if(P<b&&(P=-1),P===-1||this.lastCurrentTime===-1){var L=g.startTimeOffset;Object(z.isFiniteNumber)(L)?(P=b+L,L<0&&(P+=g.totalduration),P=Math.min(Math.max(b,P),b+g.totalduration),this.log("Start time offset "+L+" found in playlist, adjust startPosition to "+P),this.startPosition=P):g.live?P=this.hls.liveSyncPosition||b:this.startPosition=P=0,this.lastCurrentTime=P}this.nextLoadPosition=P},u.getLoadPosition=function(){var g=this.media,b=0;return this.loadedmetadata&&g?b=g.currentTime:this.nextLoadPosition&&(b=this.nextLoadPosition),b},u.handleFragLoadAborted=function(g,b){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(b?" part"+b.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},u.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=S.IDLE)},u.onFragmentOrKeyLoadError=function(g,b){if(b.fatal)return;var P=b.frag;if(!P||P.type!==g)return;var L=this.fragCurrent;console.assert(L&&P.sn===L.sn&&P.level===L.level&&P.urlId===L.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(P.level))return;var U=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+P.sn+" of "+g+" "+P.level+" failed to load, retrying in "+U+"ms"),this.retryDate=self.performance.now()+U,this.fragLoadError++,this.state=S.FRAG_LOADING_WAITING_RETRY}else b.levelRetry?(g===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=S.IDLE):(F.logger.error(b.details+" reaches max retry, redispatch as fatal ..."),b.fatal=!0,this.hls.stopLoad(),this.state=S.ERROR)},u.afterBufferFlushed=function(g,b,P){if(!g)return;var L=W.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(b,L,P),this.state===S.ENDED&&this.resetLoadingState()},u.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=S.IDLE},u.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var b=this.levels?this.levels[g].details:null;if(b!=null&&b.live)return this.startPosition=-1,this.setStartPosition(b,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},u.updateLevelTiming=function(g,b,P,L){var B=this,U=P.details;console.assert(!!U,"level.details must be defined");var C=Object.keys(g.elementaryStreams).reduce(function(_,j){var K=g.elementaryStreams[j];if(K){var q=K.endPTS-K.startPTS;if(q<=0)return B.warn("Could not parse fragment "+g.sn+" "+j+" duration reliably ("+q+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),_||!1;var te=L?0:Object(o.updateFragPTSDTS)(U,g,K.startPTS,K.endPTS,K.startDTS,K.endDTS);return B.hls.trigger(M.Events.LEVEL_PTS_UPDATED,{details:U,level:P,drift:te,type:j,frag:g,start:K.startPTS,end:K.endPTS}),!0}return _},!1);C?(this.state=S.PARSED,this.hls.trigger(M.Events.FRAG_PARSED,{frag:g,part:b})):this.resetLoadingState()},u.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},O(y,[{key:"state",get:function(){return this._state},set:function(g){var b=this._state;b!==g&&(this._state=g,this.log(b+"->"+g))}}]),y}(N.default)},"./src/controller/buffer-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return c});var z=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),k=D("./src/utils/logger.ts"),W=D("./src/errors.ts"),F=D("./src/utils/buffer-helper.ts"),M=D("./src/utils/mediasource-helper.ts"),R=D("./src/loader/fragment.ts"),v=D("./src/controller/buffer-operation-queue.ts"),m=Object(M.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function o(s){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 l=i.hls,f=i.media,O=i.mediaSource;k.logger.log("[buffer-controller]: Media source opened"),f&&(i.updateMediaElementDuration(),l.trigger(N.Events.MEDIA_ATTACHED,{media:f})),O&&O.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){k.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){k.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var h=o.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var i=this.hls;i.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(N.Events.BUFFER_RESET,this.onBufferReset,this),i.on(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(N.Events.BUFFER_EOS,this.onBufferEos,this),i.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(N.Events.FRAG_PARSED,this.onFragParsed,this),i.on(N.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var i=this.hls;i.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(N.Events.BUFFER_RESET,this.onBufferReset,this),i.off(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(N.Events.BUFFER_EOS,this.onBufferEos,this),i.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(N.Events.FRAG_PARSED,this.onFragParsed,this),i.off(N.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(i,l){var f=2;(l.audio&&!l.video||!l.altAudio)&&(f=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=f,this.details=null,k.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(i,l){var f=this.media=l.media;if(f&&m){var O=this.mediaSource=new m;O.addEventListener("sourceopen",this._onMediaSourceOpen),O.addEventListener("sourceended",this._onMediaSourceEnded),O.addEventListener("sourceclose",this._onMediaSourceClose),f.src=self.URL.createObjectURL(O),this._objectUrl=f.src}},h.onMediaDetaching=function(){var i=this.media,l=this.mediaSource,f=this._objectUrl;if(l){if(k.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(O){k.logger.warn("[buffer-controller]: onMediaDetaching: "+O.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(f&&self.URL.revokeObjectURL(f),i.src===f?(i.removeAttribute("src"),i.load()):k.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(N.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(l){var f=i.sourceBuffer[l];try{f&&(i.removeBufferListeners(l),i.mediaSource&&i.mediaSource.removeSourceBuffer(f),i.sourceBuffer[l]=void 0)}catch(O){k.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",O)}}),this._initSourceBuffer()},h.onBufferCodecs=function(i,l){var f=this,O=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(A){if(O){var T=f.tracks[A];if(T&&typeof T.buffer.changeType=="function"){var w=l[A],S=w.codec,x=w.levelCodec,d=w.container,y=(T.levelCodec||T.codec).replace(p,"$1"),u=(x||S).replace(p,"$1");if(y!==u){var E=d+";codecs="+(x||S);f.appendChangeType(A,E)}}}else f.pendingTracks[A]=l[A]}),O)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(i,l){var f=this,O=this.operationQueue,A={execute:function(){var w=f.sourceBuffer[i];w&&(k.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+l),w.changeType(l)),O.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(w){k.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",w)}};O.append(A,i)},h.onBufferAppending=function(i,l){var f=this,O=this.hls,A=this.operationQueue,T=this.tracks,w=l.data,S=l.type,x=l.frag,d=l.part,y=l.chunkMeta,u=y.buffering[S],E=self.performance.now();u.start=E;var g=x.stats.buffering,b=d?d.stats.buffering:null;g.start===0&&(g.start=E),b&&b.start===0&&(b.start=E);var P=T.audio,L=S==="audio"&&y.id===1&&(P==null?void 0:P.container)==="audio/mpeg",B={execute:function(){if(u.executeStart=self.performance.now(),L){var C=f.sourceBuffer[S];if(C){var _=x.start-C.timestampOffset;Math.abs(_)>=.1&&(k.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+x.start+" (delta: "+_+") sn: "+x.sn+")"),C.timestampOffset=x.start)}}f.appendExecutor(w,S)},onStart:function(){},onComplete:function(){var C=self.performance.now();u.executeEnd=u.end=C,g.first===0&&(g.first=C),b&&b.first===0&&(b.first=C);var _=f.sourceBuffer,j={};for(var K in _)j[K]=F.BufferHelper.getBuffered(_[K]);f.appendError=0,f.hls.trigger(N.Events.BUFFER_APPENDED,{type:S,frag:x,part:d,chunkMeta:y,parent:x.type,timeRanges:j})},onError:function(C){k.logger.error("[buffer-controller]: Error encountered while trying to append to the "+S+" SourceBuffer",C);var _={type:W.ErrorTypes.MEDIA_ERROR,parent:x.type,details:W.ErrorDetails.BUFFER_APPEND_ERROR,err:C,fatal:!1};C.code===DOMException.QUOTA_EXCEEDED_ERR?_.details=W.ErrorDetails.BUFFER_FULL_ERROR:(f.appendError++,_.details=W.ErrorDetails.BUFFER_APPEND_ERROR,f.appendError>O.config.appendErrorMaxRetry&&(k.logger.error("[buffer-controller]: Failed "+O.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),_.fatal=!0)),O.trigger(N.Events.ERROR,_)}};A.append(B,S)},h.onBufferFlushing=function(i,l){var f=this,O=this.operationQueue,A=function(w){return{execute:f.removeExecutor.bind(f,w,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){f.hls.trigger(N.Events.BUFFER_FLUSHED,{type:w})},onError:function(x){k.logger.warn("[buffer-controller]: Failed to remove from "+w+" SourceBuffer",x)}}};l.type?O.append(A(l.type),l.type):this.getSourceBufferTypes().forEach(function(T){O.append(A(T),T)})},h.onFragParsed=function(i,l){var f=this,O=l.frag,A=l.part,T=[],w=A?A.elementaryStreams:O.elementaryStreams;w[R.ElementaryStreamTypes.AUDIOVIDEO]?T.push("audiovideo"):(w[R.ElementaryStreamTypes.AUDIO]&&T.push("audio"),w[R.ElementaryStreamTypes.VIDEO]&&T.push("video"));var S=function(){var d=self.performance.now();O.stats.buffering.end=d,A&&(A.stats.buffering.end=d);var y=A?A.stats:O.stats;f.hls.trigger(N.Events.FRAG_BUFFERED,{frag:O,part:A,stats:y,id:O.type})};T.length===0&&k.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+O.type+" level: "+O.level+" sn: "+O.sn),this.blockBuffers(S,T)},h.onFragChanged=function(i,l){this.flushBackBuffer()},h.onBufferEos=function(i,l){var f=this,O=this.getSourceBufferTypes().reduce(function(A,T){var w=f.sourceBuffer[T];return(!l.type||l.type===T)&&(w&&!w.ended&&(w.ended=!0,k.logger.log("[buffer-controller]: "+T+" sourceBuffer now EOS"))),A&&!!(!w||w.ended)},!0);O&&this.blockBuffers(function(){var A=f.mediaSource;if(!A||A.readyState!=="open")return;A.endOfStream()})},h.onLevelUpdated=function(i,l){var f=l.details;if(!f.fragments.length)return;this.details=f,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var i=this.hls,l=this.details,f=this.media,O=this.sourceBuffer;if(!f||l===null)return;var A=this.getSourceBufferTypes();if(!A.length)return;var T=l.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(z.isFiniteNumber)(T)||T<0)return;var w=f.currentTime,S=l.levelTargetDuration,x=Math.max(T,S),d=Math.floor(w/S)*S-x;A.forEach(function(y){var u=O[y];if(u){var E=F.BufferHelper.getBuffered(u);E.length>0&&d>E.start(0)&&(i.trigger(N.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),l.live&&i.trigger(N.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),i.trigger(N.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:y}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,l=this.hls,f=this.media,O=this.mediaSource,A=i.fragments[0].start+i.totalduration,T=f.duration,w=Object(z.isFiniteNumber)(O.duration)?O.duration:0;i.live&&l.config.liveDurationInfinity?(k.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),O.duration=Infinity,this.updateSeekableRange(i)):(A>w&&A>T||!Object(z.isFiniteNumber)(T))&&(k.logger.log("[buffer-controller]: Updating Media Source duration to "+A.toFixed(3)),O.duration=A)},h.updateSeekableRange=function(i){var l=this.mediaSource,f=i.fragments,O=f.length;if(O&&i.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var A=Math.max(0,f[0].start),T=Math.max(A,A+i.totalduration);l.setLiveSeekableRange(A,T)}},h.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,l=this.operationQueue,f=this.pendingTracks,O=Object.keys(f).length;if(O&&!i||O===2){this.createSourceBuffers(f),this.pendingTracks={};var A=this.getSourceBufferTypes();if(A.length===0){this.hls.trigger(N.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}A.forEach(function(T){l.executeNext(T)})}},h.createSourceBuffers=function(i){var l=this.sourceBuffer,f=this.mediaSource;if(!f)throw Error("createSourceBuffers called when mediaSource was null");var O=0;for(var A in i)if(!l[A]){var T=i[A];if(!T)throw Error("source buffer exists for track "+A+", however track does not");var w=T.levelCodec||T.codec,S=T.container+";codecs="+w;k.logger.log("[buffer-controller]: creating sourceBuffer("+S+")");try{var x=l[A]=f.addSourceBuffer(S),d=A;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[A]={buffer:x,codec:w,container:T.container,levelCodec:T.levelCodec,id:T.id},O++}catch(y){k.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(N.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:S})}}O&&this.hls.trigger(N.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(i){var l=this.operationQueue,f=l.current(i);f.onStart()},h._onSBUpdateEnd=function(i){var l=this.operationQueue,f=l.current(i);f.onComplete(),l.shiftAndExecuteNext(i)},h._onSBUpdateError=function(i,l){k.logger.error("[buffer-controller]: "+i+" SourceBuffer error",l),this.hls.trigger(N.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var f=this.operationQueue.current(i);f&&f.onError(l)},h.removeExecutor=function(i,l,f){var O=this.media,A=this.mediaSource,T=this.operationQueue,w=this.sourceBuffer,S=w[i];if(!O||!A||!S){k.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),T.shiftAndExecuteNext(i);return}var x=Object(z.isFiniteNumber)(O.duration)?O.duration:Infinity,d=Object(z.isFiniteNumber)(A.duration)?A.duration:Infinity,y=Math.max(0,l),u=Math.min(f,x,d);u>y?(k.logger.log("[buffer-controller]: Removing ["+y+","+u+"] from the "+i+" SourceBuffer"),console.assert(!S.updating,i+" sourceBuffer must not be updating"),S.remove(y,u)):T.shiftAndExecuteNext(i)},h.appendExecutor=function(i,l){var f=this.operationQueue,O=this.sourceBuffer,A=O[l];if(!A){k.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(l);return}A.ended=!1,console.assert(!A.updating,l+" sourceBuffer must not be updating"),A.appendBuffer(i)},h.blockBuffers=function(i,l){var f=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){k.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var O=this.operationQueue,A=l.map(function(T){return O.appendBlocker(T)});Promise.all(A).then(function(){i(),l.forEach(function(T){var w=f.sourceBuffer[T];(!w||!w.updating)&&O.shiftAndExecuteNext(T)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(i,l,f){var O=this.sourceBuffer[i];if(!O)return;var A=f.bind(this,i);this.listeners[i].push({event:l,listener:A}),O.addEventListener(l,A)},h.removeBufferListeners=function(i){var l=this.sourceBuffer[i];if(!l)return;this.listeners[i].forEach(function(f){l.removeEventListener(f.event,f.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return N});var z=D("./src/utils/logger.ts"),N=function(){function k(F){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=F}var W=k.prototype;return W.append=function(M,R){var v=this.queues[R];v.push(M),v.length===1&&this.buffers[R]&&this.executeNext(R)},W.insertAbort=function(M,R){var v=this.queues[R];v.unshift(M),this.executeNext(R)},W.appendBlocker=function(M){var R,v=new Promise(function(p){R=p}),m={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,M),v},W.executeNext=function(M){var R=this.buffers,v=this.queues,m=R[M],p=v[M];if(p.length){var c=p[0];try{c.execute()}catch(o){z.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(o),(!m||!m.updating)&&(p.shift(),this.executeNext(M))}}},W.shiftAndExecuteNext=function(M){this.queues[M].shift(),this.executeNext(M)},W.current=function(M){return this.queues[M][0]},k}()},"./src/controller/cap-level-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts");function N(F,M){for(var R=0;R<M.length;R++){var v=M[R];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(F,v.key,v)}}function k(F,M,R){return M&&N(F.prototype,M),R&&N(F,R),F}var W=function(){function F(R){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=R,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var M=F.prototype;return M.setStreamController=function(v){this.streamController=v},M.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},M.registerListeners=function(){var v=this.hls;v.on(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},M.unregisterListener=function(){var v=this.hls;v.off(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},M.onFpsDropLevelCapping=function(v,m){F.isLevelAllowed(m.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(m.droppedLevel)},M.onMediaAttaching=function(v,m){this.media=m.media instanceof HTMLVideoElement?m.media:null},M.onManifestParsed=function(v,m){var p=this.hls;this.restrictedLevels=[],this.firstLevel=m.firstLevel,p.config.capLevelToPlayerSize&&m.video&&this.startCapping()},M.onBufferCodecs=function(v,m){var p=this.hls;p.config.capLevelToPlayerSize&&m.video&&this.startCapping()},M.onMediaDetaching=function(){this.stopCapping()},M.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(v.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},M.getMaxLevel=function(v){var m=this,p=this.hls.levels;if(!p.length)return-1;var c=p.filter(function(o,h){return F.isLevelAllowed(h,m.restrictedLevels)&&h<=v});return this.clientRect=null,F.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},M.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()},M.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},M.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,m={width:0,height:0};if(v){var p=v.getBoundingClientRect();m.width=p.width,m.height=p.height,!m.width&&!m.height&&(m.width=p.right-p.left||v.width||0,m.height=p.bottom-p.top||v.height||0)}return this.clientRect=m,m},F.isLevelAllowed=function(v,m){return m===void 0&&(m=[]),m.indexOf(v)===-1},F.getMaxLevelByMediaSize=function(v,m,p){if(!v||!v.length)return-1;for(var c=function(l,f){return f?l.width!==f.width||l.height!==f.height:!0},o=v.length-1,h=0;h<v.length;h+=1){var s=v[h];if((s.width>=m||s.height>=p)&&c(s,v[h+1])){o=h;break}}return o},k(F,[{key:"mediaWidth",get:function(){return this.getDimensions().width*F.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*F.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(m){}return v}}]),F}();V.default=W},"./src/controller/cmcd-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return c});var z=D("./src/events.ts"),N=D("./src/types/cmcd.ts"),k=D("./src/utils/buffer-helper.ts"),W=D("./src/utils/logger.ts");function F(o,h){for(var s=0;s<h.length;s++){var i=h[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(o,i.key,i)}}function M(o,h,s){return h&&F(o.prototype,h),s&&F(o,s),o}function R(o,h){var s=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(s)return(s=s.call(o)).next.bind(s);if(Array.isArray(o)||(s=v(o))||h&&o&&typeof o.length=="number"){s&&(o=s);var i=0;return function(){return i>=o.length?{done:!0}:{done:!1,value:o[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(o,h){if(!o)return;if(typeof o=="string")return m(o,h);var s=Object.prototype.toString.call(o).slice(8,-1);if(s==="Object"&&o.constructor&&(s=o.constructor.name),s==="Map"||s==="Set")return Array.from(o);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return m(o,h)}function m(o,h){(h==null||h>o.length)&&(h=o.length);for(var s=0,i=new Array(h);s<h;s++)i[s]=o[s];return i}function p(){return p=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var s=arguments[h];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(o[i]=s[i])}return o},p.apply(this,arguments)}var c=function(){function o(s){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(O){try{i.apply(O,{ot:N.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(A){W.logger.warn("Could not generate manifest CMCD data.",A)}},this.applyFragmentData=function(O){try{var A=O.frag,T=i.hls.levels[A.level],w=i.getObjectType(A),S={d:A.duration*1e3,ot:w};(w===N.CMCDObjectType.VIDEO||w===N.CMCDObjectType.AUDIO||w==N.CMCDObjectType.MUXED)&&(S.br=T.bitrate/1e3,S.tb=i.getTopBandwidth(w),S.bl=i.getBufferLength(w)),i.apply(O,S)}catch(x){W.logger.warn("Could not generate segment CMCD data.",x)}},this.hls=s;var l=this.config=s.config,f=l.cmcd;f!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=f.sessionId||o.uuid(),this.cid=f.contentId,this.useHeaders=f.useHeaders===!0,this.registerListeners())}var h=o.prototype;return h.registerListeners=function(){var i=this.hls;i.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(z.Events.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var i=this.hls;i.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(z.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(i,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(i,l){var f,O;this.audioBuffer=(f=l.tracks.audio)===null||f===void 0?void 0:f.buffer,this.videoBuffer=(O=l.tracks.video)===null||O===void 0?void 0:O.buffer},h.createData=function(){var i;return{v:N.CMCDVersion,sf:N.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}},h.apply=function(i,l){l===void 0&&(l={}),p(l,this.createData());var f=l.ot===N.CMCDObjectType.INIT||l.ot===N.CMCDObjectType.VIDEO||l.ot===N.CMCDObjectType.MUXED;if(this.starved&&f&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var O=o.toHeaders(l);if(!Object.keys(O).length)return;i.headers||(i.headers={}),p(i.headers,O)}else{var A=o.toQuery(l);if(!A)return;i.url=o.appendQueryToUri(i.url,A)}},h.getObjectType=function(i){var l=i.type;return l==="subtitle"?N.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?N.CMCDObjectType.INIT:l==="audio"?N.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?N.CMCDObjectType.VIDEO:N.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(i){for(var l=0,f=i===N.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,O=R(f),A;!(A=O()).done;){var T=A.value;T.bitrate>l&&(l=T.bitrate)}return l>0?l:NaN},h.getBufferLength=function(i){var l=this.hls.media,f=i===N.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!f||!l)return NaN;var O=k.BufferHelper.bufferInfo(f,l.currentTime,this.config.maxBufferHole);return O.len*1e3},h.createPlaylistLoader=function(){var i=this.config.pLoader,l=this.applyPlaylistData,f=i||this.config.loader;return function(){function O(T){this.loader=void 0,this.loader=new f(T)}var A=O.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(w,S,x){l(w),this.loader.load(w,S,x)},M(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},h.createFragmentLoader=function(){var i=this.config.fLoader,l=this.applyFragmentData,f=i||this.config.loader;return function(){function O(T){this.loader=void 0,this.loader=new f(T)}var A=O.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(w,S,x){l(w),this.loader.load(w,S,x)},M(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},o.uuid=function(){var i=URL.createObjectURL(new Blob),l=i.toString();return URL.revokeObjectURL(i),l.substr(l.lastIndexOf("/")+1)},o.serialize=function(i){for(var l=[],f=function(L){return!Number.isNaN(L)&&L!=null&&L!==""&&L!==!1},O=function(L){return Math.round(L)},A=function(L){return O(L/100)*100},T=function(L){return encodeURIComponent(L)},w={br:O,d:O,bl:A,dl:A,mtp:A,nor:T,rtp:A,tb:O},S=Object.keys(i||{}).sort(),x=R(S),d;!(d=x()).done;){var y=d.value,u=i[y];if(!f(u))continue;if(y==="v"&&u===1)continue;if(y=="pr"&&u===1)continue;var E=w[y];E&&(u=E(u));var g=typeof u,b=void 0;y==="ot"||y==="sf"||y==="st"?b=y+"="+u:g==="boolean"?b=y:g==="number"?b=y+"="+u:b=y+"="+JSON.stringify(u),l.push(b)}return l.join(",")},o.toHeaders=function(i){for(var l=Object.keys(i),f={},O=["Object","Request","Session","Status"],A=[{},{},{},{}],T={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},w=0,S=l;w<S.length;w++){var x=S[w],d=T[x]!=null?T[x]:1;A[d][x]=i[x]}for(var y=0;y<A.length;y++){var u=o.serialize(A[y]);u&&(f["CMCD-"+O[y]]=u)}return f},o.toQuery=function(i){return"CMCD="+encodeURIComponent(o.serialize(i))},o.appendQueryToUri=function(i,l){if(!l)return i;var f=i.includes("?")?"&":"?";return""+i+f+l},o}()},"./src/controller/eme-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts"),N=D("./src/errors.ts"),k=D("./src/utils/logger.ts"),W=D("./src/utils/mediakeys-helper.ts");function F(c,o){for(var h=0;h<o.length;h++){var s=o[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(c,s.key,s)}}function M(c,o,h){return o&&F(c.prototype,o),h&&F(c,h),c}var R=3,v=function(o,h,s){var i={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(l){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:s.audioRobustness||""})}),h.forEach(function(l){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:s.videoRobustness||""})}),[i]},m=function(o,h,s,i){switch(o){case W.KeySystems.WIDEVINE:return v(h,s,i);default:throw new Error("Unknown key-system: "+o)}},p=function(){function c(h){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=h,this._config=h.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 o=c.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(s){switch(s){case W.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},o._attemptKeySystemAccess=function(s,i,l){var f=this,O=m(s,i,l,this._drmSystemOptions);k.logger.log("Requesting encrypted media key-system access");var A=this.requestMediaKeySystemAccess(s,O);this.mediaKeysPromise=A.then(function(T){return f._onMediaKeySystemAccessObtained(s,T)}),A.catch(function(T){k.logger.error('Failed to obtain key-system "'+s+'" access:',T)})},o._onMediaKeySystemAccessObtained=function(s,i){var l=this;k.logger.log('Access for key-system "'+s+'" obtained');var f={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:s};this._mediaKeysList.push(f);var O=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(A){return f.mediaKeys=A,k.logger.log('Media-keys created for key-system "'+s+'"'),l._onMediaKeysCreated(),A});return O.catch(function(A){k.logger.error("Failed to create media-keys:",A)}),O},o._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),s._onNewMediaKeySession(i.mediaKeysSession))})},o._onNewMediaKeySession=function(s){var i=this;k.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(l){i._onKeySessionMessage(s,l.message)},!1)},o._onKeySessionMessage=function(s,i){k.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(l){k.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),s.update(l)})},o.onMediaEncrypted=function(s){var i=this;if(k.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){k.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(O){if(!i._media)return;i._attemptSetMediaKeys(O),i._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(l).catch(l)},o._attemptSetMediaKeys=function(s){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){k.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}k.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(s,i){var l=this,f=this._mediaKeysList[0];if(!f){k.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(f.mediaKeysSessionInitialized){k.logger.warn("Key-Session already initialized but requested again");return}var O=f.mediaKeysSession;if(!O){k.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){k.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}k.logger.log('Generating key-session request for "'+s+'" init data type'),f.mediaKeysSessionInitialized=!0,O.generateRequest(s,i).then(function(){k.logger.debug("Key-session generation succeeded")}).catch(function(A){k.logger.error("Error generating key-session request:",A),l.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(s,i,l){var f=new XMLHttpRequest;f.responseType="arraybuffer",f.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,f,s,i,l);var O=this._licenseXhrSetup;if(O)try{O.call(this.hls,f,s),O=void 0}catch(A){k.logger.error(A)}try{f.readyState||f.open("POST",s,!0),O&&O.call(this.hls,f,s)}catch(A){throw new Error("issue setting up KeySystem license XHR "+A)}return f},o._onLicenseRequestReadyStageChange=function(s,i,l,f){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,k.logger.log("License request succeeded");var O=s.response,A=this._licenseResponseCallback;if(A)try{O=A.call(this.hls,s,i)}catch(w){k.logger.error(w)}f(O)}else{if(k.logger.error("License Request XHR failed ("+i+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var T=R-this._requestLicenseFailureCount+1;k.logger.warn("Retrying license request, "+T+" attempts left"),this._requestLicense(l,f)}break}},o._generateLicenseRequestChallenge=function(s,i){switch(s.mediaKeySystemDomain){case W.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},o._requestLicense=function(s,i){k.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){k.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var f=this.getLicenseServerUrl(l.mediaKeySystemDomain),O=this._createLicenseXhr(f,s,i);k.logger.log("Sending license request to URL: "+f);var A=this._generateLicenseRequestChallenge(l,s);O.send(A)}catch(T){k.logger.error("Failure requesting DRM license: "+T),this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(s,i){if(!this._emeEnabled)return;var l=i.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var s=this._media,i=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(s,i){if(!this._emeEnabled)return;var l=i.levels.map(function(O){return O.audioCodec}).filter(function(O){return!!O}),f=i.levels.map(function(O){return O.videoCodec}).filter(function(O){return!!O});this._attemptKeySystemAccess(W.KeySystems.WIDEVINE,l,f)},M(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();V.default=p},"./src/controller/fps-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts"),N=D("./src/utils/logger.ts"),k=function(){function W(M){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=M,this.registerListeners()}var F=W.prototype;return F.setStreamController=function(R){this.streamController=R},F.registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},F.unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching)},F.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},F.onMediaAttaching=function(R,v){var m=this.hls.config;if(m.capLevelOnFPSDrop){var p=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},F.checkFPS=function(R,v,m){var p=performance.now();if(v){if(this.lastTime){var c=p-this.lastTime,o=m-this.lastDroppedFrames,h=v-this.lastDecodedFrames,s=1e3*o/c,i=this.hls;if(i.trigger(z.Events.FPS_DROP,{currentDropped:o,currentDecoded:h,totalDroppedFrames:m}),s>0&&o>i.config.fpsDroppedMonitoringThreshold*h){var l=i.currentLevel;N.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=l)&&(l=l-1,i.trigger(z.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:i.currentLevel}),i.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=m,this.lastDecodedFrames=v}},F.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var v=R.getVideoPlaybackQuality();this.checkFPS(R,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},W}();V.default=k},"./src/controller/fragment-finders.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"findFragmentByPDT",function(){return k}),D.d(V,"findFragmentByPTS",function(){return W}),D.d(V,"fragmentWithinToleranceTest",function(){return F}),D.d(V,"pdtWithinToleranceTest",function(){return M}),D.d(V,"findFragWithCC",function(){return R});var z=D("./src/polyfills/number.ts"),N=D("./src/utils/binary-search.ts");function k(v,m,p){if(m===null||!Array.isArray(v)||!v.length||!Object(z.isFiniteNumber)(m))return null;var c=v[0].programDateTime;if(m<(c||0))return null;var o=v[v.length-1].endProgramDateTime;if(m>=(o||0))return null;p=p||0;for(var h=0;h<v.length;++h){var s=v[h];if(M(m,p,s))return s}return null}function W(v,m,p,c){p===void 0&&(p=0),c===void 0&&(c=0);var o=null;if(v?o=m[v.sn-m[0].sn+1]||null:p===0&&m[0].start===0&&(o=m[0]),o&&F(p,c,o)===0)return o;var h=N.default.search(m,F.bind(null,p,c));return h||o}function F(v,m,p){v===void 0&&(v=0),m===void 0&&(m=0);var c=Math.min(m,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-c<=v?1:p.start-c>v&&p.start?-1:0}function M(v,m,p){var c=Math.min(m,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,o=p.endProgramDateTime||0;return o-c>v}function R(v,m){return N.default.search(v,function(p){return p.cc<m?1:p.cc>m?-1:0})}},"./src/controller/fragment-tracker.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"FragmentState",function(){return k}),D.d(V,"FragmentTracker",function(){return W});var z=D("./src/events.ts"),N=D("./src/types/loader.ts"),k;(function(R){R.NOT_LOADED="NOT_LOADED",R.BACKTRACKED="BACKTRACKED",R.APPENDING="APPENDING",R.PARTIAL="PARTIAL",R.OK="OK"})(k||(k={}));var W=function(){function R(m){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=m,this._registerListeners()}var v=R.prototype;return v._registerListeners=function(){var p=this.hls;p.on(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(z.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var p=this.hls;p.off(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(z.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(p,c){if(c===N.PlaylistLevelType.MAIN){var o=this.activeFragment,h=this.activeParts;if(!o)return null;if(h)for(var s=h.length;s--;){var i=h[s],l=i?i.end:o.appendedPTS;if(i.start<=p&&l!==void 0&&p<=l)return s>9&&(this.activeParts=h.slice(s-9)),i}else if(o.start<=p&&o.appendedPTS!==void 0&&p<=o.appendedPTS)return o}return this.getBufferedFrag(p,c)},v.getBufferedFrag=function(p,c){for(var o=this.fragments,h=Object.keys(o),s=h.length;s--;){var i=o[h[s]];if((i==null?void 0:i.body.type)===c&&i.buffered){var l=i.body;if(l.start<=p&&p<=l.end)return l}}return null},v.detectEvictedFragments=function(p,c,o){var h=this;Object.keys(this.fragments).forEach(function(s){var i=h.fragments[s];if(!i)return;if(!i.buffered){i.body.type===o&&h.removeFragment(i.body);return}var l=i.range[p];if(!l)return;l.time.some(function(f){var O=!h.isTimeBuffered(f.startPTS,f.endPTS,c);return O&&h.removeFragment(i.body),O})})},v.detectPartialFragments=function(p){var c=this,o=this.timeRanges,h=p.frag,s=p.part;if(!o||h.sn==="initSegment")return;var i=M(h),l=this.fragments[i];if(!l)return;Object.keys(o).forEach(function(f){var O=h.elementaryStreams[f];if(!O)return;var A=o[f],T=s!==null||O.partial===!0;l.range[f]=c.getBufferedTimes(h,s,T,A)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},v.fragBuffered=function(p){var c=M(p),o=this.fragments[c];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},v.getBufferedTimes=function(p,c,o,h){for(var s={time:[],partial:o},i=c?c.start:p.start,l=c?c.end:p.end,f=p.minEndPTS||l,O=p.maxStartPTS||i,A=0;A<h.length;A++){var T=h.start(A)-this.bufferPadding,w=h.end(A)+this.bufferPadding;if(O>=T&&f<=w){s.time.push({startPTS:Math.max(i,h.start(A)),endPTS:Math.min(l,h.end(A))});break}else if(i<w&&l>T)s.partial=!0,s.time.push({startPTS:Math.max(i,h.start(A)),endPTS:Math.min(l,h.end(A))});else if(l<=T)break}return s},v.getPartialFragment=function(p){var c=null,o,h,s,i=0,l=this.bufferPadding,f=this.fragments;return Object.keys(f).forEach(function(O){var A=f[O];if(!A)return;F(A)&&(h=A.body.start-l,s=A.body.end+l,p>=h&&p<=s&&(o=Math.min(p-h,s-p),i<=o&&(c=A.body,i=o)))}),c},v.getState=function(p){var c=M(p),o=this.fragments[c];return o?o.buffered?F(o)?k.PARTIAL:k.OK:o.backtrack?k.BACKTRACKED:k.APPENDING:k.NOT_LOADED},v.backtrack=function(p,c){var o=M(p),h=this.fragments[o];if(!h||h.backtrack)return null;var s=h.backtrack=c||h.loaded;return h.loaded=null,s},v.getBacktrackData=function(p){var c=M(p),o=this.fragments[c];if(o){var h,s=o.backtrack;if(s!=null&&(h=s.payload)!==null&&h!==void 0&&h.byteLength)return s;this.removeFragment(p)}return null},v.isTimeBuffered=function(p,c,o){for(var h,s,i=0;i<o.length;i++){if(h=o.start(i)-this.bufferPadding,s=o.end(i)+this.bufferPadding,p>=h&&c<=s)return!0;if(c<=h)return!1}return!1},v.onFragLoaded=function(p,c){var o=c.frag,h=c.part;if(o.sn==="initSegment"||o.bitrateTest||h)return;var s=M(o);this.fragments[s]={body:o,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(p,c){var o=this,h=c.frag,s=c.part,i=c.timeRanges;if(h.type===N.PlaylistLevelType.MAIN)if(this.activeFragment=h,s){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(s)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(f){var O=i[f];if(o.detectEvictedFragments(f,O),!s)for(var A=0;A<O.length;A++)h.appendedPTS=Math.max(O.end(A),h.appendedPTS||0)})},v.onFragBuffered=function(p,c){this.detectPartialFragments(c)},v.hasFragment=function(p){var c=M(p);return!!this.fragments[c]},v.removeFragmentsInRange=function(p,c,o){var h=this;Object.keys(this.fragments).forEach(function(s){var i=h.fragments[s];if(!i)return;if(i.buffered){var l=i.body;l.type===o&&l.start<c&&l.end>p&&h.removeFragment(l)}})},v.removeFragment=function(p){var c=M(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[c]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function F(R){var v,m;return R.buffered&&(((v=R.range.video)===null||v===void 0?void 0:v.partial)||((m=R.range.audio)===null||m===void 0?void 0:m.partial))}function M(R){return R.type+"_"+R.level+"_"+R.urlId+"_"+R.sn}},"./src/controller/gap-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"STALL_MINIMUM_DURATION_MS",function(){return F}),D.d(V,"MAX_START_GAP_JUMP",function(){return M}),D.d(V,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return R}),D.d(V,"SKIP_BUFFER_RANGE_START",function(){return v}),D.d(V,"default",function(){return m});var z=D("./src/utils/buffer-helper.ts"),N=D("./src/errors.ts"),k=D("./src/events.ts"),W=D("./src/utils/logger.ts"),F=250,M=2,R=.1,v=.05,m=function(){function p(o,h,s,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=o,this.media=h,this.fragmentTracker=s,this.hls=i}var c=p.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(h){var s=this.config,i=this.media,l=this.stalled,f=i.currentTime,O=i.seeking,A=this.seeking&&!O,T=!this.seeking&&O;if(this.seeking=O,f!==h){if(this.moved=!0,l!==null){if(this.stallReported){var w=self.performance.now()-l;W.logger.warn("playback not stuck anymore @"+f+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((T||A)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!z.BufferHelper.getBuffered(i).length)return;var S=z.BufferHelper.bufferInfo(i,f,0),x=S.len>0,d=S.nextStart||0;if(!x&&!d)return;if(O){var y=S.len>M,u=!d||d-f>M&&!this.fragmentTracker.getPartialFragment(f);if(y||u)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var E,g=Math.max(d,S.start||0)-f,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,P=b==null||((E=b.details)===null||E===void 0)?void 0:E.live,L=P?b.details.targetduration*2:M;if(g>0&&g<=L){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(l===null){this.stalled=B;return}var U=B-l;!O&&U>=F&&this._reportStall(S.len);var C=z.BufferHelper.bufferInfo(i,f,s.maxBufferHole);this._tryFixBufferStall(C,U)},c._tryFixBufferStall=function(h,s){var i=this.config,l=this.fragmentTracker,f=this.media,O=f.currentTime,A=l.getPartialFragment(O);if(A){var T=this._trySkipBufferHole(A);if(T)return}h.len>i.maxBufferHole&&s>i.highBufferWatchdogPeriod*1e3&&(W.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(h){var s=this.hls,i=this.media,l=this.stallReported;l||(this.stallReported=!0,W.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+h+")"),s.trigger(k.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},c._trySkipBufferHole=function(h){for(var s=this.config,i=this.hls,l=this.media,f=l.currentTime,O=0,A=z.BufferHelper.getBuffered(l),T=0;T<A.length;T++){var w=A.start(T);if(f+s.maxBufferHole>=O&&f<w){var S=Math.max(w+v,l.currentTime+R);return W.logger.warn("skipping hole, adjusting currentTime from "+f+" to "+S),this.moved=!0,this.stalled=null,l.currentTime=S,h&&i.trigger(k.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+f+" to "+S,frag:h}),S}O=A.end(T)}return 0},c._tryNudgeBuffer=function(){var h=this.config,s=this.hls,i=this.media,l=i.currentTime,f=(this.nudgeRetry||0)+1;if(this.nudgeRetry=f,f<h.nudgeMaxRetry){var O=l+f*h.nudgeOffset;W.logger.warn("Nudging 'currentTime' from "+l+" to "+O),i.currentTime=O,s.trigger(k.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else W.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+h.nudgeMaxRetry+" nudges"),s.trigger(k.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts"),N=D("./src/utils/texttrack-utils.ts"),k=D("./src/demux/id3.ts"),W=.25,F=function(){function M(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var R=M.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var m=this.hls;m.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var m=this.hls;m.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(m,p){this.media=p.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(N.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},R.getID3Track=function(m){if(!this.media)return;for(var p=0;p<m.length;p++){var c=m[p];if(c.kind==="metadata"&&c.label==="id3")return Object(N.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(m,p){if(!this.media)return;var c=p.frag,o=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<o.length;s++){var i=k.getID3Frames(o[s].data);if(i){var l=o[s].pts,f=s<o.length-1?o[s+1].pts:c.end,O=f-l;O<=0&&(f=l+W);for(var A=0;A<i.length;A++){var T=i[A];if(!k.isTimeStampFrame(T)){var w=new h(l,f,"");w.value=T,this.id3Track.addCue(w)}}}}},R.onBufferFlushing=function(m,p){var c=p.startOffset,o=p.endOffset,h=p.type;if(!h||h==="audio"){var s=this.id3Track;s&&Object(N.removeCuesInRange)(s,c,o)}},M}();V.default=F},"./src/controller/latency-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return M});var z=D("./src/errors.ts"),N=D("./src/events.ts"),k=D("./src/utils/logger.ts");function W(R,v){for(var m=0;m<v.length;m++){var p=v[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(R,p.key,p)}}function F(R,v,m){return v&&W(R.prototype,v),m&&W(R,m),R}var M=function(){function R(m){var p=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 p.timeupdate()},this.hls=m,this.config=m.config,this.registerListeners()}var v=R.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(N.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(N.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(N.Events.ERROR,this.onError)},v.onMediaAttached=function(p,c){this.media=c.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(p,c){var o=c.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(p,c){if(c.details!==z.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,k.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var p=this.media,c=this.levelDetails;if(!p||!c)return;this.currentTime=p.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var h=this.config,s=h.lowLatencyMode,i=h.maxLiveSyncPlaybackRate;if(!s||i===1)return;var l=this.targetLatency;if(l===null)return;var f=o-l,O=Math.min(this.maxLatency,l+c.targetduration),A=f<O;if(c.live&&A&&f>.05&&this.forwardBufferLength>1){var T=Math.min(2,Math.max(1,i)),w=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20;p.playbackRate=Math.min(T,Math.max(1,w))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},v.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},v.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},F(R,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,c=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:c?p.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var c=p.holdBack,o=p.partHoldBack,h=p.targetduration,s=this.config,i=s.liveSyncDuration,l=s.liveSyncDurationCount,f=s.lowLatencyMode,O=this.hls.userConfig,A=f&&o||c;(O.liveSyncDuration||O.liveSyncDurationCount||A===0)&&(A=i!==void 0?i:l*h);var T=h,w=1;return A+Math.min(this.stallCount*w,T)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),c=this.targetLatency,o=this.levelDetails;if(p===null||c===null||o===null)return null;var h=o.edge,s=p-c-this.edgeStalled,i=h-o.totalduration,l=h-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(i,s),l)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var c=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-c,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,c=this.levelDetails;if(!p||!c)return 0;var o=p.buffered.length;return o?p.buffered.end(o-1):c.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return s});var z=D("./src/types/level.ts"),N=D("./src/events.ts"),k=D("./src/errors.ts"),W=D("./src/utils/codecs.ts"),F=D("./src/controller/level-helper.ts"),M=D("./src/controller/base-playlist-controller.ts"),R=D("./src/types/loader.ts");function v(){return v=Object.assign||function(i){for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var O in f)Object.prototype.hasOwnProperty.call(f,O)&&(i[O]=f[O])}return i},v.apply(this,arguments)}function m(i,l){for(var f=0;f<l.length;f++){var O=l[f];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(i,O.key,O)}}function p(i,l,f){return l&&m(i.prototype,l),f&&m(i,f),i}function c(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,o(i,l)}function o(i,l){return o=Object.setPrototypeOf||function(O,A){return O.__proto__=A,O},o(i,l)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(i){c(l,i);function l(O){var A;return A=i.call(this,O,"[level-controller]")||this,A._levels=[],A._firstLevel=-1,A._startLevel=void 0,A.currentLevelIndex=-1,A.manualLevelIndex=-1,A.onParsedComplete=void 0,A._registerListeners(),A}var f=l.prototype;return f._registerListeners=function(){var A=this.hls;A.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),A.on(N.Events.ERROR,this.onError,this)},f._unregisterListeners=function(){var A=this.hls;A.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),A.off(N.Events.ERROR,this.onError,this)},f.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},f.startLoad=function(){var A=this._levels;A.forEach(function(T){T.loadError=0}),i.prototype.startLoad.call(this)},f.onManifestLoaded=function(A,T){var w=[],S=[],x=[],d,y={},u,E=!1,g=!1,b=!1;if(T.levels.forEach(function(U){var C=U.attrs;E=E||!!(U.width&&U.height),g=g||!!U.videoCodec,b=b||!!U.audioCodec,h&&U.audioCodec&&U.audioCodec.indexOf("mp4a.40.34")!==-1&&(U.audioCodec=void 0);var _=U.bitrate+"-"+U.attrs.RESOLUTION+"-"+U.attrs.CODECS;u=y[_],u?u.url.push(U.url):(u=new z.Level(U),y[_]=u,w.push(u)),C&&(C.AUDIO&&Object(F.addGroupId)(u,"audio",C.AUDIO),C.SUBTITLES&&Object(F.addGroupId)(u,"text",C.SUBTITLES))}),(E||g)&&b&&(w=w.filter(function(U){var C=U.videoCodec,_=U.width,j=U.height;return!!C||!!(_&&j)})),w=w.filter(function(U){var C=U.audioCodec,_=U.videoCodec;return(!C||Object(W.isCodecSupportedInMp4)(C,"audio"))&&(!_||Object(W.isCodecSupportedInMp4)(_,"video"))}),T.audioTracks&&(S=T.audioTracks.filter(function(U){return!U.audioCodec||Object(W.isCodecSupportedInMp4)(U.audioCodec,"audio")}),Object(F.assignTrackIdsByGroup)(S)),T.subtitles&&(x=T.subtitles,Object(F.assignTrackIdsByGroup)(x)),w.length>0){d=w[0].bitrate,w.sort(function(U,C){return U.bitrate-C.bitrate}),this._levels=w;for(var P=0;P<w.length;P++)if(w[P].bitrate===d){this._firstLevel=P,this.log("manifest loaded, "+w.length+" level(s) found, first bitrate: "+d);break}var L=b&&!g,B={levels:w,audioTracks:S,subtitleTracks:x,firstLevel:this._firstLevel,stats:T.stats,audio:b,video:g,altAudio:!L&&S.some(function(U){return!!U.url})};this.hls.trigger(N.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(N.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:T.url,reason:"no level with compatible codecs found in manifest"})},f.onError=function(A,T){if(i.prototype.onError.call(this,A,T),T.fatal)return;var w=T.context,S=this._levels[this.currentLevelIndex];if(w&&(w.type===R.PlaylistContextType.AUDIO_TRACK&&S.audioGroupIds&&w.groupId===S.audioGroupIds[S.urlId]||w.type===R.PlaylistContextType.SUBTITLE_TRACK&&S.textGroupIds&&w.groupId===S.textGroupIds[S.urlId])){this.redundantFailover(this.currentLevelIndex);return}var x=!1,d=!0,y;switch(T.details){case k.ErrorDetails.FRAG_LOAD_ERROR:case k.ErrorDetails.FRAG_LOAD_TIMEOUT:case k.ErrorDetails.KEY_LOAD_ERROR:case k.ErrorDetails.KEY_LOAD_TIMEOUT:if(T.frag){var u=this._levels[T.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(y=T.frag.level)):y=T.frag.level}break;case k.ErrorDetails.LEVEL_LOAD_ERROR:case k.ErrorDetails.LEVEL_LOAD_TIMEOUT:w&&(w.deliveryDirectives&&(d=!1),y=w.level),x=!0;break;case k.ErrorDetails.REMUX_ALLOC_ERROR:y=T.level,x=!0;break}y!==void 0&&this.recoverLevel(T,y,x,d)},f.recoverLevel=function(A,T,w,S){var x=A.details,d=this._levels[T];if(d.loadError++,w){var y=this.retryLoadingOrFail(A);if(y)A.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(S){var u=d.url.length;if(u>1&&d.loadError<u)A.levelRetry=!0,this.redundantFailover(T);else if(this.manualLevelIndex===-1){var E=T===0?this._levels.length-1:T-1;this.currentLevelIndex!==E&&this._levels[E].loadError===0&&(this.warn(x+": switch to "+E),A.levelRetry=!0,this.hls.nextAutoLevel=E)}}},f.redundantFailover=function(A){var T=this._levels[A],w=T.url.length;if(w>1){var S=(T.urlId+1)%w;this.warn("Switching to redundant URL-id "+S),this._levels.forEach(function(x){x.urlId=S}),this.level=A}},f.onFragLoaded=function(A,T){var w=T.frag;if(w!==void 0&&w.type===R.PlaylistLevelType.MAIN){var S=this._levels[w.level];S!==void 0&&(S.fragmentError=0,S.loadError=0)}},f.onLevelLoaded=function(A,T){var w,S=T.level,x=T.details,d=this._levels[S];if(!d){var y;this.warn("Invalid level index "+S),(y=T.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(x.deltaUpdateFailed=!0);return}S===this.currentLevelIndex?(d.fragmentError===0&&(d.loadError=0,this.retryCount=0),this.playlistLoaded(S,T,d.details)):(w=T.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(x.deltaUpdateFailed=!0)},f.onAudioTrackSwitched=function(A,T){var w=this.hls.levels[this.currentLevelIndex];if(!w)return;if(w.audioGroupIds){for(var S=-1,x=this.hls.audioTracks[T.id].groupId,d=0;d<w.audioGroupIds.length;d++)if(w.audioGroupIds[d]===x){S=d;break}S!==w.urlId&&(w.urlId=S,this.startLoad())}},f.loadPlaylist=function(A){var T=this.currentLevelIndex,w=this._levels[T];if(this.canLoad&&w&&w.url.length>0){var S=w.urlId,x=w.url[S];if(A)try{x=A.addDirectives(x)}catch(d){this.warn("Could not construct new URL with HLS Delivery Directives: "+d)}this.log("Attempt loading level index "+T+(A?" at sn "+A.msn+" part "+A.part:"")+" with URL-id "+S+" "+x),this.clearTimer(),this.hls.trigger(N.Events.LEVEL_LOADING,{url:x,level:T,id:S,deliveryDirectives:A||null})}},f.removeLevel=function(A,T){var w=function(d,y){return y!==T},S=this._levels.filter(function(x,d){return d!==A?!0:x.url.length>1&&T!==void 0?(x.url=x.url.filter(w),x.audioGroupIds&&(x.audioGroupIds=x.audioGroupIds.filter(w)),x.textGroupIds&&(x.textGroupIds=x.textGroupIds.filter(w)),x.urlId=0,!0):!1}).map(function(x,d){var y=x.details;return y!=null&&y.fragments&&y.fragments.forEach(function(u){u.level=d}),x});this._levels=S,this.hls.trigger(N.Events.LEVELS_UPDATED,{levels:S})},p(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(A){var T,w=this._levels;if(w.length===0)return;if(this.currentLevelIndex===A&&(T=w[A])!==null&&T!==void 0&&T.details)return;if(A<0||A>=w.length){var S=A<0;if(this.hls.trigger(N.Events.ERROR,{type:k.ErrorTypes.OTHER_ERROR,details:k.ErrorDetails.LEVEL_SWITCH_ERROR,level:A,fatal:S,reason:"invalid level idx"}),S)return;A=Math.min(A,w.length-1)}this.clearTimer();var x=this.currentLevelIndex,d=w[x],y=w[A];this.log("switching to level "+A+" from "+x),this.currentLevelIndex=A;var u=v({},y,{level:A,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete u._urlId,this.hls.trigger(N.Events.LEVEL_SWITCHING,u);var E=y.details;if(!E||E.live){var g=this.switchParams(y.uri,d==null?void 0:d.details);this.loadPlaylist(g)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(A){this.manualLevelIndex=A,this._startLevel===void 0&&(this._startLevel=A),A!==-1&&(this.level=A)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(A){this._firstLevel=A}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var A=this.hls.config.startLevel;return A!==void 0?A:this._firstLevel}else return this._startLevel},set:function(A){this._startLevel=A}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(A){this.level=A,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=A)}}]),l}(M.default)},"./src/controller/level-helper.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"addGroupId",function(){return k}),D.d(V,"assignTrackIdsByGroup",function(){return W}),D.d(V,"updatePTS",function(){return F}),D.d(V,"updateFragPTSDTS",function(){return R}),D.d(V,"mergeDetails",function(){return v}),D.d(V,"mapPartIntersection",function(){return m}),D.d(V,"mapFragmentIntersection",function(){return p}),D.d(V,"adjustSliding",function(){return c}),D.d(V,"addSliding",function(){return o}),D.d(V,"computeReloadInterval",function(){return h}),D.d(V,"getFragmentWithSN",function(){return s}),D.d(V,"getPartWith",function(){return i});var z=D("./src/polyfills/number.ts"),N=D("./src/utils/logger.ts");function k(l,f,O){switch(f){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(O);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(O);break}}function W(l){var f={};l.forEach(function(O){var A=O.groupId||"";O.id=f[A]=f[A]||0,f[A]++})}function F(l,f,O){var A=l[f],T=l[O];M(A,T)}function M(l,f){var O=f.startPTS;if(Object(z.isFiniteNumber)(O)){var A=0,T;f.sn>l.sn?(A=O-l.start,T=l):(A=l.start-O,T=f),T.duration!==A&&(T.duration=A)}else if(f.sn>l.sn){var w=l.cc===f.cc;w&&l.minEndPTS?f.start=l.start+(l.minEndPTS-l.start):f.start=l.start+l.duration}else f.start=Math.max(l.start-f.duration,0)}function R(l,f,O,A,T,w){var S=A-O;S<=0&&(N.logger.warn("Fragment should have a positive duration",f),A=O+f.duration,w=T+f.duration);var x=O,d=A,y=f.startPTS,u=f.endPTS;if(Object(z.isFiniteNumber)(y)){var E=Math.abs(y-O);Object(z.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(E,f.deltaPTS):f.deltaPTS=E,x=Math.max(O,y),O=Math.min(O,y),T=Math.min(T,f.startDTS),d=Math.min(A,u),A=Math.max(A,u),w=Math.max(w,f.endDTS)}f.duration=A-O;var g=O-f.start;f.appendedPTS=A,f.start=f.startPTS=O,f.maxStartPTS=x,f.startDTS=T,f.endPTS=A,f.minEndPTS=d,f.endDTS=w;var b=f.sn;if(!l||b<l.startSN||b>l.endSN)return 0;var P,L=b-l.startSN,B=l.fragments;for(B[L]=f,P=L;P>0;P--)M(B[P],B[P-1]);for(P=L;P<B.length-1;P++)M(B[P],B[P+1]);return l.fragmentHint&&M(B[B.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,g}function v(l,f){for(var O=null,A=l.fragments,T=A.length-1;T>=0;T--){var w=A[T].initSegment;if(w){O=w;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var S=0,x;if(p(l,f,function(P,L){P.relurl&&(S=P.cc-L.cc),Object(z.isFiniteNumber)(P.startPTS)&&Object(z.isFiniteNumber)(P.endPTS)&&(L.start=L.startPTS=P.startPTS,L.startDTS=P.startDTS,L.appendedPTS=P.appendedPTS,L.maxStartPTS=P.maxStartPTS,L.endPTS=P.endPTS,L.endDTS=P.endDTS,L.minEndPTS=P.minEndPTS,L.duration=P.endPTS-P.startPTS,L.duration&&(x=L),f.PTSKnown=f.alignedSliding=!0),L.elementaryStreams=P.elementaryStreams,L.loader=P.loader,L.stats=P.stats,L.urlId=P.urlId,P.initSegment&&(L.initSegment=P.initSegment,O=P.initSegment)}),O){var d=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;d.forEach(function(P){var L;(!P.initSegment||P.initSegment.relurl===((L=O)===null||L===void 0?void 0:L.relurl))&&(P.initSegment=O)})}if(f.skippedSegments&&(f.deltaUpdateFailed=f.fragments.some(function(P){return!P}),f.deltaUpdateFailed)){N.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var y=f.skippedSegments;y--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}var u=f.fragments;if(S){N.logger.warn("discontinuity sliding from playlist, take drift into account");for(var E=0;E<u.length;E++)u[E].cc+=S}f.skippedSegments&&(f.startCC=f.fragments[0].cc),m(l.partList,f.partList,function(P,L){L.elementaryStreams=P.elementaryStreams,L.stats=P.stats}),x?R(f,x,x.startPTS,x.endPTS,x.startDTS,x.endDTS):c(l,f),u.length&&(f.totalduration=f.edge-u[0].start),f.driftStartTime=l.driftStartTime,f.driftStart=l.driftStart;var g=f.advancedDateTime;if(f.advanced&&g){var b=f.edge;f.driftStart||(f.driftStartTime=g,f.driftStart=b),f.driftEndTime=g,f.driftEnd=b}else f.driftEndTime=l.driftEndTime,f.driftEnd=l.driftEnd,f.advancedDateTime=l.advancedDateTime}function m(l,f,O){if(l&&f)for(var A=0,T=0,w=l.length;T<=w;T++){var S=l[T],x=f[T+A];S&&x&&S.index===x.index&&S.fragment.sn===x.fragment.sn?O(S,x):A--}}function p(l,f,O){for(var A=f.skippedSegments,T=Math.max(l.startSN,f.startSN)-f.startSN,w=(l.fragmentHint?1:0)+(A?f.endSN:Math.min(l.endSN,f.endSN))-f.startSN,S=f.startSN-l.startSN,x=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,d=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,y=T;y<=w;y++){var u=d[S+y],E=x[y];A&&!E&&y<A&&(E=f.fragments[y]=u),u&&E&&O(u,E)}}function c(l,f){var O=f.startSN+f.skippedSegments-l.startSN,A=l.fragments;if(O<0||O>=A.length)return;o(f,A[O].start)}function o(l,f){if(f){for(var O=l.fragments,A=l.skippedSegments;A<O.length;A++)O[A].start+=f;l.fragmentHint&&(l.fragmentHint.start+=f)}}function h(l,f){var O=1e3*l.levelTargetDuration,A=O/2,T=l.age,w=T>0&&T<O*3,S=f.loading.end-f.loading.start,x,d=l.availabilityDelay;if(l.updated===!1)if(w){var y=333*l.misses;x=Math.max(Math.min(A,S*2),y),l.availabilityDelay=(l.availabilityDelay||0)+x}else x=A;else w?(d=Math.min(d||O/2,T),l.availabilityDelay=d,x=d+O-T):x=O-S;return Math.round(x)}function s(l,f,O){if(!l||!l.details)return null;var A=l.details,T=A.fragments[f-A.startSN];return T||(T=A.fragmentHint,T&&T.sn===f?T:f<A.startSN&&O&&O.sn===f?O:null)}function i(l,f,O){if(!l||!l.details)return null;var A=l.details.partList;if(A)for(var T=A.length;T--;){var w=A[T];if(w.index===O&&w.fragment.sn===f)return w}return null}},"./src/controller/stream-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return A});var z=D("./src/polyfills/number.ts"),N=D("./src/controller/base-stream-controller.ts"),k=D("./src/is-supported.ts"),W=D("./src/events.ts"),F=D("./src/utils/buffer-helper.ts"),M=D("./src/controller/fragment-tracker.ts"),R=D("./src/types/loader.ts"),v=D("./src/loader/fragment.ts"),m=D("./src/demux/transmuxer-interface.ts"),p=D("./src/types/transmuxer.ts"),c=D("./src/controller/gap-controller.ts"),o=D("./src/errors.ts"),h=D("./src/utils/logger.ts");function s(T,w){for(var S=0;S<w.length;S++){var x=w[S];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(T,x.key,x)}}function i(T,w,S){return w&&s(T.prototype,w),S&&s(T,S),T}function l(T,w){T.prototype=Object.create(w.prototype),T.prototype.constructor=T,f(T,w)}function f(T,w){return f=Object.setPrototypeOf||function(x,d){return x.__proto__=d,x},f(T,w)}var O=100,A=function(T){l(w,T);function w(x,d){var y;return y=T.call(this,x,d,"[stream-controller]")||this,y.audioCodecSwap=!1,y.gapController=null,y.level=-1,y._forceStartLoad=!1,y.altAudio=!1,y.audioOnly=!1,y.fragPlaying=null,y.onvplaying=null,y.onvseeked=null,y.fragLastKbps=0,y.stalled=!1,y.couldBacktrack=!1,y.audioCodecSwitch=!1,y.videoBuffer=null,y._registerListeners(),y}var S=w.prototype;return S._registerListeners=function(){var d=this.hls;d.on(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(W.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(W.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.on(W.Events.ERROR,this.onError,this),d.on(W.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.on(W.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on(W.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on(W.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.on(W.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S._unregisterListeners=function(){var d=this.hls;d.off(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(W.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.off(W.Events.ERROR,this.onError,this),d.off(W.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.off(W.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off(W.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off(W.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.off(W.Events.FRAG_BUFFERED,this.onFragBuffered,this)},S.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},S.startLoad=function(d){if(this.levels){var y=this.lastCurrentTime,u=this.hls;if(this.stopLoad(),this.setInterval(O),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var E=u.startLevel;E===-1&&(u.config.testBandwidth?(E=0,this.bitrateTest=!0):E=u.nextAutoLevel),this.level=u.nextLoadLevel=E,this.loadedmetadata=!1}y>0&&d===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),d=y),this.state=N.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()}else this._forceStartLoad=!0,this.state=N.State.STOPPED},S.stopLoad=function(){this._forceStartLoad=!1,T.prototype.stopLoad.call(this)},S.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_LEVEL:{var d,y=this.levels,u=this.level,E=y==null||((d=y[u])===null||d===void 0)?void 0:d.details;if(E&&(!E.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(E))break;this.state=N.State.IDLE;break}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var g,b=self.performance.now(),P=this.retryDate;(!P||b>=P||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=N.State.IDLE)}break;default:break}this.onTickEnd()},S.onTickEnd=function(){T.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},S.doTickIdle=function(){var d,y,u=this.hls,E=this.levelLastLoaded,g=this.levels,b=this.media,P=u.config,L=u.nextLoadLevel;if(E===null||!b&&(this.startFragRequested||!P.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[L])return;var B=g[L];this.level=u.nextLoadLevel=L;var U=B.details;if(!U||this.state===N.State.WAITING_LEVEL||U.live&&this.levelLastLoaded!==L){this.state=N.State.WAITING_LEVEL;return}var C=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:b,R.PlaylistLevelType.MAIN);if(C===null)return;var _=C.len,j=this.getMaxBufferLength(B.maxBitrate);if(_>=j)return;if(this._streamEnded(C,U)){var K={};this.altAudio&&(K.type="video"),this.hls.trigger(W.Events.BUFFER_EOS,K),this.state=N.State.ENDED;return}var q=C.end,te=this.getNextFragment(q,U);if(this.couldBacktrack&&!this.fragPrevious&&te&&te.sn!=="initSegment"){var _e=te.sn-U.startSN;_e>1&&(te=U.fragments[_e-1],this.fragmentTracker.removeFragment(te))}if(te&&this.fragmentTracker.getState(te)===M.FragmentState.OK&&this.nextLoadPosition>q){var ue=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(b,ue,R.PlaylistLevelType.MAIN),te=this.getNextFragment(this.nextLoadPosition,U)}if(!te)return;te.initSegment&&!te.initSegment.data&&!this.bitrateTest&&(te=te.initSegment),((d=te.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((y=te.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(te,U):this.loadFragment(te,U,q)},S.loadFragment=function(d,y,u){var E,g=this.fragmentTracker.getState(d);if(this.fragCurrent=d,g===M.FragmentState.BACKTRACKED){var b=this.fragmentTracker.getBacktrackData(d);if(b){this._handleFragmentLoadProgress(b),this._handleFragmentLoadComplete(b);return}else g=M.FragmentState.NOT_LOADED}g===M.FragmentState.NOT_LOADED||g===M.FragmentState.PARTIAL?d.sn==="initSegment"?this._loadInitSegment(d):this.bitrateTest?(d.bitrateTest=!0,this.log("Fragment "+d.sn+" of level "+d.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(d)):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,d,y,u)):g===M.FragmentState.APPENDING?this.reduceMaxBufferLength(d.duration)&&this.fragmentTracker.removeFragment(d):((E=this.media)===null||E===void 0?void 0:E.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},S.getAppendedFrag=function(d){var y=this.fragmentTracker.getAppendedFrag(d,R.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},S.getBufferedFrag=function(d){return this.fragmentTracker.getBufferedFrag(d,R.PlaylistLevelType.MAIN)},S.followingBufferedFrag=function(d){return d?this.getBufferedFrag(d.end+.5):null},S.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},S.nextLevelSwitch=function(){var d=this.levels,y=this.media;if(y!=null&&y.readyState){var u,E=this.getAppendedFrag(y.currentTime);if(E&&E.start>1&&this.flushMainBuffer(0,E.start-1),!y.paused&&d){var g=this.hls.nextLoadLevel,b=d[g],P=this.fragLastKbps;P&&this.fragCurrent?u=this.fragCurrent.duration*b.maxBitrate/(1e3*P)+1:u=0}else u=0;var L=this.getBufferedFrag(y.currentTime+u);if(L){var B=this.followingBufferedFrag(L);if(B){this.abortCurrentFrag();var U=B.maxStartPTS?B.maxStartPTS:B.start,C=B.duration,_=Math.max(L.end,U+Math.min(Math.max(C-this.config.maxFragLookUpTolerance,C*.5),C*.75));this.flushMainBuffer(_,Number.POSITIVE_INFINITY)}}}},S.abortCurrentFrag=function(){var d=this.fragCurrent;this.fragCurrent=null,d!=null&&d.loader&&d.loader.abort(),this.state===N.State.KEY_LOADING&&(this.state=N.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},S.flushMainBuffer=function(d,y){T.prototype.flushMainBuffer.call(this,d,y,this.altAudio?"video":null)},S.onMediaAttached=function(d,y){T.prototype.onMediaAttached.call(this,d,y);var u=y.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),u.addEventListener("playing",this.onvplaying),u.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,u,this.fragmentTracker,this.hls)},S.onMediaDetaching=function(){var d=this.media;d&&(d.removeEventListener("playing",this.onvplaying),d.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),T.prototype.onMediaDetaching.call(this)},S.onMediaPlaying=function(){this.tick()},S.onMediaSeeked=function(){var d=this.media,y=d?d.currentTime:null;Object(z.isFiniteNumber)(y)&&this.log("Media seeked to "+y.toFixed(3)),this.tick()},S.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(W.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},S.onManifestParsed=function(d,y){var u=!1,E=!1,g;y.levels.forEach(function(b){g=b.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(u=!0),g.indexOf("mp4a.40.5")!==-1&&(E=!0))}),this.audioCodecSwitch=u&&E&&!Object(k.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=y.levels,this.startFragRequested=!1},S.onLevelLoading=function(d,y){var u=this.levels;if(!u||this.state!==N.State.IDLE)return;var E=u[y.level];(!E.details||E.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(E.details))&&(this.state=N.State.WAITING_LEVEL)},S.onLevelLoaded=function(d,y){var u,E=this.levels,g=y.level,b=y.details,P=b.totalduration;if(!E){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+b.startSN+","+b.endSN+"], cc ["+b.startCC+", "+b.endCC+"] duration:"+P);var L=this.fragCurrent;L&&(this.state===N.State.FRAG_LOADING||this.state===N.State.FRAG_LOADING_WAITING_RETRY)&&(L.level!==y.level&&L.loader&&(this.state=N.State.IDLE,L.loader.abort()));var B=E[g],U=0;if(b.live||(u=B.details)!==null&&u!==void 0&&u.live){if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed)return;U=this.alignPlaylists(b,B.details)}if(B.details=b,this.levelLastLoaded=g,this.hls.trigger(W.Events.LEVEL_UPDATED,{details:b,level:g}),this.state===N.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(b))return;this.state=N.State.IDLE}this.startFragRequested?b.live&&this.synchronizeToLiveEdge(b):this.setStartPosition(b,U),this.tick()},S._handleFragmentLoadProgress=function(d){var y,u=d.frag,E=d.part,g=d.payload,b=this.levels;if(!b){this.warn("Levels were reset while fragment load was in progress. Fragment "+u.sn+" of level "+u.level+" will not be buffered");return}var P=b[u.level],L=P.details;if(!L){this.warn("Dropping fragment "+u.sn+" of level "+u.level+" after level details were reset");return}var B=P.videoCodec,U=L.PTSKnown||!L.live,C=(y=u.initSegment)===null||y===void 0?void 0:y.data,_=this._getAudioCodec(P),j=this.transmuxer=this.transmuxer||new m.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),K=E?E.index:-1,q=K!==-1,te=new p.ChunkMetadata(u.level,u.sn,u.stats.chunkCount,g.byteLength,K,q),_e=this.initPTS[u.cc];j.push(g,C,_,B,u,E,L.totalduration,U,te,_e)},S.onAudioTrackSwitching=function(d,y){var u=this.altAudio,E=!!y.url,g=y.id;if(!E){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var b=this.fragCurrent;b!=null&&b.loader&&(this.log("Switching to main audio track, cancel main fragment load"),b.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var P=this.hls;u&&P.trigger(W.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),P.trigger(W.Events.AUDIO_TRACK_SWITCHED,{id:g})}},S.onAudioTrackSwitched=function(d,y){var u=y.id,E=!!this.hls.audioTracks[u].url;if(E){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=E,this.tick()},S.onBufferCreated=function(d,y){var u=y.tracks,E,g,b=!1;for(var P in u){var L=u[P];if(L.id==="main"){if(g=P,E=L,P==="video"){var B=u[P];B&&(this.videoBuffer=B.buffer)}}else b=!0}b&&E?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=E.buffer):this.mediaBuffer=this.media},S.onFragBuffered=function(d,y){var u=y.frag,E=y.part;if(u&&u.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(u)){this.warn("Fragment "+u.sn+(E?" p: "+E.index:"")+" of level "+u.level+" finished buffering, but was aborted. state: "+this.state),this.state===N.State.PARSED&&(this.state=N.State.IDLE);return}var g=E?E.stats:u.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),u.sn!=="initSegment"&&(this.fragPrevious=u),this.fragBufferedComplete(u,E)},S.onError=function(d,y){switch(y.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,y);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==N.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=N.State.ERROR):!y.levelRetry&&this.state===N.State.WAITING_LEVEL&&(this.state=N.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(y.parent==="main"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var u=!0,E=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);E&&E.len>.5&&(u=!this.reduceMaxBufferLength(E.len)),u&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},S.checkBuffer=function(){var d=this.media,y=this.gapController;if(!d||!y||!d.readyState)return;var u=F.BufferHelper.getBuffered(d);!this.loadedmetadata&&u.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=d.currentTime},S.onFragLoadEmergencyAborted=function(){this.state=N.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},S.onBufferFlushed=function(d,y){var u=y.type;if(u!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var E=(u===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(E,u,R.PlaylistLevelType.MAIN)}},S.onLevelsUpdated=function(d,y){this.levels=y.levels},S.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},S.seekToStartPos=function(){var d=this.media,y=d.currentTime,u=this.startPosition;if(u>=0&&y<u){if(d.seeking){h.logger.log("could not seek to "+u+", already seeking at "+y);return}var E=F.BufferHelper.getBuffered(d),g=E.length?E.start(0):0,b=g-u;b>0&&(b<this.config.maxBufferHole||b<this.config.maxFragLookUpTolerance)&&(h.logger.log("adjusting start position by "+b+" to match buffer start"),u+=b,this.startPosition=u),this.log("seek to target start position "+u+" from current time "+y),d.currentTime=u}},S._getAudioCodec=function(d){var y=this.config.defaultAudioCodec||d.audioCodec;return this.audioCodecSwap&&y&&(this.log("Swapping audio codec"),y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),y},S._loadBitrateTestFrag=function(d){var y=this;this._doFragLoad(d).then(function(u){var E=y.hls;if(!u||E.nextLoadLevel||y.fragContextChanged(d))return;y.fragLoadError=0,y.state=N.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var g=d.stats;g.parsing.start=g.parsing.end=g.buffering.start=g.buffering.end=self.performance.now(),E.trigger(W.Events.FRAG_LOADED,u)})},S._handleTransmuxComplete=function(d){var y,u="main",E=this.hls,g=d.remuxResult,b=d.chunkMeta,P=this.getCurrentContext(b);if(!P){this.warn("The loading context changed while buffering fragment "+b.sn+" of level "+b.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(b.level);return}var L=P.frag,B=P.part,U=P.level,C=g.video,_=g.text,j=g.id3,K=g.initSegment,q=this.altAudio?void 0:g.audio;if(this.fragContextChanged(L))return;if(this.state=N.State.PARSING,K){K.tracks&&(this._bufferInitSegment(U,K.tracks,L,b),E.trigger(W.Events.FRAG_PARSING_INIT_SEGMENT,{frag:L,id:u,tracks:K.tracks}));var te=K.initPTS,_e=K.timescale;Object(z.isFiniteNumber)(te)&&(this.initPTS[L.cc]=te,E.trigger(W.Events.INIT_PTS_FOUND,{frag:L,id:u,initPTS:te,timescale:_e}))}if(C&&g.independent!==!1){if(U.details){var ue=C.startPTS,me=C.endPTS,fe=C.startDTS,le=C.endDTS;if(B)B.elementaryStreams[C.type]={startPTS:ue,endPTS:me,startDTS:fe,endDTS:le};else if(C.firstKeyFrame&&C.independent&&(this.couldBacktrack=!0),C.dropped&&C.independent){var ie=this.getLoadPosition()+this.config.maxBufferHole;if(ie<ue){this.backtrack(L);return}L.setElementaryStreamInfo(C.type,L.start,me,L.start,le,!0)}L.setElementaryStreamInfo(C.type,ue,me,fe,le),this.bufferFragmentData(C,L,B,b)}}else if(g.independent===!1){this.backtrack(L);return}if(q){var he=q.startPTS,J=q.endPTS,ae=q.startDTS,ee=q.endDTS;B&&(B.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:J,startDTS:ae,endDTS:ee}),L.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,he,J,ae,ee),this.bufferFragmentData(q,L,B,b)}if(j!=null&&(y=j.samples)!==null&&y!==void 0&&y.length){var be={frag:L,id:u,samples:j.samples};E.trigger(W.Events.FRAG_PARSING_METADATA,be)}if(_){var xe={frag:L,id:u,samples:_.samples};E.trigger(W.Events.FRAG_PARSING_USERDATA,xe)}},S._bufferInitSegment=function(d,y,u,E){var g=this;if(this.state!==N.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var b=y.audio,P=y.video,L=y.audiovideo;if(b){var B=d.audioCodec,U=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),b.metadata.channelCount!==1&&U.indexOf("firefox")===-1&&(B="mp4a.40.5")),U.indexOf("android")!==-1&&b.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),d.audioCodec&&d.audioCodec!==B&&this.log('Swapping manifest audio codec "'+d.audioCodec+'" for "'+B+'"'),b.levelCodec=B,b.id="main",this.log("Init audio buffer, container:"+b.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(d.audioCodec||"")+"/"+b.codec+"]")}P&&(P.levelCodec=d.videoCodec,P.id="main",this.log("Init video buffer, container:"+P.container+", codecs[level/parsed]=["+(d.videoCodec||"")+"/"+P.codec+"]")),L&&this.log("Init audiovideo buffer, container:"+L.container+", codecs[level/parsed]=["+(d.attrs.CODECS||"")+"/"+L.codec+"]"),this.hls.trigger(W.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(C){var _=y[C],j=_.initSegment;j!=null&&j.byteLength&&g.hls.trigger(W.Events.BUFFER_APPENDING,{type:C,data:j,frag:u,part:null,chunkMeta:E,parent:u.type})}),this.tick()},S.backtrack=function(d){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(d);var y=this.fragmentTracker.backtrack(d);this.fragPrevious=null,this.nextLoadPosition=d.start,y?this.resetFragmentLoading(d):this.state=N.State.BACKTRACKING},S.checkFragmentChanged=function(){var d=this.media,y=null;if(d&&d.readyState>1&&d.seeking===!1){var u=d.currentTime;if(F.BufferHelper.isBuffered(d,u)?y=this.getAppendedFrag(u):F.BufferHelper.isBuffered(d,u+.1)&&(y=this.getAppendedFrag(u+.1)),y){var E=this.fragPlaying,g=y.level;(!E||y.sn!==E.sn||E.level!==g||y.urlId!==E.urlId)&&(this.hls.trigger(W.Events.FRAG_CHANGED,{frag:y}),(!E||E.level!==g)&&this.hls.trigger(W.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=y)}}},i(w,[{key:"nextLevel",get:function(){var d=this.nextBufferedFrag;return d?d.level:-1}},{key:"currentLevel",get:function(){var d=this.media;if(d){var y=this.getAppendedFrag(d.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var d=this.media;if(d){var y=this.getAppendedFrag(d.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),w}(N.default)},"./src/controller/subtitle-stream-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"SubtitleStreamController",function(){return l});var z=D("./src/events.ts"),N=D("./src/utils/logger.ts"),k=D("./src/utils/buffer-helper.ts"),W=D("./src/controller/fragment-finders.ts"),F=D("./src/utils/discontinuities.ts"),M=D("./src/controller/level-helper.ts"),R=D("./src/controller/fragment-tracker.ts"),v=D("./src/controller/base-stream-controller.ts"),m=D("./src/types/loader.ts"),p=D("./src/types/level.ts");function c(f,O){for(var A=0;A<O.length;A++){var T=O[A];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(f,T.key,T)}}function o(f,O,A){return O&&c(f.prototype,O),A&&c(f,A),f}function h(f,O){f.prototype=Object.create(O.prototype),f.prototype.constructor=f,s(f,O)}function s(f,O){return s=Object.setPrototypeOf||function(T,w){return T.__proto__=w,T},s(f,O)}var i=500,l=function(f){h(O,f);function O(T,w){var S;return S=f.call(this,T,w,"[subtitle-stream-controller]")||this,S.levels=[],S.currentTrackId=-1,S.tracksBuffered=[],S.mainDetails=null,S._registerListeners(),S}var A=O.prototype;return A.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},A._registerListeners=function(){var w=this.hls;w.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(z.Events.ERROR,this.onError,this),w.on(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.on(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.on(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A._unregisterListeners=function(){var w=this.hls;w.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(z.Events.ERROR,this.onError,this),w.off(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.off(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.off(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(i),this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},A.onLevelLoaded=function(w,S){this.mainDetails=S.details},A.onSubtitleFragProcessed=function(w,S){var x=S.frag,d=S.success;if(this.fragPrevious=x,this.state=v.State.IDLE,!d)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var u,E=x.start,g=0;g<y.length;g++)if(E>=y[g].start&&E<=y[g].end){u=y[g];break}var b=x.start+x.duration;u?u.end=b:(u={start:E,end:b},y.push(u)),this.fragmentTracker.fragBuffered(x)},A.onBufferFlushing=function(w,S){var x=S.startOffset,d=S.endOffset;if(x===0&&d!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,u=this.levels;if(!u.length||!u[y]||!u[y].details)return;var E=u[y].details,g=E.targetduration,b=d-g;if(b<=0)return;S.endOffsetSubtitles=Math.max(0,b),this.tracksBuffered.forEach(function(P){for(var L=0;L<P.length;){if(P[L].end<=b){P.shift();continue}else if(P[L].start<b)P[L].start=b;else break;L++}}),this.fragmentTracker.removeFragmentsInRange(x,b,m.PlaylistLevelType.SUBTITLE)}},A.onError=function(w,S){var x,d=S.frag;if(!d||d.type!==m.PlaylistLevelType.SUBTITLE)return;(x=this.fragCurrent)!==null&&x!==void 0&&x.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},A.onSubtitleTracksUpdated=function(w,S){var x=this,d=S.subtitleTracks;this.tracksBuffered=[],this.levels=d.map(function(y){return new p.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){x.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},A.onSubtitleTrackSwitch=function(w,S){if(this.currentTrackId=S.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var x=this.levels[this.currentTrackId];x!=null&&x.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,x&&this.setInterval(i)},A.onSubtitleTrackLoaded=function(w,S){var x,d=S.details,y=S.id,u=this.currentTrackId,E=this.levels;if(!E.length)return;var g=E[u];if(y>=E.length||y!==u||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,d.live||(x=g.details)!==null&&x!==void 0&&x.live){var b=this.mainDetails;if(d.deltaUpdateFailed||!b)return;var P=b.fragments[0];if(!g.details)d.hasProgramDateTime&&b.hasProgramDateTime?Object(F.alignMediaPlaylistByPDT)(d,b):P&&Object(M.addSliding)(d,P.start);else{var L=this.alignPlaylists(d,g.details);L===0&&P&&Object(M.addSliding)(d,P.start)}}if(g.details=d,this.levelLastLoaded=y,this.tick(),d.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var B=Object(W.findFragmentByPTS)(null,d.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},A._handleFragmentLoadComplete=function(w){var S=w.frag,x=w.payload,d=S.decryptdata,y=this.hls;if(this.fragContextChanged(S))return;if(x&&x.byteLength>0&&d&&d.key&&d.iv&&d.method==="AES-128"){var u=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(x),d.key.buffer,d.iv.buffer).then(function(E){var g=performance.now();y.trigger(z.Events.FRAG_DECRYPTED,{frag:S,payload:E,stats:{tstart:u,tdecrypt:g}})})}},A.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var w,S=this.currentTrackId,x=this.levels;if(!x.length||!x[S]||!x[S].details)return;var d=x[S].details,y=d.targetduration,u=this.config,E=this.media,g=k.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,E.currentTime-y,u.maxBufferHole),b=g.end,P=g.len,L=this.getMaxBufferLength()+y;if(P>L)return;console.assert(d,"Subtitle track details are defined on idle subtitle stream controller tick");var B=d.fragments,U=B.length,C=d.edge,_,j=this.fragPrevious;if(b<C){var K=u.maxFragLookUpTolerance;j&&d.hasProgramDateTime&&(_=Object(W.findFragmentByPDT)(B,j.endProgramDateTime,K)),_||(_=Object(W.findFragmentByPTS)(j,B,b,K),!_&&j&&j.start<B[0].start&&(_=B[0]))}else _=B[U-1];(w=_)!==null&&w!==void 0&&w.encrypted?(N.logger.log("Loading key for "+_.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(z.Events.KEY_LOADING,{frag:_})):_&&this.fragmentTracker.getState(_)===R.FragmentState.NOT_LOADED&&this.loadFragment(_,d,b)}},A.loadFragment=function(w,S,x){this.fragCurrent=w,f.prototype.loadFragment.call(this,w,S,x)},o(O,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),O}(v.default)},"./src/controller/subtitle-track-controller.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/events.ts"),N=D("./src/utils/texttrack-utils.ts"),k=D("./src/controller/base-playlist-controller.ts"),W=D("./src/types/loader.ts");function F(c,o){for(var h=0;h<o.length;h++){var s=o[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(c,s.key,s)}}function M(c,o,h){return o&&F(c.prototype,o),h&&F(c,h),c}function R(c,o){c.prototype=Object.create(o.prototype),c.prototype.constructor=c,v(c,o)}function v(c,o){return v=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},v(c,o)}var m=function(c){R(o,c);function o(s){var i;return i=c.call(this,s,"[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 h=o.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},h.registerListeners=function(){var i=this.hls;i.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(z.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var i=this.hls;i.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(z.Events.ERROR,this.onError,this)},h.onMediaAttached=function(i,l){if(this.media=l.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)},h.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},h.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=p(this.media.textTracks);i.forEach(function(l){Object(N.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(i,l){this.tracks=l.subtitleTracks},h.onSubtitleTrackLoaded=function(i,l){var f=l.id,O=l.details,A=this.trackId,T=this.tracksInGroup[A];if(!T){this.warn("Invalid subtitle track id "+f);return}var w=T.details;T.details=l.details,this.log("subtitle track "+f+" loaded ["+O.startSN+"-"+O.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,l,w))},h.onLevelLoading=function(i,l){this.switchLevel(l.level)},h.onLevelSwitching=function(i,l){this.switchLevel(l.level)},h.switchLevel=function(i){var l=this.hls.levels[i];if(!(l!=null&&l.textGroupIds))return;var f=l.textGroupIds[l.urlId];if(this.groupId!==f){var O=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(S){return!f||S.groupId===f});this.tracksInGroup=A;var T=this.findTrackId(O==null?void 0:O.name)||this.findTrackId();this.groupId=f;var w={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(z.Events.SUBTITLE_TRACKS_UPDATED,w),T!==-1&&this.setSubtitleTrack(T,O)}},h.findTrackId=function(i){for(var l=this.tracksInGroup,f=0;f<l.length;f++){var O=l[f];if((!this.selectDefaultTrack||O.default)&&(!i||i===O.name))return O.id}return-1},h.onError=function(i,l){if(c.prototype.onError.call(this,i,l),l.fatal||!l.context)return;l.context.type===W.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},h.loadPlaylist=function(i){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var f=l.id,O=l.groupId,A=l.url;if(i)try{A=i.addDirectives(A)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("Loading subtitle playlist for id "+f),this.hls.trigger(z.Events.SUBTITLE_TRACK_LOADING,{url:A,id:f,groupId:O,deliveryDirectives:i||null})}},h.toggleTrackModes=function(i){var l=this,f=this.media,O=this.subtitleDisplay,A=this.trackId;if(!f)return;var T=p(f.textTracks),w=T.filter(function(d){return d.groupId===l.groupId});if(i===-1)[].slice.call(T).forEach(function(d){d.mode="disabled"});else{var S=w[A];S&&(S.mode="disabled")}var x=w[i];x&&(x.mode=O?"showing":"hidden")},h.setSubtitleTrack=function(i,l){var f,O=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(f=O[i])!==null&&f!==void 0&&f.details)||i<-1||i>=O.length)return;this.clearTimer();var A=O[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,A){var T=A.id,w=A.groupId,S=w===void 0?"":w,x=A.name,d=A.type,y=A.url;this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:T,groupId:S,name:x,type:d,url:y});var u=this.switchParams(A.url,l==null?void 0:l.details);this.loadPlaylist(u)}else this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:i})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,l=p(this.media.textTracks),f=0;f<l.length;f++)if(l[f].mode==="hidden")i=f;else if(l[f].mode==="showing"){i=f;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},M(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,l)}}]),o}(k.default);function p(c){for(var o=[],h=0;h<c.length;h++){var s=c[h];s.kind==="subtitles"&&s.label&&o.push(c[h])}return o}V.default=m},"./src/controller/timeline-controller.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"TimelineController",function(){return p});var z=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),k=D("./src/utils/cea-608-parser.ts"),W=D("./src/utils/output-filter.ts"),F=D("./src/utils/webvtt-parser.ts"),M=D("./src/utils/texttrack-utils.ts"),R=D("./src/utils/imsc1-ttml-parser.ts"),v=D("./src/types/loader.ts"),m=D("./src/utils/logger.ts"),p=function(){function s(l){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=h(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.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 f=new W.default(this,"textTrack1"),O=new W.default(this,"textTrack2"),A=new W.default(this,"textTrack3"),T=new W.default(this,"textTrack4");this.cea608Parser1=new k.default(1,f,O),this.cea608Parser2=new k.default(3,A,T)}l.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(N.Events.FRAG_LOADING,this.onFragLoading,this),l.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=s.prototype;return i.destroy=function(){var f=this.hls;f.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),f.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),f.off(N.Events.FRAG_LOADING,this.onFragLoading,this),f.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),f.off(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),f.off(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.off(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),f.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(f,O,A,T,w){for(var S=!1,x=w.length;x--;){var d=w[x],y=o(d[0],d[1],O,A);if(y>=0&&(d[0]=Math.min(d[0],O),d[1]=Math.max(d[1],A),S=!0,y/(A-O)>.5))return}if(S||w.push([O,A]),this.config.renderTextTracksNatively){var u=this.captionsTracks[f];this.Cues.newCue(u,O,A,T)}else{var E=this.Cues.newCue(null,O,A,T);this.hls.trigger(N.Events.CUES_PARSED,{type:"captions",cues:E,track:f})}},i.onInitPtsFound=function(f,O){var A=this,T=O.frag,w=O.id,S=O.initPTS,x=O.timescale,d=this.unparsedVttFrags;w==="main"&&(this.initPTS[T.cc]=S,this.timescale[T.cc]=x),d.length&&(this.unparsedVttFrags=[],d.forEach(function(y){A.onFragLoaded(N.Events.FRAG_LOADED,y)}))},i.getExistingTrack=function(f){var O=this.media;if(O)for(var A=0;A<O.textTracks.length;A++){var T=O.textTracks[A];if(T[f])return T}return null},i.createCaptionsTrack=function(f){this.config.renderTextTracksNatively?this.createNativeTrack(f):this.createNonNativeTrack(f)},i.createNativeTrack=function(f){if(this.captionsTracks[f])return;var O=this.captionsProperties,A=this.captionsTracks,T=this.media,w=O[f],S=w.label,x=w.languageCode,d=this.getExistingTrack(f);if(d)A[f]=d,Object(M.clearCurrentCues)(A[f]),Object(M.sendAddTrackEvent)(A[f],T);else{var y=this.createTextTrack("captions",S,x);y&&(y[f]=!0,A[f]=y)}},i.createNonNativeTrack=function(f){if(this.nonNativeCaptionsTracks[f])return;var O=this.captionsProperties[f];if(!O)return;var A=O.label,T={_id:f,label:A,kind:"captions",default:O.media?!!O.media.default:!1,closedCaptions:O.media};this.nonNativeCaptionsTracks[f]=T,this.hls.trigger(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[T]})},i.createTextTrack=function(f,O,A){var T=this.media;return T?T.addTextTrack(f,O,A):void 0},i.onMediaAttaching=function(f,O){this.media=O.media,this._cleanTracks()},i.onMediaDetaching=function(){var f=this.captionsTracks;Object.keys(f).forEach(function(O){Object(M.clearCurrentCues)(f[O]),delete f[O]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),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 f=this.media;if(!f)return;var O=f.textTracks;if(O)for(var A=0;A<O.length;A++)Object(M.clearCurrentCues)(O[A])},i.onSubtitleTracksUpdated=function(f,O){var A=this;this.textTracks=[];var T=O.subtitleTracks||[],w=T.some(function(y){return y.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||w&&this.config.enableIMSC1){var S=this.tracks&&T&&this.tracks.length===T.length;if(this.tracks=T||[],this.config.renderTextTracksNatively){var x=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,u){var E;if(u<x.length){for(var g=null,b=0;b<x.length;b++)if(c(x[b],y)){g=x[b];break}g&&(E=g)}E?Object(M.clearCurrentCues)(E):(E=A.createTextTrack("subtitles",y.name,y.lang),E&&(E.mode="disabled")),E&&(E.groupId=y.groupId,A.textTracks.push(E))})}else if(!S&&this.tracks&&this.tracks.length){var d=this.tracks.map(function(y){return{label:y.name,kind:y.type.toLowerCase(),default:y.default,subtitleTrack:y}});this.hls.trigger(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:d})}}},i.onManifestLoaded=function(f,O){var A=this;this.config.enableCEA708Captions&&O.captions&&O.captions.forEach(function(T){var w=/(?:CC|SERVICE)([1-4])/.exec(T.instreamId);if(!w)return;var S="textTrack"+w[1],x=A.captionsProperties[S];if(!x)return;x.label=T.name,T.lang&&(x.languageCode=T.lang),x.media=T})},i.onFragLoading=function(f,O){var A=this.cea608Parser1,T=this.cea608Parser2,w=this.lastSn,S=this.lastPartIndex;if(!this.enabled||!(A&&T))return;if(O.frag.type===v.PlaylistLevelType.MAIN){var x,d,y=O.frag.sn,u=(x=O==null||((d=O.part)===null||d===void 0)?void 0:d.index)!=null?x:-1;y===w+1||y===w&&u===S+1||(A.reset(),T.reset()),this.lastSn=y,this.lastPartIndex=u}},i.onFragLoaded=function(f,O){var A=O.frag,T=O.payload,w=this.initPTS,S=this.unparsedVttFrags;if(A.type===v.PlaylistLevelType.SUBTITLE)if(T.byteLength){if(!Object(z.isFiniteNumber)(w[A.cc])){S.push(O),w.length&&this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Missing initial subtitle PTS")});return}var x=A.decryptdata;if(x==null||x.key==null||x.method!=="AES-128"){var d=this.tracks[A.level],y=this.vttCCs;y[A.cc]||(y[A.cc]={start:A.start,prevCC:this.prevCC,new:!0},this.prevCC=A.cc),d&&d.textCodec===R.IMSC1_CODEC?this._parseIMSC1(A,T):this._parseVTTs(A,T,y)}}else this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(f,O){var A=this,T=this.hls;Object(R.parseIMSC1)(O,this.initPTS[f.cc],this.timescale[f.cc],function(w){A._appendCues(w,f.level),T.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(w){m.logger.log("Failed to parse IMSC1: "+w),T.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:w})})},i._parseVTTs=function(f,O,A){var T=this,w=this.hls;Object(F.parseWebVTT)(O,this.initPTS[f.cc],this.timescale[f.cc],A,f.cc,f.start,function(S){T._appendCues(S,f.level),w.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(S){T._fallbackToIMSC1(f,O),m.logger.log("Failed to parse VTT cue: "+S),w.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:S})})},i._fallbackToIMSC1=function(f,O){var A=this,T=this.tracks[f.level];T.textCodec||Object(R.parseIMSC1)(O,this.initPTS[f.cc],this.timescale[f.cc],function(){T.textCodec=R.IMSC1_CODEC,A._parseIMSC1(f,O)},function(){T.textCodec="wvtt"})},i._appendCues=function(f,O){var A=this.hls;if(this.config.renderTextTracksNatively){var T=this.textTracks[O];if(T.mode==="disabled")return;f.forEach(function(x){return Object(M.addCueToTrack)(T,x)})}else{var w=this.tracks[O],S=w.default?"default":"subtitles"+O;A.trigger(N.Events.CUES_PARSED,{type:"subtitles",cues:f,track:S})}},i.onFragDecrypted=function(f,O){var A=O.frag;if(A.type===v.PlaylistLevelType.SUBTITLE){if(!Object(z.isFiniteNumber)(this.initPTS[A.cc])){this.unparsedVttFrags.push(O);return}this.onFragLoaded(N.Events.FRAG_LOADED,O)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(f,O){var A=this.cea608Parser1,T=this.cea608Parser2;if(!this.enabled||!(A&&T))return;for(var w=0;w<O.samples.length;w++){var S=O.samples[w].bytes;if(S){var x=this.extractCea608Data(S);A.addData(O.samples[w].pts,x[0]),T.addData(O.samples[w].pts,x[1])}}},i.onBufferFlushing=function(f,O){var A=O.startOffset,T=O.endOffset,w=O.endOffsetSubtitles,S=O.type,x=this.media;if(!x||x.currentTime<T)return;if(!S||S==="video"){var d=this.captionsTracks;Object.keys(d).forEach(function(u){return Object(M.removeCuesInRange)(d[u],A,T)})}if(this.config.renderTextTracksNatively&&(A===0&&w!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(u){return Object(M.removeCuesInRange)(y[u],A,w)})}},i.extractCea608Data=function(f){for(var O=f[0]&31,A=2,T=[[],[]],w=0;w<O;w++){var S=f[A++],x=127&f[A++],d=127&f[A++],y=(4&S)!==0,u=3&S;if(x===0&&d===0)continue;y&&((u===0||u===1)&&(T[u].push(x),T[u].push(d)))}return T},s}();function c(s,i){return s&&s.label===i.name&&!(s.textTrack1||s.textTrack2)}function o(s,i,l,f){return Math.min(i,f)-Math.max(s,l)}function h(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return z});var z=function(){function N(W,F){this.subtle=void 0,this.aesIV=void 0,this.subtle=W,this.aesIV=F}var k=N.prototype;return k.decrypt=function(F,M){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},M,F)},N}()},"./src/crypt/aes-decryptor.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"removePadding",function(){return N}),D.d(V,"default",function(){return k});var z=D("./src/utils/typed-array.ts");function N(W){var F=W.byteLength,M=F&&new DataView(W.buffer).getUint8(F-1);return M?Object(z.sliceUint8)(W,0,F-M):W}var k=function(){function W(){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 F=W.prototype;return F.uint8ArrayToUint32Array_=function(R){for(var v=new DataView(R),m=new Uint32Array(4),p=0;p<4;p++)m[p]=v.getUint32(p*4);return m},F.initTable=function(){var R=this.sBox,v=this.invSBox,m=this.subMix,p=m[0],c=m[1],o=m[2],h=m[3],s=this.invSubMix,i=s[0],l=s[1],f=s[2],O=s[3],A=new Uint32Array(256),T=0,w=0,S=0;for(S=0;S<256;S++)S<128?A[S]=S<<1:A[S]=S<<1^283;for(S=0;S<256;S++){var x=w^w<<1^w<<2^w<<3^w<<4;x=x>>>8^x&255^99,R[T]=x,v[x]=T;var d=A[T],y=A[d],u=A[y],E=A[x]*257^x*16843008;p[T]=E<<24|E>>>8,c[T]=E<<16|E>>>16,o[T]=E<<8|E>>>24,h[T]=E,E=u*16843009^y*65537^d*257^T*16843008,i[x]=E<<24|E>>>8,l[x]=E<<16|E>>>16,f[x]=E<<8|E>>>24,O[x]=E,T?(T=d^A[A[A[u^d]]],w^=A[A[w]]):T=w=1}},F.expandKey=function(R){for(var v=this.uint8ArrayToUint32Array_(R),m=!0,p=0;p<v.length&&m;)m=v[p]===this.key[p],p++;if(m)return;this.key=v;var c=this.keySize=v.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var o=this.ksRows=(c+6+1)*4,h,s,i=this.keySchedule=new Uint32Array(o),l=this.invKeySchedule=new Uint32Array(o),f=this.sBox,O=this.rcon,A=this.invSubMix,T=A[0],w=A[1],S=A[2],x=A[3],d,y;for(h=0;h<o;h++){if(h<c){d=i[h]=v[h];continue}y=d,h%c===0?(y=y<<8|y>>>24,y=f[y>>>24]<<24|f[y>>>16&255]<<16|f[y>>>8&255]<<8|f[y&255],y^=O[h/c|0]<<24):c>6&&h%c===4&&(y=f[y>>>24]<<24|f[y>>>16&255]<<16|f[y>>>8&255]<<8|f[y&255]),i[h]=d=(i[h-c]^y)>>>0}for(s=0;s<o;s++)h=o-s,s&3?y=i[h]:y=i[h-4],s<4||h<=4?l[s]=y:l[s]=T[f[y>>>24]]^w[f[y>>>16&255]]^S[f[y>>>8&255]]^x[f[y&255]],l[s]=l[s]>>>0},F.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},F.decrypt=function(R,v,m){for(var p=this.keySize+6,c=this.invKeySchedule,o=this.invSBox,h=this.invSubMix,s=h[0],i=h[1],l=h[2],f=h[3],O=this.uint8ArrayToUint32Array_(m),A=O[0],T=O[1],w=O[2],S=O[3],x=new Int32Array(R),d=new Int32Array(x.length),y,u,E,g,b,P,L,B,U,C,_,j,K,q,te=this.networkToHostOrderSwap;v<x.length;){for(U=te(x[v]),C=te(x[v+1]),_=te(x[v+2]),j=te(x[v+3]),b=U^c[0],P=j^c[1],L=_^c[2],B=C^c[3],K=4,q=1;q<p;q++)y=s[b>>>24]^i[P>>16&255]^l[L>>8&255]^f[B&255]^c[K],u=s[P>>>24]^i[L>>16&255]^l[B>>8&255]^f[b&255]^c[K+1],E=s[L>>>24]^i[B>>16&255]^l[b>>8&255]^f[P&255]^c[K+2],g=s[B>>>24]^i[b>>16&255]^l[P>>8&255]^f[L&255]^c[K+3],b=y,P=u,L=E,B=g,K=K+4;y=o[b>>>24]<<24^o[P>>16&255]<<16^o[L>>8&255]<<8^o[B&255]^c[K],u=o[P>>>24]<<24^o[L>>16&255]<<16^o[B>>8&255]<<8^o[b&255]^c[K+1],E=o[L>>>24]<<24^o[B>>16&255]<<16^o[b>>8&255]<<8^o[P&255]^c[K+2],g=o[B>>>24]<<24^o[b>>16&255]<<16^o[P>>8&255]<<8^o[L&255]^c[K+3],d[v]=te(y^A),d[v+1]=te(g^T),d[v+2]=te(E^w),d[v+3]=te(u^S),A=U,T=C,w=_,S=j,v=v+4}return d.buffer},W}()},"./src/crypt/decrypter.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return v});var z=D("./src/crypt/aes-crypto.ts"),N=D("./src/crypt/fast-aes-key.ts"),k=D("./src/crypt/aes-decryptor.ts"),W=D("./src/utils/logger.ts"),F=D("./src/utils/mp4-tools.ts"),M=D("./src/utils/typed-array.ts"),R=16,v=function(){function m(c,o,h){var s=h===void 0?{}:h,i=s.removePKCS7Padding,l=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=c,this.config=o,this.removePKCS7Padding=l,l)try{var f=self.crypto;f&&(this.subtle=f.subtle||f.webkitSubtle)}catch(O){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=m.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var h=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(k.removePadding)(h):h},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(o,h,s,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),h,s);var l=this.flush();l&&i(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),h,s).then(i)},p.softwareDecrypt=function(o,h,s){var i=this.currentIV,l=this.currentResult,f=this.remainderData;this.logOnce("JS AES decrypt"),f&&(o=Object(F.appendUint8Array)(f,o),this.remainderData=null);var O=this.getValidChunk(o);if(!O.length)return null;i&&(s=i);var A=this.softwareDecrypter;A||(A=this.softwareDecrypter=new k.default),A.expandKey(h);var T=l;return this.currentResult=A.decrypt(O.buffer,0,s),this.currentIV=Object(M.sliceUint8)(O,-16).buffer,T||null},p.webCryptoDecrypt=function(o,h,s){var i=this,l=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new N.default(l,h)),this.fastAesKey.expandKey().then(function(f){if(!l)return Promise.reject(new Error("web crypto not initialized"));var O=new z.default(l,s);return O.decrypt(o.buffer,f)}).catch(function(f){return i.onWebCryptoError(f,o,h,s)})},p.onWebCryptoError=function(o,h,s,i){return W.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,s,i)},p.getValidChunk=function(o){var h=o,s=o.length-o.length%R;return s!==o.length&&(h=Object(M.sliceUint8)(o,0,s),this.remainderData=Object(M.sliceUint8)(o,s)),h},p.logOnce=function(o){if(!this.logEnabled)return;W.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},m}()},"./src/crypt/fast-aes-key.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return z});var z=function(){function N(W,F){this.subtle=void 0,this.key=void 0,this.subtle=W,this.key=F}var k=N.prototype;return k.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},N}()},"./src/demux/aacdemuxer.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/demux/base-audio-demuxer.ts"),N=D("./src/demux/adts.ts"),k=D("./src/utils/logger.ts"),W=D("./src/demux/id3.ts");function F(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,M(v,m)}function M(v,m){return M=Object.setPrototypeOf||function(c,o){return c.__proto__=o,c},M(v,m)}var R=function(v){F(m,v);function m(c,o){var h;return h=v.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=c,h.config=o,h}var p=m.prototype;return p.resetInitSegment=function(o,h,s){v.prototype.resetInitSegment.call(this,o,h,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:s,inputTimeScale:9e4,dropped:0}},m.probe=function(o){if(!o)return!1;for(var h=W.getID3Data(o,0)||[],s=h.length,i=o.length;s<i;s++)if(N.probe(o,s))return k.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(o,h){return N.canParse(o,h)},p.appendFrame=function(o,h,s){N.initTrackConfig(o,this.observer,h,s,o.manifestCodec);var i=N.appendFrame(o,h,s,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},m}(z.default);R.minProbeByteLength=9,V.default=R},"./src/demux/adts.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"getAudioConfig",function(){return W}),D.d(V,"isHeaderPattern",function(){return F}),D.d(V,"getHeaderLength",function(){return M}),D.d(V,"getFullFrameLength",function(){return R}),D.d(V,"canGetFrameLength",function(){return v}),D.d(V,"isHeader",function(){return m}),D.d(V,"canParse",function(){return p}),D.d(V,"probe",function(){return c}),D.d(V,"initTrackConfig",function(){return o}),D.d(V,"getFrameDuration",function(){return h}),D.d(V,"parseFrameHeader",function(){return s}),D.d(V,"appendFrame",function(){return i});var z=D("./src/utils/logger.ts"),N=D("./src/errors.ts"),k=D("./src/events.ts");function W(l,f,O,A){var T,w,S,x,d=navigator.userAgent.toLowerCase(),y=A,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];T=((f[O+2]&192)>>>6)+1;var E=(f[O+2]&60)>>>2;if(E>u.length-1){l.trigger(k.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+E});return}return S=(f[O+2]&1)<<2,S|=(f[O+3]&192)>>>6,z.logger.log("manifest codec:"+A+", ADTS type:"+T+", samplingIndex:"+E),/firefox/i.test(d)?E>=6?(T=5,x=new Array(4),w=E-3):(T=2,x=new Array(2),w=E):d.indexOf("android")!==-1?(T=2,x=new Array(2),w=E):(T=5,x=new Array(4),A&&(A.indexOf("mp4a.40.29")!==-1||A.indexOf("mp4a.40.5")!==-1)||!A&&E>=6?w=E-3:((A&&A.indexOf("mp4a.40.2")!==-1&&(E>=6&&S===1||/vivaldi/i.test(d))||!A&&S===1)&&(T=2,x=new Array(2)),w=E)),x[0]=T<<3,x[0]|=(E&14)>>1,x[1]|=(E&1)<<7,x[1]|=S<<3,T===5&&(x[1]|=(w&14)>>1,x[2]=(w&1)<<7,x[2]|=2<<2,x[3]=0),{config:x,samplerate:u[E],channelCount:S,codec:"mp4a.40."+T,manifestCodec:y}}function F(l,f){return l[f]===255&&(l[f+1]&246)===240}function M(l,f){return l[f+1]&1?7:9}function R(l,f){return(l[f+3]&3)<<11|l[f+4]<<3|(l[f+5]&224)>>>5}function v(l,f){return f+5<l.length}function m(l,f){return f+1<l.length&&F(l,f)}function p(l,f){return v(l,f)&&F(l,f)&&R(l,f)<=l.length-f}function c(l,f){if(m(l,f)){var O=M(l,f);if(f+O>=l.length)return!1;var A=R(l,f);if(A<=O)return!1;var T=f+A;return T===l.length||m(l,T)}return!1}function o(l,f,O,A,T){if(!l.samplerate){var w=W(f,O,A,T);if(!w)return;l.config=w.config,l.samplerate=w.samplerate,l.channelCount=w.channelCount,l.codec=w.codec,l.manifestCodec=w.manifestCodec,z.logger.log("parsed codec:"+l.codec+", rate:"+w.samplerate+", channels:"+w.channelCount)}}function h(l){return 1024*9e4/l}function s(l,f,O,A,T){var w=M(l,f),S=R(l,f);if(S-=w,S>0){var x=O+A*T;return{headerLength:w,frameLength:S,stamp:x}}}function i(l,f,O,A,T){var w=h(l.samplerate),S=s(f,O,A,T,w);if(S){var x=S.frameLength,d=S.headerLength,y=S.stamp,u=d+x,E=Math.max(0,O+u-f.length),g;E?(g=new Uint8Array(u-d),g.set(f.subarray(O+d,f.length),0)):g=f.subarray(O+d,O+u);var b={unit:g,pts:y};return E||l.samples.push(b),{sample:b,length:u,missing:E}}}},"./src/demux/base-audio-demuxer.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"initPTSFn",function(){return R});var z=D("./src/polyfills/number.ts"),N=D("./src/demux/id3.ts"),k=D("./src/demux/dummy-demuxed-track.ts"),W=D("./src/utils/mp4-tools.ts"),F=D("./src/utils/typed-array.ts"),M=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=v.prototype;return m.resetInitSegment=function(c,o,h){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(c,o){return!1},m.appendFrame=function(c,o,h){},m.demux=function(c,o){this.cachedData&&(c=Object(W.appendUint8Array)(this.cachedData,c),this.cachedData=null);var h=N.getID3Data(c,0),s=h?h.length:0,i,l,f=this._audioTrack,O=this._id3Track,A=h?N.getTimeStamp(h):void 0,T=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(A,o)),h&&h.length>0&&O.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),l=this.initPTS;s<T;){if(this.canParse(c,s)){var w=this.appendFrame(f,c,s);w?(this.frameIndex++,l=w.sample.pts,s+=w.length,i=s):s=T}else N.canParse(c,s)?(h=N.getID3Data(c,s),O.samples.push({pts:l,dts:l,data:h}),s+=h.length,i=s):s++;if(s===T&&i!==T){var S=Object(F.sliceUint8)(c,i);this.cachedData?this.cachedData=Object(W.appendUint8Array)(this.cachedData,S):this.cachedData=S}}return{audioTrack:f,avcTrack:Object(k.dummyTrack)(),id3Track:O,textTrack:Object(k.dummyTrack)()}},m.demuxSampleAes=function(c,o,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},m.flush=function(c){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(k.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(k.dummyTrack)()}},m.destroy=function(){},v}(),R=function(m,p){return Object(z.isFiniteNumber)(m)?m*90:p*9e4};V.default=M},"./src/demux/chunk-cache.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return z});var z=function(){function k(){this.chunks=[],this.dataLength=0}var W=k.prototype;return W.push=function(M){this.chunks.push(M),this.dataLength+=M.length},W.flush=function(){var M=this.chunks,R=this.dataLength,v;if(M.length)M.length===1?v=M[0]:v=N(M,R);else return new Uint8Array(0);return this.reset(),v},W.reset=function(){this.chunks.length=0,this.dataLength=0},k}();function N(k,W){for(var F=new Uint8Array(W),M=0,R=0;R<k.length;R++){var v=k[R];F.set(v,M),M+=v.length}return F}},"./src/demux/dummy-demuxed-track.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"dummyTrack",function(){return z});function z(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/utils/logger.ts"),N=function(){function k(F){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=F,this.bytesAvailable=F.byteLength,this.word=0,this.bitsAvailable=0}var W=k.prototype;return W.loadWord=function(){var M=this.data,R=this.bytesAvailable,v=M.byteLength-R,m=new Uint8Array(4),p=Math.min(4,R);if(p===0)throw new Error("no bytes available");m.set(M.subarray(v,v+p)),this.word=new DataView(m.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},W.skipBits=function(M){var R;this.bitsAvailable>M?(this.word<<=M,this.bitsAvailable-=M):(M-=this.bitsAvailable,R=M>>3,M-=R>>3,this.bytesAvailable-=R,this.loadWord(),this.word<<=M,this.bitsAvailable-=M)},W.readBits=function(M){var R=Math.min(this.bitsAvailable,M),v=this.word>>>32-R;return M>32&&z.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=R,this.bitsAvailable>0?this.word<<=R:this.bytesAvailable>0&&this.loadWord(),R=M-R,R>0&&this.bitsAvailable?v<<R|this.readBits(R):v},W.skipLZ=function(){var M;for(M=0;M<this.bitsAvailable;++M)if((this.word&2147483648>>>M)!==0)return this.word<<=M,this.bitsAvailable-=M,M;return this.loadWord(),M+this.skipLZ()},W.skipUEG=function(){this.skipBits(1+this.skipLZ())},W.skipEG=function(){this.skipBits(1+this.skipLZ())},W.readUEG=function(){var M=this.skipLZ();return this.readBits(M+1)-1},W.readEG=function(){var M=this.readUEG();return 1&M?1+M>>>1:-1*(M>>>1)},W.readBoolean=function(){return this.readBits(1)===1},W.readUByte=function(){return this.readBits(8)},W.readUShort=function(){return this.readBits(16)},W.readUInt=function(){return this.readBits(32)},W.skipScalingList=function(M){for(var R=8,v=8,m,p=0;p<M;p++)v!==0&&(m=this.readEG(),v=(R+m+256)%256),R=v===0?R:v},W.readSPS=function(){var M=0,R=0,v=0,m=0,p,c,o,h=this.readUByte.bind(this),s=this.readBits.bind(this),i=this.readUEG.bind(this),l=this.readBoolean.bind(this),f=this.skipBits.bind(this),O=this.skipEG.bind(this),A=this.skipUEG.bind(this),T=this.skipScalingList.bind(this);h();var w=h();if(s(5),f(3),h(),A(),w===100||w===110||w===122||w===244||w===44||w===83||w===86||w===118||w===128){var S=i();if(S===3&&f(1),A(),A(),f(1),l())for(c=S!==3?8:12,o=0;o<c;o++)l()&&(o<6?T(16):T(64))}A();var x=i();if(x===0)i();else if(x===1)for(f(1),O(),O(),p=i(),o=0;o<p;o++)O();A(),f(1);var d=i(),y=i(),u=s(1);u===0&&f(1),f(1),l()&&(M=i(),R=i(),v=i(),m=i());var E=[1,1];if(l()&&l()){var g=h();switch(g){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:{E=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((d+1)*16-M*2-R*2),height:(2-u)*(y+1)*16-(u?2:4)*(v+m),pixelRatio:E}},W.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},k}();V.default=N},"./src/demux/id3.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"isHeader",function(){return z}),D.d(V,"isFooter",function(){return N}),D.d(V,"getID3Data",function(){return k}),D.d(V,"canParse",function(){return F}),D.d(V,"getTimeStamp",function(){return M}),D.d(V,"isTimeStampFrame",function(){return R}),D.d(V,"getID3Frames",function(){return m}),D.d(V,"decodeFrame",function(){return p}),D.d(V,"utf8ArrayToStr",function(){return i}),D.d(V,"testables",function(){return l});var z=function(T,w){return w+10<=T.length&&(T[w]===73&&T[w+1]===68&&T[w+2]===51&&(T[w+3]<255&&T[w+4]<255&&(T[w+6]<128&&T[w+7]<128&&T[w+8]<128&&T[w+9]<128)))},N=function(T,w){return w+10<=T.length&&(T[w]===51&&T[w+1]===68&&T[w+2]===73&&(T[w+3]<255&&T[w+4]<255&&(T[w+6]<128&&T[w+7]<128&&T[w+8]<128&&T[w+9]<128)))},k=function(T,w){for(var S=w,x=0;z(T,w);){x+=10;var d=W(T,w+6);x+=d,N(T,w+10)&&(x+=10),w+=x}return x>0?T.subarray(S,S+x):void 0},W=function(T,w){var S=0;return S=(T[w]&127)<<21,S|=(T[w+1]&127)<<14,S|=(T[w+2]&127)<<7,S|=T[w+3]&127,S},F=function(T,w){return z(T,w)&&W(T,w+6)+10<=T.length-w},M=function(T){for(var w=m(T),S=0;S<w.length;S++){var x=w[S];if(R(x))return s(x)}return},R=function(T){return T&&T.key==="PRIV"&&T.info==="com.apple.streaming.transportStreamTimestamp"},v=function(T){var w=String.fromCharCode(T[0],T[1],T[2],T[3]),S=W(T,4),x=10;return{type:w,size:S,data:T.subarray(x,x+S)}},m=function(T){for(var w=0,S=[];z(T,w);){var x=W(T,w+6);w+=10;for(var d=w+x;w+8<d;){var y=v(T.subarray(w)),u=p(y);u&&S.push(u),w+=y.size+10}N(T,w)&&(w+=10)}return S},p=function(T){return T.type==="PRIV"?c(T):T.type[0]==="W"?h(T):o(T)},c=function(T){if(T.size<2)return;var w=i(T.data,!0),S=new Uint8Array(T.data.subarray(w.length+1));return{key:T.type,info:w,data:S.buffer}},o=function(T){if(T.size<2)return;if(T.type==="TXXX"){var w=1,S=i(T.data.subarray(w),!0);w+=S.length+1;var x=i(T.data.subarray(w));return{key:T.type,info:S,data:x}}var d=i(T.data.subarray(1));return{key:T.type,data:d}},h=function(T){if(T.type==="WXXX"){if(T.size<2)return;var w=1,S=i(T.data.subarray(w),!0);w+=S.length+1;var x=i(T.data.subarray(w));return{key:T.type,info:S,data:x}}var d=i(T.data);return{key:T.type,data:d}},s=function(T){if(T.data.byteLength===8){var w=new Uint8Array(T.data),S=w[3]&1,x=(w[4]<<23)+(w[5]<<15)+(w[6]<<7)+w[7];return x/=45,S&&(x+=4772185884e-2),Math.round(x)}return},i=function(T,w){w===void 0&&(w=!1);var S=O();if(S){var x=S.decode(T);if(w){var d=x.indexOf("\0");return d!==-1?x.substring(0,d):x}return x.replace(/\0/g,"")}for(var y=T.length,u,E,g,b="",P=0;P<y;){if(u=T[P++],u===0&&w)return b;if(u===0||u===3)continue;switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:b+=String.fromCharCode(u);break;case 12:case 13:E=T[P++],b+=String.fromCharCode((u&31)<<6|E&63);break;case 14:E=T[P++],g=T[P++],b+=String.fromCharCode((u&15)<<12|(E&63)<<6|(g&63)<<0);break;default:}}return b},l={decodeTextFrame:o},f;function O(){return!f&&typeof self.TextDecoder!="undefined"&&(f=new self.TextDecoder("utf-8")),f}},"./src/demux/mp3demuxer.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/demux/base-audio-demuxer.ts"),N=D("./src/demux/id3.ts"),k=D("./src/utils/logger.ts"),W=D("./src/demux/mpegaudio.ts");function F(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,M(v,m)}function M(v,m){return M=Object.setPrototypeOf||function(c,o){return c.__proto__=o,c},M(v,m)}var R=function(v){F(m,v);function m(){return v.apply(this,arguments)||this}var p=m.prototype;return p.resetInitSegment=function(o,h,s){v.prototype.resetInitSegment.call(this,o,h,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:s,inputTimeScale:9e4,dropped:0}},m.probe=function(o){if(!o)return!1;for(var h=N.getID3Data(o,0)||[],s=h.length,i=o.length;s<i;s++)if(W.probe(o,s))return k.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(o,h){return W.canParse(o,h)},p.appendFrame=function(o,h,s){return this.initPTS===null?void 0:W.appendFrame(o,h,s,this.initPTS,this.frameIndex)},m}(z.default);R.minProbeByteLength=4,V.default=R},"./src/demux/mp4demuxer.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/utils/mp4-tools.ts"),N=D("./src/demux/dummy-demuxed-track.ts"),k=function(){function W(M,R){this.remainderData=null,this.config=void 0,this.config=R}var F=W.prototype;return F.resetTimeStamp=function(){},F.resetInitSegment=function(){},F.resetContiguity=function(){},W.probe=function(R){return Object(z.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},F.demux=function(R){var v=R,m=Object(N.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(z.appendUint8Array)(this.remainderData,R));var p=Object(z.segmentValidRange)(v);this.remainderData=p.remainder,m.samples=p.valid||new Uint8Array}else m.samples=v;return{audioTrack:Object(N.dummyTrack)(),avcTrack:m,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},F.flush=function(){var R=Object(N.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(N.dummyTrack)(),avcTrack:R,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},F.demuxSampleAes=function(R,v,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},F.destroy=function(){},W}();k.minProbeByteLength=1024,V.default=k},"./src/demux/mpegaudio.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"appendFrame",function(){return M}),D.d(V,"parseHeader",function(){return R}),D.d(V,"isHeaderPattern",function(){return v}),D.d(V,"isHeader",function(){return m}),D.d(V,"canParse",function(){return p}),D.d(V,"probe",function(){return c});var z=null,N=[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],k=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],W=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],F=[0,1,1,4];function M(o,h,s,i,l){if(s+24>h.length)return;var f=R(h,s);if(f&&s+f.frameLength<=h.length){var O=f.samplesPerFrame*9e4/f.sampleRate,A=i+l*O,T={unit:h.subarray(s,s+f.frameLength),pts:A,dts:A};return o.config=[],o.channelCount=f.channelCount,o.samplerate=f.sampleRate,o.samples.push(T),{sample:T,length:f.frameLength,missing:0}}}function R(o,h){var s=o[h+1]>>3&3,i=o[h+1]>>1&3,l=o[h+2]>>4&15,f=o[h+2]>>2&3;if(s!==1&&l!==0&&l!==15&&f!==3){var O=o[h+2]>>1&1,A=o[h+3]>>6,T=s===3?3-i:i===3?3:4,w=N[T*14+l-1]*1e3,S=s===3?0:s===2?1:2,x=k[S*3+f],d=A===3?1:2,y=W[s][i],u=F[i],E=y*8*u,g=Math.floor(y*w/x+O)*u;if(z===null){var b=navigator.userAgent||"",P=b.match(/Chrome\/(\d+)/i);z=P?parseInt(P[1]):0}var L=!!z&&z<=87;return L&&i===2&&w>=224e3&&A===0&&(o[h+3]=o[h+3]|128),{sampleRate:x,channelCount:d,frameLength:g,samplesPerFrame:E}}}function v(o,h){return o[h]===255&&(o[h+1]&224)===224&&(o[h+1]&6)!==0}function m(o,h){return h+1<o.length&&v(o,h)}function p(o,h){var s=4;return v(o,h)&&s<=o.length-h}function c(o,h){if(h+1<o.length&&v(o,h)){var s=4,i=R(o,h),l=s;i!=null&&i.frameLength&&(l=i.frameLength);var f=h+l;return f===o.length||m(o,f)}return!1}},"./src/demux/sample-aes.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/crypt/decrypter.ts"),N=D("./src/demux/tsdemuxer.ts"),k=function(){function W(M,R,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new z.default(M,R,{removePKCS7Padding:!1})}var F=W.prototype;return F.decryptBuffer=function(R,v){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,v)},F.decryptAacSample=function(R,v,m,p){var c=R[v].unit,o=c.subarray(16,c.length-c.length%16),h=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(h,function(i){var l=new Uint8Array(i);c.set(l,16),p||s.decryptAacSamples(R,v+1,m)})},F.decryptAacSamples=function(R,v,m){for(;;v++){if(v>=R.length){m();return}if(R[v].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(R,v,m,p),!p)return}},F.getAvcEncryptedData=function(R){for(var v=Math.floor((R.length-48)/160)*16+16,m=new Int8Array(v),p=0,c=32;c<=R.length-16;c+=160,p+=16)m.set(R.subarray(c,c+16),p);return m},F.getAvcDecryptedUnit=function(R,v){for(var m=new Uint8Array(v),p=0,c=32;c<=R.length-16;c+=160,p+=16)R.set(m.subarray(p,p+16),c);return R},F.decryptAvcSample=function(R,v,m,p,c,o){var h=Object(N.discardEPB)(c.data),s=this.getAvcEncryptedData(h),i=this;this.decryptBuffer(s.buffer,function(l){c.data=i.getAvcDecryptedUnit(h,l),o||i.decryptAvcSamples(R,v,m+1,p)})},F.decryptAvcSamples=function(R,v,m,p){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,m=0){if(v>=R.length){p();return}for(var c=R[v].units;!(m>=c.length);m++){var o=c[m];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(R,v,m,p,o,h),!h)return}}},W}();V.default=k},"./src/demux/transmuxer-interface.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return c});var z=D("./node_modules/webworkify-webpack/index.js"),N=D.n(z),k=D("./src/events.ts"),W=D("./src/demux/transmuxer.ts"),F=D("./src/utils/logger.ts"),M=D("./src/errors.ts"),R=D("./src/utils/mediasource-helper.ts"),v=D("./node_modules/eventemitter3/index.js"),m=D.n(v),p=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function o(s,i,l,f){var O=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=s,this.id=i,this.onTransmuxComplete=l,this.onFlush=f;var A=s.config,T=function(y,u){u=u||{},u.frag=O.frag,u.id=O.id,s.trigger(y,u)};this.observer=new v.EventEmitter,this.observer.on(k.Events.FRAG_DECRYPTED,T),this.observer.on(k.Events.ERROR,T);var w={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},S=navigator.vendor;if(A.enableWorker&&typeof Worker!="undefined"){F.logger.log("demuxing in webworker");var x;try{x=this.worker=z("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(d){s.trigger(k.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(d.message+" ("+d.filename+":"+d.lineno+")")})},x.postMessage({cmd:"init",typeSupported:w,vendor:S,id:i,config:JSON.stringify(A)})}catch(d){F.logger.warn("Error in worker:",d),F.logger.error("Error while initializing DemuxerWorker, fallback to inline"),x&&self.URL.revokeObjectURL(x.objectURL),this.transmuxer=new W.default(this.observer,w,A,S,i),this.worker=null}}else this.transmuxer=new W.default(this.observer,w,A,S,i)}var h=o.prototype;return h.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var f=this.observer;f&&f.removeAllListeners(),this.observer=null},h.push=function(i,l,f,O,A,T,w,S,x,d){var y=this;x.transmuxing.start=self.performance.now();var u=this.transmuxer,E=this.worker,g=T?T.start:A.start,b=A.decryptdata,P=this.frag,L=!(P&&A.cc===P.cc),B=!(P&&x.level===P.level),U=P?x.sn-P.sn:-1,C=this.part?x.part-this.part.index:1,_=!B&&(U===1||U===0&&C===1),j=self.performance.now();(B||U||A.stats.parsing.start===0)&&(A.stats.parsing.start=j),T&&(C||!_)&&(T.stats.parsing.start=j);var K=new W.TransmuxState(L,_,S,B,g);if(!_||L){F.logger.log("[transmuxer-interface, "+A.type+"]: Starting new transmux session for sn: "+x.sn+" p: "+x.part+" level: "+x.level+" id: "+x.id+`
|
|
discontinuity: `+L+`
|
|
trackSwitch: `+B+`
|
|
contiguous: `+_+`
|
|
accurateTimeOffset: `+S+`
|
|
timeOffset: `+g);var q=new W.TransmuxConfig(f,O,l,w,d);this.configureTransmuxer(q)}if(this.frag=A,this.part=T,E)E.postMessage({cmd:"demux",data:i,decryptdata:b,chunkMeta:x,state:K},i instanceof ArrayBuffer?[i]:[]);else if(u){var te=u.push(i,b,x,K);Object(W.isPromise)(te)?te.then(function(_e){y.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(te)}},h.flush=function(i){var l=this;i.transmuxing.start=self.performance.now();var f=this.transmuxer,O=this.worker;if(O)O.postMessage({cmd:"flush",chunkMeta:i});else if(f){var A=f.flush(i);Object(W.isPromise)(A)?A.then(function(T){l.handleFlushResult(T,i)}):this.handleFlushResult(A,i)}},h.handleFlushResult=function(i,l){var f=this;i.forEach(function(O){f.handleTransmuxComplete(O)}),this.onFlush(l)},h.onWorkerMessage=function(i){var l=i.data,f=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,f.trigger(l.event,l.data);break}}},h.configureTransmuxer=function(i){var l=this.worker,f=this.transmuxer;l?l.postMessage({cmd:"configure",config:i}):f&&f.configure(i)},h.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},o}()},"./src/demux/transmuxer-worker.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return M});var z=D("./src/demux/transmuxer.ts"),N=D("./src/events.ts"),k=D("./src/utils/logger.ts"),W=D("./node_modules/eventemitter3/index.js"),F=D.n(W);function M(c){var o=new W.EventEmitter,h=function(i,l){c.postMessage({event:i,data:l})};o.on(N.Events.FRAG_DECRYPTED,h),o.on(N.Events.ERROR,h),c.addEventListener("message",function(s){var i=s.data;switch(i.cmd){case"init":{var l=JSON.parse(i.config);c.transmuxer=new z.default(o,i.typeSupported,l,i.vendor,i.id),Object(k.enableLogs)(l.debug),h("init",null);break}case"configure":{c.transmuxer.configure(i.config);break}case"demux":{var f=c.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(z.isPromise)(f)?f.then(function(T){R(c,T)}):R(c,f);break}case"flush":{var O=i.chunkMeta,A=c.transmuxer.flush(O);Object(z.isPromise)(A)?A.then(function(T){m(c,T,O)}):m(c,A,O);break}default:break}})}function R(c,o){if(p(o.remuxResult))return;var h=[],s=o.remuxResult,i=s.audio,l=s.video;i&&v(h,i),l&&v(h,l),c.postMessage({event:"transmuxComplete",data:o},h)}function v(c,o){o.data1&&c.push(o.data1.buffer),o.data2&&c.push(o.data2.buffer)}function m(c,o,h){o.forEach(function(s){R(c,s)}),c.postMessage({event:"flush",data:h})}function p(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return l}),D.d(V,"isPromise",function(){return A}),D.d(V,"TransmuxConfig",function(){return T}),D.d(V,"TransmuxState",function(){return w});var z=D("./src/events.ts"),N=D("./src/errors.ts"),k=D("./src/crypt/decrypter.ts"),W=D("./src/demux/aacdemuxer.ts"),F=D("./src/demux/mp4demuxer.ts"),M=D("./src/demux/tsdemuxer.ts"),R=D("./src/demux/mp3demuxer.ts"),v=D("./src/remux/mp4-remuxer.ts"),m=D("./src/remux/passthrough-remuxer.ts"),p=D("./src/demux/chunk-cache.ts"),c=D("./src/utils/mp4-tools.ts"),o=D("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(S){o.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var s=[{demux:M.default,remux:v.default},{demux:F.default,remux:m.default},{demux:W.default,remux:v.default},{demux:R.default,remux:v.default}],i=1024;s.forEach(function(S){var x=S.demux;i=Math.max(i,x.minProbeByteLength)});var l=function(){function S(d,y,u,E,g){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 p.default,this.observer=d,this.typeSupported=y,this.config=u,this.vendor=E,this.id=g}var x=S.prototype;return x.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},x.push=function(y,u,E,g){var b=this,P=E.transmuxing;P.executeStart=h();var L=new Uint8Array(y),B=this.cache,U=this.config,C=this.currentTransmuxState,_=this.transmuxConfig;g&&(this.currentTransmuxState=g);var j=f(L,u);if(j&&j.method==="AES-128"){var K=this.getDecrypter();if(U.enableSoftwareAES){var q=K.softwareDecrypt(L,j.key.buffer,j.iv.buffer);if(!q)return P.executeEnd=h(),O(E);L=new Uint8Array(q)}else return this.decryptionPromise=K.webCryptoDecrypt(L,j.key.buffer,j.iv.buffer).then(function(Ae){var Le=b.push(Ae,null,E);return b.decryptionPromise=null,Le}),this.decryptionPromise}var te=g||C,_e=te.contiguous,ue=te.discontinuity,me=te.trackSwitch,fe=te.accurateTimeOffset,le=te.timeOffset,ie=_.audioCodec,he=_.videoCodec,J=_.defaultInitPts,ae=_.duration,ee=_.initSegmentData;if((ue||me)&&this.resetInitSegment(ee,ie,he,ae),ue&&this.resetInitialTimestamp(J),_e||this.resetContiguity(),this.needsProbing(L,ue,me)){if(B.dataLength){var be=B.flush();L=Object(c.appendUint8Array)(be,L)}this.configureTransmuxer(L,_)}var xe=this.transmux(L,j,le,fe,E),ye=this.currentTransmuxState;return ye.contiguous=!0,ye.discontinuity=!1,ye.trackSwitch=!1,P.executeEnd=h(),xe},x.flush=function(y){var u=this,E=y.transmuxing;E.executeStart=h();var g=this.decrypter,b=this.cache,P=this.currentTransmuxState,L=this.decryptionPromise;if(L)return L.then(function(){return u.flush(y)});var B=[],U=P.timeOffset;if(g){var C=g.flush();C&&B.push(this.push(C,null,y))}var _=b.dataLength;b.reset();var j=this.demuxer,K=this.remuxer;if(!j||!K)return _>=i&&this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),E.executeEnd=h(),[O(y)];var q=j.flush(U);return A(q)?q.then(function(te){return u.flushRemux(B,te,y),B}):(this.flushRemux(B,q,y),B)},x.flushRemux=function(y,u,E){var g=u.audioTrack,b=u.avcTrack,P=u.id3Track,L=u.textTrack,B=this.currentTransmuxState,U=B.accurateTimeOffset,C=B.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+E.sn+(E.part>-1?" p: "+E.part:"")+" of level "+E.level);var _=this.remuxer.remux(g,b,P,L,C,U,!0,this.id);y.push({remuxResult:_,chunkMeta:E}),E.transmuxing.executeEnd=h()},x.resetInitialTimestamp=function(y){var u=this.demuxer,E=this.remuxer;if(!u||!E)return;u.resetTimeStamp(y),E.resetTimeStamp(y)},x.resetContiguity=function(){var y=this.demuxer,u=this.remuxer;if(!y||!u)return;y.resetContiguity(),u.resetNextTimestamp()},x.resetInitSegment=function(y,u,E,g){var b=this.demuxer,P=this.remuxer;if(!b||!P)return;b.resetInitSegment(u,E,g),P.resetInitSegment(y,u,E)},x.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},x.transmux=function(y,u,E,g,b){var P;return u&&u.method==="SAMPLE-AES"?P=this.transmuxSampleAes(y,u,E,g,b):P=this.transmuxUnencrypted(y,E,g,b),P},x.transmuxUnencrypted=function(y,u,E,g){var b=this.demuxer.demux(y,u,!1,!this.config.progressive),P=b.audioTrack,L=b.avcTrack,B=b.id3Track,U=b.textTrack,C=this.remuxer.remux(P,L,B,U,u,E,!1,this.id);return{remuxResult:C,chunkMeta:g}},x.transmuxSampleAes=function(y,u,E,g,b){var P=this;return this.demuxer.demuxSampleAes(y,u,E).then(function(L){var B=P.remuxer.remux(L.audioTrack,L.avcTrack,L.id3Track,L.textTrack,E,g,!1,P.id);return{remuxResult:B,chunkMeta:b}})},x.configureTransmuxer=function(y,u){for(var E=this.config,g=this.observer,b=this.typeSupported,P=this.vendor,L=u.audioCodec,B=u.defaultInitPts,U=u.duration,C=u.initSegmentData,_=u.videoCodec,j,K=0,q=s.length;K<q;K++)if(s[K].demux.probe(y)){j=s[K];break}j||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),j={demux:F.default,remux:m.default});var te=this.demuxer,_e=this.remuxer,ue=j.remux,me=j.demux;(!_e||!(_e instanceof ue))&&(this.remuxer=new ue(g,E,b,P)),(!te||!(te instanceof me))&&(this.demuxer=new me(g,E,b),this.probe=me.probe),this.resetInitSegment(C,L,_,U),this.resetInitialTimestamp(B)},x.needsProbing=function(y,u,E){return!this.demuxer||!this.remuxer||u||E},x.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new k.default(this.observer,this.config)),y},S}();function f(S,x){var d=null;return S.byteLength>0&&x!=null&&x.key!=null&&x.iv!==null&&x.method!=null&&(d=x),d}var O=function(x){return{remuxResult:{},chunkMeta:x}};function A(S){return"then"in S&&S.then instanceof Function}var T=function(x,d,y,u,E){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=x,this.videoCodec=d,this.initSegmentData=y,this.duration=u,this.defaultInitPts=E},w=function(x,d,y,u,E){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=x,this.contiguous=d,this.accurateTimeOffset=y,this.trackSwitch=u,this.timeOffset=E}},"./src/demux/tsdemuxer.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"discardEPB",function(){return O});var z=D("./src/demux/adts.ts"),N=D("./src/demux/mpegaudio.ts"),k=D("./src/demux/exp-golomb.ts"),W=D("./src/demux/id3.ts"),F=D("./src/demux/sample-aes.ts"),M=D("./src/events.ts"),R=D("./src/utils/mp4-tools.ts"),v=D("./src/utils/logger.ts"),m=D("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},c=function(){function A(w,S,x){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=w,this.config=S,this.typeSupported=x}A.probe=function(S){var x=A.syncOffset(S);return x<0?!1:(x&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},A.syncOffset=function(S){for(var x=Math.min(1e3,S.length-3*188),d=0;d<x;){if(S[d]===71&&S[d+188]===71&&S[d+2*188]===71)return d;d++}return-1},A.createTrack=function(S,x){return{container:S==="video"||S==="audio"?"video/mp2t":void 0,type:S,id:p[S],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:S==="audio"?x:void 0}};var T=A.prototype;return T.resetInitSegment=function(S,x,d){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=A.createTrack("video",d),this._audioTrack=A.createTrack("audio",d),this._id3Track=A.createTrack("id3",d),this._txtTrack=A.createTrack("text",d),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=S,this.videoCodec=x,this._duration=d},T.resetTimeStamp=function(){},T.resetContiguity=function(){var S=this._audioTrack,x=this._avcTrack,d=this._id3Track;S&&(S.pesData=null),x&&(x.pesData=null),d&&(d.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},T.demux=function(S,x,d,y){d===void 0&&(d=!1),y===void 0&&(y=!1),d||(this.sampleAes=null);var u,E=this._avcTrack,g=this._audioTrack,b=this._id3Track,P=E.pid,L=E.pesData,B=g.pid,U=b.pid,C=g.pesData,_=b.pesData,j=!1,K=this.pmtParsed,q=this._pmtId,te=S.length;if(this.remainderData&&(S=Object(R.appendUint8Array)(this.remainderData,S),te=S.length,this.remainderData=null),te<188&&!y)return this.remainderData=S,{audioTrack:g,avcTrack:E,id3Track:b,textTrack:this._txtTrack};var _e=Math.max(0,A.syncOffset(S));te-=(te+_e)%188,te<S.byteLength&&!y&&(this.remainderData=new Uint8Array(S.buffer,te,S.buffer.byteLength-te));for(var ue=_e;ue<te;ue+=188)if(S[ue]===71){var me=!!(S[ue+1]&64),fe=((S[ue+1]&31)<<8)+S[ue+2],le=(S[ue+3]&48)>>4,ie=void 0;if(le>1){if(ie=ue+5+S[ue+4],ie===ue+188)continue}else ie=ue+4;switch(fe){case P:me&&(L&&(u=i(L))&&this.parseAVCPES(u,!1),L={data:[],size:0}),L&&(L.data.push(S.subarray(ie,ue+188)),L.size+=ue+188-ie);break;case B:me&&(C&&(u=i(C))&&(g.isAAC?this.parseAACPES(u):this.parseMPEGPES(u)),C={data:[],size:0}),C&&(C.data.push(S.subarray(ie,ue+188)),C.size+=ue+188-ie);break;case U:me&&(_&&(u=i(_))&&this.parseID3PES(u),_={data:[],size:0}),_&&(_.data.push(S.subarray(ie,ue+188)),_.size+=ue+188-ie);break;case 0:me&&(ie+=S[ie]+1),q=this._pmtId=h(S,ie);break;case q:{me&&(ie+=S[ie]+1);var he=s(S,ie,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,d);P=he.avc,P>0&&(E.pid=P),B=he.audio,B>0&&(g.pid=B,g.isAAC=he.isAAC),U=he.id3,U>0&&(b.pid=U),j&&!K&&(v.logger.log("reparse from beginning"),j=!1,ue=_e-188),K=this.pmtParsed=!0;break}case 17:case 8191:break;default:j=!0;break}}else this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E.pesData=L,g.pesData=C,b.pesData=_;var J={audioTrack:g,avcTrack:E,id3Track:b,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(J),J},T.flush=function(){var S=this.remainderData;this.remainderData=null;var x;return S?x=this.demux(S,-1,!1,!0):x={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(x),this.sampleAes?this.decrypt(x,this.sampleAes):x},T.extractRemainingSamples=function(S){var x=S.audioTrack,d=S.avcTrack,y=S.id3Track,u=d.pesData,E=x.pesData,g=y.pesData,b;u&&(b=i(u))?(this.parseAVCPES(b,!0),d.pesData=null):d.pesData=u,E&&(b=i(E))?(x.isAAC?this.parseAACPES(b):this.parseMPEGPES(b),x.pesData=null):(E!=null&&E.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),x.pesData=E),g&&(b=i(g))?(this.parseID3PES(b),y.pesData=null):y.pesData=g},T.demuxSampleAes=function(S,x,d){var y=this.demux(S,d,!0,!this.config.progressive),u=this.sampleAes=new F.default(this.observer,this.config,x);return this.decrypt(y,u)},T.decrypt=function(S,x){return new Promise(function(d){var y=S.audioTrack,u=S.avcTrack;y.samples&&y.isAAC?x.decryptAacSamples(y.samples,0,function(){u.samples?x.decryptAvcSamples(u.samples,0,0,function(){d(S)}):d(S)}):u.samples&&x.decryptAvcSamples(u.samples,0,0,function(){d(S)})})},T.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},T.parseAVCPES=function(S,x){var d=this,y=this._avcTrack,u=this.parseAVCNALu(S.data),E=!1,g=this.avcSample,b,P=!1;S.data=null,g&&u.length&&!y.audFound&&(l(g,y),g=this.avcSample=o(!1,S.pts,S.dts,"")),u.forEach(function(L){switch(L.type){case 1:{b=!0,g||(g=d.avcSample=o(!0,S.pts,S.dts,"")),E&&(g.debug+="NDR "),g.frame=!0;var B=L.data;if(P&&B.length>4){var U=new k.default(B).readSliceType();(U===2||U===4||U===7||U===9)&&(g.key=!0)}break}case 5:b=!0,g||(g=d.avcSample=o(!0,S.pts,S.dts,"")),E&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{b=!0,E&&g&&(g.debug+="SEI ");var C=new k.default(O(L.data));C.readUByte();for(var _=0,j=0,K=!1,q=0;!K&&C.bytesAvailable>1;){_=0;do q=C.readUByte(),_+=q;while(q===255);j=0;do q=C.readUByte(),j+=q;while(q===255);if(_===4&&C.bytesAvailable!==0){K=!0;var te=C.readUByte();if(te===181){var _e=C.readUShort();if(_e===49){var ue=C.readUInt();if(ue===1195456820){var me=C.readUByte();if(me===3){for(var fe=C.readUByte(),le=C.readUByte(),ie=31&fe,he=[fe,le],J=0;J<ie;J++)he.push(C.readUByte()),he.push(C.readUByte()),he.push(C.readUByte());f(d._txtTrack.samples,{type:3,pts:S.pts,bytes:he})}}}}}else if(_===5&&C.bytesAvailable!==0){if(K=!0,j>16){for(var ae=[],ee=0;ee<16;ee++)ae.push(C.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&ae.push("-");for(var be=j-16,xe=new Uint8Array(be),ye=0;ye<be;ye++)xe[ye]=C.readUByte();f(d._txtTrack.samples,{pts:S.pts,payloadType:_,uuid:ae.join(""),userData:Object(W.utf8ArrayToStr)(xe),userDataBytes:xe})}}else if(j<C.bytesAvailable)for(var Ae=0;Ae<j;Ae++)C.readUByte()}break}case 7:if(b=!0,P=!0,E&&g&&(g.debug+="SPS "),!y.sps){var Le=new k.default(L.data),Ne=Le.readSPS();y.width=Ne.width,y.height=Ne.height,y.pixelRatio=Ne.pixelRatio,y.sps=[L.data],y.duration=d._duration;for(var ke=L.data.subarray(1,4),Oe="avc1.",Ie=0;Ie<3;Ie++){var Ge=ke[Ie].toString(16);Ge.length<2&&(Ge="0"+Ge),Oe+=Ge}y.codec=Oe}break;case 8:b=!0,E&&g&&(g.debug+="PPS "),y.pps||(y.pps=[L.data]);break;case 9:b=!1,y.audFound=!0,g&&l(g,y),g=d.avcSample=o(!1,S.pts,S.dts,E?"AUD ":"");break;case 12:b=!1;break;default:b=!1,g&&(g.debug+="unknown NAL "+L.type+" ");break}if(g&&b){var Je=g.units;Je.push(L)}}),x&&g&&(l(g,y),this.avcSample=null)},T.getLastNalUnit=function(){var S,x=this.avcSample,d;if(!x||x.units.length===0){var y=this._avcTrack.samples;x=y[y.length-1]}if((S=x)!==null&&S!==void 0&&S.units){var u=x.units;d=u[u.length-1]}return d},T.parseAVCNALu=function(S){var x=S.byteLength,d=this._avcTrack,y=d.naluState||0,u=y,E=[],g=0,b,P,L,B=-1,U=0;for(y===-1&&(B=0,U=S[0]&31,y=0,g=1);g<x;){if(b=S[g++],!y){y=b?0:1;continue}if(y===1){y=b?0:2;continue}if(!b)y=3;else if(b===1){if(B>=0){var C={data:S.subarray(B,g-y-1),type:U};E.push(C)}else{var _=this.getLastNalUnit();if(_&&(u&&g<=4-u&&(_.state&&(_.data=_.data.subarray(0,_.data.byteLength-u))),P=g-y-1,P>0)){var j=new Uint8Array(_.data.byteLength+P);j.set(_.data,0),j.set(S.subarray(0,P),_.data.byteLength),_.data=j,_.state=0}}g<x?(L=S[g]&31,B=g,U=L,y=0):y=-1}else y=0}if(B>=0&&y>=0){var K={data:S.subarray(B,x),type:U,state:y};E.push(K)}if(E.length===0){var q=this.getLastNalUnit();if(q){var te=new Uint8Array(q.data.byteLength+S.byteLength);te.set(q.data,0),te.set(S,q.data.byteLength),q.data=te}}return d.naluState=y,E},T.parseAACPES=function(S){var x=0,d=this._audioTrack,y=this.aacOverFlow,u=S.data;if(y){this.aacOverFlow=null;var E=y.sample.unit.byteLength,g=Math.min(y.missing,E),b=E-g;y.sample.unit.set(u.subarray(0,g),b),d.samples.push(y.sample),x=y.missing}var P,L;for(P=x,L=u.length;P<L-1&&!z.isHeader(u,P);P++);if(P!==x){var B,U;if(P<L-1?(B="AAC PES did not start with ADTS header,offset:"+P,U=!1):(B="no ADTS header found in AAC PES",U=!0),v.logger.warn("parsing error:"+B),this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:U,reason:B}),U)return}z.initTrackConfig(d,this.observer,u,P,this.audioCodec);var C;if(S.pts!==void 0)C=S.pts;else if(y){var _=z.getFrameDuration(d.samplerate);C=y.sample.pts+_}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var j=0;P<L;)if(z.isHeader(u,P)){if(P+5<L){var K=z.appendFrame(d,u,P,C,j);if(K)if(K.missing)this.aacOverFlow=K;else{P+=K.length,j++;continue}}break}else P++},T.parseMPEGPES=function(S){var x=S.data,d=x.length,y=0,u=0,E=S.pts;if(E===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;u<d;)if(N.isHeader(x,u)){var g=N.appendFrame(this._audioTrack,x,u,E,y);if(g)u+=g.length,y++;else break}else u++},T.parseID3PES=function(S){if(S.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(S)},A}();c.minProbeByteLength=188;function o(A,T,w,S){return{key:A,frame:!1,pts:T,dts:w,units:[],debug:S,length:0}}function h(A,T){return(A[T+10]&31)<<8|A[T+11]}function s(A,T,w,S){var x={audio:-1,avc:-1,id3:-1,isAAC:!0},d=(A[T+1]&15)<<8|A[T+2],y=T+3+d-4,u=(A[T+10]&15)<<8|A[T+11];for(T+=12+u;T<y;){var E=(A[T+1]&31)<<8|A[T+2];switch(A[T]){case 207:if(!S){v.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:x.audio===-1&&(x.audio=E);break;case 21:x.id3===-1&&(x.id3=E);break;case 219:if(!S){v.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:x.avc===-1&&(x.avc=E);break;case 3:case 4:w?x.audio===-1&&(x.audio=E,x.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}T+=((A[T+3]&15)<<8|A[T+4])+5}return x}function i(A){var T=0,w,S,x,d,y,u=A.data;if(!A||A.size===0)return null;for(;u[0].length<19&&u.length>1;){var E=new Uint8Array(u[0].length+u[1].length);E.set(u[0]),E.set(u[1],u[0].length),u[0]=E,u.splice(1,1)}w=u[0];var g=(w[0]<<16)+(w[1]<<8)+w[2];if(g===1){if(S=(w[4]<<8)+w[5],S&&S>A.size-6)return null;var b=w[7];b&192&&(d=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,b&64?(y=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,d-y>60*9e4&&(v.logger.warn(Math.round((d-y)/9e4)+"s delta between PTS and DTS, align them"),d=y)):y=d),x=w[8];var P=x+9;if(A.size<=P)return null;A.size-=P;for(var L=new Uint8Array(A.size),B=0,U=u.length;B<U;B++){w=u[B];var C=w.byteLength;if(P)if(P>C){P-=C;continue}else w=w.subarray(P),C-=P,P=0;L.set(w,T),T+=C}return S&&(S-=x+3),{data:L,pts:d,dts:y,len:S}}return null}function l(A,T){if(A.units.length&&A.frame){if(A.pts===void 0){var w=T.samples,S=w.length;if(S){var x=w[S-1];A.pts=x.pts,A.dts=x.dts}else{T.dropped++;return}}T.samples.push(A)}A.debug.length&&v.logger.log(A.pts+"/"+A.dts+":"+A.debug)}function f(A,T){var w=A.length;if(w>0){if(T.pts>=A[w-1].pts)A.push(T);else for(var S=w-1;S>=0;S--)if(T.pts<A[S].pts){A.splice(S,0,T);break}}else A.push(T)}function O(A){for(var T=A.byteLength,w=[],S=1;S<T-2;)A[S]===0&&A[S+1]===0&&A[S+2]===3?(w.push(S+2),S+=2):S++;if(w.length===0)return A;var x=T-w.length,d=new Uint8Array(x),y=0;for(S=0;S<x;y++,S++)y===w[0]&&(y++,w.shift()),d[S]=A[y];return d}V.default=c},"./src/errors.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"ErrorTypes",function(){return z}),D.d(V,"ErrorDetails",function(){return N});var z;(function(k){k.NETWORK_ERROR="networkError",k.MEDIA_ERROR="mediaError",k.KEY_SYSTEM_ERROR="keySystemError",k.MUX_ERROR="muxError",k.OTHER_ERROR="otherError"})(z||(z={}));var N;(function(k){k.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",k.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",k.KEY_SYSTEM_NO_SESSION="keySystemNoSession",k.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",k.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",k.MANIFEST_LOAD_ERROR="manifestLoadError",k.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",k.MANIFEST_PARSING_ERROR="manifestParsingError",k.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",k.LEVEL_EMPTY_ERROR="levelEmptyError",k.LEVEL_LOAD_ERROR="levelLoadError",k.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",k.LEVEL_SWITCH_ERROR="levelSwitchError",k.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",k.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",k.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",k.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",k.FRAG_LOAD_ERROR="fragLoadError",k.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",k.FRAG_DECRYPT_ERROR="fragDecryptError",k.FRAG_PARSING_ERROR="fragParsingError",k.REMUX_ALLOC_ERROR="remuxAllocError",k.KEY_LOAD_ERROR="keyLoadError",k.KEY_LOAD_TIMEOUT="keyLoadTimeOut",k.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",k.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",k.BUFFER_APPEND_ERROR="bufferAppendError",k.BUFFER_APPENDING_ERROR="bufferAppendingError",k.BUFFER_STALLED_ERROR="bufferStalledError",k.BUFFER_FULL_ERROR="bufferFullError",k.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",k.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",k.INTERNAL_EXCEPTION="internalException",k.INTERNAL_ABORTED="aborted",k.UNKNOWN="unknown"})(N||(N={}))},"./src/events.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"Events",function(){return z});var z;(function(N){N.MEDIA_ATTACHING="hlsMediaAttaching",N.MEDIA_ATTACHED="hlsMediaAttached",N.MEDIA_DETACHING="hlsMediaDetaching",N.MEDIA_DETACHED="hlsMediaDetached",N.BUFFER_RESET="hlsBufferReset",N.BUFFER_CODECS="hlsBufferCodecs",N.BUFFER_CREATED="hlsBufferCreated",N.BUFFER_APPENDING="hlsBufferAppending",N.BUFFER_APPENDED="hlsBufferAppended",N.BUFFER_EOS="hlsBufferEos",N.BUFFER_FLUSHING="hlsBufferFlushing",N.BUFFER_FLUSHED="hlsBufferFlushed",N.MANIFEST_LOADING="hlsManifestLoading",N.MANIFEST_LOADED="hlsManifestLoaded",N.MANIFEST_PARSED="hlsManifestParsed",N.LEVEL_SWITCHING="hlsLevelSwitching",N.LEVEL_SWITCHED="hlsLevelSwitched",N.LEVEL_LOADING="hlsLevelLoading",N.LEVEL_LOADED="hlsLevelLoaded",N.LEVEL_UPDATED="hlsLevelUpdated",N.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",N.LEVELS_UPDATED="hlsLevelsUpdated",N.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",N.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",N.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",N.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",N.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",N.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",N.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",N.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",N.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",N.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",N.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",N.CUES_PARSED="hlsCuesParsed",N.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",N.INIT_PTS_FOUND="hlsInitPtsFound",N.FRAG_LOADING="hlsFragLoading",N.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",N.FRAG_LOADED="hlsFragLoaded",N.FRAG_DECRYPTED="hlsFragDecrypted",N.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",N.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",N.FRAG_PARSING_METADATA="hlsFragParsingMetadata",N.FRAG_PARSED="hlsFragParsed",N.FRAG_BUFFERED="hlsFragBuffered",N.FRAG_CHANGED="hlsFragChanged",N.FPS_DROP="hlsFpsDrop",N.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",N.ERROR="hlsError",N.DESTROYING="hlsDestroying",N.KEY_LOADING="hlsKeyLoading",N.KEY_LOADED="hlsKeyLoaded",N.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",N.BACK_BUFFER_REACHED="hlsBackBufferReached"})(z||(z={}))},"./src/hls.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return A});var z=D("./node_modules/url-toolkit/src/url-toolkit.js"),N=D.n(z),k=D("./src/loader/playlist-loader.ts"),W=D("./src/loader/key-loader.ts"),F=D("./src/controller/id3-track-controller.ts"),M=D("./src/controller/latency-controller.ts"),R=D("./src/controller/level-controller.ts"),v=D("./src/controller/fragment-tracker.ts"),m=D("./src/controller/stream-controller.ts"),p=D("./src/is-supported.ts"),c=D("./src/utils/logger.ts"),o=D("./src/config.ts"),h=D("./node_modules/eventemitter3/index.js"),s=D.n(h),i=D("./src/events.ts"),l=D("./src/errors.ts");function f(T,w){for(var S=0;S<w.length;S++){var x=w[S];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(T,x.key,x)}}function O(T,w,S){return w&&f(T.prototype,w),S&&f(T,S),T}var A=function(){T.isSupported=function(){return Object(p.isSupported)()};function T(S){S===void 0&&(S={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.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 x=this.config=Object(o.mergeConfig)(T.DefaultConfig,S);this.userConfig=S,Object(c.enableLogs)(x.debug),this._autoLevelCapping=-1,x.progressive&&Object(o.enableStreamingMode)(x);var d=x.abrController,y=x.bufferController,u=x.capLevelController,E=x.fpsController,g=this.abrController=new d(this),b=this.bufferController=new y(this),P=this.capLevelController=new u(this),L=new E(this),B=new k.default(this),U=new W.default(this),C=new F.default(this),_=this.levelController=new R.default(this),j=new v.FragmentTracker(this),K=this.streamController=new m.default(this,j);P.setStreamController(K),L.setStreamController(K);var q=[_,K];this.networkControllers=q;var te=[B,U,g,b,P,L,C,j];this.audioTrackController=this.createController(x.audioTrackController,null,q),this.createController(x.audioStreamController,j,q),this.subtitleTrackController=this.createController(x.subtitleTrackController,null,q),this.createController(x.subtitleStreamController,j,q),this.createController(x.timelineController,null,te),this.emeController=this.createController(x.emeController,null,te),this.cmcdController=this.createController(x.cmcdController,null,te),this.latencyController=this.createController(M.default,null,te),this.coreComponents=te}var w=T.prototype;return w.createController=function(x,d,y){if(x){var u=d?new x(this,d):new x(this);return y&&y.push(u),u}return null},w.on=function(x,d,y){y===void 0&&(y=this),this._emitter.on(x,d,y)},w.once=function(x,d,y){y===void 0&&(y=this),this._emitter.once(x,d,y)},w.removeAllListeners=function(x){this._emitter.removeAllListeners(x)},w.off=function(x,d,y,u){y===void 0&&(y=this),this._emitter.off(x,d,y,u)},w.listeners=function(x){return this._emitter.listeners(x)},w.emit=function(x,d,y){return this._emitter.emit(x,d,y)},w.trigger=function(x,d){if(this.config.debug)return this.emit(x,x,d);try{return this.emit(x,x,d)}catch(y){c.logger.error("An internal error happened while handling event "+x+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(i.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:x,error:y})}return!1},w.listenerCount=function(x){return this._emitter.listenerCount(x)},w.destroy=function(){c.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(x){return x.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(x){return x.destroy()}),this.coreComponents.length=0},w.attachMedia=function(x){c.logger.log("attachMedia"),this._media=x,this.trigger(i.Events.MEDIA_ATTACHING,{media:x})},w.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},w.loadSource=function(x){this.stopLoad();var d=this.media,y=this.url,u=this.url=z.buildAbsoluteURL(self.location.href,x,{alwaysNormalize:!0});c.logger.log("loadSource:"+u),d&&y&&y!==u&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(d)),this.trigger(i.Events.MANIFEST_LOADING,{url:x})},w.startLoad=function(x){x===void 0&&(x=-1),c.logger.log("startLoad("+x+")"),this.networkControllers.forEach(function(d){d.startLoad(x)})},w.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(x){x.stopLoad()})},w.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},w.recoverMediaError=function(){c.logger.log("recoverMediaError");var x=this._media;this.detachMedia(),x&&this.attachMedia(x)},w.removeLevel=function(x,d){d===void 0&&(d=0),this.levelController.removeLevel(x,d)},O(T,[{key:"levels",get:function(){var x=this.levelController.levels;return x||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(x){c.logger.log("set currentLevel:"+x),this.loadLevel=x,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(x){c.logger.log("set nextLevel:"+x),this.levelController.manualLevel=x,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(x){c.logger.log("set loadLevel:"+x),this.levelController.manualLevel=x}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(x){this.levelController.nextLoadLevel=x}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(x){c.logger.log("set firstLevel:"+x),this.levelController.firstLevel=x}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(x){c.logger.log("set startLevel:"+x),x!==-1&&(x=Math.max(x,this.minAutoLevel)),this.levelController.startLevel=x}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(x){var d=!!x;d!==this.config.capLevelToPlayerSize&&(d?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=d)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(x){this._autoLevelCapping!==x&&(c.logger.log("set autoLevelCapping:"+x),this._autoLevelCapping=x)}},{key:"bandwidthEstimate",get:function(){var x=this.abrController.bwEstimator;return x?x.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var x=this.levels,d=this.config.minAutoBitrate;if(!x)return 0;for(var y=x.length,u=0;u<y;u++)if(x[u].maxBitrate>d)return u;return 0}},{key:"maxAutoLevel",get:function(){var x=this.levels,d=this.autoLevelCapping,y;return d===-1&&x&&x.length?y=x.length-1:y=d,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(x){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,x)}},{key:"audioTracks",get:function(){var x=this.audioTrackController;return x?x.audioTracks:[]}},{key:"audioTrack",get:function(){var x=this.audioTrackController;return x?x.audioTrack:-1},set:function(x){var d=this.audioTrackController;d&&(d.audioTrack=x)}},{key:"subtitleTracks",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTrack:-1},set:function(x){var d=this.subtitleTrackController;d&&(d.subtitleTrack=x)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var x=this.subtitleTrackController;return x?x.subtitleDisplay:!1},set:function(x){var d=this.subtitleTrackController;d&&(d.subtitleDisplay=x)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(x){this.config.lowLatencyMode=x}},{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 l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return T.defaultConfig?T.defaultConfig:o.hlsDefaultConfig},set:function(x){T.defaultConfig=x}}]),T}();A.defaultConfig=void 0},"./src/is-supported.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"isSupported",function(){return k}),D.d(V,"changeTypeSupported",function(){return W});var z=D("./src/utils/mediasource-helper.ts");function N(){return self.SourceBuffer||self.WebKitSourceBuffer}function k(){var F=Object(z.getMediaSource)();if(!F)return!1;var M=N(),R=F&&typeof F.isTypeSupported=="function"&&F.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!M||M.prototype&&typeof M.prototype.appendBuffer=="function"&&typeof M.prototype.remove=="function";return!!R&&!!v}function W(){var F,M=N();return typeof(M==null||((F=M.prototype)===null||F===void 0)?void 0:F.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return c}),D.d(V,"LoadError",function(){return h});var z=D("./src/polyfills/number.ts"),N=D("./src/errors.ts");function k(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,v(s,i)}function W(s){var i=typeof Map=="function"?new Map:void 0;return W=function(f){if(f===null||!R(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(f))return i.get(f);i.set(f,O)}function O(){return F(f,arguments,m(this).constructor)}return O.prototype=Object.create(f.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v(O,f)},W(s)}function F(s,i,l){return M()?F=Reflect.construct:F=function(O,A,T){var w=[null];w.push.apply(w,A);var S=Function.bind.apply(O,w),x=new S;return T&&v(x,T.prototype),x},F.apply(null,arguments)}function M(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function R(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function v(s,i){return v=Object.setPrototypeOf||function(f,O){return f.__proto__=O,f},v(s,i)}function m(s){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},m(s)}var p=Math.pow(2,17),c=function(){function s(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var i=s.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(f,O){var A=this,T=f.url;if(!T)return Promise.reject(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(T?"part list":"url")));this.abort();var w=this.config,S=w.fLoader,x=w.loader;return new Promise(function(d,y){A.loader&&A.loader.destroy();var u=A.loader=f.loader=S?new S(w):new x(w),E=o(f),g={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:p};f.stats=u.stats,u.load(E,g,{onSuccess:function(P,L,B,U){A.resetLoader(f,u),d({frag:f,part:null,payload:P.data,networkDetails:U})},onError:function(P,L,B){A.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:P,networkDetails:B}))},onAbort:function(P,L,B){A.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:B}))},onTimeout:function(P,L,B){A.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:B}))},onProgress:function(P,L,B,U){O&&O({frag:f,part:null,payload:B,networkDetails:U})}})})},i.loadPart=function(f,O,A){var T=this;this.abort();var w=this.config,S=w.fLoader,x=w.loader;return new Promise(function(d,y){T.loader&&T.loader.destroy();var u=T.loader=f.loader=S?new S(w):new x(w),E=o(f,O),g={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:p};O.stats=u.stats,u.load(E,g,{onSuccess:function(P,L,B,U){T.resetLoader(f,u),T.updateStatsFromPart(f,O);var C={frag:f,part:O,payload:P.data,networkDetails:U};A(C),d(C)},onError:function(P,L,B){T.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:O,response:P,networkDetails:B}))},onAbort:function(P,L,B){f.stats.aborted=O.stats.aborted,T.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:O,networkDetails:B}))},onTimeout:function(P,L,B){T.resetLoader(f,u),y(new h({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:O,networkDetails:B}))}})})},i.updateStatsFromPart=function(f,O){var A=f.stats,T=O.stats,w=T.total;if(A.loaded+=T.loaded,w){var S=Math.round(f.duration/O.duration),x=Math.min(Math.round(A.loaded/w),S),d=S-x,y=d*Math.round(A.loaded/x);A.total=A.loaded+y}else A.total=Math.max(A.loaded,A.total);var u=A.loading,E=T.loading;u.start?u.first+=E.first-E.start:(u.start=E.start,u.first=E.first),u.end=E.end},i.resetLoader=function(f,O){f.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},s}();function o(s,i){i===void 0&&(i=null);var l=i||s,f={frag:s,part:i,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},O=l.byteRangeStartOffset,A=l.byteRangeEndOffset;return Object(z.isFiniteNumber)(O)&&Object(z.isFiniteNumber)(A)&&(f.rangeStart=O,f.rangeEnd=A),f}var h=function(s){k(i,s);function i(l){for(var f,O=arguments.length,A=new Array(O>1?O-1:0),T=1;T<O;T++)A[T-1]=arguments[T];return f=s.call.apply(s,[this].concat(A))||this,f.data=void 0,f.data=l,f}return i}(W(Error))},"./src/loader/fragment.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"ElementaryStreamTypes",function(){return c}),D.d(V,"BaseSegment",function(){return o}),D.d(V,"Fragment",function(){return h}),D.d(V,"Part",function(){return s});var z=D("./src/polyfills/number.ts"),N=D("./node_modules/url-toolkit/src/url-toolkit.js"),k=D.n(N),W=D("./src/utils/logger.ts"),F=D("./src/loader/level-key.ts"),M=D("./src/loader/load-stats.ts");function R(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,v(i,l)}function v(i,l){return v=Object.setPrototypeOf||function(O,A){return O.__proto__=A,O},v(i,l)}function m(i,l){for(var f=0;f<l.length;f++){var O=l[f];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(i,O.key,O)}}function p(i,l,f){return l&&m(i.prototype,l),f&&m(i,f),i}var c;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(c||(c={}));var o=function(){function i(f){var O;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(O={},O[c.AUDIO]=null,O[c.VIDEO]=null,O[c.AUDIOVIDEO]=null,O),this.baseurl=f}var l=i.prototype;return l.setByteRange=function(O,A){var T=O.split("@",2),w=[];T.length===1?w[0]=A?A.byteRangeEndOffset:0:w[0]=parseInt(T[1]),w[1]=parseInt(T[0])+w[0],this._byteRange=w},p(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(N.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(O){this._url=O}}]),i}(),h=function(i){R(l,i);function l(O,A){var T;return T=i.call(this,A)||this,T._decryptdata=null,T.rawProgramDateTime=null,T.programDateTime=null,T.tagList=[],T.duration=0,T.sn=0,T.levelkey=void 0,T.type=void 0,T.loader=null,T.level=-1,T.cc=0,T.startPTS=void 0,T.endPTS=void 0,T.appendedPTS=void 0,T.startDTS=void 0,T.endDTS=void 0,T.start=0,T.deltaPTS=void 0,T.maxStartPTS=void 0,T.minEndPTS=void 0,T.stats=new M.LoadStats,T.urlId=0,T.data=void 0,T.bitrateTest=!1,T.title=null,T.initSegment=null,T.type=O,T}var f=l.prototype;return f.createInitializationVector=function(A){for(var T=new Uint8Array(16),w=12;w<16;w++)T[w]=A>>8*(15-w)&255;return T},f.setDecryptDataFromLevelKey=function(A,T){var w=A;return(A==null?void 0:A.method)==="AES-128"&&A.uri&&!A.iv&&(w=F.LevelKey.fromURI(A.uri),w.method=A.method,w.iv=this.createInitializationVector(T),w.keyFormat="identity"),w},f.setElementaryStreamInfo=function(A,T,w,S,x,d){d===void 0&&(d=!1);var y=this.elementaryStreams,u=y[A];if(!u){y[A]={startPTS:T,endPTS:w,startDTS:S,endDTS:x,partial:d};return}u.startPTS=Math.min(u.startPTS,T),u.endPTS=Math.max(u.endPTS,w),u.startDTS=Math.min(u.startDTS,S),u.endDTS=Math.max(u.endDTS,x)},f.clearElementaryStreamInfo=function(){var A=this.elementaryStreams;A[c.AUDIO]=null,A[c.VIDEO]=null,A[c.AUDIOVIDEO]=null},p(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var A=this.sn;typeof A!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&W.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),A=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,A)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(z.isFiniteNumber)(this.programDateTime))return null;var A=Object(z.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+A*1e3}},{key:"encrypted",get:function(){var A;return!!((A=this.decryptdata)!==null&&A!==void 0&&A.keyFormat&&this.decryptdata.uri)}}]),l}(o),s=function(i){R(l,i);function l(f,O,A,T,w){var S;S=i.call(this,A)||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 M.LoadStats,S.duration=f.decimalFloatingPoint("DURATION"),S.gap=f.bool("GAP"),S.independent=f.bool("INDEPENDENT"),S.relurl=f.enumeratedString("URI"),S.fragment=O,S.index=T;var x=f.enumeratedString("BYTERANGE");return x&&S.setByteRange(x,w),w&&(S.fragOffset=w.fragOffset+w.duration),S}return p(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),l}(o)},"./src/loader/key-loader.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return W});var z=D("./src/events.ts"),N=D("./src/errors.ts"),k=D("./src/utils/logger.ts"),W=function(){function F(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var M=F.prototype;return M._registerListeners=function(){this.hls.on(z.Events.KEY_LOADING,this.onKeyLoading,this)},M._unregisterListeners=function(){this.hls.off(z.Events.KEY_LOADING,this.onKeyLoading)},M.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var m=this.loaders[v];m&&m.destroy()}this.loaders={}},M.onKeyLoading=function(v,m){var p=m.frag,c=p.type,o=this.loaders[c];if(!p.decryptdata){k.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=p.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(o&&(k.logger.warn("abort previous key loader for type:"+c),o.abort()),!h){k.logger.warn("key uri is falsy");return}var i=s.loader,l=p.loader=this.loaders[c]=new i(s);this.decrypturl=h,this.decryptkey=null;var f={url:h,frag:p,responseType:"arraybuffer"},O={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(f,O,A)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(z.Events.KEY_LOADED,{frag:p}))},M.loadsuccess=function(v,m,p){var c=p.frag;if(!c.decryptdata){k.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(v.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(z.Events.KEY_LOADED,{frag:c})},M.loaderror=function(v,m){var p=m.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:v})},M.loadtimeout=function(v,m){var p=m.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(z.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},F}()},"./src/loader/level-details.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"LevelDetails",function(){return F});var z=D("./src/polyfills/number.ts");function N(M,R){for(var v=0;v<R.length;v++){var m=R[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(M,m.key,m)}}function k(M,R,v){return R&&N(M.prototype,R),v&&N(M,v),M}var W=10,F=function(){function M(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 R=M.prototype;return R.reloaded=function(m){if(!m){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-m.lastPartSn,c=this.lastPartIndex-m.lastPartIndex;this.updated=this.endSN!==m.endSN||!!c||!!p,this.advanced=this.endSN>m.endSN||p>0||p===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},k(M,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(z.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||W}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var p=this.driftEnd-this.driftStart;return p*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.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 m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),M}()},"./src/loader/level-key.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"LevelKey",function(){return F});var z=D("./node_modules/url-toolkit/src/url-toolkit.js"),N=D.n(z);function k(M,R){for(var v=0;v<R.length;v++){var m=R[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(M,m.key,m)}}function W(M,R,v){return R&&k(M.prototype,R),v&&k(M,v),M}var F=function(){M.fromURL=function(v,m){return new M(v,m)},M.fromURI=function(v){return new M(v)};function M(R,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(z.buildAbsoluteURL)(R,v,{alwaysNormalize:!0}):this._uri=R}return W(M,[{key:"uri",get:function(){return this._uri}}]),M}()},"./src/loader/load-stats.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"LoadStats",function(){return z});var z=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(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return l});var z=D("./src/polyfills/number.ts"),N=D("./node_modules/url-toolkit/src/url-toolkit.js"),k=D.n(N),W=D("./src/loader/fragment.ts"),F=D("./src/loader/level-details.ts"),M=D("./src/loader/level-key.ts"),R=D("./src/utils/attr-list.ts"),v=D("./src/utils/logger.ts"),m=D("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=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("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function i(w){var S,x;return s.test((S=(x=N.parseURL(w))===null||x===void 0?void 0:x.path)!=null?S:"")}var l=function(){function w(){}return w.findGroup=function(x,d){for(var y=0;y<x.length;y++){var u=x[y];if(u.id===d)return u}},w.convertAVC1ToAVCOTI=function(x){var d=x.split(".");if(d.length>2){var y=d.shift()+".";return y+=parseInt(d.shift()).toString(16),y+=("000"+parseInt(d.shift()).toString(16)).substr(-4),y}return x},w.resolve=function(x,d){return N.buildAbsoluteURL(d,x,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(x,d){var y=[],u={},E=!1;p.lastIndex=0;for(var g;(g=p.exec(x))!=null;)if(g[1]){var b=new R.AttrList(g[1]),P={attrs:b,bitrate:b.decimalInteger("AVERAGE-BANDWIDTH")||b.decimalInteger("BANDWIDTH"),name:b.NAME,url:w.resolve(g[2],d)},L=b.decimalResolution("RESOLUTION");L&&(P.width=L.width,P.height=L.height),f((b.CODECS||"").split(/[ ,]+/).filter(function(U){return U}),P),P.videoCodec&&P.videoCodec.indexOf("avc1")!==-1&&(P.videoCodec=w.convertAVC1ToAVCOTI(P.videoCodec)),y.push(P)}else if(g[3]){var B=new R.AttrList(g[3]);B["DATA-ID"]&&(E=!0,u[B["DATA-ID"]]=B)}return{levels:y,sessionData:E?u:null}},w.parseMasterPlaylistMedia=function(x,d,y,u){u===void 0&&(u=[]);var E,g=[],b=0;for(c.lastIndex=0;(E=c.exec(x))!==null;){var P=new R.AttrList(E[1]);if(P.TYPE===y){var L={attrs:P,bitrate:0,id:b++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:y,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?w.resolve(P.URI,d):""};if(u.length){var B=w.findGroup(u,L.groupId)||u[0];O(L,B,"audioCodec"),O(L,B,"textCodec")}g.push(L)}}return g},w.parseLevelPlaylist=function(x,d,y,u,E){var g=new F.LevelDetails(d),b=g.fragments,P=null,L=0,B=0,U=0,C=0,_=null,j=new W.Fragment(u,d),K,q,te,_e=-1,ue=!1;for(o.lastIndex=0,g.m3u8=x;(K=o.exec(x))!==null;){ue&&(ue=!1,j=new W.Fragment(u,d),j.start=U,j.sn=L,j.cc=C,j.level=y,P&&(j.initSegment=P,j.rawProgramDateTime=P.rawProgramDateTime));var me=K[1];if(me){j.duration=parseFloat(me);var fe=(" "+K[2]).slice(1);j.title=fe||null,j.tagList.push(fe?["INF",me,fe]:["INF",me])}else if(K[3])Object(z.isFiniteNumber)(j.duration)&&(j.start=U,te&&(j.levelkey=te),j.sn=L,j.level=y,j.cc=C,j.urlId=E,b.push(j),j.relurl=(" "+K[3]).slice(1),T(j,_),_=j,U+=j.duration,L++,B=0,ue=!0);else if(K[4]){var le=(" "+K[4]).slice(1);_?j.setByteRange(le,_):j.setByteRange(le)}else if(K[5])j.rawProgramDateTime=(" "+K[5]).slice(1),j.tagList.push(["PROGRAM-DATE-TIME",j.rawProgramDateTime]),_e===-1&&(_e=b.length);else{if(K=K[0].match(h),!K){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(q=1;q<K.length&&!(typeof K[q]!="undefined");q++);var ie=(" "+K[q]).slice(1),he=(" "+K[q+1]).slice(1),J=K[q+2]?(" "+K[q+2]).slice(1):"";switch(ie){case"PLAYLIST-TYPE":g.type=he.toUpperCase();break;case"MEDIA-SEQUENCE":L=g.startSN=parseInt(he);break;case"SKIP":{var ae=new R.AttrList(he),ee=ae.decimalInteger("SKIPPED-SEGMENTS");if(Object(z.isFiniteNumber)(ee)){g.skippedSegments=ee;for(var be=ee;be--;)b.unshift(null);L+=ee}var xe=ae.enumeratedString("RECENTLY-REMOVED-DATERANGES");xe&&(g.recentlyRemovedDateranges=xe.split(" "));break}case"TARGETDURATION":g.targetduration=parseFloat(he);break;case"VERSION":g.version=parseInt(he);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":(he||J)&&j.tagList.push(J?[he,J]:[he]);break;case"DIS":C++;case"GAP":j.tagList.push([ie]);break;case"BITRATE":j.tagList.push([ie,he]);break;case"DISCONTINUITY-SEQ":C=parseInt(he);break;case"KEY":{var ye,Ae=new R.AttrList(he),Le=Ae.enumeratedString("METHOD"),Ne=Ae.URI,ke=Ae.hexadecimalInteger("IV"),Oe=Ae.enumeratedString("KEYFORMATVERSIONS"),Ie=Ae.enumeratedString("KEYID"),Ge=(ye=Ae.enumeratedString("KEYFORMAT"))!=null?ye:"identity",Je=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Je.indexOf(Ge)>-1){v.logger.warn("Keyformat "+Ge+" is not supported from the manifest");continue}else if(Ge!=="identity")continue;Le&&(te=M.LevelKey.fromURL(d,Ne),Ne&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Le)>=0&&(te.method=Le,te.keyFormat=Ge,Ie&&(te.keyID=Ie),Oe&&(te.keyFormatVersions=Oe),te.iv=ke));break}case"START":{var Ve=new R.AttrList(he),Ke=Ve.decimalFloatingPoint("TIME-OFFSET");Object(z.isFiniteNumber)(Ke)&&(g.startTimeOffset=Ke);break}case"MAP":{var nt=new R.AttrList(he);j.relurl=nt.URI,nt.BYTERANGE&&j.setByteRange(nt.BYTERANGE),j.level=y,j.sn="initSegment",te&&(j.levelkey=te),j.initSegment=null,P=j,ue=!0;break}case"SERVER-CONTROL":{var Qe=new R.AttrList(he);g.canBlockReload=Qe.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=Qe.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&Qe.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=Qe.optionalFloat("PART-HOLD-BACK",0),g.holdBack=Qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ze=new R.AttrList(he);g.partTarget=Ze.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Re=g.partList;Re||(Re=g.partList=[]);var tt=B>0?Re[Re.length-1]:void 0,Xe=B++,Se=new W.Part(new R.AttrList(he),j,d,Xe,tt);Re.push(Se),j.duration+=Se.duration;break}case"PRELOAD-HINT":{var je=new R.AttrList(he);g.preloadHint=je;break}case"RENDITION-REPORT":{var ve=new R.AttrList(he);g.renditionReports=g.renditionReports||[],g.renditionReports.push(ve);break}default:v.logger.warn("line parsed but not handled: "+K);break}}}_&&!_.relurl?(b.pop(),U-=_.duration,g.partList&&(g.fragmentHint=_)):g.partList&&(T(j,_),j.cc=C,g.fragmentHint=j);var ce=b.length,pe=b[0],Z=b[ce-1];if(U+=g.skippedSegments*g.targetduration,U>0&&ce&&Z){g.averagetargetduration=U/ce;var $=Z.sn;g.endSN=$!=="initSegment"?$:0,pe&&(g.startCC=pe.cc,pe.initSegment||g.fragments.every(function(re){return re.relurl&&i(re.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),j=new W.Fragment(u,d),j.relurl=Z.relurl,j.level=y,j.sn="initSegment",pe.initSegment=j,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(U+=g.fragmentHint.duration),g.totalduration=U,g.endCC=C,_e>0&&A(b,_e),g},w}();function f(w,S){["video","audio","text"].forEach(function(x){var d=w.filter(function(u){return Object(m.isCodecType)(u,x)});if(d.length){var y=d.filter(function(u){return u.lastIndexOf("avc1",0)===0||u.lastIndexOf("mp4a",0)===0});S[x+"Codec"]=y.length>0?y[0]:d[0],w=w.filter(function(u){return d.indexOf(u)===-1})}}),S.unknownCodecs=w}function O(w,S,x){var d=S[x];d&&(w[x]=d)}function A(w,S){for(var x=w[S],d=S;d--;){var y=w[d];if(!y)return;y.programDateTime=x.programDateTime-y.duration*1e3,x=y}}function T(w,S){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):S!=null&&S.programDateTime&&(w.programDateTime=S.endProgramDateTime),Object(z.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),k=D("./src/errors.ts"),W=D("./src/utils/logger.ts"),F=D("./src/utils/mp4-tools.ts"),M=D("./src/loader/m3u8-parser.ts"),R=D("./src/types/loader.ts"),v=D("./src/utils/attr-list.ts");function m(o){var h=o.type;switch(h){case R.PlaylistContextType.AUDIO_TRACK:return R.PlaylistLevelType.AUDIO;case R.PlaylistContextType.SUBTITLE_TRACK:return R.PlaylistLevelType.SUBTITLE;default:return R.PlaylistLevelType.MAIN}}function p(o,h){var s=o.url;return(s===void 0||s.indexOf("data:")===0)&&(s=h.url),s}var c=function(){function o(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var h=o.prototype;return h.registerListeners=function(){var i=this.hls;i.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var i=this.hls;i.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(i){var l=this.hls.config,f=l.pLoader,O=l.loader,A=f||O,T=new A(l);return i.loader=T,this.loaders[i.type]=T,T},h.getInternalLoader=function(i){return this.loaders[i.type]},h.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},h.destroyInternalLoaders=function(){for(var i in this.loaders){var l=this.loaders[i];l&&l.destroy(),this.resetInternalLoader(i)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(i,l){var f=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:R.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},h.onLevelLoading=function(i,l){var f=l.id,O=l.level,A=l.url,T=l.deliveryDirectives;this.load({id:f,groupId:null,level:O,responseType:"text",type:R.PlaylistContextType.LEVEL,url:A,deliveryDirectives:T})},h.onAudioTrackLoading=function(i,l){var f=l.id,O=l.groupId,A=l.url,T=l.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:A,deliveryDirectives:T})},h.onSubtitleTrackLoading=function(i,l){var f=l.id,O=l.groupId,A=l.url,T=l.deliveryDirectives;this.load({id:f,groupId:O,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:A,deliveryDirectives:T})},h.load=function(i){var l,f=this.hls.config,O=this.getInternalLoader(i);if(O){var A=O.context;if(A&&A.url===i.url){W.logger.trace("[playlist-loader]: playlist request ongoing");return}W.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),O.abort()}var T,w,S,x;switch(i.type){case R.PlaylistContextType.MANIFEST:T=f.manifestLoadingMaxRetry,w=f.manifestLoadingTimeOut,S=f.manifestLoadingRetryDelay,x=f.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:T=0,w=f.levelLoadingTimeOut;break;default:T=f.levelLoadingMaxRetry,w=f.levelLoadingTimeOut,S=f.levelLoadingRetryDelay,x=f.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(i),(l=i.deliveryDirectives)!==null&&l!==void 0&&l.part){var d;if(i.type===R.PlaylistContextType.LEVEL&&i.level!==null?d=this.hls.levels[i.level].details:i.type===R.PlaylistContextType.AUDIO_TRACK&&i.id!==null?d=this.hls.audioTracks[i.id].details:i.type===R.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(d=this.hls.subtitleTracks[i.id].details),d){var y=d.partTarget,u=d.targetduration;y&&u&&(w=Math.min(Math.max(y*3,u*.8)*1e3,w))}}var E={timeout:w,maxRetry:T,retryDelay:S,maxRetryDelay:x,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(i,E,g)},h.loadsuccess=function(i,l,f,O){if(O===void 0&&(O=null),f.isSidxRequest){this.handleSidxRequest(i,f),this.handlePlaylistLoaded(i,l,f,O);return}this.resetInternalLoader(f.type);var A=i.data;if(A.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,f,"no EXTM3U delimiter",O);return}l.parsing.start=performance.now(),A.indexOf("#EXTINF:")>0||A.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,l,f,O):this.handleMasterPlaylist(i,l,f,O)},h.loaderror=function(i,l,f){f===void 0&&(f=null),this.handleNetworkError(l,f,!1,i)},h.loadtimeout=function(i,l,f){f===void 0&&(f=null),this.handleNetworkError(l,f,!0)},h.handleMasterPlaylist=function(i,l,f,O){var A=this.hls,T=i.data,w=p(i,f),S=M.default.parseMasterPlaylist(T,w),x=S.levels,d=S.sessionData;if(!x.length){this.handleManifestParsingError(i,f,"no level found in manifest",O);return}var y=x.map(function(L){return{id:L.attrs.AUDIO,audioCodec:L.audioCodec}}),u=x.map(function(L){return{id:L.attrs.SUBTITLES,textCodec:L.textCodec}}),E=M.default.parseMasterPlaylistMedia(T,w,"AUDIO",y),g=M.default.parseMasterPlaylistMedia(T,w,"SUBTITLES",u),b=M.default.parseMasterPlaylistMedia(T,w,"CLOSED-CAPTIONS");if(E.length){var P=E.some(function(L){return!L.url});!P&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(W.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),E.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}A.trigger(N.Events.MANIFEST_LOADED,{levels:x,audioTracks:E,subtitles:g,captions:b,url:w,stats:l,networkDetails:O,sessionData:d})},h.handleTrackOrLevelPlaylist=function(i,l,f,O){var A=this.hls,T=f.id,w=f.level,S=f.type,x=p(i,f),d=Object(z.isFiniteNumber)(T)?T:0,y=Object(z.isFiniteNumber)(w)?w:d,u=m(f),E=M.default.parseLevelPlaylist(i.data,x,y,u,d);if(!E.fragments.length){A.trigger(N.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:x,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(S===R.PlaylistContextType.MANIFEST){var g={attrs:new v.AttrList({}),bitrate:0,details:E,name:"",url:x};A.trigger(N.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:x,stats:l,networkDetails:O,sessionData:null})}if(l.parsing.end=performance.now(),E.needSidxRanges){var b,P=(b=E.fragments[0].initSegment)===null||b===void 0?void 0:b.url;this.load({url:P,isSidxRequest:!0,type:S,level:w,levelDetails:E,id:T,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=E,this.handlePlaylistLoaded(i,l,f,O)},h.handleSidxRequest=function(i,l){var f=Object(F.parseSegmentIndex)(new Uint8Array(i.data));if(!f)return;var O=f.references,A=l.levelDetails;O.forEach(function(T,w){var S=T.info,x=A.fragments[w];x.byteRange.length===0&&x.setByteRange(String(1+S.end-S.start)+"@"+String(S.start)),x.initSegment&&x.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(i,l,f,O){this.hls.trigger(N.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===R.PlaylistContextType.MANIFEST,url:i.url,reason:f,response:i,context:l,networkDetails:O})},h.handleNetworkError=function(i,l,f,O){f===void 0&&(f=!1),W.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var A=k.ErrorDetails.UNKNOWN,T=!1,w=this.getInternalLoader(i);switch(i.type){case R.PlaylistContextType.MANIFEST:A=f?k.ErrorDetails.MANIFEST_LOAD_TIMEOUT:k.ErrorDetails.MANIFEST_LOAD_ERROR,T=!0;break;case R.PlaylistContextType.LEVEL:A=f?k.ErrorDetails.LEVEL_LOAD_TIMEOUT:k.ErrorDetails.LEVEL_LOAD_ERROR,T=!1;break;case R.PlaylistContextType.AUDIO_TRACK:A=f?k.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:k.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,T=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:A=f?k.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:k.ErrorDetails.SUBTITLE_LOAD_ERROR,T=!1;break}w&&this.resetInternalLoader(i.type);var S={type:k.ErrorTypes.NETWORK_ERROR,details:A,fatal:T,url:i.url,loader:w,context:i,networkDetails:l};O&&(S.response=O),this.hls.trigger(N.Events.ERROR,S)},h.handlePlaylistLoaded=function(i,l,f,O){var A=f.type,T=f.level,w=f.id,S=f.groupId,x=f.loader,d=f.levelDetails,y=f.deliveryDirectives;if(!(d!=null&&d.targetduration)){this.handleManifestParsingError(i,f,"invalid target duration",O);return}if(!x)return;d.live&&(x.getCacheAge&&(d.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(d.ageHeader))&&(d.ageHeader=0));switch(A){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(N.Events.LEVEL_LOADED,{details:d,level:T||0,id:w||0,stats:l,networkDetails:O,deliveryDirectives:y});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(N.Events.AUDIO_TRACK_LOADED,{details:d,id:w||0,groupId:S||"",stats:l,networkDetails:O,deliveryDirectives:y});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADED,{details:d,id:w||0,groupId:S||"",stats:l,networkDetails:O,deliveryDirectives:y});break}},o}();V.default=c},"./src/polyfills/number.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"isFiniteNumber",function(){return z}),D.d(V,"MAX_SAFE_INTEGER",function(){return N});var z=Number.isFinite||function(k){return typeof k=="number"&&isFinite(k)},N=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ne,V,D){"use strict";D.r(V);var z=function(){function N(){}return N.getSilentFrame=function(W,F){switch(W){case"mp4a.40.2":if(F===1)return new Uint8Array([0,200,0,128,35,128]);if(F===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(F===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(F===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(F===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(F===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(F===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(F===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(F===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},N}();V.default=z},"./src/remux/mp4-generator.ts":function(ne,V,D){"use strict";D.r(V);var z=Math.pow(2,32)-1,N=function(){function k(){}return k.init=function(){k.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 F;for(F in k.types)k.types.hasOwnProperty(F)&&(k.types[F]=[F.charCodeAt(0),F.charCodeAt(1),F.charCodeAt(2),F.charCodeAt(3)]);var M=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]),R=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]);k.HDLR_TYPES={video:M,audio:R};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);k.STTS=k.STSC=k.STCO=m,k.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),k.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),k.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),k.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);k.FTYP=k.box(k.types.ftyp,p,o,p,c),k.DINF=k.box(k.types.dinf,k.box(k.types.dref,v))},k.box=function(F){for(var M=8,R=arguments.length,v=new Array(R>1?R-1:0),m=1;m<R;m++)v[m-1]=arguments[m];for(var p=v.length,c=p;p--;)M+=v[p].byteLength;var o=new Uint8Array(M);for(o[0]=M>>24&255,o[1]=M>>16&255,o[2]=M>>8&255,o[3]=M&255,o.set(F,4),p=0,M=8;p<c;p++)o.set(v[p],M),M+=v[p].byteLength;return o},k.hdlr=function(F){return k.box(k.types.hdlr,k.HDLR_TYPES[F])},k.mdat=function(F){return k.box(k.types.mdat,F)},k.mdhd=function(F,M){M*=F;var R=Math.floor(M/(z+1)),v=Math.floor(M%(z+1));return k.box(k.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,F>>24&255,F>>16&255,F>>8&255,F&255,R>>24,R>>16&255,R>>8&255,R&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},k.mdia=function(F){return k.box(k.types.mdia,k.mdhd(F.timescale,F.duration),k.hdlr(F.type),k.minf(F))},k.mfhd=function(F){return k.box(k.types.mfhd,new Uint8Array([0,0,0,0,F>>24,F>>16&255,F>>8&255,F&255]))},k.minf=function(F){return F.type==="audio"?k.box(k.types.minf,k.box(k.types.smhd,k.SMHD),k.DINF,k.stbl(F)):k.box(k.types.minf,k.box(k.types.vmhd,k.VMHD),k.DINF,k.stbl(F))},k.moof=function(F,M,R){return k.box(k.types.moof,k.mfhd(F),k.traf(R,M))},k.moov=function(F){for(var M=F.length,R=[];M--;)R[M]=k.trak(F[M]);return k.box.apply(null,[k.types.moov,k.mvhd(F[0].timescale,F[0].duration)].concat(R).concat(k.mvex(F)))},k.mvex=function(F){for(var M=F.length,R=[];M--;)R[M]=k.trex(F[M]);return k.box.apply(null,[k.types.mvex].concat(R))},k.mvhd=function(F,M){M*=F;var R=Math.floor(M/(z+1)),v=Math.floor(M%(z+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,F>>24&255,F>>16&255,F>>8&255,F&255,R>>24,R>>16&255,R>>8&255,R&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 k.box(k.types.mvhd,m)},k.sdtp=function(F){var M=F.samples||[],R=new Uint8Array(4+M.length),v,m;for(v=0;v<M.length;v++)m=M[v].flags,R[v+4]=m.dependsOn<<4|m.isDependedOn<<2|m.hasRedundancy;return k.box(k.types.sdtp,R)},k.stbl=function(F){return k.box(k.types.stbl,k.stsd(F),k.box(k.types.stts,k.STTS),k.box(k.types.stsc,k.STSC),k.box(k.types.stsz,k.STSZ),k.box(k.types.stco,k.STCO))},k.avc1=function(F){var M=[],R=[],v,m,p;for(v=0;v<F.sps.length;v++)m=F.sps[v],p=m.byteLength,M.push(p>>>8&255),M.push(p&255),M=M.concat(Array.prototype.slice.call(m));for(v=0;v<F.pps.length;v++)m=F.pps[v],p=m.byteLength,R.push(p>>>8&255),R.push(p&255),R=R.concat(Array.prototype.slice.call(m));var c=k.box(k.types.avcC,new Uint8Array([1,M[3],M[4],M[5],252|3,224|F.sps.length].concat(M).concat([F.pps.length]).concat(R))),o=F.width,h=F.height,s=F.pixelRatio[0],i=F.pixelRatio[1];return k.box(k.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,o>>8&255,o&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,k.box(k.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),k.box(k.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255])))},k.esds=function(F){var M=F.config.length;return new Uint8Array([0,0,0,0,3,23+M,0,1,0,4,15+M,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([M]).concat(F.config).concat([6,1,2]))},k.mp4a=function(F){var M=F.samplerate;return k.box(k.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,F.channelCount,0,16,0,0,0,0,M>>8&255,M&255,0,0]),k.box(k.types.esds,k.esds(F)))},k.mp3=function(F){var M=F.samplerate;return k.box(k.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,F.channelCount,0,16,0,0,0,0,M>>8&255,M&255,0,0]))},k.stsd=function(F){return F.type==="audio"?!F.isAAC&&F.codec==="mp3"?k.box(k.types.stsd,k.STSD,k.mp3(F)):k.box(k.types.stsd,k.STSD,k.mp4a(F)):k.box(k.types.stsd,k.STSD,k.avc1(F))},k.tkhd=function(F){var M=F.id,R=F.duration*F.timescale,v=F.width,m=F.height,p=Math.floor(R/(z+1)),c=Math.floor(R%(z+1));return k.box(k.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,v>>8&255,v&255,0,0,m>>8&255,m&255,0,0]))},k.traf=function(F,M){var R=k.sdtp(F),v=F.id,m=Math.floor(M/(z+1)),p=Math.floor(M%(z+1));return k.box(k.types.traf,k.box(k.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),k.box(k.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,p>>24,p>>16&255,p>>8&255,p&255])),k.trun(F,R.length+16+20+8+16+8+8),R)},k.trak=function(F){return F.duration=F.duration||4294967295,k.box(k.types.trak,k.tkhd(F),k.mdia(F))},k.trex=function(F){var M=F.id;return k.box(k.types.trex,new Uint8Array([0,0,0,0,M>>24,M>>16&255,M>>8&255,M&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},k.trun=function(F,M){var R=F.samples||[],v=R.length,m=12+16*v,p=new Uint8Array(m),c,o,h,s,i,l;for(M+=8+m,p.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255],0),c=0;c<v;c++)o=R[c],h=o.duration,s=o.size,i=o.flags,l=o.cts,p.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*c);return k.box(k.types.trun,p)},k.initSegment=function(F){k.types||k.init();var M=k.moov(F),R=new Uint8Array(k.FTYP.byteLength+M.byteLength);return R.set(k.FTYP),R.set(M,k.FTYP.byteLength),R},k}();N.types=void 0,N.HDLR_TYPES=void 0,N.STTS=void 0,N.STSC=void 0,N.STCO=void 0,N.STSZ=void 0,N.VMHD=void 0,N.SMHD=void 0,N.STSD=void 0,N.FTYP=void 0,N.DINF=void 0,V.default=N},"./src/remux/mp4-remuxer.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return l}),D.d(V,"normalizePts",function(){return f});var z=D("./src/polyfills/number.ts"),N=D("./src/remux/aac-helper.ts"),k=D("./src/remux/mp4-generator.ts"),W=D("./src/events.ts"),F=D("./src/errors.ts"),M=D("./src/utils/logger.ts"),R=D("./src/types/loader.ts"),v=D("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(w){for(var S=1;S<arguments.length;S++){var x=arguments[S];for(var d in x)Object.prototype.hasOwnProperty.call(x,d)&&(w[d]=x[d])}return w},m.apply(this,arguments)}var p=10*1e3,c=1024,o=1152,h=null,s=null,i=!1,l=function(){function w(x,d,y,u){if(u===void 0&&(u=""),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=x,this.config=d,this.typeSupported=y,this.ISGenerated=!1,h===null){var E=navigator.userAgent||"",g=E.match(/Chrome\/(\d+)/i);h=g?parseInt(g[1]):0}if(s===null){var b=navigator.userAgent.match(/Safari\/(\d+)/i);s=b?parseInt(b[1]):0}i=!!h&&h<75||!!s&&s<600}var S=w.prototype;return S.destroy=function(){},S.resetTimeStamp=function(d){M.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=d},S.resetNextTimestamp=function(){M.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},S.resetInitSegment=function(){M.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},S.getVideoStartPts=function(d){var y=!1,u=d.reduce(function(E,g){var b=g.pts-E;return b<-4294967296?(y=!0,f(E,g.pts)):b>0?E:g.pts},d[0].pts);return y&&M.logger.debug("PTS rollover detected"),u},S.remux=function(d,y,u,E,g,b,P,L){var B,U,C,_,j,K,q=g,te=g,_e=d.pid>-1,ue=y.pid>-1,me=y.samples.length,fe=d.samples.length>0,le=me>1,ie=(!_e||fe)&&(!ue||le)||this.ISGenerated||P;if(ie){this.ISGenerated||(C=this.generateIS(d,y,g));var he=this.isVideoContiguous,J=-1;if(le&&(J=O(y.samples),!he&&this.config.forceKeyFrameOnDiscontinuity))if(K=!0,J>0){M.logger.warn("[mp4-remuxer]: Dropped "+J+" out of "+me+" video samples due to a missing keyframe");var ae=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(J),y.dropped+=J,te+=(y.samples[0].pts-ae)/(y.timescale||9e4)}else J===-1&&(M.logger.warn("[mp4-remuxer]: No keyframe found out of "+me+" video samples"),K=!1);if(this.ISGenerated){if(fe&&le){var ee=this.getVideoStartPts(y.samples),be=f(d.samples[0].pts,ee)-ee,xe=be/y.inputTimeScale;q+=Math.max(0,xe),te+=Math.max(0,-xe)}if(fe){if(d.samplerate||(M.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),C=this.generateIS(d,y,g)),U=this.remuxAudio(d,q,this.isAudioContiguous,b,ue||le||L===R.PlaylistLevelType.AUDIO?te:void 0),le){var ye=U?U.endPTS-U.startPTS:0;y.inputTimeScale||(M.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),C=this.generateIS(d,y,g)),B=this.remuxVideo(y,te,he,ye)}}else le&&(B=this.remuxVideo(y,te,he,0));B&&(B.firstKeyFrame=J,B.independent=J!==-1)}}return this.ISGenerated&&(u.samples.length&&(j=this.remuxID3(u,g)),E.samples.length&&(_=this.remuxText(E,g))),{audio:U,video:B,initSegment:C,independent:K,text:_,id3:j}},S.generateIS=function(d,y,u){var E=d.samples,g=y.samples,b=this.typeSupported,P={},L=!Object(z.isFiniteNumber)(this._initPTS),B="audio/mp4",U,C,_;if(L&&(U=C=Infinity),d.config&&E.length&&(d.timescale=d.samplerate,d.isAAC||(b.mpeg?(B="audio/mpeg",d.codec=""):b.mp3&&(d.codec="mp3")),P.audio={id:"audio",container:B,codec:d.codec,initSegment:!d.isAAC&&b.mpeg?new Uint8Array(0):k.default.initSegment([d]),metadata:{channelCount:d.channelCount}},L&&(_=d.inputTimeScale,U=C=E[0].pts-Math.round(_*u))),y.sps&&y.pps&&g.length&&(y.timescale=y.inputTimeScale,P.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:k.default.initSegment([y]),metadata:{width:y.width,height:y.height}},L)){_=y.inputTimeScale;var j=this.getVideoStartPts(g),K=Math.round(_*u);C=Math.min(C,f(g[0].dts,j)-K),U=Math.min(U,j-K)}if(Object.keys(P).length)return this.ISGenerated=!0,L&&(this._initPTS=U,this._initDTS=C),{tracks:P,initPTS:U,timescale:_}},S.remuxVideo=function(d,y,u,E){var g=d.inputTimeScale,b=d.samples,P=[],L=b.length,B=this._initPTS,U=this.nextAvcDts,C=8,_,j,K,q=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY,_e=0,ue=!1;if(!u||U===null){var me=y*g,fe=b[0].pts-f(b[0].dts,b[0].pts);U=me-fe}for(var le=0;le<L;le++){var ie=b[le];if(ie.pts=f(ie.pts-B,U),ie.dts=f(ie.dts-B,U),ie.dts>ie.pts){var he=9e4*.2;_e=Math.max(Math.min(_e,ie.pts-ie.dts),-1*he)}ie.dts<b[le>0?le-1:le].dts&&(ue=!0)}ue&&b.sort(function(St,ht){var Me=St.dts-ht.dts,yt=St.pts-ht.pts;return Me||yt}),j=b[0].dts,K=b[b.length-1].dts;var J=Math.round((K-j)/(L-1));if(_e<0){if(_e<J*-2){M.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-J,!0)+" ms");for(var ae=_e,ee=0;ee<L;ee++)b[ee].dts=ae=Math.max(ae,b[ee].pts-J),b[ee].pts=Math.max(ae,b[ee].pts)}else{M.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var be=0;be<L;be++)b[be].dts=b[be].dts+_e}j=b[0].dts}if(u){var xe=j-U,ye=xe>J,Ae=xe<-1;if(ye||Ae){ye?M.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(xe,!0)+" ms ("+xe+"dts) hole between fragments detected, filling it"):M.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-xe,!0)+" ms ("+xe+"dts) overlapping between fragments detected"),j=U;var Le=b[0].pts-xe;b[0].dts=j,b[0].pts=Le,M.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Le,!0)+"/"+Object(v.toMsFromMpegTsClock)(j,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(xe,!0)+" ms")}}i&&(j=Math.max(0,j));for(var Ne=0,ke=0,Oe=0;Oe<L;Oe++){for(var Ie=b[Oe],Ge=Ie.units,Je=Ge.length,Ve=0,Ke=0;Ke<Je;Ke++)Ve+=Ge[Ke].data.length;ke+=Ve,Ne+=Je,Ie.length=Ve,Ie.dts=Math.max(Ie.dts,j),Ie.pts=Math.max(Ie.pts,Ie.dts,0),q=Math.min(Ie.pts,q),te=Math.max(Ie.pts,te)}K=b[L-1].dts;var nt=ke+4*Ne+8,Qe;try{Qe=new Uint8Array(nt)}catch(St){this.observer.emit(W.Events.ERROR,W.Events.ERROR,{type:F.ErrorTypes.MUX_ERROR,details:F.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:nt,reason:"fail allocating video mdat "+nt});return}var Ze=new DataView(Qe.buffer);Ze.setUint32(0,nt),Qe.set(k.default.types.mdat,4);for(var Re=0;Re<L;Re++){for(var tt=b[Re],Xe=tt.units,Se=0,je=0,ve=Xe.length;je<ve;je++){var ce=Xe[je],pe=ce.data,Z=ce.data.byteLength;Ze.setUint32(C,Z),C+=4,Qe.set(pe,C),C+=Z,Se+=4+Z}if(Re<L-1)_=b[Re+1].dts-tt.dts;else{var $=this.config,re=tt.dts-b[Re>0?Re-1:Re].dts;if($.stretchShortVideoTrack&&this.nextAudioPts!==null){var oe=Math.floor($.maxBufferHole*g),ge=(E?q+E*g:this.nextAudioPts)-tt.pts;ge>oe?(_=ge-re,_<0&&(_=re),M.logger.log("[mp4-remuxer]: It is approximately "+ge/90+" ms to the next segment; using duration "+_/90+" ms for the last video frame.")):_=re}else _=re}var Ce=Math.round(tt.pts-tt.dts);P.push(new A(tt.key,_,Se,Ce))}if(P.length&&h&&h<70){var Fe=P[0].flags;Fe.dependsOn=2,Fe.isNonSync=0}console.assert(_!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=U=K+_,this.isVideoContiguous=!0;var et=k.default.moof(d.sequenceNumber++,j,m({},d,{samples:P})),rt="video",De={data1:et,data2:Qe,startPTS:q/g,endPTS:(te+_)/g,startDTS:j/g,endDTS:U/g,type:rt,hasAudio:!1,hasVideo:!0,nb:P.length,dropped:d.dropped};return d.samples=[],d.dropped=0,console.assert(Qe.length,"MDAT length must not be zero"),De},S.remuxAudio=function(d,y,u,E,g){var b=d.inputTimeScale,P=d.samplerate?d.samplerate:b,L=b/P,B=d.isAAC?c:o,U=B*L,C=this._initPTS,_=!d.isAAC&&this.typeSupported.mpeg,j=[],K=d.samples,q=_?0:8,te=this.nextAudioPts||-1,_e=y*b;if(this.isAudioContiguous=u=u||K.length&&te>0&&(E&&Math.abs(_e-te)<9e3||Math.abs(f(K[0].pts-C,_e)-te)<20*U),K.forEach(function(pe){pe.pts=f(pe.pts-C,_e)}),!u||te<0){if(K=K.filter(function(pe){return pe.pts>=0}),!K.length)return;g===0?te=0:E?te=Math.max(0,_e):te=K[0].pts}if(d.isAAC)for(var ue=g!==void 0,me=this.config.maxAudioFramesDrift,fe=0,le=te;fe<K.length;fe++){var ie=K[fe],he=ie.pts,J=he-le,ae=Math.abs(1e3*J/b);if(J<=-me*U&&ue)fe===0&&(M.logger.warn("Audio frame @ "+(he/b).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*J/b)+" ms."),this.nextAudioPts=te=le=he);else if(J>=me*U&&ae<p&&ue){var ee=Math.round(J/U);le=he-ee*U,le<0&&(ee--,le+=U),fe===0&&(this.nextAudioPts=te=le),M.logger.warn("[mp4-remuxer]: Injecting "+ee+" audio frame @ "+(le/b).toFixed(3)+"s due to "+Math.round(1e3*J/b)+" ms gap.");for(var be=0;be<ee;be++){var xe=Math.max(le,0),ye=N.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);ye||(M.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ye=ie.unit.subarray()),K.splice(fe,0,{unit:ye,pts:xe}),le+=U,fe++}}ie.pts=le,le+=U}for(var Ae=null,Le=null,Ne,ke=0,Oe=K.length;Oe--;)ke+=K[Oe].unit.byteLength;for(var Ie=0,Ge=K.length;Ie<Ge;Ie++){var Je=K[Ie],Ve=Je.unit,Ke=Je.pts;if(Le!==null){var nt=j[Ie-1];nt.duration=Math.round((Ke-Le)/L)}else if(u&&d.isAAC&&(Ke=te),Ae=Ke,ke>0){ke+=q;try{Ne=new Uint8Array(ke)}catch(pe){this.observer.emit(W.Events.ERROR,W.Events.ERROR,{type:F.ErrorTypes.MUX_ERROR,details:F.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ke,reason:"fail allocating audio mdat "+ke});return}if(!_){var Qe=new DataView(Ne.buffer);Qe.setUint32(0,ke),Ne.set(k.default.types.mdat,4)}}else return;Ne.set(Ve,q);var Ze=Ve.byteLength;q+=Ze,j.push(new A(!0,B,Ze,0)),Le=Ke}var Re=j.length;if(!Re)return;var tt=j[j.length-1];this.nextAudioPts=te=Le+L*tt.duration;var Xe=_?new Uint8Array(0):k.default.moof(d.sequenceNumber++,Ae/L,m({},d,{samples:j}));d.samples=[];var Se=Ae/b,je=te/b,ve="audio",ce={data1:Xe,data2:Ne,startPTS:Se,endPTS:je,startDTS:Se,endDTS:je,type:ve,hasAudio:!0,hasVideo:!1,nb:Re};return this.isAudioContiguous=!0,console.assert(Ne.length,"MDAT length must not be zero"),ce},S.remuxEmptyAudio=function(d,y,u,E){var g=d.inputTimeScale,b=d.samplerate?d.samplerate:g,P=g/b,L=this.nextAudioPts,B=(L!==null?L:E.startDTS*g)+this._initDTS,U=E.endDTS*g+this._initDTS,C=P*c,_=Math.ceil((U-B)/C),j=N.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);if(M.logger.warn("[mp4-remuxer]: remux empty Audio"),!j){M.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var K=[],q=0;q<_;q++){var te=B+q*C;K.push({unit:j,pts:te,dts:te})}return d.samples=K,this.remuxAudio(d,y,u,!1)},S.remuxID3=function(d,y){var u=d.samples.length;if(!u)return;for(var E=d.inputTimeScale,g=this._initPTS,b=this._initDTS,P=0;P<u;P++){var L=d.samples[P];L.pts=f(L.pts-g,y*E)/E,L.dts=f(L.dts-b,y*E)/E}var B=d.samples;return d.samples=[],{samples:B}},S.remuxText=function(d,y){var u=d.samples.length;if(!u)return;for(var E=d.inputTimeScale,g=this._initPTS,b=0;b<u;b++){var P=d.samples[b];P.pts=f(P.pts-g,y*E)/E}d.samples.sort(function(B,U){return B.pts-U.pts});var L=d.samples;return d.samples=[],{samples:L}},w}();function f(w,S){var x;if(S===null)return w;for(S<w?x=-8589934592:x=8589934592;Math.abs(w-S)>4294967296;)w+=x;return w}function O(w){for(var S=0;S<w.length;S++)if(w[S].key)return S;return-1}var A=function(S,x,d,y){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=x,this.size=d,this.cts=y,this.flags=new T(S)},T=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(ne,V,D){"use strict";D.r(V);var z=D("./src/polyfills/number.ts"),N=D("./src/utils/mp4-tools.ts"),k=D("./src/loader/fragment.ts"),W=D("./src/utils/logger.ts"),F=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 m=v.prototype;return m.destroy=function(){},m.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},m.resetNextTimestamp=function(){this.lastEndDTS=null},m.resetInitSegment=function(c,o,h){this.audioCodec=o,this.videoCodec=h,this.generateInitSegment(c),this.emitInitSegment=!0},m.generateInitSegment=function(c){var o=this.audioCodec,h=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(N.parseInitSegment)(c);o||(o=R(s.audio,k.ElementaryStreamTypes.AUDIO)),h||(h=R(s.video,k.ElementaryStreamTypes.VIDEO));var i={};s.audio&&s.video?i.audiovideo={container:"video/mp4",codec:o+","+h,initSegment:c,id:"main"}:s.audio?i.audio={container:"audio/mp4",codec:o,initSegment:c,id:"audio"}:s.video?i.video={container:"video/mp4",codec:h,initSegment:c,id:"main"}:W.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},m.remux=function(c,o,h,s,i){var l=this.initPTS,f=this.lastEndDTS,O={audio:void 0,video:void 0,text:s,id3:h,initSegment:void 0};Object(z.isFiniteNumber)(f)||(f=this.lastEndDTS=i||0);var A=o.samples;if(!A||!A.length)return O;var T={initPTS:void 0,timescale:1},w=this.initData;if((!w||!w.length)&&(this.generateInitSegment(A),w=this.initData),!w||!w.length)return W.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),O;this.emitInitSegment&&(T.tracks=this.initTracks,this.emitInitSegment=!1),Object(z.isFiniteNumber)(l)||(this.initPTS=T.initPTS=l=M(w,A,f));var S=Object(N.getDuration)(A,w),x=f,d=S+x;Object(N.offsetStartDTS)(w,A,l),S>0?this.lastEndDTS=d:(W.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!w.audio,u=!!w.video,E="";y&&(E+="audio"),u&&(E+="video");var g={data1:A,startPTS:x,startDTS:x,endPTS:d,endDTS:d,type:E,hasAudio:y,hasVideo:u,nb:1,dropped:0};return O.audio=g.type==="audio"?g:void 0,O.video=g.type!=="audio"?g:void 0,O.text=s,O.id3=h,O.initSegment=T,O},v}(),M=function(m,p,c){return Object(N.getStartDTS)(m,p)-c};function R(v,m){var p=v==null?void 0:v.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||m===k.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}V.default=F},"./src/task-loop.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return z});var z=function(){function N(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var k=N.prototype;return k.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},k.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},k.onHandlerDestroyed=function(){},k.hasInterval=function(){return!!this._tickInterval},k.hasNextTick=function(){return!!this._tickTimer},k.setInterval=function(F){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,F),!0)},k.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},k.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},k.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},k.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},k.doTick=function(){},N}()},"./src/types/cmcd.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"CMCDVersion",function(){return z}),D.d(V,"CMCDObjectType",function(){return N}),D.d(V,"CMCDStreamingFormat",function(){return k}),D.d(V,"CMCDStreamType",function(){return W});var z=1,N;(function(F){F.MANIFEST="m",F.AUDIO="a",F.VIDEO="v",F.MUXED="av",F.INIT="i",F.CAPTION="c",F.TIMED_TEXT="tt",F.KEY="k",F.OTHER="o"})(N||(N={}));var k;(function(F){F.DASH="d",F.HLS="h",F.SMOOTH="s",F.OTHER="o"})(k||(k={}));var W;(function(F){F.VOD="v",F.LIVE="l"})(W||(W={}))},"./src/types/level.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"HlsSkip",function(){return k}),D.d(V,"getSkipValue",function(){return W}),D.d(V,"HlsUrlParameters",function(){return F}),D.d(V,"Level",function(){return M});function z(R,v){for(var m=0;m<v.length;m++){var p=v[m];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(R,p.key,p)}}function N(R,v,m){return v&&z(R.prototype,v),m&&z(R,m),R}var k;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(k||(k={}));function W(R,v){var m=R.canSkipUntil,p=R.canSkipDateRanges,c=R.endSN,o=v!==void 0?v-c:0;return m&&o<m?p?k.v2:k.Yes:k.No}var F=function(){function R(m,p,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=m,this.part=p,this.skip=c}var v=R.prototype;return v.addDirectives=function(p){var c=new self.URL(p);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},R}(),M=function(){function R(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(m){return m}).join(",").replace(/\.[^.,]+/g,"")}return N(R,[{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(m){var p=m%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),R}()},"./src/types/loader.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"PlaylistContextType",function(){return z}),D.d(V,"PlaylistLevelType",function(){return N});var z;(function(k){k.MANIFEST="manifest",k.LEVEL="level",k.AUDIO_TRACK="audioTrack",k.SUBTITLE_TRACK="subtitleTrack"})(z||(z={}));var N;(function(k){k.MAIN="main",k.AUDIO="audio",k.SUBTITLE="subtitle"})(N||(N={}))},"./src/types/transmuxer.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"ChunkMetadata",function(){return z});var z=function(W,F,M,R,v,m){R===void 0&&(R=0),v===void 0&&(v=-1),m===void 0&&(m=!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=N(),this.buffering={audio:N(),video:N(),audiovideo:N()},this.level=W,this.sn=F,this.id=M,this.size=R,this.part=v,this.partial=m};function N(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"AttrList",function(){return k});var z=/^(\d+)x(\d+)$/,N=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,k=function(){function W(M){typeof M=="string"&&(M=W.parseAttrList(M));for(var R in M)M.hasOwnProperty(R)&&(this[R]=M[R])}var F=W.prototype;return F.decimalInteger=function(R){var v=parseInt(this[R],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},F.hexadecimalInteger=function(R){if(this[R]){var v=(this[R]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var m=new Uint8Array(v.length/2),p=0;p<v.length/2;p++)m[p]=parseInt(v.slice(p*2,p*2+2),16);return m}else return null},F.hexadecimalIntegerAsNumber=function(R){var v=parseInt(this[R],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},F.decimalFloatingPoint=function(R){return parseFloat(this[R])},F.optionalFloat=function(R,v){var m=this[R];return m?parseFloat(m):v},F.enumeratedString=function(R){return this[R]},F.bool=function(R){return this[R]==="YES"},F.decimalResolution=function(R){var v=z.exec(this[R]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},W.parseAttrList=function(R){var v,m={},p='"';for(N.lastIndex=0;(v=N.exec(R))!==null;){var c=v[2];c.indexOf(p)===0&&c.lastIndexOf(p)===c.length-1&&(c=c.slice(1,-1)),m[v[1]]=c}return m},W}()},"./src/utils/binary-search.ts":function(ne,V,D){"use strict";D.r(V);var z={search:function(k,W){for(var F=0,M=k.length-1,R=null,v=null;F<=M;){R=(F+M)/2|0,v=k[R];var m=W(v);if(m>0)F=R+1;else if(m<0)M=R-1;else return v}return null}};V.default=z},"./src/utils/buffer-helper.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"BufferHelper",function(){return k});var z=D("./src/utils/logger.ts"),N={length:0,start:function(){return 0},end:function(){return 0}},k=function(){function W(){}return W.isBuffered=function(M,R){try{if(M){for(var v=W.getBuffered(M),m=0;m<v.length;m++)if(R>=v.start(m)&&R<=v.end(m))return!0}}catch(p){}return!1},W.bufferInfo=function(M,R,v){try{if(M){var m=W.getBuffered(M),p=[],c;for(c=0;c<m.length;c++)p.push({start:m.start(c),end:m.end(c)});return this.bufferedInfo(p,R,v)}}catch(o){}return{len:0,start:R,end:R,nextStart:void 0}},W.bufferedInfo=function(M,R,v){R=Math.max(0,R),M.sort(function(T,w){var S=T.start-w.start;return S||w.end-T.end});var m=[];if(v)for(var p=0;p<M.length;p++){var c=m.length;if(c){var o=m[c-1].end;M[p].start-o<v?M[p].end>o&&(m[c-1].end=M[p].end):m.push(M[p])}else m.push(M[p])}else m=M;for(var h=0,s,i=R,l=R,f=0;f<m.length;f++){var O=m[f].start,A=m[f].end;if(R+v>=O&&R<A)i=O,l=A,h=l-R;else if(R+v<O){s=O;break}}return{len:h,start:i||0,end:l||0,nextStart:s}},W.getBuffered=function(M){try{return M.buffered}catch(R){return z.logger.log("failed to get media.buffered",R),N}},W}()},"./src/utils/cea-608-parser.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"Row",function(){return l}),D.d(V,"CaptionScreen",function(){return f});var z=D("./src/utils/logger.ts"),N={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},k=function(d){var y=d;return N.hasOwnProperty(d)&&(y=N[d]),String.fromCharCode(y)},W=15,F=100,M={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},R={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},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(x){x[x.ERROR=0]="ERROR",x[x.TEXT=1]="TEXT",x[x.WARNING=2]="WARNING",x[x.INFO=2]="INFO",x[x.DEBUG=3]="DEBUG",x[x.DATA=3]="DATA"})(c||(c={}));var o=function(){function x(){this.time=null,this.verboseLevel=c.ERROR}var d=x.prototype;return d.log=function(u,E){this.verboseLevel>=u&&z.logger.log(this.time+" ["+u+"] "+E)},x}(),h=function(d){for(var y=[],u=0;u<d.length;u++)y.push(d[u].toString(16));return y},s=function(){function x(y,u,E,g,b){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=y||"white",this.underline=u||!1,this.italics=E||!1,this.background=g||"black",this.flash=b||!1}var d=x.prototype;return d.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},d.setStyles=function(u){for(var E=["foreground","underline","italics","background","flash"],g=0;g<E.length;g++){var b=E[g];u.hasOwnProperty(b)&&(this[b]=u[b])}},d.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},d.equals=function(u){return this.foreground===u.foreground&&this.underline===u.underline&&this.italics===u.italics&&this.background===u.background&&this.flash===u.flash},d.copy=function(u){this.foreground=u.foreground,this.underline=u.underline,this.italics=u.italics,this.background=u.background,this.flash=u.flash},d.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},x}(),i=function(){function x(y,u,E,g,b,P){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new s(u,E,g,b,P)}var d=x.prototype;return d.reset=function(){this.uchar=" ",this.penState.reset()},d.setChar=function(u,E){this.uchar=u,this.penState.copy(E)},d.setPenState=function(u){this.penState.copy(u)},d.equals=function(u){return this.uchar===u.uchar&&this.penState.equals(u.penState)},d.copy=function(u){this.uchar=u.uchar,this.penState.copy(u.penState)},d.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},x}(),l=function(){function x(y){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var u=0;u<F;u++)this.chars.push(new i);this.logger=y,this.pos=0,this.currPenState=new s}var d=x.prototype;return d.equals=function(u){for(var E=!0,g=0;g<F;g++)if(!this.chars[g].equals(u.chars[g])){E=!1;break}return E},d.copy=function(u){for(var E=0;E<F;E++)this.chars[E].copy(u.chars[E])},d.isEmpty=function(){for(var u=!0,E=0;E<F;E++)if(!this.chars[E].isEmpty()){u=!1;break}return u},d.setCursor=function(u){this.pos!==u&&(this.pos=u),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>F&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=F)},d.moveCursor=function(u){var E=this.pos+u;if(u>1)for(var g=this.pos+1;g<E+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(E)},d.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},d.insertChar=function(u){u>=144&&this.backSpace();var E=k(u);if(this.pos>=F){this.logger.log(c.ERROR,"Cannot insert "+u.toString(16)+" ("+E+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(E,this.currPenState),this.moveCursor(1)},d.clearFromPos=function(u){var E;for(E=u;E<F;E++)this.chars[E].reset()},d.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},d.clearToEndOfRow=function(){this.clearFromPos(this.pos)},d.getTextString=function(){for(var u=[],E=!0,g=0;g<F;g++){var b=this.chars[g].uchar;b!==" "&&(E=!1),u.push(b)}return E?"":u.join("")},d.setPenStyles=function(u){this.currPenState.setStyles(u);var E=this.chars[this.pos];E.setPenState(this.currPenState)},x}(),f=function(){function x(y){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var u=0;u<W;u++)this.rows.push(new l(y));this.logger=y,this.currRow=W-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var d=x.prototype;return d.reset=function(){for(var u=0;u<W;u++)this.rows[u].clear();this.currRow=W-1},d.equals=function(u){for(var E=!0,g=0;g<W;g++)if(!this.rows[g].equals(u.rows[g])){E=!1;break}return E},d.copy=function(u){for(var E=0;E<W;E++)this.rows[E].copy(u.rows[E])},d.isEmpty=function(){for(var u=!0,E=0;E<W;E++)if(!this.rows[E].isEmpty()){u=!1;break}return u},d.backSpace=function(){var u=this.rows[this.currRow];u.backSpace()},d.clearToEndOfRow=function(){var u=this.rows[this.currRow];u.clearToEndOfRow()},d.insertChar=function(u){var E=this.rows[this.currRow];E.insertChar(u)},d.setPen=function(u){var E=this.rows[this.currRow];E.setPenStyles(u)},d.moveCursor=function(u){var E=this.rows[this.currRow];E.moveCursor(u)},d.setCursor=function(u){this.logger.log(c.INFO,"setCursor: "+u);var E=this.rows[this.currRow];E.setCursor(u)},d.setPAC=function(u){this.logger.log(c.INFO,"pacData = "+JSON.stringify(u));var E=u.row-1;if(this.nrRollUpRows&&E<this.nrRollUpRows-1&&(E=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==E){for(var g=0;g<W;g++)this.rows[g].clear();var b=this.currRow+1-this.nrRollUpRows,P=this.lastOutputScreen;if(P){var L=P.rows[b].cueStartTime,B=this.logger.time;if(L&&B!==null&&L<B)for(var U=0;U<this.nrRollUpRows;U++)this.rows[E-this.nrRollUpRows+U+1].copy(P.rows[b+U])}}this.currRow=E;var C=this.rows[this.currRow];if(u.indent!==null){var _=u.indent,j=Math.max(_-1,0);C.setCursor(u.indent),u.color=C.chars[j].penState.foreground}var K={foreground:u.color,underline:u.underline,italics:u.italics,background:"black",flash:!1};this.setPen(K)},d.setBkgData=function(u){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(u)),this.backSpace(),this.setPen(u),this.insertChar(32)},d.setRollUpRows=function(u){this.nrRollUpRows=u},d.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var u=this.currRow+1-this.nrRollUpRows,E=this.rows.splice(u,1)[0];E.clear(),this.rows.splice(this.currRow,0,E),this.logger.log(c.INFO,"Rolling up")},d.getDisplayText=function(u){u=u||!1;for(var E=[],g="",b=-1,P=0;P<W;P++){var L=this.rows[P].getTextString();L&&(b=P+1,u?E.push("Row "+b+": '"+L+"'"):E.push(L.trim()))}return E.length>0&&(u?g="["+E.join(" | ")+"]":g=E.join(`
|
|
`)),g},d.getTextAndFormat=function(){return this.rows},x}(),O=function(){function x(y,u,E){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=y,this.outputFilter=u,this.mode=null,this.verbose=0,this.displayedMemory=new f(E),this.nonDisplayedMemory=new f(E),this.lastOutputScreen=new f(E),this.currRollUpRow=this.displayedMemory.rows[W-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=E}var d=x.prototype;return d.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[W-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},d.getHandler=function(){return this.outputFilter},d.setHandler=function(u){this.outputFilter=u},d.setPAC=function(u){this.writeScreen.setPAC(u)},d.setBkgData=function(u){this.writeScreen.setBkgData(u)},d.setMode=function(u){if(u===this.mode)return;this.mode=u,this.logger.log(c.INFO,"MODE="+u),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=u},d.insertChars=function(u){for(var E=0;E<u.length;E++)this.writeScreen.insertChar(u[E]);var g=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,g+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},d.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},d.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},d.ccAOF=function(){},d.ccAON=function(){},d.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},d.ccRU=function(u){this.logger.log(c.INFO,"RU("+u+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(u)},d.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},d.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},d.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},d.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},d.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},d.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},d.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},d.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var u=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=u,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},d.ccTO=function(u){this.logger.log(c.INFO,"TO("+u+") - Tab Offset"),this.writeScreen.moveCursor(u)},d.ccMIDROW=function(u){var E={flash:!1};if(E.underline=u%2===1,E.italics=u>=46,E.italics)E.foreground="white";else{var g=Math.floor(u/2)-16,b=["white","green","blue","cyan","red","yellow","magenta"];E.foreground=b[g]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(E)),this.writeScreen.setPen(E)},d.outputDataUpdate=function(u){u===void 0&&(u=!1);var E=this.logger.time;if(E===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=E:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,E,this.lastOutputScreen),u&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:E),this.lastOutputScreen.copy(this.displayedMemory))},d.cueSplitAtTime=function(u){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,u,this.displayedMemory),this.cueStartTime=u))},x}(),A=function(){function x(y,u,E){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new o;this.channels=[null,new O(y,u,g),new O(y+1,E,g)],this.cmdHistory=S(),this.logger=g}var d=x.prototype;return d.getHandler=function(u){return this.channels[u].getHandler()},d.setHandler=function(u,E){this.channels[u].setHandler(E)},d.addData=function(u,E){var g,b,P,L=!1;this.logger.time=u;for(var B=0;B<E.length;B+=2){if(b=E[B]&127,P=E[B+1]&127,b===0&&P===0)continue;if(this.logger.log(c.DATA,"["+h([E[B],E[B+1]])+"] -> ("+h([b,P])+")"),g=this.parseCmd(b,P),g||(g=this.parseMidrow(b,P)),g||(g=this.parsePAC(b,P)),g||(g=this.parseBackgroundAttributes(b,P)),!g&&(L=this.parseChars(b,P),L)){var U=this.currentChannel;if(U&&U>0){var C=this.channels[U];C.insertChars(L)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!L&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+h([b,P])+" orig: "+h([E[B],E[B+1]]))}},d.parseCmd=function(u,E){var g=this.cmdHistory,b=(u===20||u===28||u===21||u===29)&&E>=32&&E<=47,P=(u===23||u===31)&&E>=33&&E<=35;if(!(b||P))return!1;if(w(u,E,g))return T(null,null,g),this.logger.log(c.DEBUG,"Repeated command ("+h([u,E])+") is dropped"),!0;var L=u===20||u===21||u===23?1:2,B=this.channels[L];return u===20||u===21||u===28||u===29?E===32?B.ccRCL():E===33?B.ccBS():E===34?B.ccAOF():E===35?B.ccAON():E===36?B.ccDER():E===37?B.ccRU(2):E===38?B.ccRU(3):E===39?B.ccRU(4):E===40?B.ccFON():E===41?B.ccRDC():E===42?B.ccTR():E===43?B.ccRTD():E===44?B.ccEDM():E===45?B.ccCR():E===46?B.ccENM():E===47&&B.ccEOC():B.ccTO(E-32),T(u,E,g),this.currentChannel=L,!0},d.parseMidrow=function(u,E){var g=0;if((u===17||u===25)&&E>=32&&E<=47){if(u===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var b=this.channels[g];return b?(b.ccMIDROW(E),this.logger.log(c.DEBUG,"MIDROW ("+h([u,E])+")"),!0):!1}return!1},d.parsePAC=function(u,E){var g,b=this.cmdHistory,P=(u>=17&&u<=23||u>=25&&u<=31)&&E>=64&&E<=127,L=(u===16||u===24)&&E>=64&&E<=95;if(!(P||L))return!1;if(w(u,E,b))return T(null,null,b),!0;var B=u<=23?1:2;E>=64&&E<=95?g=B===1?M[u]:v[u]:g=B===1?R[u]:m[u];var U=this.channels[B];return U?(U.setPAC(this.interpretPAC(g,E)),T(u,E,b),this.currentChannel=B,!0):!1},d.interpretPAC=function(u,E){var g,b={color:null,italics:!1,indent:null,underline:!1,row:u};return E>95?g=E-96:g=E-64,b.underline=(g&1)===1,g<=13?b.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(b.italics=!0,b.color="white"):b.indent=Math.floor((g-16)/2)*4,b},d.parseChars=function(u,E){var g,b=null,P=null;if(u>=25?(g=2,P=u-8):(g=1,P=u),P>=17&&P<=19){var L;P===17?L=E+80:P===18?L=E+112:L=E+144,this.logger.log(c.INFO,"Special char '"+k(L)+"' in channel "+g),b=[L]}else u>=32&&u<=127&&(b=E===0?[u]:[u,E]);if(b){var B=h(b);this.logger.log(c.DEBUG,"Char codes = "+B.join(",")),T(u,E,this.cmdHistory)}return b},d.parseBackgroundAttributes=function(u,E){var g=(u===16||u===24)&&E>=32&&E<=47,b=(u===23||u===31)&&E>=45&&E<=47;if(!(g||b))return!1;var P,L={};u===16||u===24?(P=Math.floor((E-32)/2),L.background=p[P],E%2===1&&(L.background=L.background+"_semi")):E===45?L.background="transparent":(L.foreground="black",E===47&&(L.underline=!0));var B=u<=23?1:2,U=this.channels[B];return U.setBkgData(L),T(u,E,this.cmdHistory),!0},d.reset=function(){for(var u=0;u<Object.keys(this.channels).length;u++){var E=this.channels[u];E&&E.reset()}this.cmdHistory=S()},d.cueSplitAtTime=function(u){for(var E=0;E<this.channels.length;E++){var g=this.channels[E];g&&g.cueSplitAtTime(u)}},x}();function T(x,d,y){y.a=x,y.b=d}function w(x,d,y){return y.a===x&&y.b===d}function S(){return{a:null,b:null}}V.default=A},"./src/utils/codecs.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"isCodecType",function(){return N}),D.d(V,"isCodecSupportedInMp4",function(){return k});var z={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 N(W,F){var M=z[F];return!!M&&M[W.slice(0,4)]===!0}function k(W,F){return MediaSource.isTypeSupported((F||"video")+'/mp4;codecs="'+W+'"')}},"./src/utils/cues.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/utils/vttparser.ts"),N=D("./src/utils/webvtt-parser.ts"),k=D("./src/utils/texttrack-utils.ts"),W=/\s/,F={newCue:function(R,v,m,p){for(var c=[],o,h,s,i,l,f=self.VTTCue||self.TextTrackCue,O=0;O<p.rows.length;O++)if(o=p.rows[O],s=!0,i=0,l="",!o.isEmpty()){for(var A=0;A<o.chars.length;A++)W.test(o.chars[A].uchar)&&s?i++:(l+=o.chars[A].uchar,s=!1);o.cueStartTime=v,v===m&&(m+=1e-4),i>=16?i--:i++;var T=Object(z.fixLineBreaks)(l.trim()),w=Object(N.generateCueId)(v,m,T);(!R||!R.cues||!R.cues.getCueById(w))&&(h=new f(v,m,T),h.id=w,h.line=O+1,h.align="left",h.position=10+Math.min(80,Math.floor(i*8/32)*10),c.push(h))}return R&&c.length&&(c.sort(function(S,x){return S.line==="auto"||x.line==="auto"?0:S.line>8&&x.line>8?x.line-S.line:S.line-x.line}),c.forEach(function(S){return Object(k.addCueToTrack)(R,S)})),c}};V.default=F},"./src/utils/discontinuities.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"findFirstFragWithCC",function(){return W}),D.d(V,"shouldAlignOnDiscontinuities",function(){return F}),D.d(V,"findDiscontinuousReferenceFrag",function(){return M}),D.d(V,"adjustSlidingStart",function(){return v}),D.d(V,"alignStream",function(){return m}),D.d(V,"alignPDT",function(){return c}),D.d(V,"alignFragmentByPDTDelta",function(){return o}),D.d(V,"alignMediaPlaylistByPDT",function(){return h});var z=D("./src/polyfills/number.ts"),N=D("./src/utils/logger.ts"),k=D("./src/controller/level-helper.ts");function W(s,i){for(var l=null,f=0,O=s.length;f<O;f++){var A=s[f];if(A&&A.cc===i){l=A;break}}return l}function F(s,i,l){return!!(i.details&&(l.endCC>l.startCC||s&&s.cc<l.startCC))}function M(s,i){var l=s.fragments,f=i.fragments;if(!f.length||!l.length){N.logger.log("No fragments to align");return}var O=W(l,f[0].cc);if(!O||O&&!O.startPTS){N.logger.log("No frag in previous level to align on");return}return O}function R(s,i){if(s){var l=s.start+i;s.start=s.startPTS=l,s.endPTS=l+s.duration}}function v(s,i){for(var l=i.fragments,f=0,O=l.length;f<O;f++)R(l[f],s);i.fragmentHint&&R(i.fragmentHint,s),i.alignedSliding=!0}function m(s,i,l){if(!i)return;p(s,l,i),!l.alignedSliding&&i.details&&c(l,i.details),!l.alignedSliding&&i.details&&!l.skippedSegments&&Object(k.adjustSliding)(i.details,l)}function p(s,i,l){if(F(s,l,i)){var f=M(l.details,i);f&&Object(z.isFiniteNumber)(f.start)&&(N.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),v(f.start,i))}}function c(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var l=i.fragments[0].programDateTime,f=s.fragments[0].programDateTime,O=(f-l)/1e3+i.fragments[0].start;O&&Object(z.isFiniteNumber)(O)&&(N.logger.log("Adjusting PTS using programDateTime delta "+(f-l)+"ms, sliding:"+O.toFixed(3)+" "+s.url+" "),v(O,s))}function o(s,i){var l=s.programDateTime;if(!l)return;var f=(l-i)/1e3;s.start=s.startPTS=f,s.endPTS=f+s.duration}function h(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var l=i.fragments[0].programDateTime,f=i.fragments[0].start,O=l-f*1e3;s.fragments.forEach(function(A){o(A,O)}),s.fragmentHint&&o(s.fragmentHint,O),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/utils/ewma.ts"),N=function(){function k(F,M,R){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=R,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new z.default(F),this.fast_=new z.default(M)}var W=k.prototype;return W.update=function(M,R){var v=this.slow_,m=this.fast_;this.slow_.halfLife!==M&&(this.slow_=new z.default(M,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new z.default(R,m.getEstimate(),m.getTotalWeight()))},W.sample=function(M,R){M=Math.max(M,this.minDelayMs_);var v=8*R,m=M/1e3,p=v/m;this.fast_.sample(m,p),this.slow_.sample(m,p)},W.canEstimate=function(){var M=this.fast_;return M&&M.getTotalWeight()>=this.minWeight_},W.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},W.destroy=function(){},k}();V.default=N},"./src/utils/ewma.ts":function(ne,V,D){"use strict";D.r(V);var z=function(){function N(W,F,M){F===void 0&&(F=0),M===void 0&&(M=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=W,this.alpha_=W?Math.exp(Math.log(.5)/W):0,this.estimate_=F,this.totalWeight_=M}var k=N.prototype;return k.sample=function(F,M){var R=Math.pow(this.alpha_,F);this.estimate_=M*(1-R)+R*this.estimate_,this.totalWeight_+=F},k.getTotalWeight=function(){return this.totalWeight_},k.getEstimate=function(){if(this.alpha_){var F=1-Math.pow(this.alpha_,this.totalWeight_);if(F)return this.estimate_/F}return this.estimate_},N}();V.default=z},"./src/utils/fetch-loader.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"fetchSupported",function(){return o});var z=D("./src/polyfills/number.ts"),N=D("./src/loader/load-stats.ts"),k=D("./src/demux/chunk-cache.ts");function W(f,O){f.prototype=Object.create(O.prototype),f.prototype.constructor=f,m(f,O)}function F(f){var O=typeof Map=="function"?new Map:void 0;return F=function(T){if(T===null||!v(T))return T;if(typeof T!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(T))return O.get(T);O.set(T,w)}function w(){return M(T,arguments,p(this).constructor)}return w.prototype=Object.create(T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),m(w,T)},F(f)}function M(f,O,A){return R()?M=Reflect.construct:M=function(w,S,x){var d=[null];d.push.apply(d,S);var y=Function.bind.apply(w,d),u=new y;return x&&m(u,x.prototype),u},M.apply(null,arguments)}function R(){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(f){return!1}}function v(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function m(f,O){return m=Object.setPrototypeOf||function(T,w){return T.__proto__=w,T},m(f,O)}function p(f){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},p(f)}function c(){return c=Object.assign||function(f){for(var O=1;O<arguments.length;O++){var A=arguments[O];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(f[T]=A[T])}return f},c.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(f){}return!1}var h=function(){function f(A){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=A.fetchSetup||i,this.controller=new self.AbortController,this.stats=new N.LoadStats}var O=f.prototype;return O.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},O.abortInternal=function(){var T=this.response;(!T||!T.ok)&&(this.stats.aborted=!0,this.controller.abort())},O.abort=function(){var T;this.abortInternal(),(T=this.callbacks)!==null&&T!==void 0&&T.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},O.load=function(T,w,S){var x=this,d=this.stats;if(d.loading.start)throw new Error("Loader can only be used once.");d.loading.start=self.performance.now();var y=s(T,this.controller.signal),u=S.onProgress,E=T.responseType==="arraybuffer",g=E?"byteLength":"length";this.context=T,this.config=w,this.callbacks=S,this.request=this.fetchSetup(T,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){x.abortInternal(),S.onTimeout(d,T,x.response)},w.timeout),self.fetch(this.request).then(function(b){if(x.response=x.loader=b,!b.ok){var P=b.status,L=b.statusText;throw new l(L||"fetch, bad network response",P,b)}return d.loading.first=Math.max(self.performance.now(),d.loading.start),d.total=parseInt(b.headers.get("Content-Length")||"0"),u&&Object(z.isFiniteNumber)(w.highWaterMark)?x.loadProgressively(b,d,T,w.highWaterMark,u):E?b.arrayBuffer():b.text()}).then(function(b){var P=x.response;self.clearTimeout(x.requestTimeout),d.loading.end=Math.max(self.performance.now(),d.loading.first),d.loaded=d.total=b[g];var L={url:P.url,data:b};u&&!Object(z.isFiniteNumber)(w.highWaterMark)&&u(d,T,b,P),S.onSuccess(L,d,T,P)}).catch(function(b){if(self.clearTimeout(x.requestTimeout),d.aborted)return;var P=b.code||0;S.onError({code:P,text:b.message},T,b.details)})},O.getCacheAge=function(){var T=null;if(this.response){var w=this.response.headers.get("age");T=w?parseFloat(w):null}return T},O.loadProgressively=function(T,w,S,x,d){x===void 0&&(x=0);var y=new k.default,u=T.body.getReader(),E=function g(){return u.read().then(function(b){if(b.done)return y.dataLength&&d(w,S,y.flush(),T),Promise.resolve(new ArrayBuffer(0));var P=b.value,L=P.length;return w.loaded+=L,L<x||y.dataLength?(y.push(P),y.dataLength>=x&&d(w,S,y.flush(),T)):d(w,S,P,T),g()}).catch(function(){return Promise.reject()})};return E()},f}();function s(f,O){var A={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(c({},f.headers))};return f.rangeEnd&&A.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),A}function i(f,O){return new self.Request(f.url,O)}var l=function(f){W(O,f);function O(A,T,w){var S;return S=f.call(this,A)||this,S.code=void 0,S.details=void 0,S.code=T,S.details=w,S}return O}(F(Error));V.default=h},"./src/utils/imsc1-ttml-parser.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"IMSC1_CODEC",function(){return v}),D.d(V,"parseIMSC1",function(){return o});var z=D("./src/utils/mp4-tools.ts"),N=D("./src/utils/vttparser.ts"),k=D("./src/utils/vttcue.ts"),W=D("./src/demux/id3.ts"),F=D("./src/utils/timescale-conversion.ts"),M=D("./src/utils/webvtt-parser.ts");function R(){return R=Object.assign||function(x){for(var d=1;d<arguments.length;d++){var y=arguments[d];for(var u in y)Object.prototype.hasOwnProperty.call(y,u)&&(x[u]=y[u])}return x},R.apply(this,arguments)}var v="stpp.ttml.im1t",m=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(x,d,y,u,E){var g=Object(z.findBox)(new Uint8Array(x),["mdat"]);if(g.length===0){E(new Error("Could not parse IMSC1 mdat"));return}var b=g[0],P=Object(W.utf8ArrayToStr)(new Uint8Array(x,b.start,b.end-b.start)),L=Object(F.toTimescaleFromScale)(d,1,y);try{u(h(P,L))}catch(B){E(B)}}function h(x,d){var y=new DOMParser,u=y.parseFromString(x,"text/xml"),E=u.getElementsByTagName("tt")[0];if(!E)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},b=Object.keys(g).reduce(function(C,_){return C[_]=E.getAttribute("ttp:"+_)||g[_],C},{}),P=E.getAttribute("xml:space")!=="preserve",L=i(s(E,"styling","style")),B=i(s(E,"layout","region")),U=s(E,"body","[begin]");return[].map.call(U,function(C){var _=l(C,P);if(!_||!C.hasAttribute("begin"))return null;var j=T(C.getAttribute("begin"),b),K=T(C.getAttribute("dur"),b),q=T(C.getAttribute("end"),b);if(j===null)throw A(C);if(q===null){if(K===null)throw A(C);q=j+K}var te=new k.default(j-d,q-d,_);te.id=Object(M.generateCueId)(te.startTime,te.endTime,te.text);var _e=B[C.getAttribute("region")],ue=L[C.getAttribute("style")];te.position=10,te.size=80;var me=f(_e,ue),fe=me.textAlign;if(fe){var le=c[fe];le&&(te.lineAlign=le),te.align=fe}return R(te,me),te}).filter(function(C){return C!==null})}function s(x,d,y){var u=x.getElementsByTagName(d)[0];return u?[].slice.call(u.querySelectorAll(y)):[]}function i(x){return x.reduce(function(d,y){var u=y.getAttribute("xml:id");return u&&(d[u]=y),d},{})}function l(x,d){return[].slice.call(x.childNodes).reduce(function(y,u,E){var g;return u.nodeName==="br"&&E?y+`
|
|
`:(g=u.childNodes)!==null&&g!==void 0&&g.length?l(u,d):d?y+u.textContent.trim().replace(/\s+/g," "):y+u.textContent},"")}function f(x,d){var y="http://www.w3.org/ns/ttml#styling",u=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return u.reduce(function(E,g){var b=O(d,y,g)||O(x,y,g);return b&&(E[g]=b),E},{})}function O(x,d,y){return x.hasAttributeNS(d,y)?x.getAttributeNS(d,y):null}function A(x){return new Error("Could not parse ttml timestamp "+x)}function T(x,d){if(!x)return null;var y=Object(N.parseTimeStamp)(x);return y===null&&(m.test(x)?y=w(x,d):p.test(x)&&(y=S(x,d))),y}function w(x,d){var y=m.exec(x),u=(y[4]|0)+(y[5]|0)/d.subFrameRate;return(y[1]|0)*3600+(y[2]|0)*60+(y[3]|0)+u/d.frameRate}function S(x,d){var y=p.exec(x),u=Number(y[1]),E=y[2];switch(E){case"h":return u*3600;case"m":return u*60;case"ms":return u*1e3;case"f":return u/d.frameRate;case"t":return u/d.tickRate}return u}},"./src/utils/logger.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"enableLogs",function(){return M}),D.d(V,"logger",function(){return R});var z=function(){},N={trace:z,debug:z,log:z,warn:z,info:z,error:z},k=N;function W(v){var m=self.console[v];return m?m.bind(self.console,"["+v+"] >"):z}function F(v){for(var m=arguments.length,p=new Array(m>1?m-1:0),c=1;c<m;c++)p[c-1]=arguments[c];p.forEach(function(o){k[o]=v[o]?v[o].bind(v):W(o)})}function M(v){if(self.console&&v===!0||typeof v=="object"){F(v,"debug","log","info","warn","error");try{k.log()}catch(m){k=N}}else k=N}var R=k},"./src/utils/mediakeys-helper.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"KeySystems",function(){return z}),D.d(V,"requestMediaKeySystemAccess",function(){return N});var z;(function(k){k.WIDEVINE="com.widevine.alpha",k.PLAYREADY="com.microsoft.playready"})(z||(z={}));var N=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"getMediaSource",function(){return z});function z(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"bin2str",function(){return F}),D.d(V,"readUint16",function(){return M}),D.d(V,"readUint32",function(){return R}),D.d(V,"writeUint32",function(){return v}),D.d(V,"findBox",function(){return m}),D.d(V,"parseSegmentIndex",function(){return p}),D.d(V,"parseInitSegment",function(){return c}),D.d(V,"getStartDTS",function(){return o}),D.d(V,"getDuration",function(){return h}),D.d(V,"computeRawDurationFromSamples",function(){return s}),D.d(V,"offsetStartDTS",function(){return i}),D.d(V,"segmentValidRange",function(){return l}),D.d(V,"appendUint8Array",function(){return f});var z=D("./src/utils/typed-array.ts"),N=D("./src/loader/fragment.ts"),k=Math.pow(2,32)-1,W=[].push;function F(O){return String.fromCharCode.apply(null,O)}function M(O,A){"data"in O&&(A+=O.start,O=O.data);var T=O[A]<<8|O[A+1];return T<0?65536+T:T}function R(O,A){"data"in O&&(A+=O.start,O=O.data);var T=O[A]<<24|O[A+1]<<16|O[A+2]<<8|O[A+3];return T<0?4294967296+T:T}function v(O,A,T){"data"in O&&(A+=O.start,O=O.data),O[A]=T>>24,O[A+1]=T>>16&255,O[A+2]=T>>8&255,O[A+3]=T&255}function m(O,A){var T=[];if(!A.length)return T;var w,S,x;"data"in O?(w=O.data,S=O.start,x=O.end):(w=O,S=0,x=w.byteLength);for(var d=S;d<x;){var y=R(w,d),u=F(w.subarray(d+4,d+8)),E=y>1?d+y:x;if(u===A[0])if(A.length===1)T.push({data:w,start:d+8,end:E});else{var g=m({data:w,start:d+8,end:E},A.slice(1));g.length&&W.apply(T,g)}d=E}return T}function p(O){var A=m(O,["moov"]),T=A[0],w=T?T.end:null,S=m(O,["sidx"]);if(!S||!S[0])return null;var x=[],d=S[0],y=d.data[0],u=y===0?8:16,E=R(d,u);u+=4;var g=0,b=0;y===0?u+=8:u+=16,u+=2;var P=d.end+b,L=M(d,u);u+=2;for(var B=0;B<L;B++){var U=u,C=R(d,U);U+=4;var _=C&2147483647,j=(C&2147483648)>>>31;if(j===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var K=R(d,U);U+=4,x.push({referenceSize:_,subsegmentDuration:K,info:{duration:K/E,start:P,end:P+_-1}}),P+=_,U+=4,u=U}return{earliestPresentationTime:g,timescale:E,version:y,referencesCount:L,references:x,moovEndOffset:w}}function c(O){for(var A=[],T=m(O,["moov","trak"]),w=0;w<T.length;w++){var S=T[w],x=m(S,["tkhd"])[0];if(x){var d=x.data[x.start],y=d===0?12:20,u=R(x,y),E=m(S,["mdia","mdhd"])[0];if(E){d=E.data[E.start],y=d===0?12:20;var g=R(E,y),b=m(S,["mdia","hdlr"])[0];if(b){var P=F(b.data.subarray(b.start+8,b.start+12)),L={soun:N.ElementaryStreamTypes.AUDIO,vide:N.ElementaryStreamTypes.VIDEO}[P];if(L){var B=m(S,["mdia","minf","stbl","stsd"])[0],U=void 0;B&&(U=F(B.data.subarray(B.start+12,B.start+16))),A[u]={timescale:g,type:L},A[L]={timescale:g,id:u,codec:U}}}}}}var C=m(O,["moov","mvex","trex"]);return C.forEach(function(_){var j=R(_,4),K=A[j];K&&(K.default={duration:R(_,12),flags:R(_,20)})}),A}function o(O,A){return m(A,["moof","traf"]).reduce(function(T,w){var S=m(w,["tfdt"])[0],x=S.data[S.start],d=m(w,["tfhd"]).reduce(function(y,u){var E=R(u,4),g=O[E];if(g){var b=R(S,4);x===1&&(b*=Math.pow(2,32),b+=R(S,8));var P=g.timescale||9e4,L=b/P;if(isFinite(L)&&(y===null||L<y))return L}return y},null);return d!==null&&isFinite(d)&&(T===null||d<T)?d:T},null)||0}function h(O,A){for(var T=0,w=0,S=0,x=m(O,["moof","traf"]),d=0;d<x.length;d++){var y=x[d],u=m(y,["tfhd"])[0],E=R(u,4),g=A[E];if(!g)continue;var b=g.default,P=R(u,0)|(b==null?void 0:b.flags),L=b==null?void 0:b.duration;P&8&&(P&2?L=R(u,12):L=R(u,8));for(var B=g.timescale||9e4,U=m(y,["trun"]),C=0;C<U.length;C++){if(L){var _=R(U[C],4);T=L*_}else T=s(U[C]);g.type===N.ElementaryStreamTypes.VIDEO?w+=T/B:g.type===N.ElementaryStreamTypes.AUDIO&&(S+=T/B)}}if(w===0&&S===0){var j=p(O);if(j!=null&&j.references)return j.references.reduce(function(K,q){return K+q.info.duration||0},0)}return w||S}function s(O){var A=R(O,0),T=8;A&1&&(T+=4),A&4&&(T+=4);for(var w=0,S=R(O,4),x=0;x<S;x++){if(A&256){var d=R(O,T);w+=d,T+=4}A&512&&(T+=4),A&1024&&(T+=4),A&2048&&(T+=4)}return w}function i(O,A,T){m(A,["moof","traf"]).forEach(function(w){m(w,["tfhd"]).forEach(function(S){var x=R(S,4),d=O[x];if(!d)return;var y=d.timescale||9e4;m(w,["tfdt"]).forEach(function(u){var E=u.data[u.start],g=R(u,4);if(E===0)v(u,4,g-T*y);else{g*=Math.pow(2,32),g+=R(u,8),g-=T*y,g=Math.max(g,0);var b=Math.floor(g/(k+1)),P=Math.floor(g%(k+1));v(u,4,b),v(u,8,P)}})})})}function l(O){var A={valid:null,remainder:null},T=m(O,["moof"]);if(T){if(T.length<2)return A.remainder=O,A}else return A;var w=T[T.length-1];return A.valid=Object(z.sliceUint8)(O,0,w.start-8),A.remainder=Object(z.sliceUint8)(O,w.start-8),A}function f(O,A){var T=new Uint8Array(O.length+A.length);return T.set(O),T.set(A,O.length),T}},"./src/utils/output-filter.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"default",function(){return z});var z=function(){function N(W,F){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=W,this.trackName=F}var k=N.prototype;return k.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},k.newCue=function(F,M,R){(this.startTime===null||this.startTime>F)&&(this.startTime=F),this.endTime=M,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},k.reset=function(){this.cueRanges=[]},N}()},"./src/utils/texttrack-utils.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"sendAddTrackEvent",function(){return N}),D.d(V,"addCueToTrack",function(){return k}),D.d(V,"clearCurrentCues",function(){return W}),D.d(V,"removeCuesInRange",function(){return F}),D.d(V,"getCuesInRange",function(){return R});var z=D("./src/utils/logger.ts");function N(v,m){var p;try{p=new Event("addtrack")}catch(c){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=v,m.dispatchEvent(p)}function k(v,m){var p=v.mode;if(p==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(m.id))try{if(v.addCue(m),!v.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(o){z.logger.debug("[texttrack-utils]: "+o);var c=new self.TextTrackCue(m.startTime,m.endTime,m.text);c.id=m.id,v.addCue(c)}p==="disabled"&&(v.mode=p)}function W(v){var m=v.mode;if(m==="disabled"&&(v.mode="hidden"),v.cues)for(var p=v.cues.length;p--;)v.removeCue(v.cues[p]);m==="disabled"&&(v.mode=m)}function F(v,m,p){var c=v.mode;if(c==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var o=R(v.cues,m,p),h=0;h<o.length;h++)v.removeCue(o[h]);c==="disabled"&&(v.mode=c)}function M(v,m){if(m<v[0].startTime)return 0;var p=v.length-1;if(m>v[p].endTime)return-1;for(var c=0,o=p;c<=o;){var h=Math.floor((o+c)/2);if(m<v[h].startTime)o=h-1;else if(m>v[h].startTime&&c<p)c=h+1;else return h}return v[c].startTime-m<m-v[o].startTime?c:o}function R(v,m,p){var c=[],o=M(v,m);if(o>-1)for(var h=o,s=v.length;h<s;h++){var i=v[h];if(i.startTime>=m&&i.endTime<=p)c.push(i);else if(i.startTime>p)return c}return c}},"./src/utils/time-ranges.ts":function(ne,V,D){"use strict";D.r(V);var z={toString:function(k){for(var W="",F=k.length,M=0;M<F;M++)W+="["+k.start(M).toFixed(3)+","+k.end(M).toFixed(3)+"]";return W}};V.default=z},"./src/utils/timescale-conversion.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"toTimescaleFromBase",function(){return N}),D.d(V,"toTimescaleFromScale",function(){return k}),D.d(V,"toMsFromMpegTsClock",function(){return W}),D.d(V,"toMpegTsClockFromTimescale",function(){return F});var z=9e4;function N(M,R,v,m){v===void 0&&(v=1),m===void 0&&(m=!1);var p=M*R*v;return m?Math.round(p):p}function k(M,R,v,m){return v===void 0&&(v=1),m===void 0&&(m=!1),N(M,R,1/v,m)}function W(M,R){return R===void 0&&(R=!1),N(M,1e3,1/z,R)}function F(M,R){return R===void 0&&(R=1),N(M,z,1/R)}},"./src/utils/typed-array.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"sliceUint8",function(){return z});function z(N,k,W){return Uint8Array.prototype.slice?N.slice(k,W):new Uint8Array(Array.prototype.slice.call(N,k,W))}},"./src/utils/vttcue.ts":function(ne,V,D){"use strict";D.r(V),V.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var z=["","lr","rl"],N=["start","middle","end","left","right"];function k(v,m){if(typeof m!="string")return!1;if(!Array.isArray(v))return!1;var p=m.toLowerCase();return~v.indexOf(p)?p:!1}function W(v){return k(z,v)}function F(v){return k(N,v)}function M(v){for(var m=arguments.length,p=new Array(m>1?m-1:0),c=1;c<m;c++)p[c-1]=arguments[c];for(var o=1;o<arguments.length;o++){var h=arguments[o];for(var s in h)v[s]=h[s]}return v}function R(v,m,p){var c=this,o={enumerable:!0};c.hasBeenReset=!1;var h="",s=!1,i=v,l=m,f=p,O=null,A="",T=!0,w="auto",S="start",x=50,d="middle",y=50,u="middle";Object.defineProperty(c,"id",M({},o,{get:function(){return h},set:function(g){h=""+g}})),Object.defineProperty(c,"pauseOnExit",M({},o,{get:function(){return s},set:function(g){s=!!g}})),Object.defineProperty(c,"startTime",M({},o,{get:function(){return i},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");i=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",M({},o,{get:function(){return l},set:function(g){if(typeof g!="number")throw new TypeError("End time must be set to a number.");l=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",M({},o,{get:function(){return f},set:function(g){f=""+g,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",M({},o,{get:function(){return O},set:function(g){O=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",M({},o,{get:function(){return A},set:function(g){var b=W(g);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");A=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",M({},o,{get:function(){return T},set:function(g){T=!!g,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",M({},o,{get:function(){return w},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");w=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",M({},o,{get:function(){return S},set:function(g){var b=F(g);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");S=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",M({},o,{get:function(){return x},set:function(g){if(g<0||g>100)throw new Error("Position must be between 0 and 100.");x=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",M({},o,{get:function(){return d},set:function(g){var b=F(g);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");d=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",M({},o,{get:function(){return y},set:function(g){if(g<0||g>100)throw new Error("Size must be between 0 and 100.");y=g,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",M({},o,{get:function(){return u},set:function(g){var b=F(g);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");u=b,this.hasBeenReset=!0}})),c.displayState=void 0}return R.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"parseTimeStamp",function(){return k}),D.d(V,"fixLineBreaks",function(){return m}),D.d(V,"VTTParser",function(){return p});var z=D("./src/utils/vttcue.ts"),N=function(){function c(){}var o=c.prototype;return o.decode=function(s,i){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},c}();function k(c){function o(s,i,l,f){return(s|0)*3600+(i|0)*60+(l|0)+parseFloat(f||0)}var h=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?o(h[2],h[3],0,h[4]):o(h[1],h[2],h[3],h[4]):null}var W=function(){function c(){this.values=Object.create(null)}var o=c.prototype;return o.set=function(s,i){!this.get(s)&&i!==""&&(this.values[s]=i)},o.get=function(s,i,l){return l?this.has(s)?this.values[s]:i[l]:this.has(s)?this.values[s]:i},o.has=function(s){return s in this.values},o.alt=function(s,i,l){for(var f=0;f<l.length;++f)if(i===l[f]){this.set(s,i);break}},o.integer=function(s,i){/^-?\d+$/.test(i)&&this.set(s,parseInt(i,10))},o.percent=function(s,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var l=parseFloat(i);if(l>=0&&l<=100)return this.set(s,l),!0}return!1},c}();function F(c,o,h,s){var i=s?c.split(s):[c];for(var l in i){if(typeof i[l]!="string")continue;var f=i[l].split(h);if(f.length!==2)continue;var O=f[0],A=f[1];o(O,A)}}var M=new z.default(0,0,""),R=M.align==="middle"?"middle":"center";function v(c,o,h){var s=c;function i(){var O=k(c);if(O===null)throw new Error("Malformed timestamp: "+s);return c=c.replace(/^[^\sa-zA-Z-]+/,""),O}function l(O,A){var T=new W;F(O,function(x,d){var y;switch(x){case"region":for(var u=h.length-1;u>=0;u--)if(h[u].id===d){T.set(x,h[u].region);break}break;case"vertical":T.alt(x,d,["rl","lr"]);break;case"line":y=d.split(","),T.integer(x,y[0]),T.percent(x,y[0])&&T.set("snapToLines",!1),T.alt(x,y[0],["auto"]),y.length===2&&T.alt("lineAlign",y[1],["start",R,"end"]);break;case"position":y=d.split(","),T.percent(x,y[0]),y.length===2&&T.alt("positionAlign",y[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":T.percent(x,d);break;case"align":T.alt(x,d,["start",R,"end","left","right"]);break}},/:/,/\s/),A.region=T.get("region",null),A.vertical=T.get("vertical","");var w=T.get("line","auto");w==="auto"&&M.line===-1&&(w=-1),A.line=w,A.lineAlign=T.get("lineAlign","start"),A.snapToLines=T.get("snapToLines",!0),A.size=T.get("size",100),A.align=T.get("align",R);var S=T.get("position","auto");S==="auto"&&M.position===50&&(S=A.align==="start"||A.align==="left"?0:A.align==="end"||A.align==="right"?100:50),A.position=S}function f(){c=c.replace(/^\s+/,"")}if(f(),o.startTime=i(),f(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);c=c.substr(3),f(),o.endTime=i(),f(),l(c,o)}function m(c){return c.replace(/<br(?: \/)?>/gi,`
|
|
`)}var p=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new N,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=c.prototype;return o.parse=function(s){var i=this;s&&(i.buffer+=i.decoder.decode(s,{stream:!0}));function l(){var S=i.buffer,x=0;for(S=m(S);x<S.length&&S[x]!=="\r"&&S[x]!==`
|
|
`;)++x;var d=S.substr(0,x);return S[x]==="\r"&&++x,S[x]===`
|
|
`&&++x,i.buffer=S.substr(x),d}function f(S){F(S,function(x,d){},/:/)}try{var O="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;O=l();var A=O.match(/^()?WEBVTT([ \t].*)?$/);if(!A||!A[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var T=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;T?T=!1:O=l();switch(i.state){case"HEADER":/:/.test(O)?f(O):O||(i.state="ID");continue;case"NOTE":O||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(O)){i.state="NOTE";break}if(!O)continue;if(i.cue=new z.default(0,0,""),i.state="CUE",O.indexOf("-->")===-1){i.cue.id=O;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{v(O,i.cue,i.regionList)}catch(S){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var w=O.indexOf("-->")!==-1;if(!O||w&&(T=!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+=O}continue;case"BADCUE":O||(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},o.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
|
|
|
|
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){s.onparsingerror&&s.onparsingerror(i)}return s.onflush&&s.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(ne,V,D){"use strict";D.r(V),D.d(V,"generateCueId",function(){return p}),D.d(V,"parseWebVTT",function(){return o});var z=D("./src/polyfills/number.ts"),N=D("./src/utils/vttparser.ts"),k=D("./src/demux/id3.ts"),W=D("./src/utils/timescale-conversion.ts"),F=D("./src/remux/mp4-remuxer.ts"),M=/\r\n|\n\r|\n|\r/g,R=function(s,i,l){return l===void 0&&(l=0),s.substr(l,i.length)===i},v=function(s){var i=parseInt(s.substr(-3)),l=parseInt(s.substr(-6,2)),f=parseInt(s.substr(-9,2)),O=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(z.isFiniteNumber)(i)||!Object(z.isFiniteNumber)(l)||!Object(z.isFiniteNumber)(f)||!Object(z.isFiniteNumber)(O))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return i+=1e3*l,i+=60*1e3*f,i+=60*60*1e3*O,i},m=function(s){for(var i=5381,l=s.length;l;)i=i*33^s.charCodeAt(--l);return(i>>>0).toString()};function p(h,s,i){return m(h.toString())+m(s.toString())+m(i)}var c=function(s,i,l){var f=s[i],O=s[f.prevCC];if(!O||!O.new&&f.new){s.ccOffset=s.presentationOffset=f.start,f.new=!1;return}for(;(A=O)!==null&&A!==void 0&&A.new;){var A;s.ccOffset+=f.start-O.start,f.new=!1,f=O,O=s[f.prevCC]}s.presentationOffset=l};function o(h,s,i,l,f,O,A,T){var w=new N.VTTParser,S=Object(k.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(M,`
|
|
`).split(`
|
|
`),x=[],d=Object(W.toMpegTsClockFromTimescale)(s,i),y="00:00.000",u=0,E=0,g,b=!0,P=!1;w.oncue=function(L){var B=l[f],U=l.ccOffset,C=(u-d)/9e4;if(B!=null&&B.new&&(E!==void 0?U=l.ccOffset=B.start:c(l,f,C)),C&&(U=C-l.presentationOffset),P){var _=L.endTime-L.startTime,j=Object(F.normalizePts)((L.startTime+U-E)*9e4,O*9e4)/9e4;L.startTime=j,L.endTime=j+_}var K=L.text.trim();L.text=decodeURIComponent(encodeURIComponent(K)),L.id||(L.id=p(L.startTime,L.endTime,K)),L.endTime>0&&x.push(L)},w.onparsingerror=function(L){g=L},w.onflush=function(){if(g){T(g);return}A(x)},S.forEach(function(L){if(b)if(R(L,"X-TIMESTAMP-MAP=")){b=!1,P=!0,L.substr(16).split(",").forEach(function(B){R(B,"LOCAL:")?y=B.substr(6):R(B,"MPEGTS:")&&(u=parseInt(B.substr(7)))});try{E=v(y)/1e3}catch(B){P=!1,g=B}return}else L===""&&(b=!1);w.parse(L+`
|
|
`)}),w.flush()}},"./src/utils/xhr-loader.ts":function(ne,V,D){"use strict";D.r(V);var z=D("./src/utils/logger.ts"),N=D("./src/loader/load-stats.ts"),k=/^age:\s*[\d.]+\s*$/m,W=function(){function F(R){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=R?R.xhrSetup:null,this.stats=new N.LoadStats,this.retryDelay=0}var M=F.prototype;return M.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},M.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()))},M.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},M.load=function(v,m,p){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=m,this.callbacks=p,this.retryDelay=m.retryDelay,this.loadInternal()},M.loadInternal=function(){var v=this.config,m=this.context;if(!v)return;var p=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var o=this.xhrSetup;try{if(o)try{o(p,m.url)}catch(i){p.open("GET",m.url,!0),o(p,m.url)}p.readyState||p.open("GET",m.url,!0);var h=this.context.headers;if(h)for(var s in h)p.setRequestHeader(s,h[s])}catch(i){this.callbacks.onError({code:p.status,text:i.message},m,p);return}m.rangeEnd&&p.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),p.send()},M.readystatechange=function(){var v=this.context,m=this.loader,p=this.stats;if(!v||!m)return;var c=m.readyState,o=this.config;if(p.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),c===4){m.onreadystatechange=null,m.onprogress=null;var h=m.status;if(h>=200&&h<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var s,i;if(v.responseType==="arraybuffer"?(s=m.response,i=s.byteLength):(s=m.responseText,i=s.length),p.loaded=p.total=i,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(p,v,s,m),!this.callbacks)return;var f={url:m.responseURL,data:s};this.callbacks.onSuccess(f,p,v,m)}else p.retry>=o.maxRetry||h>=400&&h<499?(z.logger.error(h+" while loading "+v.url),this.callbacks.onError({code:h,text:m.statusText},v,m)):(z.logger.warn(h+" 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,o.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},M.loadtimeout=function(){z.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},M.loadprogress=function(v){var m=this.stats;m.loaded=v.loaded,v.lengthComputable&&(m.total=v.total)},M.getCacheAge=function(){var v=null;if(this.loader&&k.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");v=m?parseFloat(m):null}return v},F}();V.default=W}}).default})},vHTk:function(Pe,we,Y){Pe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS:function(Pe,we,Y){"use strict";Y.d(we,"c",function(){return N}),Y.d(we,"b",function(){return k}),Y.d(we,"d",function(){return W}),Y.d(we,"a",function(){return M}),Y.d(we,"e",function(){return R});var ne=Y("9og8"),V=Y("WmNS"),D=Y.n(V),z=Y("ErOA");function N(v){return Object(z.c)("libraries/".concat(v,".json"))}function k(){return Object(z.c)("library_tags.json")}function W(v){return F.apply(this,arguments)}function F(){return F=Object(ne.a)(D.a.mark(function v(m){var p;return D.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(z.b)("attachments/".concat(m,".json"));case 2:return p=o.sent,o.abrupt("return",p.status===0);case 4:case"end":return o.stop()}},v)})),F.apply(this,arguments)}function M(v){return Object(z.f)("libraries.json",v)}function R(v,m){return Object(z.g)("libraries/".concat(v,".json"),m)}},y5JW:function(Pe,we,Y){"use strict";Y.d(we,"c",function(){return h}),Y.d(we,"a",function(){return s});var ne=Y("DZo9"),V=Y("8z0m"),D=Y("+L6B"),z=Y("2/Rp"),N=Y("9og8"),k=Y("miYZ"),W=Y("tsqr"),F=Y("k1fw"),M=Y("oBTY"),R=Y("WmNS"),v=Y.n(R),m=Y("cDcd"),p=Y.n(m),c=Y("m3rI"),o=Y("wzkS"),h="\u3000\u3000";function s(i){var l=["Bytes","KB","MB","GB","TB"];if(i==0)return"0 Byte";var f=parseInt(""+Math.floor(Math.log(i)/Math.log(1024)),10);return(i/Math.pow(1024,f)).toFixed(1)+" "+l[f]}we.b=function(i){var l=i.value,f=l===void 0?[]:l,O=i.action,A=i.onChange,T=i.className,w=i.maxSize,S=w===void 0?150:w,x=i.title,d=x===void 0?"\u6587\u4EF6\u4E0A\u4F20":x,y=i.accept,u=y===void 0?null:y,E={multiple:!1,fileList:f,accept:u,withCredentials:!0,beforeUpload:function(P){var L=P.size/1024/1024;return!0},action:"".concat(c.a.API_SERVER,"/api/attachments.json"),onChange:function(P){var L,B,U=Object(M.a)(P.fileList);if(U=U.map(function(j){return j.name.indexOf(h)===-1&&(j.name="".concat(j.name).concat(h).concat(s(j.size))),Object(F.a)({},j)}),P.file.status==="done"&&((L=P.file)===null||L===void 0||((B=L.response)===null||B===void 0)?void 0:B.status)===-1){var C,_;W.b.error((C=P.file)===null||C===void 0||((_=C.response)===null||_===void 0)?void 0:_.message),A([]);return}A(U)},onRemove:function(){var b=Object(N.a)(v.a.mark(function L(B){var U,C,_;return v.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(U=B.size/1024/1024,!(B.status==="uploading")){K.next=3;break}return K.abrupt("return",!0);case 3:if(U<S){K.next=7;break}return K.abrupt("return",!0);case 7:if(C=B.response?B.response.id:B.uid,!C){K.next=15;break}return K.next=11,Object(o.d)(B.response?B.response.id:B.id);case 11:return _=K.sent,K.abrupt("return",_);case 15:return K.abrupt("return",!0);case 16:case"end":return K.stop()}},L)}));function P(L){return b.apply(this,arguments)}return P}()};function g(b){b.preventDefault(),b.stopPropagation()}return p.a.createElement("div",{className:"single-upload ".concat(T||"")},p.a.createElement(V.a,E,p.a.createElement(z.a,{type:"primary",title:f.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:f.length>0,ghost:!0},d),p.a.createElement("span",{onClick:g,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",S,"M)"," ")))}},yslc:function(Pe,we){Pe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlx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