(window.webpackJsonp=window.webpackJsonp||[]).push([[215,3,5,7,8,20],{"++UQ":function(Be,le,D){},"+NIl":function(Be,le,D){(function(Q){Q(D("VrN/"))})(function(Q){"use strict";Q.defineMode("stex",function(z,M){"use strict";function X(u,o){u.cmdState.push(o)}function F(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function I(u){var o=u.cmdState.pop();o&&o.closeBracket()}function H(u){for(var o=u.cmdState,h=o.length-1;h>=0;h--){var r=o[h];if(r.name=="DEFAULT")continue;return r}return{styleIdentifier:function(){return null}}}function N(u,o,h){return function(){this.name=u,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 n={};n.importmodule=N("importmodule","tag",["string","builtin"]),n.documentclass=N("documentclass","tag",["","atom"]),n.usepackage=N("usepackage","tag",["atom"]),n.begin=N("begin","tag",["atom"]),n.end=N("end","tag",["atom"]),n.label=N("label","tag",["atom"]),n.ref=N("ref","tag",["atom"]),n.eqref=N("eqref","tag",["atom"]),n.cite=N("cite","tag",["atom"]),n.bibitem=N("bibitem","tag",["atom"]),n.Bibitem=N("Bibitem","tag",["atom"]),n.RBibitem=N("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function P(u,o){u.f=o}function p(u,o){var h;if(u.match(/^\\[a-zA-Z@]+/)){var r=u.current().slice(1);return h=n.hasOwnProperty(r)?n[r]:n.DEFAULT,h=new h,X(o,h),P(o,d),h.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return P(o,function(i,s){return m(i,s,"\\]")}),"keyword";if(u.match("\\("))return P(o,function(i,s){return m(i,s,"\\)")}),"keyword";if(u.match("$$"))return P(o,function(i,s){return m(i,s,"$$")}),"keyword";if(u.match("$"))return P(o,function(i,s){return m(i,s,"$")}),"keyword";var a=u.next();if(a=="%")return u.skipToEnd(),"comment";if(a=="}"||a=="]"){if(h=F(o),h)h.closeBracket(a),P(o,d);else return"error";return"bracket"}else return a=="{"||a=="["?(h=n.DEFAULT,h=new h,X(o,h),"bracket"):/\d/.test(a)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),h=H(o),h.name=="begin"&&(h.argument=u.current()),h.styleIdentifier())}function m(u,o,h){if(u.eatSpace())return null;if(h&&u.match(h))return P(o,p),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=u.next();return r=="{"||r=="}"||r=="["||r=="]"||r=="("||r==")"?"bracket":r=="%"?(u.skipToEnd(),"comment"):"error"}function d(u,o){var h=u.peek(),r;return h=="{"||h=="["?(r=F(o),r.openBracket(h),u.eat(h),P(o,p),"bracket"):/[ \t\r]/.test(h)?(u.eat(h),null):(P(o,p),I(o),p(u,o))}return{startState:function(){var u=M.inMathMode?function(o,h){return m(o,h)}:p;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,o){return o.f(u,o)},blankLine:function(u){u.f=p,u.cmdState.length=0},lineComment:"%"}}),Q.defineMIME("text/x-stex","stex"),Q.defineMIME("text/x-latex","stex")})},"+QRC":function(Be,le,D){"use strict";var Q=D("E9nw"),z={"text/plain":"Text","text/html":"Url",default:"Text"},M="Copy to clipboard: #{key}, Enter";function X(I){var H=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return I.replace(/#{\s*key\s*}/g,H)}function F(I,H){var N,n,P,p,m,d,u=!1;H||(H={}),N=H.debug||!1;try{P=Q(),p=document.createRange(),m=document.getSelection(),d=document.createElement("span"),d.textContent=I,d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(h){if(h.stopPropagation(),H.format)if(h.preventDefault(),typeof h.clipboardData=="undefined"){N&&console.warn("unable to use e.clipboardData"),N&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=z[H.format]||z.default;window.clipboardData.setData(r,I)}else h.clipboardData.clearData(),h.clipboardData.setData(H.format,I);H.onCopy&&(h.preventDefault(),H.onCopy(h.clipboardData))}),document.body.appendChild(d),p.selectNodeContents(d),m.addRange(p);var o=document.execCommand("copy");if(!o)throw new Error("copy command was unsuccessful");u=!0}catch(h){N&&console.error("unable to copy using execCommand: ",h),N&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(H.format||"text",I),H.onCopy&&H.onCopy(window.clipboardData),u=!0}catch(r){N&&console.error("unable to copy using clipboardData: ",r),N&&console.error("falling back to prompt"),n=X("message"in H?H.message:M),window.prompt(n,I)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(p):m.removeAllRanges()),d&&document.body.removeChild(d),P()}return u}Be.exports=F},"+aKw":function(Be,le,D){"use strict";var Q=D("tJVT"),z=D("q1tI"),M=D.n(z),X=function(H){return String(H).length===1?"0".concat(H):H},F=function(H){var N=H.className,n=N===void 0?"":N,P=H.onChange,p=H.defaultValue,m=p===void 0?0:p,d=Object(z.useState)(m),u=Object(Q.a)(d,2),o=u[0],h=u[1];Object(z.useEffect)(function(){var s=setTimeout(function(){h(o+1e3)},1e3);return P(o+1e3),function(){clearInterval(s)}},[o]);var r=parseInt(o/(60*6e4))||"00",a=parseInt(o%(60*6e4)/6e4)||"00",i=parseInt(o%6e4/1e3)||"00";return M.a.createElement("div",{className:n},X(r),":",X(a),":",X(i))};le.a=F},"+ua5":function(Be,le,D){},"/cxE":function(Be,le,D){"use strict";D.d(le,"f",function(){return M}),D.d(le,"g",function(){return X}),D.d(le,"h",function(){return F}),D.d(le,"e",function(){return H}),D.d(le,"b",function(){return N}),D.d(le,"c",function(){return n}),D.d(le,"d",function(){return P}),D.d(le,"a",function(){return p});class Q{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
`+m.stack):m},0)}}emit(m){this.listeners.forEach(d=>{d(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const z=new Q;function M(m){H(m)||z.onUnexpectedError(m);return}function X(m){H(m)||z.onUnexpectedExternalError(m);return}function F(m){if(m instanceof Error){let{name:d,message:u}=m;const o=m.stacktrace||m.stack;return{$isError:!0,name:d,message:u,stack:o}}return m}const I="Canceled";function H(m){return m instanceof Error&&m.name===I&&m.message===I}function N(){const m=new Error(I);return m.name=m.message,m}function n(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function P(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class p extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"07cG":function(Be,le,D){Be.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(Be,le){var D=arguments[3],Q=arguments[4],z=arguments[5],M=JSON.stringify;Be.exports=function(X,F){for(var I,H=Object.keys(z),N=0,n=H.length;N")):null:f.match("--")?E(o("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),E(h(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),C.tokenize=o("meta","?>"),"meta"):(P=f.eat("/")?"closeTag":"openTag",C.tokenize=d,"tag bracket");if(_=="&"){var U;return f.eat("#")?f.eat("x")?U=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):U=f.eatWhile(/[\d]/)&&f.eat(";"):U=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),U?"atom":"error"}else return f.eatWhile(/[^&<]/),null}m.isInText=!0;function d(f,C){var E=f.next();if(E==">"||E=="/"&&f.eat(">"))return C.tokenize=m,P=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return P="equals",null;if(E=="<"){C.tokenize=m,C.state=s,C.tagName=C.tagStart=null;var _=C.tokenize(f,C);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(E)?(C.tokenize=u(E),C.stringStartCol=f.column(),C.tokenize(f,C)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(f){var C=function(E,_){for(;!E.eol();)if(E.next()==f){_.tokenize=d;break}return"string"};return C.isInAttribute=!0,C}function o(f,C){return function(E,_){for(;!E.eol();){if(E.match(C)){_.tokenize=m;break}E.next()}return f}}function h(f){return function(C,E){for(var _;(_=C.next())!=null;){if(_=="<")return E.tokenize=h(f+1),E.tokenize(C,E);if(_==">")if(f==1){E.tokenize=m;break}else return E.tokenize=h(f-1),E.tokenize(C,E)}return"meta"}}function r(f,C,E){this.prev=f.context,this.tagName=C,this.indent=f.indented,this.startOfLine=E,(H.doNotIndent.hasOwnProperty(C)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function a(f){f.context&&(f.context=f.context.prev)}function i(f,C){for(var E;;){if(!f.context)return;if(E=f.context.tagName,!H.contextGrabbers.hasOwnProperty(E)||!H.contextGrabbers[E].hasOwnProperty(C))return;a(f)}}function s(f,C,E){return f=="openTag"?(E.tagStart=C.column(),S):f=="closeTag"?x:s}function S(f,C,E){return f=="word"?(E.tagName=C.current(),p="tag",w):H.allowMissingTagName&&f=="endTag"?(p="tag bracket",w(f,C,E)):(p="error",S)}function x(f,C,E){if(f=="word"){var _=C.current();return E.context&&E.context.tagName!=_&&H.implicitlyClosed.hasOwnProperty(E.context.tagName)&&a(E),E.context&&E.context.tagName==_||H.matchClosing===!1?(p="tag",T):(p="tag error",A)}else return H.allowMissingTagName&&f=="endTag"?(p="tag bracket",T(f,C,E)):(p="error",A)}function T(f,C,E){return f!="endTag"?(p="error",T):(a(E),s)}function A(f,C,E){return p="error",T(f,C,E)}function w(f,C,E){if(f=="word")return p="attribute",v;if(f=="endTag"||f=="selfcloseTag"){var _=E.tagName,U=E.tagStart;return E.tagName=E.tagStart=null,f=="selfcloseTag"||H.autoSelfClosers.hasOwnProperty(_)?i(E,_):(i(E,_),E.context=new r(E,_,U==E.indented)),s}return p="error",w}function v(f,C,E){return f=="equals"?b:(H.allowMissing||(p="error"),w(f,C,E))}function b(f,C,E){return f=="string"?g:f=="word"&&H.allowUnquoted?(p="string",w):(p="error",w(f,C,E))}function g(f,C,E){return f=="string"?g:w(f,C,E)}return{startState:function(f){var C={tokenize:m,state:s,indented:f||0,tagName:null,tagStart:null,context:null};return f!=null&&(C.baseIndent=f),C},token:function(f,C){if(!C.tagName&&f.sol()&&(C.indented=f.indentation()),f.eatSpace())return null;P=null;var E=C.tokenize(f,C);return(E||P)&&E!="comment"&&(p=null,C.state=C.state(P||E,f,C),p&&(E=p=="error"?E+" error":p)),E},indent:function(f,C,E){var _=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+I;if(_&&_.noIndent)return Q.Pass;if(f.tokenize!=d&&f.tokenize!=m)return E?E.match(/^(\s*)/)[0].length:0;if(f.tagName)return H.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+I*(H.multilineTagIndentFactor||1);if(H.alignCDATA&&/$/,blockCommentStart:"",configuration:H.htmlMode?"html":"xml",helperType:H.htmlMode?"html":"xml",skipAttribute:function(f){f.state==b&&(f.state=w)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var C=[],E=f.context;E;E=E.prev)E.tagName&&C.push(E.tagName);return C.reverse()}}}),Q.defineMIME("text/xml","xml"),Q.defineMIME("application/xml","xml"),Q.mimeModes.hasOwnProperty("text/html")||Q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Be,le,D){"use strict";D.d(le,"d",function(){return We}),D.d(le,"b",function(){return Le}),D.d(le,"c",function(){return ut}),D.d(le,"a",function(){return jt});var Q=D("VTBJ"),z=D("1OyB"),M=D("vuIU"),X=D("JX7q"),F=D("Ji7U"),I=D("LK+K"),H=D("q1tI"),N=D("I8Z2"),n=D("BGR+"),P=D("wx14"),p=D("rePB"),m=D("4IlW"),d=D("2GS6"),u=D("Gytx"),o=D.n(u),h=D("TSYQ"),r=D.n(h),a=D("U8pU"),i=D("ODXe"),s=/iPhone/i,S=/iPod/i,x=/iPad/i,T=/\bAndroid(?:.+)Mobile\b/i,A=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,v=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,g=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,C=/BB10/i,E=/Opera Mini/i,_=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function j(Ct,et){return Ct.test(et)}function L(Ct){var et=Ct||(typeof navigator!="undefined"?navigator.userAgent:""),st=et.split("[FBAN");if(typeof st[1]!="undefined"){var He=st,pe=Object(i.a)(He,1);et=pe[0]}if(st=et.split("Twitter"),typeof st[1]!="undefined"){var Re=st,lt=Object(i.a)(Re,1);et=lt[0]}var Ye={apple:{phone:j(s,et)&&!j(b,et),ipod:j(S,et),tablet:!j(s,et)&&j(x,et)&&!j(b,et),device:(j(s,et)||j(S,et)||j(x,et))&&!j(b,et)},amazon:{phone:j(w,et),tablet:!j(w,et)&&j(v,et),device:j(w,et)||j(v,et)},android:{phone:!j(b,et)&&j(w,et)||!j(b,et)&&j(T,et),tablet:!j(b,et)&&!j(w,et)&&!j(T,et)&&(j(v,et)||j(A,et)),device:!j(b,et)&&(j(w,et)||j(v,et)||j(T,et)||j(A,et))||j(/\bokhttp\b/i,et)},windows:{phone:j(b,et),tablet:j(g,et),device:j(b,et)||j(g,et)},other:{blackberry:j(f,et),blackberry10:j(C,et),opera:j(E,et),firefox:j(U,et),chrome:j(_,et),device:j(f,et)||j(C,et)||j(E,et)||j(U,et)||j(_,et)},any:null,phone:null,tablet:null};return Ye.any=Ye.apple.device||Ye.android.device||Ye.windows.device||Ye.other.device,Ye.phone=Ye.apple.phone||Ye.android.phone||Ye.windows.phone,Ye.tablet=Ye.apple.tablet||Ye.android.tablet||Ye.windows.tablet,Ye}var G=Object(Q.a)(Object(Q.a)({},L()),{},{isMobile:L}),B=G;function O(){}function V(Ct,et,st){var He=et||"";return Ct.key||"".concat(He,"item_").concat(st)}function te(Ct){return"".concat(Ct,"-menu-")}function re(Ct,et){var st=-1;H.Children.forEach(Ct,function(He){st+=1,He&&He.type&&He.type.isMenuItemGroup?H.Children.forEach(He.props.children,function(pe){st+=1,et(pe,st)}):et(He,st)})}function ge(Ct,et,st){if(!Ct||st.find)return;H.Children.forEach(Ct,function(He){if(He){var pe=He.type;if(!pe||!(pe.isSubMenu||pe.isMenuItem||pe.isMenuItemGroup))return;et.indexOf(He.key)!==-1?st.find=!0:He.props.children&&ge(He.props.children,et,st)}})}var Ae=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],Oe=function(et){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=et&&typeof et.getBoundingClientRect=="function"&&et.getBoundingClientRect().width;if(He){if(st){var pe=getComputedStyle(et),Re=pe.marginLeft,lt=pe.marginRight;He+=+Re.replace("px","")+ +lt.replace("px","")}He=+He.toFixed(6)}return He||0},Ce=function(et,st,He){et&&Object(a.a)(et.style)==="object"&&(et.style[st]=He)},je=function(){return B.any},Ue=D("KQm4"),xe=D("Ff2n"),be=D("i8i4"),Ve=D("bdgK"),mt=D("uciX"),yt=D("8XRh"),_t={adjustX:1,adjustY:1},xt={topLeft:{points:["bl","tl"],overflow:_t,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_t,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:_t,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:_t,offset:[4,0]}},nt={topLeft:{points:["bl","tl"],overflow:_t,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_t,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:_t,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:_t,offset:[4,0]}},ct=xt,wt=0,_e={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Me=function(et,st,He){var pe=te(st),Re=et.getState();et.setState({defaultActiveFirst:Object(Q.a)(Object(Q.a)({},Re.defaultActiveFirst),{},Object(p.a)({},pe,He))})},ve=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(He){var pe;Object(z.a)(this,st),pe=et.call(this,He),pe.onDestroy=function(Ke){pe.props.onDestroy(Ke)},pe.onKeyDown=function(Ke){var gt=Ke.keyCode,bt=pe.menuInstance,Tt=pe.props,Wt=Tt.isOpen,fe=Tt.store;if(gt===m.a.ENTER)return pe.onTitleClick(Ke),Me(fe,pe.props.eventKey,!0),!0;if(gt===m.a.RIGHT)return Wt?bt.onKeyDown(Ke):(pe.triggerOpenChange(!0),Me(fe,pe.props.eventKey,!0)),!0;if(gt===m.a.LEFT){var se;if(Wt)se=bt.onKeyDown(Ke);else return;return se||(pe.triggerOpenChange(!1),se=!0),se}return Wt&&(gt===m.a.UP||gt===m.a.DOWN)?bt.onKeyDown(Ke):void 0},pe.onOpenChange=function(Ke){pe.props.onOpenChange(Ke)},pe.onPopupVisibleChange=function(Ke){pe.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},pe.onMouseEnter=function(Ke){var gt=pe.props,bt=gt.eventKey,Tt=gt.onMouseEnter,Wt=gt.store;Me(Wt,pe.props.eventKey,!1),Tt({key:bt,domEvent:Ke})},pe.onMouseLeave=function(Ke){var gt=pe.props,bt=gt.parentMenu,Tt=gt.eventKey,Wt=gt.onMouseLeave;bt.subMenuInstance=Object(X.a)(pe),Wt({key:Tt,domEvent:Ke})},pe.onTitleMouseEnter=function(Ke){var gt=pe.props,bt=gt.eventKey,Tt=gt.onItemHover,Wt=gt.onTitleMouseEnter;Tt({key:bt,hover:!0}),Wt({key:bt,domEvent:Ke})},pe.onTitleMouseLeave=function(Ke){var gt=pe.props,bt=gt.parentMenu,Tt=gt.eventKey,Wt=gt.onItemHover,fe=gt.onTitleMouseLeave;bt.subMenuInstance=Object(X.a)(pe),Wt({key:Tt,hover:!1}),fe({key:Tt,domEvent:Ke})},pe.onTitleClick=function(Ke){var gt=Object(X.a)(pe),bt=gt.props;if(bt.onTitleClick({key:bt.eventKey,domEvent:Ke}),bt.triggerSubMenuAction==="hover")return;pe.triggerOpenChange(!bt.isOpen,"click"),Me(bt.store,pe.props.eventKey,!1)},pe.onSubMenuClick=function(Ke){typeof pe.props.onClick=="function"&&pe.props.onClick(pe.addKeyPath(Ke))},pe.onSelect=function(Ke){pe.props.onSelect(Ke)},pe.onDeselect=function(Ke){pe.props.onDeselect(Ke)},pe.getPrefixCls=function(){return"".concat(pe.props.rootPrefixCls,"-submenu")},pe.getActiveClassName=function(){return"".concat(pe.getPrefixCls(),"-active")},pe.getDisabledClassName=function(){return"".concat(pe.getPrefixCls(),"-disabled")},pe.getSelectedClassName=function(){return"".concat(pe.getPrefixCls(),"-selected")},pe.getOpenClassName=function(){return"".concat(pe.props.rootPrefixCls,"-submenu-open")},pe.saveMenuInstance=function(Ke){pe.menuInstance=Ke},pe.addKeyPath=function(Ke){return Object(Q.a)(Object(Q.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(pe.props.eventKey)})},pe.triggerOpenChange=function(Ke,gt){var bt=pe.props.eventKey,Tt=function(){pe.onOpenChange({key:bt,item:Object(X.a)(pe),trigger:gt,open:Ke})};gt==="mouseenter"?pe.mouseenterTimeout=setTimeout(function(){Tt()},0):Tt()},pe.isChildrenSelected=function(){var Ke={find:!1};return ge(pe.props.children,pe.props.selectedKeys,Ke),Ke.find},pe.isOpen=function(){return pe.props.openKeys.indexOf(pe.props.eventKey)!==-1},pe.adjustWidth=function(){if(!pe.subMenuTitle||!pe.menuInstance)return;var Ke=be.findDOMNode(pe.menuInstance);if(Ke.offsetWidth>=pe.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(pe.subMenuTitle.offsetWidth,"px")},pe.saveSubMenuTitle=function(Ke){pe.subMenuTitle=Ke},pe.getBaseProps=function(){var Ke=Object(X.a)(pe),gt=Ke.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:pe.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:pe.onSubMenuClick,onSelect:pe.onSelect,onDeselect:pe.onDeselect,onDestroy:pe.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:pe.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(X.a)(pe),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[te(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:pe.internalMenuId,manualRef:pe.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},pe.getMotion=function(Ke,gt){var bt=Object(X.a)(pe),Tt=bt.haveRendered,Wt=pe.props,fe=Wt.motion,se=Wt.rootPrefixCls,W=Object(Q.a)(Object(Q.a)({},fe),{},{leavedClassName:"".concat(se,"-hidden"),removeOnLeave:!1,motionAppear:Tt||!gt||Ke!=="inline"});return W};var Re=He.store,lt=He.eventKey,Ye=Re.getState(),Pt=Ye.defaultActiveFirst;pe.isRootMenu=!1;var Nt=!1;return Pt&&(Nt=Pt[lt]),Me(Re,lt,Nt),pe}return Object(M.a)(st,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var pe=this,Re=this.props,lt=Re.mode,Ye=Re.parentMenu,Pt=Re.manualRef;if(Pt&&Pt(this),lt!=="horizontal"||!Ye.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var pe=this.props,Re=pe.onDestroy,lt=pe.eventKey;Re&&Re(lt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(pe){var Re=this,lt=this.getBaseProps(),Ye=this.getMotion(lt.mode,lt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||lt.visible||lt.forceSubMenuRender,!this.haveOpened)return H.createElement("div",null);var Pt=lt.direction;return H.createElement(yt.default,Object.assign({visible:lt.visible},Ye),function(Nt){var Ke=Nt.className,gt=Nt.style,bt=r()("".concat(lt.prefixCls,"-sub"),Ke,Object(p.a)({},"".concat(lt.prefixCls,"-rtl"),Pt==="rtl"));return H.createElement(we,Object.assign({},lt,{id:Re.internalMenuId,className:bt,style:gt}),pe)})}},{key:"render",value:function(){var pe,Re=Object(Q.a)({},this.props),lt=Re.isOpen,Ye=this.getPrefixCls(),Pt=Re.mode==="inline",Nt=r()(Ye,"".concat(Ye,"-").concat(Re.mode),(pe={},Object(p.a)(pe,Re.className,!!Re.className),Object(p.a)(pe,this.getOpenClassName(),lt),Object(p.a)(pe,this.getActiveClassName(),Re.active||lt&&!Pt),Object(p.a)(pe,this.getDisabledClassName(),Re.disabled),Object(p.a)(pe,this.getSelectedClassName(),this.isChildrenSelected()),pe));this.internalMenuId||(Re.eventKey?this.internalMenuId="".concat(Re.eventKey,"$Menu"):(wt+=1,this.internalMenuId="$__$".concat(wt,"$Menu")));var Ke={},gt={},bt={};Re.disabled||(Ke={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},bt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Tt={},Wt=Re.direction;Pt&&(Wt==="rtl"?Tt.paddingRight=Re.inlineIndent*Re.level:Tt.paddingLeft=Re.inlineIndent*Re.level);var fe={};this.props.isOpen&&(fe={"aria-owns":this.internalMenuId});var se=null;Re.mode!=="horizontal"&&(se=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(se=H.createElement(this.props.expandIcon,Object(Q.a)({},this.props))));var W=H.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Tt,className:"".concat(Ye,"-title"),role:"button"},bt,gt,{"aria-expanded":lt},fe,{"aria-haspopup":"true",title:typeof Re.title=="string"?Re.title:void 0}),Re.title,se||H.createElement("i",{className:"".concat(Ye,"-arrow")})),$=this.renderChildren(Re.children),Z=Re.parentMenu.isRootMenu?Re.parentMenu.props.getPopupContainer:function(pn){return pn.parentNode},ne=_e[Re.mode],he=Re.popupOffset?{offset:Re.popupOffset}:{},Pe=Re.mode==="inline"?"":Re.popupClassName;Pe+=Wt==="rtl"?" ".concat(Ye,"-rtl"):"";var ze=Re.disabled,Rt=Re.triggerSubMenuAction,Mt=Re.subMenuOpenDelay,Ze=Re.forceSubMenuRender,kt=Re.subMenuCloseDelay,an=Re.builtinPlacements;Ae.forEach(function(pn){return delete Re[pn]}),delete Re.onClick;var At=Wt==="rtl"?Object.assign({},nt,an):Object.assign({},xt,an);return delete Re.direction,H.createElement("li",Object.assign({},Re,Ke,{className:Nt,role:"menuitem"}),Pt&&W,Pt&&$,!Pt&&H.createElement(mt.a,{prefixCls:Ye,popupClassName:r()("".concat(Ye,"-popup"),Pe),getPopupContainer:Z,builtinPlacements:At,popupPlacement:ne,popupVisible:lt,popupAlign:he,popup:$,action:ze?[]:[Rt],mouseEnterDelay:Mt,mouseLeaveDelay:kt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Ze},W))}}]),st}(H.Component);ve.defaultProps={onMouseEnter:O,onMouseLeave:O,onTitleMouseEnter:O,onTitleMouseLeave:O,onTitleClick:O,manualRef:O,mode:"vertical",title:""};var Te=Object(N.b)(function(Ct,et){var st=Ct.openKeys,He=Ct.activeKey,pe=Ct.selectedKeys,Re=et.eventKey,lt=et.subMenuKey;return{isOpen:st.indexOf(Re)>-1,active:He[lt]===Re,selectedKeys:pe}})(ve);Te.isSubMenu=!0;var We=Te,Je="menuitem-overflowed",at=.5,dt=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(){var He;return Object(z.a)(this,st),He=et.apply(this,arguments),He.resizeObserver=null,He.mutationObserver=null,He.originalTotalWidth=0,He.overflowedItems=[],He.menuItemSizes=[],He.cancelFrameId=null,He.state={lastVisibleIndex:void 0},He.getMenuItemNodes=function(){var pe=He.props.prefixCls,Re=be.findDOMNode(Object(X.a)(He));return Re?[].slice.call(Re.children).filter(function(lt){return lt.className.split(" ").indexOf("".concat(pe,"-overflowed-submenu"))<0}):[]},He.getOverflowedSubMenuItem=function(pe,Re,lt){var Ye=He.props,Pt=Ye.overflowedIndicator,Nt=Ye.level,Ke=Ye.mode,gt=Ye.prefixCls,bt=Ye.theme;if(Nt!==1||Ke!=="horizontal")return null;var Tt=He.props.children[0],Wt=Tt.props,fe=Wt.children,se=Wt.title,W=Wt.style,$=Object(xe.a)(Wt,["children","title","style"]),Z=Object(Q.a)({},W),ne="".concat(pe,"-overflowed-indicator"),he="".concat(pe,"-overflowed-indicator");Re.length===0&<!==!0?Z=Object(Q.a)(Object(Q.a)({},Z),{},{display:"none"}):lt&&(Z=Object(Q.a)(Object(Q.a)({},Z),{},{visibility:"hidden",position:"absolute"}),ne="".concat(ne,"-placeholder"),he="".concat(he,"-placeholder"));var Pe=bt?"".concat(gt,"-").concat(bt):"",ze={};return Ae.forEach(function(Rt){$[Rt]!==void 0&&(ze[Rt]=$[Rt])}),H.createElement(We,Object.assign({title:Pt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:Pe},ze,{key:ne,eventKey:he,disabled:!1,style:Z}),Re)},He.setChildrenWidthAndResize=function(){if(He.props.mode!=="horizontal")return;var pe=be.findDOMNode(Object(X.a)(He));if(!pe)return;var Re=pe.children;if(!Re||Re.length===0)return;var lt=pe.children[Re.length-1];Ce(lt,"display","inline-block");var Ye=He.getMenuItemNodes(),Pt=Ye.filter(function(Nt){return Nt.className.split(" ").indexOf(Je)>=0});Pt.forEach(function(Nt){Ce(Nt,"display","inline-block")}),He.menuItemSizes=Ye.map(function(Nt){return Oe(Nt,!0)}),Pt.forEach(function(Nt){Ce(Nt,"display","none")}),He.overflowedIndicatorWidth=Oe(pe.children[pe.children.length-1],!0),He.originalTotalWidth=He.menuItemSizes.reduce(function(Nt,Ke){return Nt+Ke},0),He.handleResize(),Ce(lt,"display","none")},He.handleResize=function(){if(He.props.mode!=="horizontal")return;var pe=be.findDOMNode(Object(X.a)(He));if(!pe)return;var Re=Oe(pe);He.overflowedItems=[];var lt=0,Ye;He.originalTotalWidth>Re+at&&(Ye=-1,He.menuItemSizes.forEach(function(Pt){lt+=Pt,lt+He.overflowedIndicatorWidth<=Re&&(Ye+=1)})),He.setState({lastVisibleIndex:Ye})},He}return Object(M.a)(st,[{key:"componentDidMount",value:function(){var pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Re=be.findDOMNode(this);if(!Re)return;this.resizeObserver=new Ve.default(function(lt){lt.forEach(function(){var Ye=pe.cancelFrameId;cancelAnimationFrame(Ye),pe.cancelFrameId=requestAnimationFrame(pe.setChildrenWidthAndResize)})}),[].slice.call(Re.children).concat(Re).forEach(function(lt){pe.resizeObserver.observe(lt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){pe.resizeObserver.disconnect(),[].slice.call(Re.children).concat(Re).forEach(function(lt){pe.resizeObserver.observe(lt)}),pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Re,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(pe){var Re=this,lt=this.state.lastVisibleIndex;return(pe||[]).reduce(function(Ye,Pt,Nt){var Ke=Pt;if(Re.props.mode==="horizontal"){var gt=Re.getOverflowedSubMenuItem(Pt.props.eventKey,[]);lt!==void 0&&Re.props.className.indexOf("".concat(Re.props.prefixCls,"-root"))!==-1&&(Nt>lt&&(Ke=H.cloneElement(Pt,{style:{display:"none"},eventKey:"".concat(Pt.props.eventKey,"-hidden"),className:"".concat(Je)})),Nt===lt+1&&(Re.overflowedItems=pe.slice(lt+1).map(function(Tt){return H.cloneElement(Tt,{key:Tt.props.eventKey,mode:"vertical-left"})}),gt=Re.getOverflowedSubMenuItem(Pt.props.eventKey,Re.overflowedItems)));var bt=[].concat(Object(Ue.a)(Ye),[gt,Ke]);return Nt===pe.length-1&&bt.push(Re.getOverflowedSubMenuItem(Pt.props.eventKey,[],!0)),bt}return[].concat(Object(Ue.a)(Ye),[Ke])},[])}},{key:"render",value:function(){var pe=this.props,Re=pe.visible,lt=pe.prefixCls,Ye=pe.overflowedIndicator,Pt=pe.mode,Nt=pe.level,Ke=pe.tag,gt=pe.children,bt=pe.theme,Tt=Object(xe.a)(pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Wt=Ke;return H.createElement(Wt,Object.assign({},Tt),this.renderChildren(gt))}}]),st}(H.Component);dt.defaultProps={tag:"div",className:""};var Lt=dt;function It(Ct){return Ct.length?Ct.every(function(et){return!!et.props.disabled}):!0}function Ne(Ct,et,st){var He=Ct.getState();Ct.setState({activeKey:Object(Q.a)(Object(Q.a)({},He.activeKey),{},Object(p.a)({},et,st))})}function ke(Ct){return Ct.eventKey||"0-menu-"}function it(Ct,et){var st=et,He=Ct.children,pe=Ct.eventKey;if(st){var Re;if(re(He,function(lt,Ye){lt&<.props&&!lt.props.disabled&&st===V(lt,pe,Ye)&&(Re=!0)}),Re)return st}return st=null,Ct.defaultActiveFirst&&re(He,function(lt,Ye){!st&<&&!lt.props.disabled&&(st=V(lt,pe,Ye))}),st}function ot(Ct){if(Ct){var et=this.instanceArray.indexOf(Ct);et!==-1?this.instanceArray[et]=Ct:this.instanceArray.push(Ct)}}var Ge=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(He){var pe;return Object(z.a)(this,st),pe=et.call(this,He),pe.onKeyDown=function(Re,lt){var Ye=Re.keyCode,Pt;if(pe.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Pt=Ke.onKeyDown(Re))}),Pt)return 1;var Nt=null;return(Ye===m.a.UP||Ye===m.a.DOWN)&&(Nt=pe.step(Ye===m.a.UP?-1:1)),Nt?(Re.preventDefault(),Ne(pe.props.store,ke(pe.props),Nt.props.eventKey),typeof lt=="function"&<(Nt),1):void 0},pe.onItemHover=function(Re){var lt=Re.key,Ye=Re.hover;Ne(pe.props.store,ke(pe.props),Ye?lt:null)},pe.onDeselect=function(Re){pe.props.onDeselect(Re)},pe.onSelect=function(Re){pe.props.onSelect(Re)},pe.onClick=function(Re){pe.props.onClick(Re)},pe.onOpenChange=function(Re){pe.props.onOpenChange(Re)},pe.onDestroy=function(Re){pe.props.onDestroy(Re)},pe.getFlatInstanceArray=function(){return pe.instanceArray},pe.step=function(Re){var lt=pe.getFlatInstanceArray(),Ye=pe.props.store.getState().activeKey[ke(pe.props)],Pt=lt.length;if(!Pt)return null;Re<0&&(lt=lt.concat().reverse());var Nt=-1;if(lt.every(function(Tt,Wt){return Tt&&Tt.props.eventKey===Ye?(Nt=Wt,!1):!0}),!pe.props.defaultActiveFirst&&Nt!==-1&&It(lt.slice(Nt,Pt-1)))return;var Ke=(Nt+1)%Pt,gt=Ke;do{var bt=lt[gt];if(!bt||bt.props.disabled)gt=(gt+1)%Pt;else return bt}while(gt!==Ke);return null},pe.renderCommonMenuItem=function(Re,lt,Ye){var Pt=pe.props.store.getState(),Nt=Object(X.a)(pe),Ke=Nt.props,gt=V(Re,Ke.eventKey,lt),bt=Re.props;if(!bt||typeof Re.type=="string")return Re;var Tt=gt===Pt.activeKey,Wt=Object(Q.a)(Object(Q.a)({mode:bt.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:pe.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:lt,parentMenu:Ke.parentMenu,manualRef:bt.disabled?void 0:Object(d.a)(Re.ref,ot.bind(Object(X.a)(pe))),eventKey:gt,active:!bt.disabled&&Tt,multiple:Ke.multiple,onClick:function(se){(bt.onClick||O)(se),pe.onClick(se)},onItemHover:pe.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:pe.onOpenChange,onDeselect:pe.onDeselect,onSelect:pe.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:bt.itemIcon||pe.props.itemIcon,expandIcon:bt.expandIcon||pe.props.expandIcon},Ye),{},{direction:Ke.direction});return(Ke.mode==="inline"||je())&&(Wt.triggerSubMenuAction="click"),H.cloneElement(Re,Wt)},pe.renderMenuItem=function(Re,lt,Ye){if(!Re)return null;var Pt=pe.props.store.getState(),Nt={openKeys:Pt.openKeys,selectedKeys:Pt.selectedKeys,triggerSubMenuAction:pe.props.triggerSubMenuAction,subMenuKey:Ye};return pe.renderCommonMenuItem(Re,lt,Nt)},He.store.setState({activeKey:Object(Q.a)(Object(Q.a)({},He.store.getState().activeKey),{},Object(p.a)({},He.eventKey,it(He,He.activeKey)))}),pe.instanceArray=[],pe}return Object(M.a)(st,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(pe){return this.props.visible||pe.visible||this.props.className!==pe.className||!o()(this.props.style,pe.style)}},{key:"componentDidUpdate",value:function(pe){var Re=this.props,lt="activeKey"in Re?Re.activeKey:Re.store.getState().activeKey[ke(Re)],Ye=it(Re,lt);if(Ye!==lt)Ne(Re.store,ke(Re),Ye);else if("activeKey"in pe){var Pt=it(pe,pe.activeKey);Ye!==Pt&&Ne(Re.store,ke(Re),Ye)}}},{key:"render",value:function(){var pe=this,Re=Object(P.a)({},this.props);this.instanceArray=[];var lt=r()(Re.prefixCls,Re.className,"".concat(Re.prefixCls,"-").concat(Re.mode)),Ye={className:lt,role:Re.role||"menu"};Re.id&&(Ye.id=Re.id),Re.focusable&&(Ye.tabIndex=0,Ye.onKeyDown=this.onKeyDown);var Pt=Re.prefixCls,Nt=Re.eventKey,Ke=Re.visible,gt=Re.level,bt=Re.mode,Tt=Re.overflowedIndicator,Wt=Re.theme;return Ae.forEach(function(fe){return delete Re[fe]}),delete Re.onClick,H.createElement(Lt,Object.assign({},Re,{prefixCls:Pt,mode:bt,tag:"ul",level:gt,theme:Wt,visible:Ke,overflowedIndicator:Tt},Ye),H.Children.map(Re.children,function(fe,se){return pe.renderMenuItem(fe,se,Nt||"0-menu-")}))}}]),st}(H.Component);Ge.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:O};var $e=Object(N.b)()(Ge),we=$e,Se=D("Kwbf");function Ee(Ct,et,st){var He=Ct.prefixCls,pe=Ct.motion,Re=Ct.defaultMotions,lt=Re===void 0?{}:Re,Ye=Ct.openAnimation,Pt=Ct.openTransitionName,Nt=et.switchingModeFromInline;if(pe)return pe;if(Object(a.a)(Ye)==="object"&&Ye)Object(Se.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ye=="string")return{motionName:"".concat(He,"-open-").concat(Ye)};if(Pt)return{motionName:Pt};var Ke=lt[st];return Ke||(Nt?null:lt.other)}var ue=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(He){var pe;Object(z.a)(this,st),pe=et.call(this,He),pe.inlineOpenKeys=[],pe.onSelect=function(Ye){var Pt=Object(X.a)(pe),Nt=Pt.props;if(Nt.selectable){var Ke=pe.store.getState(),gt=Ke.selectedKeys,bt=Ye.key;Nt.multiple?gt=gt.concat([bt]):gt=[bt],"selectedKeys"in Nt||pe.store.setState({selectedKeys:gt}),Nt.onSelect(Object(Q.a)(Object(Q.a)({},Ye),{},{selectedKeys:gt}))}},pe.onClick=function(Ye){var Pt=pe.getRealMenuMode(),Nt=Object(X.a)(pe),Ke=Nt.store,gt=Nt.props.onOpenChange;Pt!=="inline"&&!("openKeys"in pe.props)&&(Ke.setState({openKeys:[]}),gt([])),pe.props.onClick(Ye)},pe.onKeyDown=function(Ye,Pt){pe.innerMenu.getWrappedInstance().onKeyDown(Ye,Pt)},pe.onOpenChange=function(Ye){var Pt=Object(X.a)(pe),Nt=Pt.props,Ke=pe.store.getState().openKeys.concat(),gt=!1,bt=function(Wt){var fe=!1;if(Wt.open)fe=Ke.indexOf(Wt.key)===-1,fe&&Ke.push(Wt.key);else{var se=Ke.indexOf(Wt.key);fe=se!==-1,fe&&Ke.splice(se,1)}gt=gt||fe};Array.isArray(Ye)?Ye.forEach(bt):bt(Ye),gt&&("openKeys"in pe.props||pe.store.setState({openKeys:Ke}),Nt.onOpenChange(Ke))},pe.onDeselect=function(Ye){var Pt=Object(X.a)(pe),Nt=Pt.props;if(Nt.selectable){var Ke=pe.store.getState().selectedKeys.concat(),gt=Ye.key,bt=Ke.indexOf(gt);bt!==-1&&Ke.splice(bt,1),"selectedKeys"in Nt||pe.store.setState({selectedKeys:Ke}),Nt.onDeselect(Object(Q.a)(Object(Q.a)({},Ye),{},{selectedKeys:Ke}))}},pe.onMouseEnter=function(Ye){pe.restoreModeVerticalFromInline();var Pt=pe.props.onMouseEnter;Pt&&Pt(Ye)},pe.onTransitionEnd=function(Ye){var Pt=Ye.propertyName==="width"&&Ye.target===Ye.currentTarget,Nt=Ye.target.className,Ke=Object.prototype.toString.call(Nt)==="[object SVGAnimatedString]"?Nt.animVal:Nt,gt=Ye.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Pt||gt)&&pe.restoreModeVerticalFromInline()},pe.setInnerMenu=function(Ye){pe.innerMenu=Ye},pe.isRootMenu=!0;var Re=He.defaultSelectedKeys,lt=He.defaultOpenKeys;return"selectedKeys"in He&&(Re=He.selectedKeys||[]),"openKeys"in He&&(lt=He.openKeys||[]),pe.store=Object(N.c)({selectedKeys:Re,openKeys:lt,activeKey:{"0-menu-":it(He,He.activeKey)}}),pe.state={switchingModeFromInline:!1},pe}return Object(M.a)(st,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(pe){this.updateOpentKeysWhenSwitchMode(pe),this.updateMiniStore();var Re=this.props,lt=Re.siderCollapsed,Ye=Re.inlineCollapsed,Pt=Re.onOpenChange;(!pe.inlineCollapsed&&Ye||!pe.siderCollapsed&<)&&Pt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(pe){var Re=this.props,lt=this.store,Ye=this.inlineOpenKeys,Pt=lt.getState(),Nt={};pe.mode==="inline"&&Re.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Re||((Re.inlineCollapsed&&!pe.inlineCollapsed||Re.siderCollapsed&&!pe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Pt.openKeys.concat(),Nt.openKeys=[]),(!Re.inlineCollapsed&&pe.inlineCollapsed||!Re.siderCollapsed&&pe.siderCollapsed)&&(Nt.openKeys=Ye,this.inlineOpenKeys=[])),Object.keys(Nt).length&<.setState(Nt)}},{key:"updateMenuDisplay",value:function(){var pe=this.props.collapsedWidth,Re=this.store,lt=this.prevOpenKeys,Ye=this.getInlineCollapsed()&&(pe===0||pe==="0"||pe==="0px");Ye?(this.prevOpenKeys=Re.getState().openKeys.concat(),this.store.setState({openKeys:[]})):lt&&(this.store.setState({openKeys:lt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var pe=this.props.mode,Re=this.state.switchingModeFromInline,lt=this.getInlineCollapsed();return Re&<?"inline":lt?"vertical":pe}},{key:"getInlineCollapsed",value:function(){var pe=this.props,Re=pe.inlineCollapsed,lt=pe.siderCollapsed;return lt!==void 0?lt:Re}},{key:"restoreModeVerticalFromInline",value:function(){var pe=this.state.switchingModeFromInline;pe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var pe=Object(Q.a)({},Object(n.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Re=this.getRealMenuMode();return pe.className+=" ".concat(pe.prefixCls,"-root"),pe.direction==="rtl"&&(pe.className+=" ".concat(pe.prefixCls,"-rtl")),pe=Object(Q.a)(Object(Q.a)({},pe),{},{mode:Re,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ee(this.props,this.state,Re)}),delete pe.openAnimation,delete pe.openTransitionName,H.createElement(N.a,{store:this.store},H.createElement(we,Object.assign({},pe,{ref:this.setInnerMenu}),this.props.children))}}]),st}(H.Component);ue.defaultProps={selectable:!0,onClick:O,onSelect:O,onOpenChange:O,onDeselect:O,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:H.createElement("span",null,"\xB7\xB7\xB7")};var de=ue,ye=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(){var He;return Object(z.a)(this,st),He=et.apply(this,arguments),He.onKeyDown=function(pe){var Re=pe.keyCode;return Re===m.a.ENTER?(He.onClick(pe),!0):void 0},He.onMouseLeave=function(pe){var Re=He.props,lt=Re.eventKey,Ye=Re.onItemHover,Pt=Re.onMouseLeave;Ye({key:lt,hover:!1}),Pt({key:lt,domEvent:pe})},He.onMouseEnter=function(pe){var Re=He.props,lt=Re.eventKey,Ye=Re.onItemHover,Pt=Re.onMouseEnter;Ye({key:lt,hover:!0}),Pt({key:lt,domEvent:pe})},He.onClick=function(pe){var Re=He.props,lt=Re.eventKey,Ye=Re.multiple,Pt=Re.onClick,Nt=Re.onSelect,Ke=Re.onDeselect,gt=Re.isSelected,bt={key:lt,keyPath:[lt],item:Object(X.a)(He),domEvent:pe};Pt(bt),Ye?gt?Ke(bt):Nt(bt):gt||Nt(bt)},He.saveNode=function(pe){He.node=pe},He}return Object(M.a)(st,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var pe=this.props;pe.onDestroy&&pe.onDestroy(pe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var pe,Re=Object(Q.a)({},this.props),lt=r()(this.getPrefixCls(),Re.className,(pe={},Object(p.a)(pe,this.getActiveClassName(),!Re.disabled&&Re.active),Object(p.a)(pe,this.getSelectedClassName(),Re.isSelected),Object(p.a)(pe,this.getDisabledClassName(),Re.disabled),pe)),Ye=Object(Q.a)(Object(Q.a)({},Re.attribute),{},{title:typeof Re.title=="string"?Re.title:void 0,className:lt,role:Re.role||"menuitem","aria-disabled":Re.disabled});Re.role==="option"?Ye=Object(Q.a)(Object(Q.a)({},Ye),{},{role:"option","aria-selected":Re.isSelected}):(Re.role===null||Re.role==="none")&&(Ye.role="none");var Pt={onClick:Re.disabled?null:this.onClick,onMouseLeave:Re.disabled?null:this.onMouseLeave,onMouseEnter:Re.disabled?null:this.onMouseEnter},Nt=Object(Q.a)({},Re.style);Re.mode==="inline"&&(Re.direction==="rtl"?Nt.paddingRight=Re.inlineIndent*Re.level:Nt.paddingLeft=Re.inlineIndent*Re.level),Ae.forEach(function(gt){return delete Re[gt]}),delete Re.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=H.createElement(this.props.itemIcon,this.props)),H.createElement("li",Object.assign({},Object(n.default)(Re,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ye,Pt,{style:Nt,ref:this.saveNode}),Re.children,Ke)}}]),st}(H.Component);ye.isMenuItem=!0,ye.defaultProps={onSelect:O,onMouseEnter:O,onMouseLeave:O,manualRef:O};var me=Object(N.b)(function(Ct,et){var st=Ct.activeKey,He=Ct.selectedKeys,pe=et.eventKey,Re=et.subMenuKey;return{active:st[Re]===pe,isSelected:He.indexOf(pe)!==-1}})(ye),Le=me,Xe=function(Ct){Object(F.a)(st,Ct);var et=Object(I.a)(st);function st(){var He;return Object(z.a)(this,st),He=et.apply(this,arguments),He.renderInnerMenuItem=function(pe){var Re=He.props,lt=Re.renderMenuItem,Ye=Re.index;return lt(pe,Ye,He.props.subMenuKey)},He}return Object(M.a)(st,[{key:"render",value:function(){var pe=Object(P.a)({},this.props),Re=pe.className,lt=Re===void 0?"":Re,Ye=pe.rootPrefixCls,Pt="".concat(Ye,"-item-group-title"),Nt="".concat(Ye,"-item-group-list"),Ke=pe.title,gt=pe.children;return Ae.forEach(function(bt){return delete pe[bt]}),delete pe.onClick,delete pe.direction,H.createElement("li",Object.assign({},pe,{className:"".concat(lt," ").concat(Ye,"-item-group")}),H.createElement("div",{className:Pt,title:typeof Ke=="string"?Ke:void 0},Ke),H.createElement("ul",{className:Nt},H.Children.map(gt,this.renderInnerMenuItem)))}}]),st}(H.Component);Xe.isMenuItemGroup=!0,Xe.defaultProps={disabled:!0};var ut=Xe,Dt=function(et){var st=et.className,He=et.rootPrefixCls,pe=et.style;return H.createElement("li",{className:"".concat(st," ").concat(He,"-item-divider"),style:pe})};Dt.defaultProps={disabled:!0,className:"",style:{}};var jt=Dt,Ut=le.e=de},"24hK":function(Be,le,D){"use strict";D.d(le,"a",function(){return z});class Q{constructor(M){this.element=M,this.next=Q.Undefined,this.prev=Q.Undefined}}Q.Undefined=new Q(void 0);class z{constructor(){this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Q.Undefined}clear(){let M=this._first;for(;M!==Q.Undefined;){const X=M.next;M.prev=Q.Undefined,M.next=Q.Undefined,M=X}this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}unshift(M){return this._insert(M,!1)}push(M){return this._insert(M,!0)}_insert(M,X){const F=new Q(M);if(this._first===Q.Undefined)this._first=F,this._last=F;else if(X){const H=this._last;this._last=F,F.prev=H,H.next=F}else{const H=this._first;this._first=F,F.next=H,H.prev=F}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(F))}}shift(){if(this._first===Q.Undefined)return;{const M=this._first.element;return this._remove(this._first),M}}pop(){if(this._last===Q.Undefined)return;{const M=this._last.element;return this._remove(this._last),M}}_remove(M){if(M.prev!==Q.Undefined&&M.next!==Q.Undefined){const X=M.prev;X.next=M.next,M.next.prev=X}else M.prev===Q.Undefined&&M.next===Q.Undefined?(this._first=Q.Undefined,this._last=Q.Undefined):M.next===Q.Undefined?(this._last=this._last.prev,this._last.next=Q.Undefined):M.prev===Q.Undefined&&(this._first=this._first.next,this._first.prev=Q.Undefined);this._size-=1}*[Symbol.iterator](){let M=this._first;for(;M!==Q.Undefined;)yield M.element,M=M.next}}},"3/fG":function(Be,le,D){"use strict";D.d(le,"a",function(){return z});function Q(M,X){let F;return X.length===0?F=M:F=M.replace(/\{(\d+)\}/g,function(I,H){const N=H[0];return typeof X[N]!="undefined"?X[N]:I}),F}function z(M,X,...F){return Q(X,F)}},"3tLw":function(Be,le,D){Be.exports=D.p+"static/a.39070d50.svg"},"4xil":function(Be,le,D){Be.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","right-controls":"right-controls___3oxDi","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","fullscreen-button1":"fullscreen-button1___1murk","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(Be,le,D){"use strict";D.d(le,"a",function(){return i});var Q=D("Ty5D"),z=D("dI71"),M=D("q1tI"),X=D.n(M),F=D("YS25"),I=D("17x9"),H=D.n(I),N=D("wx14"),n=D("zLVn"),P=D("9R94"),p=function(b){Object(z.a)(g,b);function g(){for(var C,E=arguments.length,_=new Array(E),U=0;U=0||E.relatedTarget.className.indexOf("".concat(L,"-next"))>=0))return;b.setState({goInputText:""}),j(b.getValidValue())},b.go=function(E){var _=b.state.goInputText;if(_==="")return;(E.keyCode===u.ENTER||E.type==="click")&&(b.setState({goInputText:""}),b.props.quickGo(b.getValidValue()))},b}return Object(F.a)(v,[{key:"getValidValue",value:function(){var g=this.state,f=g.goInputText,C=g.current;return!f||isNaN(f)?C:Number(f)}},{key:"getPageSizeOptions",value:function(){var g=this.props,f=g.pageSize,C=g.pageSizeOptions;return C.some(function(E){return E.toString()===f.toString()})?C:C.concat([f.toString()]).sort(function(E,_){var U=isNaN(Number(E))?0:Number(E),j=isNaN(Number(_))?0:Number(_);return U-j})}},{key:"render",value:function(){var g=this,f=this.props,C=f.pageSize,E=f.locale,_=f.rootPrefixCls,U=f.changeSize,j=f.quickGo,L=f.goButton,G=f.selectComponentClass,B=f.buildOptionText,O=f.selectPrefixCls,V=f.disabled,te=this.state.goInputText,re="".concat(_,"-options"),ge=G,Ae=null,Oe=null,Ce=null;if(!U&&!j)return null;var je=this.getPageSizeOptions();if(U&&ge){var Ue=je.map(function(xe,be){return n.a.createElement(ge.Option,{key:be,value:xe.toString()},(B||g.buildOptionText)(xe))});Ae=n.a.createElement(ge,{disabled:V,prefixCls:O,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||je[0]).toString(),onChange:this.changeSize,getPopupContainer:function(be){return be.parentNode}},Ue)}return j&&(L&&(Ce=typeof L=="boolean"?n.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(re,"-quick-jumper-button")},E.jump_to_confirm):n.a.createElement("span",{onClick:this.go,onKeyUp:this.go},L)),Oe=n.a.createElement("div",{className:"".concat(re,"-quick-jumper")},E.jump_to,n.a.createElement("input",{disabled:V,type:"text",value:te,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,Ce)),n.a.createElement("li",{className:"".concat(re)},Ae,Oe)}}]),v}(n.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=o,r=D("N2Kk");function a(){}function i(A){return typeof A=="number"&&isFinite(A)&&Math.floor(A)===A}function s(A,w,v){return v}function S(A,w,v){var b=typeof A=="undefined"?w.pageSize:A;return Math.floor((v.total-1)/b)+1}var x=function(A){Object(I.a)(v,A);var w=Object(H.a)(v);function v(b){var g;Object(X.a)(this,v),g=w.call(this,b),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(U,j){var L=g.props.prefixCls,G=U||n.a.createElement("button",{type:"button","aria-label":j,className:"".concat(L,"-item-link")});return typeof U=="function"&&(G=n.a.createElement(U,Object(M.a)({},g.props))),G},g.savePaginationNode=function(U){g.paginationNode=U},g.isValid=function(U){return i(U)&&U!==g.state.current},g.shouldDisplayQuickJumper=function(){var U=g.props,j=U.showQuickJumper,L=U.pageSize,G=U.total;return G<=L?!1:j},g.handleKeyDown=function(U){(U.keyCode===u.ARROW_UP||U.keyCode===u.ARROW_DOWN)&&U.preventDefault()},g.handleKeyUp=function(U){var j=g.getValidValue(U),L=g.state.currentInputValue;j!==L&&g.setState({currentInputValue:j}),U.keyCode===u.ENTER?g.handleChange(j):U.keyCode===u.ARROW_UP?g.handleChange(j-1):U.keyCode===u.ARROW_DOWN&&g.handleChange(j+1)},g.changePageSize=function(U){var j=g.state.current,L=S(U,g.state,g.props);j=j>L?L:j,L===0&&(j=g.state.current),typeof U=="number"&&("pageSize"in g.props||g.setState({pageSize:U}),"current"in g.props||g.setState({current:j,currentInputValue:j})),g.props.onShowSizeChange(j,U),"onChange"in g.props&&g.props.onChange&&g.props.onChange(j,U)},g.handleChange=function(U){var j=g.props.disabled,L=U;if(g.isValid(L)&&!j){var G=S(void 0,g.state,g.props);L>G?L=G:L<1&&(L=1),"current"in g.props||g.setState({current:L,currentInputValue:L});var B=g.state.pageSize;return g.props.onChange(L,B),L}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current2?L-2:0),B=2;B=C?_=C:_=Number(f),_}},{key:"getShowSizeChanger",value:function(){var g=this.props,f=g.showSizeChanger,C=g.total,E=g.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:C>E}},{key:"renderPrev",value:function(g){var f=this.props,C=f.prevIcon,E=f.itemRender,_=E(g,"prev",this.getItemIcon(C,"prev page")),U=!this.hasPrev();return Object(N.isValidElement)(_)?Object(N.cloneElement)(_,{disabled:U}):_}},{key:"renderNext",value:function(g){var f=this.props,C=f.nextIcon,E=f.itemRender,_=E(g,"next",this.getItemIcon(C,"next page")),U=!this.hasNext();return Object(N.isValidElement)(_)?Object(N.cloneElement)(_,{disabled:U}):_}},{key:"render",value:function(){var g=this,f=this.props,C=f.prefixCls,E=f.className,_=f.style,U=f.disabled,j=f.hideOnSinglePage,L=f.total,G=f.locale,B=f.showQuickJumper,O=f.showLessItems,V=f.showTitle,te=f.showTotal,re=f.simple,ge=f.itemRender,Ae=f.showPrevNextJumpers,Oe=f.jumpPrevIcon,Ce=f.jumpNextIcon,je=f.selectComponentClass,Ue=f.selectPrefixCls,xe=f.pageSizeOptions,be=this.state,Ve=be.current,mt=be.pageSize,yt=be.currentInputValue;if(j===!0&&L<=mt)return null;var _t=S(void 0,this.state,this.props),xt=[],nt=null,ct=null,wt=null,_e=null,Me=null,ve=B&&B.goButton,Te=O?1:2,We=Ve-1>0?Ve-1:0,Je=Ve+1<_t?Ve+1:_t,at=Object.keys(this.props).reduce(function(ue,de){return(de.substr(0,5)==="data-"||de.substr(0,5)==="aria-"||de==="role")&&(ue[de]=g.props[de]),ue},{});if(re)return ve&&(typeof ve=="boolean"?Me=n.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},G.jump_to_confirm):Me=n.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ve),Me=n.a.createElement("li",{title:V?"".concat(G.jump_to).concat(Ve,"/").concat(_t):null,className:"".concat(C,"-simple-pager")},Me)),n.a.createElement("ul",Object(Q.a)({className:p()(C,"".concat(C,"-simple"),Object(z.a)({},"".concat(C,"-disabled"),U),E),style:_,ref:this.savePaginationNode},at),n.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:p()("".concat(C,"-prev"),Object(z.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(We)),n.a.createElement("li",{title:V?"".concat(Ve,"/").concat(_t):null,className:"".concat(C,"-simple-pager")},n.a.createElement("input",{type:"text",value:yt,disabled:U,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),n.a.createElement("span",{className:"".concat(C,"-slash")},"/"),_t),n.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:p()("".concat(C,"-next"),Object(z.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Je)),Me);if(_t<=3+Te*2){var dt={locale:G,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:V,itemRender:ge};_t||xt.push(n.a.createElement(d,Object(Q.a)({},dt,{key:"noPager",page:_t,className:"".concat(C,"-disabled")})));for(var Lt=1;Lt<=_t;Lt+=1){var It=Ve===Lt;xt.push(n.a.createElement(d,Object(Q.a)({},dt,{key:Lt,page:Lt,active:It})))}}else{var Ne=O?G.prev_3:G.prev_5,ke=O?G.next_3:G.next_5;Ae&&(nt=n.a.createElement("li",{title:V?Ne:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:p()("".concat(C,"-jump-prev"),Object(z.a)({},"".concat(C,"-jump-prev-custom-icon"),!!Oe))},ge(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Oe,"prev page"))),ct=n.a.createElement("li",{title:V?ke:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:p()("".concat(C,"-jump-next"),Object(z.a)({},"".concat(C,"-jump-next-custom-icon"),!!Ce))},ge(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ce,"next page")))),_e=n.a.createElement(d,{locale:G,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:_t,page:_t,active:!1,showTitle:V,itemRender:ge}),wt=n.a.createElement(d,{locale:G,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:V,itemRender:ge});var it=Math.max(1,Ve-Te),ot=Math.min(Ve+Te,_t);Ve-1<=Te&&(ot=1+Te*2),_t-Ve<=Te&&(it=_t-Te*2);for(var Ge=it;Ge<=ot;Ge+=1){var $e=Ve===Ge;xt.push(n.a.createElement(d,{locale:G,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ge,page:Ge,active:$e,showTitle:V,itemRender:ge}))}Ve-1>=Te*2&&Ve!==1+2&&(xt[0]=Object(N.cloneElement)(xt[0],{className:"".concat(C,"-item-after-jump-prev")}),xt.unshift(nt)),_t-Ve>=Te*2&&Ve!==_t-2&&(xt[xt.length-1]=Object(N.cloneElement)(xt[xt.length-1],{className:"".concat(C,"-item-before-jump-next")}),xt.push(ct)),it!==1&&xt.unshift(wt),ot!==_t&&xt.push(_e)}var we=null;te&&(we=n.a.createElement("li",{className:"".concat(C,"-total-text")},te(L,[L===0?0:(Ve-1)*mt+1,Ve*mt>L?L:Ve*mt])));var Se=!this.hasPrev()||!_t,Ee=!this.hasNext()||!_t;return n.a.createElement("ul",Object(Q.a)({className:p()(C,E,Object(z.a)({},"".concat(C,"-disabled"),U)),style:_,unselectable:"unselectable",ref:this.savePaginationNode},at),we,n.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:Se?null:0,onKeyPress:this.runIfEnterPrev,className:p()("".concat(C,"-prev"),Object(z.a)({},"".concat(C,"-disabled"),Se)),"aria-disabled":Se},this.renderPrev(We)),xt,n.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:Ee?null:0,onKeyPress:this.runIfEnterNext,className:p()("".concat(C,"-next"),Object(z.a)({},"".concat(C,"-disabled"),Ee)),"aria-disabled":Ee},this.renderNext(Je)),n.a.createElement(h,{disabled:U,locale:G,rootPrefixCls:C,selectComponentClass:je,selectPrefixCls:Ue,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ve,pageSize:mt,pageSizeOptions:xe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ve}))}}],[{key:"getDerivedStateFromProps",value:function(g,f){var C={};if("current"in g&&(C.current=g.current,g.current!==f.current&&(C.currentInputValue=C.current)),"pageSize"in g&&g.pageSize!==f.pageSize){var E=f.current,_=S(g.pageSize,f,g);E=E>_?_:E,"current"in g||(C.current=E,C.currentInputValue=E),C.pageSize=g.pageSize}return C}}]),v}(n.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:r.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var T=x},"6RRn":function(Be,le,D){"use strict";var Q=D("wCXF"),z=D("n6Qo");D.d(le,"b",function(){return z.a});var M=D("IBYe"),X=D("6eGT"),F=D("hW8S");D.d(le,"a",function(){return F.a}),le.c=Q.b},"6UM0":function(Be,le,D){var Q,z;(function(){var M;(function(){"use strict";var F=[function(n,P,p){var m=p(1).Beautifier,d=p(5).Options;function u(o,h){var r=new m(o,h);return r.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new d}},function(n,P,p){var m=p(2).Output,d=p(3).Token,u=p(4),o=p(5).Options,h=p(7).Tokenizer,r=p(7).line_starters,a=p(7).positionable_operators,i=p(7).TOKEN;function s(O,V){return V.indexOf(O)!==-1}function S(O){return O.replace(/^\s+/g,"")}function x(O){for(var V={},te=0;tete&&(te=O.line_indent_level));var re={mode:V,parent:O,last_token:O?O.last_token:new d(i.START_BLOCK,""),last_word:O?O.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:te,alignment:0,line_indent_level:O?O.line_indent_level:te,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},G.prototype._reset=function(O){var V=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var te=new h(O,this._options);return this._tokens=te.tokenize(),O},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,V=this._reset(this._source_text),te=this._options.eol;this._options.eol==="auto"&&(te=`
`,V&&u.lineBreak.test(V||"")&&(te=V.match(u.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return O=this._output.get_code(te),O},G.prototype.handle_token=function(O,V){O.type===i.START_EXPR?this.handle_start_expr(O):O.type===i.END_EXPR?this.handle_end_expr(O):O.type===i.START_BLOCK?this.handle_start_block(O):O.type===i.END_BLOCK?this.handle_end_block(O):O.type===i.WORD?this.handle_word(O):O.type===i.RESERVED?this.handle_word(O):O.type===i.SEMICOLON?this.handle_semicolon(O):O.type===i.STRING?this.handle_string(O):O.type===i.EQUALS?this.handle_equals(O):O.type===i.OPERATOR?this.handle_operator(O):O.type===i.COMMA?this.handle_comma(O):O.type===i.BLOCK_COMMENT?this.handle_block_comment(O,V):O.type===i.COMMENT?this.handle_comment(O,V):O.type===i.DOT?this.handle_dot(O):O.type===i.EOF?this.handle_eof(O):O.type===i.UNKNOWN?this.handle_unknown(O,V):this.handle_unknown(O,V)},G.prototype.handle_whitespace_and_comments=function(O,V){var te=O.newlines,re=this._options.keep_array_indentation&&_(this._flags.mode);if(O.comments_before)for(var ge=O.comments_before.next();ge;)this.handle_whitespace_and_comments(ge,V),this.handle_token(ge,V),ge=O.comments_before.next();if(re)for(var Ae=0;Ae0,V);else if(this._options.max_preserve_newlines&&te>this._options.max_preserve_newlines&&(te=this._options.max_preserve_newlines),this._options.preserve_newlines&&te>1){this.print_newline(!1,V);for(var Oe=1;Oe0&&(!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))},G.prototype.set_mode=function(O){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,O),this._flags=this.create_flags(this._previous_flags,O),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===f.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(O){var V=!1;return V=V||A(this._flags.last_token,["var","let","const"])&&O.type===i.WORD,V=V||T(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&A(this._flags.last_token,B)&&!O.newlines,V=V||T(this._flags.last_token,"else")&&!(T(O,"if")&&!O.comments_before),V=V||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),V=V||this._flags.last_token.type===i.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==i.WORD&&O.type!==i.RESERVED,V=V||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"])),V?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,A(O,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var V=f.Expression;if(O.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){A(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=f.ArrayLiteral,_(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())),s(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=f.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=f.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&O.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var te=this._tokens.peek(-3);if(this._options.space_after_named_function&&te){var re=this._tokens.peek(-4);A(te,["async","function"])||te.text==="*"&&A(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(te.text==="{"||te.text===","||te.text==="*"&&(re.text==="{"||re.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(O);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&s(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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(O){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&_(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(O),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===f.Conditional&&(this._previous_flags.mode=f.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var V=this._tokens.peek(),te=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):te&&(s(te.text,[":",","])&&s(V.type,[i.STRING,i.WORD,i.RESERVED])||s(V.text,["get","set","..."])&&s(te.type,[i.WORD,i.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(te.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):s(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||A(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(A(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!V.comments_before&&V.text==="}",ge=re&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Ae=0,Oe=null;this._flags.inline_frame=!0;do if(Ae+=1,Oe=this._tokens.peek(Ae-1),Oe.newlines){this._flags.inline_frame=!1;break}while(Oe.type!==i.EOF&&!(Oe.type===i.END_BLOCK&&Oe.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(ge||this._flags.last_token.type===i.EQUALS||A(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(_(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(O),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===f.Statement;)this.restore_mode();var V=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(_(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(O)},G.prototype.handle_word=function(O){if(O.type===i.RESERVED){if(s(O.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)O.type=i.WORD;else if(O.text==="import"&&s(this._tokens.peek().text,["(","."]))O.type=i.WORD;else if(s(O.text,["as","from"])&&!this._flags.import_block)O.type=i.WORD;else if(this._flags.mode===f.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(O.type=i.WORD)}}if(this.start_of_statement(O)?A(this._flags.last_token,["var","let","const"])&&O.type===i.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!U(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!A(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(O),this.print_newline()):this.handle_whitespace_and_comments(O),this._flags.do_block&&!this._flags.do_while)if(T(O,"while")){this._output.space_before_token=!0,this.print_token(O),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(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===f.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&A(O,["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(O),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),T(O,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?A(this._flags.last_token,["get","set","new","export"])||A(this._flags.last_token,B)?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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(U(this._flags.mode)||_(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var te="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?te="SPACE":A(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?te="NEWLINE":(te="SPACE",this._output.space_before_token=!0):te="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===f.BlockStatement?te="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&U(this._flags.mode)?te="SPACE":this._flags.last_token.type===i.STRING?te="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&s(this._last_last_text,["{",","]))?te="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?te="SPACE":te="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,te="NEWLINE"),A(O,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?te="SPACE":te="NEWLINE"),A(O,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else te==="NEWLINE"?A(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&A(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!A(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(T(O,"if")&&T(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):A(O,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&_(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():te==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===i.WORD||O.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===i.RESERVED&&(O.text==="do"?this._flags.do_block=!0:O.text==="if"?this._flags.if_block=!0:O.text==="import"?this._flags.import_block=!0:this._flags.import_block&&T(O,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var V=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&T(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},G.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},G.prototype.handle_equals=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0},G.prototype.handle_comma=function(O){this.handle_whitespace_and_comments(O,!0),this.print_token(O),this._output.space_before_token=!0,this._flags.declaration_statement?(U(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(O)):this._flags.mode===f.ObjectLiteral||this._flags.mode===f.Statement&&this._flags.parent.mode===f.ObjectLiteral?(this._flags.mode===f.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},G.prototype.handle_operator=function(O){var V=O.text==="*"&&(A(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),te=s(O.text,["-","+"])&&(s(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||s(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var re=!V;this.handle_whitespace_and_comments(O,re)}if(O.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===i.OPERATOR&&s(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(O),O.text===":"&&this._flags.in_case){this.print_token(O),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.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 ge=!0,Ae=!0,Oe=!1;if(O.text===":"?this._flags.ternary_depth===0?ge=!1:(this._flags.ternary_depth-=1,Oe=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!te&&!V&&this._options.preserve_newlines&&s(O.text,a)){var Ce=O.text===":",je=Ce&&Oe,Ue=Ce&&!Oe;switch(this._options.operator_position){case b.before_newline:this._output.space_before_token=!Ue,this.print_token(O),(!Ce||je)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case b.after_newline:this._output.space_before_token=!0,!Ce||je?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(O):this._output.space_before_token=!1,this.print_token(O),this._output.space_before_token=!0;return;case b.preserve_newline:Ue||this.allow_wrap_or_preserved_newline(O),ge=!(this._output.just_added_newline()||Ue),this._output.space_before_token=ge,this.print_token(O),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(O),ge=!1;var xe=this._tokens.peek();Ae=xe&&s(xe.type,[i.WORD,i.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),ge=this._flags.last_token.type===i.START_BLOCK,Ae=!1;else if(s(O.text,["--","++","!","~"])||te){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),ge=!1,Ae=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var be=A(this._flags.last_token,w)&&O.newlines;be&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(be,!0)}this._flags.last_token.text===";"&&U(this._flags.mode)&&(ge=!0),this._flags.last_token.type===i.RESERVED?ge=!0:this._flags.last_token.type===i.END_EXPR?ge=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===i.OPERATOR&&(ge=s(O.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(O.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(Ae=!0)),(this._flags.mode===f.BlockStatement&&!this._flags.inline_frame||this._flags.mode===f.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ge,this.print_token(O),this._output.space_before_token=Ae},G.prototype.handle_block_comment=function(O,V){if(this._output.raw){this._output.add_raw_token(O),O.directives&&O.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(O.directives){this.print_newline(!1,V),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!u.newline.test(O.text)&&!O.newlines){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0;return}else this.print_block_commment(O,V)},G.prototype.print_block_commment=function(O,V){var te=E(O.text),re,ge=!1,Ae=!1,Oe=O.whitespace_before,Ce=Oe.length;if(this.print_newline(!1,V),this.print_token_line_indentation(O),this._output.add_token(te[0]),this.print_newline(!1,V),te.length>1){for(te=te.slice(1),ge=j(te,"*"),Ae=L(te,Oe),ge&&(this._flags.alignment=1),re=0;re=0;u--)if(this.__items[u].match(d))return!0;return!1},P.prototype.set_indent=function(d,u){this.is_empty()&&(this.__indent_count=d||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},P.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)},P.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},P.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var d=this.__parent.current_line;return d.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),d.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),d.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,d.__items[0]===" "&&(d.__items.splice(0,1),d.__character_count-=1),!0}return!1},P.prototype.is_empty=function(){return this.__items.length===0},P.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},P.prototype.push=function(d){this.__items.push(d);var u=d.lastIndexOf(`
`);u!==-1?this.__character_count=d.length-u:this.__character_count+=d.length},P.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},P.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},P.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},P.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},P.prototype.toString=function(){var d="";return this.is_empty()?this.__parent.indent_empty_lines&&(d=this.__parent.get_indent_string(this.__indent_count)):(d=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),d+=this.__items.join("")),d};function p(d,u){this.__cache=[""],this.__indent_size=d.indent_size,this.__indent_string=d.indent_char,d.indent_with_tabs||(this.__indent_string=new Array(d.indent_size+1).join(d.indent_char)),u=u||"",d.indent_level>0&&(u=new Array(d.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}p.prototype.get_indent_size=function(d,u){var o=this.__base_string_length;return u=u||0,d<0&&(o=0),o+=d*this.__indent_size,o+=u,o},p.prototype.get_indent_string=function(d,u){var o=this.__base_string;return u=u||0,d<0&&(d=0,o=""),u+=d*this.__indent_size,this.__ensure_cache(u),o+=this.__cache[u],o},p.prototype.__ensure_cache=function(d){for(;d>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var d=this.__cache.length,u=0,o="";this.__indent_size&&d>=this.__indent_size&&(u=Math.floor(d/this.__indent_size),d-=u*this.__indent_size,o=new Array(u+1).join(this.__indent_string)),d&&(o+=new Array(d+1).join(" ")),this.__cache.push(o)};function m(d,u){this.__indent_cache=new p(d,u),this.raw=!1,this._end_with_newline=d.end_with_newline,this.indent_size=d.indent_size,this.wrap_line_length=d.wrap_line_length,this.indent_empty_lines=d.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new P(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(d,u){return this.__indent_cache.get_indent_string(d,u)},m.prototype.get_indent_size=function(d,u){return this.__indent_cache.get_indent_size(d,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(d){return this.is_empty()||!d&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(d){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return d!==`
`&&(o=o.replace(/[\n]/g,d)),o},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(d,u){return d=d||0,u=u||0,this.next_line.set_indent(d,u),this.__lines.length>1?(this.current_line.set_indent(d,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(d){for(var u=0;u1&&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(d,u){for(var o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(d)!==0&&h.item(-1)!==u){this.__lines.splice(o+1,0,new P(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},n.exports.Output=m},function(n){function P(p,m,d,u){this.type=p,this.text=m,this.comments_before=null,this.newlines=d||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=P},function(n,P){var p="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",d="\\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\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\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",u="\\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}|["+p+d+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+m+d+u+"])*";P.identifier=new RegExp(o+h,"g"),P.identifierStart=new RegExp(o),P.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+d+u+"])+");var r=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;P.newline=/[\n\r\u2028\u2029]/,P.lineBreak=new RegExp(`\r
|`+P.newline.source),P.allLineBreaks=new RegExp(P.lineBreak.source,"g")},function(n,P,p){var m=p(6).Options,d=["before-newline","after-newline","preserve-newline"];function u(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 r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var b=new RegExp(v),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+f.join("|")+")$"),E,_=function(j,L){d.call(this,j,L),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new r(this._input),B=new a(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(h.identifier).matching(h.identifierMatch),number:G.matching(x),punct:G.matching(b),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(h.lineBreak),shebang:G.starting_with(/#!/).until_after(h.lineBreak),xml:G.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:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};_.prototype=new d,_.prototype._is_comment=function(j){return j.type===s.COMMENT||j.type===s.BLOCK_COMMENT||j.type===s.UNKNOWN},_.prototype._is_opening=function(j){return j.type===s.START_BLOCK||j.type===s.START_EXPR},_.prototype._is_closing=function(j,L){return(j.type===s.END_BLOCK||j.type===s.END_EXPR)&&L&&(j.text==="]"&&L.text==="["||j.text===")"&&L.text==="("||j.text==="}"&&L.text==="{")},_.prototype._reset=function(){E=!1},_.prototype._get_next_token=function(j,L){var G=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(s.EOF,""):(G=G||this._read_non_javascript(B),G=G||this._read_string(B),G=G||this._read_word(j),G=G||this._read_singles(B),G=G||this._read_comment(B),G=G||this._read_regexp(B,j),G=G||this._read_xml(B,j),G=G||this._read_punctuation(),G=G||this._create_token(s.UNKNOWN,this._input.next()),G)},_.prototype._read_word=function(j){var L;if(L=this.__patterns.identifier.read(),L!=="")return L=L.replace(h.allLineBreaks,`
`),!(j.type===s.DOT||j.type===s.RESERVED&&(j.text==="set"||j.text==="get"))&&C.test(L)?(L==="in"||L==="of")&&(j.type===s.WORD||j.type===s.STRING)?this._create_token(s.OPERATOR,L):this._create_token(s.RESERVED,L):this._create_token(s.WORD,L);if(L=this.__patterns.number.read(),L!=="")return this._create_token(s.WORD,L)},_.prototype._read_singles=function(j){var L=null;return j==="("||j==="["?L=this._create_token(s.START_EXPR,j):j===")"||j==="]"?L=this._create_token(s.END_EXPR,j):j==="{"?L=this._create_token(s.START_BLOCK,j):j==="}"?L=this._create_token(s.END_BLOCK,j):j===";"?L=this._create_token(s.SEMICOLON,j):j==="."&&A.test(this._input.peek(1))?L=this._create_token(s.DOT,j):j===","&&(L=this._create_token(s.COMMA,j)),L&&this._input.next(),L},_.prototype._read_punctuation=function(){var j=this.__patterns.punct.read();if(j!=="")return j==="="?this._create_token(s.EQUALS,j):j==="?."?this._create_token(s.DOT,j):this._create_token(s.OPERATOR,j)},_.prototype._read_non_javascript=function(j){var L="";if(j==="#"){if(this._is_first_token()&&(L=this.__patterns.shebang.read(),L))return this._create_token(s.UNKNOWN,L.trim()+`
`);if(L=this.__patterns.include.read(),L)return this._create_token(s.UNKNOWN,L.trim()+`
`);j=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(T)){do j=this._input.next(),G+=j;while(this._input.hasNext()&&j!=="#"&&j!=="=");return j==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,G)}this._input.back()}else if(j==="<"&&this._is_first_token()){if(L=this.__patterns.html_comment_start.read(),L){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)L+=this._input.next();return E=!0,this._create_token(s.COMMENT,L)}}else if(E&&j==="-"&&(L=this.__patterns.html_comment_end.read(),L))return E=!1,this._create_token(s.COMMENT,L);return null},_.prototype._read_comment=function(j){var L=null;if(j==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var B=S.get_directives(G);B&&B.ignore==="start"&&(G+=S.readIgnored(this._input)),G=G.replace(h.allLineBreaks,`
`),L=this._create_token(s.BLOCK_COMMENT,G),L.directives=B}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),L=this._create_token(s.COMMENT,G))}return L},_.prototype._read_string=function(j){if(j==="`"||j==="'"||j==='"'){var L=this._input.next();return this.has_char_escapes=!1,j==="`"?L+=this._read_string_recursive("`",!0,"${"):L+=this._read_string_recursive(j),this.has_char_escapes&&this._options.unescape_strings&&(L=U(L)),this._input.peek()===j&&(L+=this._input.next()),L=L.replace(h.allLineBreaks,`
`),this._create_token(s.STRING,L)}return null},_.prototype._allow_regexp_or_xml=function(j){return j.type===s.RESERVED&&i(j.text,["return","case","throw","else","do","typeof","yield"])||j.type===s.END_EXPR&&j.text===")"&&j.opened.previous.type===s.RESERVED&&i(j.opened.previous.text,["if","while","for"])||i(j.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},_.prototype._read_regexp=function(j,L){if(j==="/"&&this._allow_regexp_or_xml(L)){for(var G=this._input.next(),B=!1,O=!1;this._input.hasNext()&&(B||O||this._input.peek()!==j)&&!this._input.testChar(h.newline);)G+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===j&&(G+=this._input.next(),G+=this._input.read(h.identifier)),this._create_token(s.STRING,G)}return null},_.prototype._read_xml=function(j,L){if(this._options.e4x&&j==="<"&&this._allow_regexp_or_xml(L)){var G="",B=this.__patterns.xml.read_match();if(B){for(var O=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=O.indexOf("{")===0,te=0;B;){var re=!!B[1],ge=B[2],Ae=!!B[B.length-1]||ge.slice(0,8)==="![CDATA[";if(!Ae&&(ge===O||V&&ge.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--te:++te),G+=B[0],te<=0)break;B=this.__patterns.xml.read_match()}return B||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(h.allLineBreaks,`
`),this._create_token(s.STRING,G)}}return null};function U(j){for(var L="",G=0,B=new m(j),O=null;B.hasNext();)if(O=B.match(/([\s]|[^\\]|\\\\)+/g),O&&(L+=O[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")O=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")O=B.match(/u([0-9A-Fa-f]{4})/g);else{L+="\\",B.hasNext()&&(L+=B.next());continue}if(!O)return j;if(G=parseInt(O[1],16),G>126&&G<=255&&O[0].indexOf("x")===0)return j;if(G>=0&&G<32){L+="\\"+O[0];continue}else G===34||G===39||G===92?L+="\\"+String.fromCharCode(G):L+=String.fromCharCode(G)}return L}_.prototype._read_string_recursive=function(j,L,G){var B,O;j==="'"?O=this.__patterns.single_quote:j==='"'?O=this.__patterns.double_quote:j==="`"?O=this.__patterns.template_text:j==="}"&&(O=this.__patterns.template_expression);for(var V=O.read(),te="";this._input.hasNext();){if(te=this._input.next(),te===j||!L&&h.newline.test(te)){this._input.back();break}else te==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===`
`&&this._input.next(),te+=this._input.next()):G&&(G==="${"&&te==="$"&&this._input.peek()==="{"&&(te+=this._input.next()),G===te&&(j==="`"?te+=this._read_string_recursive("}",L,"`"):te+=this._read_string_recursive("`",L,"${"),this._input.hasNext()&&(te+=this._input.next())));te+=O.read(),V+=te}return V},n.exports.Tokenizer=_,n.exports.TOKEN=s,n.exports.positionable_operators=w.slice(),n.exports.line_starters=g.slice()},function(n){var P=RegExp.prototype.hasOwnProperty("sticky");function p(m){this.__input=m||"",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=0&&m=0&&d=m.length&&this.__input.substring(d-m.length,d).toLowerCase()===m},n.exports.InputScanner=p},function(n,P,p){var m=p(8).InputScanner,d=p(3).Token,u=p(10).TokenStream,o=p(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(a,i){this._input=new m(a),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var a,i=new d(h.START,""),s=null,S=[],x=new u;i.type!==h.EOF;){for(a=this._get_next_token(i,s);this._is_comment(a);)x.add(a),a=this._get_next_token(i,s);x.isEmpty()||(a.comments_before=x,x=new u),a.parent=s,this._is_opening(a)?(S.push(s),s=a):s&&this._is_closing(a,s)&&(a.opened=s,s.closed=a,s=S.pop(),a.parent=s),a.previous=i,i.next=a,this.__tokens.add(a),i=a}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(a,i){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(h.RAW,s):this._create_token(h.EOF,"")},r.prototype._is_comment=function(a){return!1},r.prototype._is_opening=function(a){return!1},r.prototype._is_closing=function(a,i){return!1},r.prototype._create_token=function(a,i){var s=new d(a,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=r,n.exports.TOKEN=h},function(n){function P(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}P.prototype.restart=function(){this.__position=0},P.prototype.isEmpty=function(){return this.__tokens_length===0},P.prototype.hasNext=function(){return this.__position=0&&p/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new m,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},u.prototype.read_options=function(o){var h=this._create();for(var r in d)h._disabled[r]=o.templating.indexOf(r)===-1;return h._update(),h},u.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},u.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},u.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("|")+")")},u.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(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},n.exports.TemplatablePattern=u}],I={};function H(n){var P=I[n];if(P!==void 0)return P.exports;var p=I[n]={exports:{}};return F[n](p,p.exports,H),p.exports}var N=H(0);M=N})();var X=M;!(Q=[],z=function(){return{js_beautify:X}}.apply(le,Q),z!==void 0&&(Be.exports=z))})()},"6eGT":function(Be,le,D){"use strict";function Q(z){return null}le.a=Q},"7+5b":function(Be,le,D){Be.exports=D.p+"static/v.e7f297d6.svg"},"746U":function(Be,le,D){"use strict";D.d(le,"f",function(){return Q}),D.d(le,"l",function(){return z}),D.d(le,"k",function(){return M}),D.d(le,"j",function(){return X}),D.d(le,"g",function(){return F}),D.d(le,"m",function(){return I}),D.d(le,"h",function(){return H}),D.d(le,"n",function(){return N}),D.d(le,"c",function(){return n}),D.d(le,"a",function(){return P}),D.d(le,"i",function(){return p}),D.d(le,"o",function(){return m}),D.d(le,"e",function(){return o}),D.d(le,"d",function(){return h}),D.d(le,"p",function(){return r}),D.d(le,"b",function(){return a});function Q(i){return Array.isArray(i)}function z(i){return typeof i=="string"}function M(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function X(i){return typeof i=="number"&&!isNaN(i)}function F(i){return i===!0||i===!1}function I(i){return typeof i=="undefined"}function H(i){return!N(i)}function N(i){return I(i)||i===null}function n(i,s){if(!i)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function P(i){if(N(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function p(i){return typeof i=="function"}function m(i,s){const S=Math.min(i.length,s.length);for(let x=0;xfunction(){const A=Array.prototype.slice.call(arguments,0);return s(T,A)};let x={};for(const T of i)x[T]=S(T);return x}function r(i){return i===null?void 0:i}function a(i,s="Unreachable"){throw new Error(s)}},"7Cbv":function(Be,le,D){"use strict";var Q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),z=new Uint8Array(16);function M(){if(!Q)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Q(z)}var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function F(d){return typeof d=="string"&&X.test(d)}for(var I=F,H=[],N=0;N<256;++N)H.push((N+256).toString(16).substr(1));function n(d){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(H[d[u+0]]+H[d[u+1]]+H[d[u+2]]+H[d[u+3]]+"-"+H[d[u+4]]+H[d[u+5]]+"-"+H[d[u+6]]+H[d[u+7]]+"-"+H[d[u+8]]+H[d[u+9]]+"-"+H[d[u+10]]+H[d[u+11]]+H[d[u+12]]+H[d[u+13]]+H[d[u+14]]+H[d[u+15]]).toLowerCase();if(!I(o))throw TypeError("Stringified UUID is invalid");return o}var P=n;function p(d,u,o){d=d||{};var h=d.random||(d.rng||M)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,u){o=o||0;for(var r=0;r<16;++r)u[o+r]=h[r];return u}return P(h)}var m=le.a=p},"7ahc":function(Be,le,D){"use strict";D.d(le,"a",function(){return S});var Q=D("k1fw"),z=D("0Owb"),M=D("+L6B"),X=D("2/Rp"),F=D("y8nQ"),I=D("Vl3Y"),H=D("tJVT"),N=D("OaEy"),n=D("2fM7"),P=D("q1tI"),p=D.n(P),m=D("VrN/"),d=D.n(m),u=D("p77/"),o=D.n(u),h=D("c5Ni"),r=D.n(h),a=n.a.Option,i={labelCol:{span:4},wrapperCol:{span:20}},s={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"]};le.b=function(x){var T=x.callback,A=x.onCancel,w=Object(P.useState)("python"),v=Object(H.a)(w,2),b=v[0],g=v[1];function f(E){g(s[E][1])}function C(E){T(E)}return p.a.createElement(I.a,Object(z.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),p.a.createElement(I.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},p.a.createElement(n.a,{onChange:f},Object.keys(s).map(function(E){return p.a.createElement(a,{key:E,value:E},s[E][0])}))),p.a.createElement(I.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},p.a.createElement(S,{mode:b})),p.a.createElement("div",{className:"flex-container flex-end"},p.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),p.a.createElement(X.a,{type:"ghost",onClick:A},"\u53D6\u6D88")))};function S(x){var T=x.value,A=x.onChange,w=x.mode,v=x.options,b=v===void 0?{}:v,g=Object(P.useRef)(),f=Object(P.useState)(),C=Object(H.a)(f,2),E=C[0],_=C[1];return Object(P.useEffect)(function(){if(E){function U(j){var L=j.getValue();A&&A(L)}return E.on("change",U),function(){E.off("change",U)}}},[E,A]),Object(P.useEffect)(function(){E&&E.setOption("mode",w)},[E,w]),Object(P.useEffect)(function(){E&&((T!==E.getValue()||T==="")&&setTimeout(function(){E.setValue(T||" ")},300))},[E,T]),Object(P.useEffect)(function(){if(g.current&&!E){var U=d.a.fromTextArea(g.current,Object(Q.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));_(U)}},[g.current,E]),p.a.createElement("div",{className:"my-codemirror-container"},p.a.createElement("textarea",{ref:g}))}},"7ixt":function(Be,le,D){"use strict";D.d(le,"a",function(){return M});var Q={adjustX:1,adjustY:1},z=[0,0],M={left:{points:["cr","cl"],overflow:Q,offset:[-4,0],targetOffset:z},right:{points:["cl","cr"],overflow:Q,offset:[4,0],targetOffset:z},top:{points:["bc","tc"],overflow:Q,offset:[0,-4],targetOffset:z},bottom:{points:["tc","bc"],overflow:Q,offset:[0,4],targetOffset:z},topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-4],targetOffset:z},leftTop:{points:["tr","tl"],overflow:Q,offset:[-4,0],targetOffset:z},topRight:{points:["br","tr"],overflow:Q,offset:[0,-4],targetOffset:z},rightTop:{points:["tl","tr"],overflow:Q,offset:[4,0],targetOffset:z},bottomRight:{points:["tr","br"],overflow:Q,offset:[0,4],targetOffset:z},rightBottom:{points:["bl","br"],overflow:Q,offset:[4,0],targetOffset:z},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,4],targetOffset:z},leftBottom:{points:["br","bl"],overflow:Q,offset:[-4,0],targetOffset:z}},X=M},"7qur":function(Be,le,D){"use strict";D.d(le,"m",function(){return z}),D.d(le,"s",function(){return M}),D.d(le,"h",function(){return X}),D.d(le,"o",function(){return F}),D.d(le,"n",function(){return I}),D.d(le,"l",function(){return H}),D.d(le,"b",function(){return N}),D.d(le,"q",function(){return n}),D.d(le,"t",function(){return P}),D.d(le,"v",function(){return p}),D.d(le,"w",function(){return m}),D.d(le,"u",function(){return d}),D.d(le,"p",function(){return u}),D.d(le,"f",function(){return o}),D.d(le,"a",function(){return h}),D.d(le,"j",function(){return r}),D.d(le,"k",function(){return a}),D.d(le,"d",function(){return i}),D.d(le,"g",function(){return s}),D.d(le,"c",function(){return S}),D.d(le,"e",function(){return x}),D.d(le,"i",function(){return T}),D.d(le,"r",function(){return A});var Q=D("ErOA");function z(w){return Object(Q.c)("mypractices/".concat(w,".json"),{hidePopLogin:!0})}function M(w,v){return Object(Q.f)("mypractices/".concat(w,"/code_submit.json"),v)}function X(w,v){return Object(Q.c)("mypractices/".concat(w,"/code_debug.json"),v)}function F(w,v){return Object(Q.c)("mypractices/".concat(w,"/submit_records.json"),v)}function I(w){return Object(Q.c)("mypractices/record_detail.json",{id:w})}function H(w,v){return Object(Q.c)("mypractices/".concat(w,"/result.json"),{mode:v})}function N(w,v){return Object(Q.f)("mypractices/".concat(w,"/add_notes.json"),v)}function n(w,v){return Object(Q.f)("mypractices/".concat(w,"/restore_initial_code.json"),v)}function P(w,v){return Object(Q.f)("mypractices/".concat(w,"/sync_code.json"),v)}function p(w,v){return Object(Q.f)("mypractices/".concat(w,"/update_code.json"),v)}function m(w){return Object(Q.f)("mypractices/".concat(w,"/initial_codes.json"))}function d(w,v){return Object(Q.f)("discusses/".concat(w,"/plus.json"),v)}function u(w){return Object(Q.c)("practices/practices_list.json",w)}function o(w,v){return Object(Q.c)("practices/".concat(w,"/question_solution_articles"),v)}function h(w,v){return Object(Q.f)("practices/".concat(w,"/question_solution_articles"),v)}function r(w,v){return Object(Q.g)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function a(w,v){return Object(Q.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/edit"),v)}function i(w,v){return Object(Q.c)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function s(w,v){return Object(Q.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/set_authority_or_excellent"),v)}function S(w,v){return Object(Q.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/praise_or_treads"),v)}function x(w,v){return Object(Q.f)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active,"/hide"))}function T(w,v){return Object(Q.b)("practices/".concat(w,"/question_solution_articles/").concat(v==null?void 0:v.active),v)}function A(w,v){return Object(Q.f)("mypractices/".concat(w,"/update_practice_time_sum"),v)}},"815F":function(Be,le,D){"use strict";D.d(le,"e",function(){return H}),D.d(le,"c",function(){return n}),D.d(le,"d",function(){return P}),D.d(le,"a",function(){return m}),D.d(le,"f",function(){return d}),D.d(le,"b",function(){return u});var Q=D("KQm4"),z=D("VTBJ"),M=D("Ff2n"),X=D("Zm9Q"),F=D("Kwbf"),I=D("OZM5");function H(o,h){return o!=null?o:h}function N(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function r(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(s){var S=s.key,x=s.children;Object(F.a)(S!=null,"Tree node must have a certain key: [".concat(i).concat(S,"]"));var T=String(S);Object(F.a)(!h.has(T)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(T)),h.set(T,!0),r(x,"".concat(i).concat(T," > "))})}r(o)}function n(o){function h(r){var a=Object(X.a)(r);return a.map(function(i){if(!Object(I.i)(i))return Object(F.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var s=i.key,S=i.props,x=S.children,T=Object(M.a)(S,["children"]),A=Object(z.a)({key:s},T),w=h(x);return w.length&&(A.children=w),A}).filter(function(i){return i})}return h(o)}function P(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=new Set(h===!0?[]:h),a=[];function i(s){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(x,T){var A=Object(I.h)(S?S.pos:"0",T),w=H(x.key,A),v=Object(z.a)(Object(z.a)({},x),{},{parent:S,pos:A,children:null,data:x,isStart:[].concat(Object(Q.a)(S?S.isStart:[]),[T===0]),isEnd:[].concat(Object(Q.a)(S?S.isEnd:[]),[T===s.length-1])});return a.push(v),h===!0||r.has(w)?v.children=i(x.children||[],v):v.children=[],v})}return i(o),a}function p(o,h,r){var a;r?typeof r=="string"?a=function(S){return S[r]}:typeof r=="function"&&(a=function(S){return r(S)}):a=function(S,x){return H(S.key,x)};function i(s,S,x){var T=s?s.children:o,A=s?Object(I.h)(x.pos,S):"0";if(s){var w=a(s,A),v={node:s,index:S,pos:A,key:w,parentPos:x.node?x.pos:null,level:x.level+1};h(v)}T&&T.forEach(function(b,g){i(b,g,{node:s,pos:A,level:x?x.level+1:-1})})}i(null)}function m(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=h.initWrapper,a=h.processEntity,i=h.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,S={},x={},T={posEntities:S,keyEntities:x};return r&&(T=r(T)||T),p(o,function(A){var w=A.node,v=A.index,b=A.pos,g=A.key,f=A.parentPos,C=A.level,E={node:w,index:v,key:g,pos:b,level:C},_=H(g,b);S[b]=E,x[_]=E,E.parent=S[f],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,T)},s),i&&i(T),T}function d(o,h){var r=h.expandedKeys,a=h.selectedKeys,i=h.loadedKeys,s=h.loadingKeys,S=h.checkedKeys,x=h.halfCheckedKeys,T=h.dragOverNodeKey,A=h.dropPosition,w=h.keyEntities,v=w[o],b={eventKey:o,expanded:r.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:i.indexOf(o)!==-1,loading:s.indexOf(o)!==-1,checked:S.indexOf(o)!==-1,halfChecked:x.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:T===o&&A===0,dragOverGapTop:T===o&&A===-1,dragOverGapBottom:T===o&&A===1};return b}function u(o){var h=o.data,r=o.expanded,a=o.selected,i=o.checked,s=o.loaded,S=o.loading,x=o.halfChecked,T=o.dragOver,A=o.dragOverGapTop,w=o.dragOverGapBottom,v=o.pos,b=o.active,g=Object(z.a)(Object(z.a)({},h),{},{expanded:r,selected:a,checked:i,loaded:s,loading:S,halfChecked:x,dragOver:T,dragOverGapTop:A,dragOverGapBottom:w,pos:v,active:b});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(F.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),g}},"8EBN":function(Be,le,D){(function(Q){Q(D("VrN/"))})(function(Q){"use strict";Q.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var z=0;z-1&&X.substring(H+1,X.length);if(N)return Q.findModeByExtension(N)},Q.findModeByName=function(X){X=X.toLowerCase();for(var F=0;F0)){ye.next=20;break}return ye.next=18,Promise.all(Se);case 18:Ee=ye.sent,Ge+=$e;case 20:ye.next=13;break;case 22:return ye.next=24,Object(N.a)("/api/attachments/multipart_upload_end",{method:"POST",body:Object(Q.a)({fileName:ve.name,chunkCount:We,uploadId:It},S)});case 24:ue=ye.sent,ue.object?(O("success"),xt(),T&&T(Object(Q.a)(Object(Q.a)({},ue),{},{file:ve,percent:100}))):(O("error"),je("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),xt(),A&&A(ve.name));case 26:case"end":return ye.stop()}},dt)})(),"t0",11);case 11:at.next=19;break;case 13:at.prev=13,at.t1=at.catch(9),O("error"),je("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),xt(),A&&A(ve.name);case 19:case"end":return at.stop()}},Me,null,[[9,13]])}));return function(ve){return _e.apply(this,arguments)}}(),ct=Object(I.useCallback)(function(){_t.current=!0,mt.current&&(mt.current.abort(),x&&x())},[x]),wt=function(Me){var ve,Te,We=Me==null||((ve=Me.target)===null||ve===void 0||((Te=ve.files)===null||Te===void 0))?void 0:Te[0];if(Ve(We),B="ready",!We)return;if(v){var Je=v(We);Je||nt(We),xt();return}nt(We)};return H.a.createElement(I.Fragment,null,H.a.createElement("input",{type:"file",id:yt.current,style:{display:"none"},onChange:wt,accept:f}),H.a.createElement("label",{className:p()(d.a.upload,C),htmlFor:yt.current,style:_},g))};le.a=Object(I.forwardRef)(u)},"9Bee":function(Be,le,D){"use strict";var Q=D("DYRE"),z=D("zeV3"),M=D("+L6B"),X=D("2/Rp"),F=D("k1fw"),I=D("9og8"),H=D("tJVT"),N=D("WmNS"),n=D.n(N),P=D("q1tI"),p=D.n(P),m=D("vg9a"),d=D("DlQD"),u=D.n(d),o=D("rUJ1");function h(J,R){var k=J.match(/^(\s+)(?:```)/);if(k===null)return R;var Y=k[1];return R.split(`
`).map(function(ae){var q=ae.match(/^\s+/);if(q===null)return ae;var Ie=Object(H.a)(q,1),ht=Ie[0];return ht.length>=Y.length?ae.slice(Y.length):ae}).join(`
`)}var r=[],a=[""],i=new u.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){r.length=0,a=[""]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(J,R,k,Y){if(R>=J.length||J[R].level<=k)return R;var ae=J[R];Y.push("- "+ae.text+""),R++;var q=[];return R=T(J,R,ae.level,q),q.length>0&&(Y.push("
"),q.forEach(function(Ie){Y.push(Ie)}),Y.push("
")),Y.push(" "),R=T(J,R,k,Y),R}function A(){return T(r,0,0,a),a.push("
"),a.join("")}var w={heading:function(R){var k=s.exec(R);if(k)return{type:"heading",raw:k[0],depth:k[1].length,text:k[2]}},fences:function(R){var k=this.rules.block.fences.exec(R);if(k){var Y=k[0],ae=h(Y,k[3]||""),q=k[2]?k[2].trim():k[2];if(["latex","katex","math"].indexOf(q)>=0){var Ie=g(),ht=ae;ae=Ie,f[Ie]={type:"block",expression:ht}}return{type:"code",raw:Y,lang:q,text:ae}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,g=function(){return"__special_katext_id_".concat(b++,"__")},f={};function C(){return f}function E(){b=0,f={}}function _(J){return J=J.replace(v,function(R,k){var Y=g();return f[Y]={type:"inline",expression:k},Y}),J}var U=i.listitem;i.listitem=function(J){return U(_(J))};var j=i.paragraph;i.paragraph=function(J){return j(_(J))};var L=i.tablecell;i.tablecell=function(J,R){return L(_(J),R)},i.code=function(J,R,k){var Y=(R||"").match(/\S*/)[0];return Y?["latex","katex","math"].indexOf(Y)>=0?"".concat(J,"
"):'
').concat(k?J:Object(o.escape)(J,!0),`
`):''+(k?J:Object(o.escape)(J,!0))+"
"},i.heading=function(J,R,k){var Y=this.options.headerPrefix+k.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return r.push({anchor:Y,level:R,text:J}),"'+J+""},u.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),u.a.use({tokenizer:w,renderer:i});var G=u.a,B=D("SJMd"),O=D("ulZh"),V=D.n(O),te=D("m3rI"),re=D("Oy/b"),ge=D("p5ED"),Ae=D("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Oe=function(J,R){return(Oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,Y){k.__proto__=Y}||function(k,Y){for(var ae in Y)Object.prototype.hasOwnProperty.call(Y,ae)&&(k[ae]=Y[ae])})(J,R)};function Ce(J,R){function k(){this.constructor=J}Oe(J,R),J.prototype=R===null?Object.create(R):(k.prototype=R.prototype,new k)}function je(J,R,k,Y){return new(k||(k=Promise))(function(ae,q){function Ie($t){try{Ot(Y.next($t))}catch(ft){q(ft)}}function ht($t){try{Ot(Y.throw($t))}catch(ft){q(ft)}}function Ot($t){var ft;$t.done?ae($t.value):(ft=$t.value,ft instanceof k?ft:new k(function(zt){zt(ft)})).then(Ie,ht)}Ot((Y=Y.apply(J,R||[])).next())})}function Ue(J,R){var k,Y,ae,q,Ie={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return q={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ht(Ot){return function($t){return function(ft){if(k)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(k=1,Y&&(ae=2&ft[0]?Y.return:ft[0]?Y.throw||((ae=Y.return)&&ae.call(Y),0):Y.next)&&!(ae=ae.call(Y,ft[1])).done)return ae;switch(Y=0,ae&&(ft=[2&ft[0],ae.value]),ft[0]){case 0:case 1:ae=ft;break;case 4:return Ie.label++,{value:ft[1],done:!1};case 5:Ie.label++,Y=ft[1],ft=[0];continue;case 7:ft=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(ae=Ie.trys,(ae=ae.length>0&&ae[ae.length-1])||ft[0]!==6&&ft[0]!==2)){Ie=0;continue}if(ft[0]===3&&(!ae||ft[1]>ae[0]&&ft[1]',"select"),this.addActionButton(Y,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Y,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Y,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Y,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Y,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Y,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Y,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(q){var Ie=document.createElement("div");Ie.className=""+k.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",q.typeName),Ie.innerHTML=q.icon,Ie.addEventListener("click",function(){k.markerToolbarButtonClicked(Ie,q)}),k.buttons.push(Ie),k.markerButtons.push(Ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ae=document.createElement("div");ae.className=this.toolbarBlockStyleClass.name,ae.style.whiteSpace="nowrap",ae.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ae),this.addActionButton(ae,'',"render"),this.addActionButton(ae,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},J.prototype.addButtonClickListener=function(R){this.buttonClickListeners.push(R)},J.prototype.removeButtonClickListener=function(R){this.buttonClickListeners.indexOf(R)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(R),1)},J.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},J.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var R=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var k=0;k0&&this.buttonClickListeners.forEach(function(Y){return Y("marker",k)}),this.markerButtonOverflowBlock.style.display="none"},J.prototype.actionToolbarButtonClicked=function(R,k){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Y){return Y("action",k)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},J.prototype.setActiveButton=function(R){this.resetButtonStyles(),R.className=R.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),R.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},J.prototype.setActiveMarkerButton=function(R){var k=this.markerButtons.find(function(Y){return Y.getAttribute("data-type-name")===R});k&&this.setActiveButton(k)},J.prototype.setCurrentMarker=function(R){var k=this;this.currentMarker=R,this.buttons.filter(function(Y){return/delete|notes/.test(Y.getAttribute("data-action"))}).forEach(function(Y){k.currentMarker===void 0?(Y.style.fillOpacity="0.4",Y.style.pointerEvents="none"):(Y.style.fillOpacity="1",Y.style.pointerEvents="all")})},J}(),wt=function(){function J(R,k,Y,ae){this.panels=[],this.panelButtons=[],this.markerjsContainer=R,this.displayMode=k,this.uiStyleSettings=Y,this.styles=ae,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return J.prototype.addStyles=function(){var R;this.toolboxStyleClass=this.styles.addClass(new nt("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new nt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var k=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new nt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new nt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new nt("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new nt("toolbox-panel-row_colors",`
background-color: `+((R=this.uiStyleSettings.toolboxBackgroundColor)!==null&&R!==void 0?R:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new nt("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*k)+`px;
padding: `+k+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new nt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new nt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new xt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new xt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},J.prototype.show=function(R){var k;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=R,this.uiContainer.className=this.toolboxStyleClass.name+" "+((k=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},J.prototype.setPanelButtons=function(R){var k,Y,ae=this;this.panels=R,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(q){var Ie;q.uiStyleSettings=ae.uiStyleSettings;var ht=document.createElement("div");ht.className=ae.toolboxButtonStyleClass.name+" "+((Ie=ae.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:ae.toolboxButtonStyleColorsClass.name),ht.innerHTML=q.icon,ht.title=q.title,ht.addEventListener("click",function(){ae.panelButtonClick(q)}),ae.panelButtons.push(ht),ae.buttonRow.appendChild(ht)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},J.prototype.panelButtonClick=function(R){var k=this,Y=-1;if(R!==this.activePanel){Y=this.panels.indexOf(R),this.panelRow.innerHTML="";var ae=R.getUi();ae.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ae),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=R}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){k.displayMode==="inline"?k.panelRow.style.display="none":k.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(q,Ie){var ht,Ot;q.className=k.toolboxButtonStyleClass.name+" "+(Ie===Y?""+((ht=k.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ht!==void 0?ht:k.toolboxActiveButtonStyleColorsClass.name):""+((Ot=k.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ot!==void 0?Ot:k.toolboxButtonStyleColorsClass.name))})},J}(),_e=function(J,R){this.title=J,this.icon=R},Me=function(J){function R(k,Y,ae,q){var Ie=J.call(this,k,q||'')||this;return Ie.colors=[],Ie.addTransparent=!1,Ie.colorBoxes=[],Ie.colors=Y,Ie.currentColor=ae,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.overflow="hidden",Y.style.whiteSpace="nowrap",this.colors.forEach(function(ae){var q=k.getColorBox(ae);Y.appendChild(q),k.colorBoxes.push(q)}),Y},R.prototype.getColorBox=function(k){var Y=this,ae=this.uiStyleSettings.toolbarHeight/4,q=this.uiStyleSettings.toolbarHeight-ae,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=q-2+"px",Ie.style.height=q-2+"px",Ie.style.padding="1px",Ie.style.marginRight="2px",Ie.style.marginBottom="2px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderRadius=(q+2)/2+"px",Ie.style.borderColor=k===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Y.setCurrentColor(k,Ie)});var ht=document.createElement("div");return ht.style.display="inline-block",ht.style.width=q-2+"px",ht.style.height=q-2+"px",ht.style.backgroundColor=k,ht.style.borderRadius=q/2+"px",k==="transparent"&&(ht.style.fill=this.uiStyleSettings.toolboxAccentColor,ht.innerHTML=``),Ie.appendChild(ht),Ie},R.prototype.setCurrentColor=function(k,Y){var ae=this;this.currentColor=k,this.colorBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(k)},R}(_e),ve=function(){function J(R,k,Y){this._state="new",this._isSelected=!1,this._container=R,this._overlayContainer=k,this.globalSettings=Y,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(J.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),J.prototype.ownsTarget=function(R){return!1},Object.defineProperty(J.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),J.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},J.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},J.prototype.pointerDown=function(R,k){},J.prototype.dblClick=function(R,k){},J.prototype.manipulate=function(R){},J.prototype.pointerUp=function(R){this.stateChanged()},J.prototype.dispose=function(){},J.prototype.addMarkerVisualToContainer=function(R){this.container.childNodes.length>0?this.container.insertBefore(R,this.container.childNodes[0]):this.container.appendChild(R)},J.prototype.getState=function(){return{typeName:J.typeName,state:this.state,notes:this.notes}},J.prototype.restoreState=function(R){this._state=R.state,this.notes=R.notes},J.prototype.scale=function(R,k){},J.prototype.colorChanged=function(R){this.onColorChanged&&this.onColorChanged(R),this.stateChanged()},J.prototype.fillColorChanged=function(R){this.onFillColorChanged&&this.onFillColorChanged(R),this.stateChanged()},J.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var R=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),R.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(R)&&this.onStateChanged(this)}},J.typeName="MarkerBase",J}(),Te=function(){function J(){this.findGripByVisual=this.findGripByVisual.bind(this)}return J.prototype.findGripByVisual=function(R){return this.topLeft.ownsTarget(R)?this.topLeft:this.topCenter.ownsTarget(R)?this.topCenter:this.topRight.ownsTarget(R)?this.topRight:this.centerLeft.ownsTarget(R)?this.centerLeft:this.centerRight.ownsTarget(R)?this.centerRight:this.bottomLeft.ownsTarget(R)?this.bottomLeft:this.bottomCenter.ownsTarget(R)?this.bottomCenter:this.bottomRight.ownsTarget(R)?this.bottomRight:void 0},J}(),We=function(){function J(){this.GRIP_SIZE=10,this.visual=be.createGroup(),this.visual.appendChild(be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(be.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(R){return R===this.visual||R===this.visual.childNodes[0]||R===this.visual.childNodes[1]},J}(),Je=function(){function J(){}return J.toITransformMatrix=function(R){return{a:R.a,b:R.b,c:R.c,d:R.d,e:R.e,f:R.f}},J.toSVGMatrix=function(R,k){return R.a=k.a,R.b=k.b,R.c=k.c,R.d=k.d,R.e=k.e,R.f=k.f,R},J}(),at=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.left=0,q.top=0,q.width=0,q.height=0,q.defaultSize={x:50,y:20},q.offsetX=0,q.offsetY=0,q.rotationAngle=0,q.CB_DISTANCE=10,q._suppressMarkerCreateEvent=!1,q.container.transform.baseVal.appendItem(be.createTransform()),q.setupControlBox(),q}return Ce(R,J),Object.defineProperty(R.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"visual",{get:function(){return this._visual},set:function(k){this._visual=k;var Y=be.createTransform();this._visual.transform.baseVal.appendItem(Y)},enumerable:!1,configurable:!0}),R.prototype.ownsTarget=function(k){return!!J.prototype.ownsTarget.call(this,k)||!!(this.controlGrips.findGripByVisual(k)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k))},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.left=k.x,this.top=k.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ae=this.unrotatePoint(k);if(this.manipulationStartX=ae.x,this.manipulationStartY=ae.y,this.offsetX=ae.x-this.left,this.offsetY=ae.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Y),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y)){this.activeGrip=this.rotatorGrip;var q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=q.x-this.width/2,this.top=q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},R.prototype.pointerUp=function(k){var Y=this.state;J.prototype.pointerUp.call(this,k),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(k),this._state="select",Y==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},R.prototype.moveVisual=function(k){this.visual.style.transform="translate("+k.x+"px, "+k.y+"px)"},R.prototype.manipulate=function(k){var Y=this.unrotatePoint(k);this.state==="creating"?this.resize(k):this.state==="move"?(this.left=this.manipulationStartLeft+(Y.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Y.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Y):this.state==="rotate"&&this.rotate(k)},R.prototype.resize=function(k){var Y=this.manipulationStartLeft,ae=this.manipulationStartWidth,q=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Y=this.manipulationStartLeft+k.x-this.manipulationStartX,ae=this.manipulationStartWidth+this.manipulationStartLeft-Y;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ae=this.manipulationStartWidth+k.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:q=this.manipulationStartTop+k.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+k.y-this.manipulationStartY}ae>=0?(this.left=Y,this.width=ae):(this.left=Y+ae,this.width=-ae),Ie>=0?(this.top=q,this.height=Ie):(this.top=q+Ie,this.height=-Ie),this.setSize()},R.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},R.prototype.rotate=function(k){if(Math.abs(k.x-this.centerX)>.1){var Y=Math.sign(k.x-this.centerX);this.rotationAngle=180*Math.atan((k.y-this.centerY)/(k.x-this.centerX))/Math.PI+90*Y,this.applyRotation()}},R.prototype.applyRotation=function(){var k=this.container.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(k,0)},R.prototype.rotatePoint=function(k){if(this.rotationAngle===0)return k;var Y=this.container.getCTM(),ae=be.createPoint(k.x,k.y);return{x:(ae=ae.matrixTransform(Y)).x,y:ae.y}},R.prototype.unrotatePoint=function(k){if(this.rotationAngle===0)return k;var Y=this.container.getCTM();Y=Y.inverse();var ae=be.createPoint(k.x,k.y);return{x:(ae=ae.matrixTransform(Y)).x,y:ae.y}},R.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},R.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},R.prototype.setupControlBox=function(){this.controlBox=be.createGroup();var k=be.createTransform();k.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(k),this.container.appendChild(this.controlBox),this.controlRect=be.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=be.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Te,this.addControlGrips(),this.controlBox.style.display="none"},R.prototype.adjustControlBox=function(){var k=this.controlBox.transform.baseVal.getItem(0);k.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(k,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},R.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},R.prototype.createGrip=function(){var k=new We;return k.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(k.visual),k},R.prototype.positionGrips=function(){var k=this.controlGrips.topLeft.GRIP_SIZE,Y=-k/2,ae=Y,q=(this.width+this.CB_DISTANCE)/2-k/2,Ie=(this.height+this.CB_DISTANCE)/2-k/2,ht=this.height+this.CB_DISTANCE-k/2,Ot=this.width+this.CB_DISTANCE-k/2;this.positionGrip(this.controlGrips.topLeft.visual,Y,ae),this.positionGrip(this.controlGrips.topCenter.visual,q,ae),this.positionGrip(this.controlGrips.topRight.visual,Ot,ae),this.positionGrip(this.controlGrips.centerLeft.visual,Y,Ie),this.positionGrip(this.controlGrips.centerRight.visual,Ot,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,Y,ht),this.positionGrip(this.controlGrips.bottomCenter.visual,q,ht),this.positionGrip(this.controlGrips.bottomRight.visual,Ot,ht),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,q,ae-3*this.CB_DISTANCE)},R.prototype.positionGrip=function(k,Y,ae){var q=k.transform.baseVal.getItem(0);q.setTranslate(Y,ae),k.transform.baseVal.replaceItem(q,0)},R.prototype.hideControlBox=function(){this.controlBox.style.display="none"},R.prototype.showControlBox=function(){this.controlBox.style.display=""},R.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Je.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Je.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},J.prototype.getState.call(this))},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k);var Y=k;this.left=Y.left,this.top=Y.top,this.width=Y.width,this.height=Y.height,this.rotationAngle=Y.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Y.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Y.containerTransformMatrix))},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y);var ae=this.rotatePoint({x:this.left,y:this.top}),q=this.unrotatePoint({x:ae.x*k,y:ae.y*Y});this.left=q.x,this.top=q.y,this.width=this.width*k,this.height=this.height*Y,this.adjustControlBox()},R}(ve),dt=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.createVisual=q.createVisual.bind(q),q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.visual)},R.prototype.createVisual=function(){this.visual=be.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},R.prototype.manipulate=function(k){J.prototype.manipulate.call(this,k)},R.prototype.resize=function(k){J.prototype.resize.call(this,k),this.setSize()},R.prototype.setSize=function(){J.prototype.setSize.call(this),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},R.prototype.pointerUp=function(k){J.prototype.pointerUp.call(this,k),this.setSize()},R.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},R.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},R.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},R.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},R.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this))},R.prototype.restoreState=function(k){var Y=k;this.fillColor=Y.fillColor,this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.opacity=Y.opacity,this.createVisual(),J.prototype.restoreState.call(this,k),this.setSize()},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y),this.setSize()},R.title="Rectangle marker",R}(at),Lt=function(J){function R(k,Y,ae,q){var Ie=J.call(this,k,q||'')||this;return Ie.widths=[],Ie.widthBoxes=[],Ie.widths=Y,Ie.currentWidth=ae,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",this.widths.forEach(function(ae){var q=document.createElement("div");q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=ae===k.currentWidth?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentWidth(ae,q)}),Y.appendChild(q);var Ie=document.createElement("div");Ie.innerText=ae.toString(),Ie.style.marginRight="5px",q.appendChild(Ie);var ht=document.createElement("div");ht.style.minHeight="20px",ht.style.flexGrow="2",ht.style.display="flex",ht.style.alignItems="center";var Ot=document.createElement("hr");Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop=ae+"px solid "+k.uiStyleSettings.toolboxColor,Ot.style.flexGrow="2",ht.appendChild(Ot),q.appendChild(ht),k.widthBoxes.push(q)}),Y},R.prototype.setCurrentWidth=function(k,Y){var ae=this;this.currentWidth=k,this.widthBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},R}(_e),It=function(J){function R(k,Y,ae,q){var Ie=J.call(this,k,q||'')||this;return Ie.styles=[],Ie.styleBoxes=[],Ie.styles=Y,Ie.currentStyle=ae,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",this.styles.forEach(function(ae){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/k.styles.length-5+"%",q.style.borderColor=ae===k.currentStyle?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentStyle(ae,q)}),Y.appendChild(q);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var ht=``;Ie.innerHTML=ht,q.appendChild(Ie),k.styleBoxes.push(q)}),Y},R.prototype.setCurrentStyle=function(k,Y){var ae=this;this.currentStyle=k,this.styleBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},R}(_e),Ne=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.strokeColor=ae.defaultColor,q.strokeWidth=ae.defaultStrokeWidth,q.strokeDasharray=ae.defaultStrokeDasharray,q.strokePanel=new Me("Line color",ae.defaultColorSet,ae.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Lt("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new It("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(R,J),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=J.prototype.getState.call(this);return k.typeName=R.typeName,k},R.typeName="FrameMarker",R.title="Frame marker",R.icon='',R}(dt),ke=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},it=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.x1=0,q.y1=0,q.x2=0,q.y2=0,q.defaultLength=50,q.manipulationStartX=0,q.manipulationStartY=0,q.manipulationStartX1=0,q.manipulationStartY1=0,q.manipulationStartX2=0,q.manipulationStartY2=0,q.setupControlBox(),q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!!J.prototype.ownsTarget.call(this,k)||!(!this.grip1.ownsTarget(k)&&!this.grip2.ownsTarget(k))},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.manipulationStartX=k.x,this.manipulationStartY=k.y,this.state==="new"&&(this.x1=k.x,this.y1=k.y,this.x2=k.x,this.y2=k.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Y)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Y)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},R.prototype.pointerUp=function(k){var Y=this.state;J.prototype.pointerUp.call(this,k),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(k),this._state="select",Y==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},R.prototype.adjustVisual=function(){},R.prototype.manipulate=function(k){this.state==="creating"?this.resize(k):this.state==="move"?(this.x1=this.manipulationStartX1+k.x-this.manipulationStartX,this.y1=this.manipulationStartY1+k.y-this.manipulationStartY,this.x2=this.manipulationStartX2+k.x-this.manipulationStartX,this.y2=this.manipulationStartY2+k.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(k)},R.prototype.resize=function(k){switch(this.activeGrip){case this.grip1:this.x1=k.x,this.y1=k.y;break;case this.grip2:case void 0:this.x2=k.x,this.y2=k.y}this.adjustVisual(),this.adjustControlBox()},R.prototype.select=function(){J.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},R.prototype.deselect=function(){J.prototype.deselect.call(this),this.controlBox.style.display="none"},R.prototype.setupControlBox=function(){this.controlBox=be.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},R.prototype.adjustControlBox=function(){this.positionGrips()},R.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},R.prototype.createGrip=function(){var k=new We;return k.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(k.visual),k},R.prototype.positionGrips=function(){var k=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-k/2,this.y1-k/2),this.positionGrip(this.grip2.visual,this.x2-k/2,this.y2-k/2)},R.prototype.positionGrip=function(k,Y,ae){var q=k.transform.baseVal.getItem(0);q.setTranslate(Y,ae),k.transform.baseVal.replaceItem(q,0)},R.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},J.prototype.getState.call(this))},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k);var Y=k;this.x1=Y.x1,this.y1=Y.y1,this.x2=Y.x2,this.y2=Y.y2},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y),this.x1=this.x1*k,this.y1=this.y1*Y,this.x2=this.x2*k,this.y2=this.y2*Y,this.adjustVisual(),this.adjustControlBox()},R}(ve),ot=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.strokeColor=ae.defaultColor,q.strokeWidth=ae.defaultStrokeWidth,q.strokeDasharray=ae.defaultStrokeDasharray,q.strokePanel=new Me("Line color",ae.defaultColorSet,ae.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Lt("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new It("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorLine&&k!==this.visibleLine)},R.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorLine=be.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=be.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},R.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),be.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},R.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},R.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},R.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k);var Y=k;this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.createVisual(),this.adjustVisual()},R.typeName="LineMarker",R.title="Line marker",R.icon='',R}(it),Ge=function(J){function R(k,Y,ae,q){var Ie=J.call(this,k,q||'')||this;return Ie.fonts=[],Ie.fontBoxes=[],Ie.fonts=Y,Ie.currentFont=ae,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.overflow="hidden",Y.style.flexGrow="2",this.fonts.forEach(function(ae){var q=document.createElement("div");q.style.display="inline-block",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/k.fonts.length-5+"%",q.style.borderColor=ae===k.currentFont?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentFont(ae,q)}),Y.appendChild(q);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=ae,Ie.style.overflow="hidden";var ht=document.createElement("div");ht.style.whiteSpace="nowrap",ht.style.overflow="hidden",ht.style.textOverflow="ellipsis",ht.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(ht),q.appendChild(Ie),k.fontBoxes.push(q)}),Y},R.prototype.setCurrentFont=function(k,Y){var ae=this;this.currentFont=k,this.fontBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},R}(_e),$e=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.color="transparent",q.padding=5,q.DEFAULT_TEXT="your text here",q.text=q.DEFAULT_TEXT,q.isMoved=!1,q.color=ae.defaultColor,q.fontFamily=ae.defaultFontFamily,q.defaultSize={x:100,y:30},q.setColor=q.setColor.bind(q),q.setFont=q.setFont.bind(q),q.renderText=q.renderText.bind(q),q.sizeText=q.sizeText.bind(q),q.textEditDivClicked=q.textEditDivClicked.bind(q),q.showTextEditor=q.showTextEditor.bind(q),q.setSize=q.setSize.bind(q),q.positionTextEditor=q.positionTextEditor.bind(q),q.colorPanel=new Me("Color",ae.defaultColorSet,ae.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.fontFamilyPanel=new Ge("Font",ae.defaultFontFamilies,ae.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q}return Ce(R,J),R.prototype.ownsTarget=function(k){if(J.prototype.ownsTarget.call(this,k)||k===this.visual||k===this.textElement||k===this.bgRectangle)return!0;var Y=!1;return this.textElement.childNodes.forEach(function(ae){ae===k&&(Y=!0)}),Y},R.prototype.createVisual=function(){this.visual=be.createGroup(),this.bgRectangle=be.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=be.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.isMoved=!1,this.pointerDownPoint=k,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},R.prototype.renderText=function(){var k=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Y){k.textElement.appendChild(be.createTSpan(Y.trim()===""?" ":Y.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},R.prototype.getTextScale=function(){var k=this.textElement.getBBox(),Y=1;if(k.width>0&&k.height>0){var ae=(1*this.width-this.width*this.padding*2/100)/k.width,q=(1*this.height-this.height*this.padding*2/100)/k.height;Y=Math.min(ae,q)}return Y},R.prototype.getTextPosition=function(k){var Y=this.textElement.getBBox(),ae=0,q=0;return Y.width>0&&Y.height>0&&(ae=(this.width-Y.width*k)/2,q=this.height/2-Y.height*k/2),{x:ae,y:q}},R.prototype.sizeText=function(){var k=this.textElement.getBBox(),Y=this.getTextScale(),ae=this.getTextPosition(Y);ae.y-=k.y*Y,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ae.x+"px, "+ae.y+"px) scale("+Y+", "+Y+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ae.x,ae.y),this.textElement.transform.baseVal.getItem(1).setScale(Y,Y))},R.prototype.manipulate=function(k){J.prototype.manipulate.call(this,k),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(k.x-this.pointerDownPoint.x)>5||Math.abs(k.y-this.pointerDownPoint.y)>5)},R.prototype.resize=function(k){J.prototype.resize.call(this,k),this.isMoved=!0,this.setSize(),this.sizeText()},R.prototype.setSize=function(){J.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},R.prototype.pointerUp=function(k){var Y=this.state;Y==="creating"&&(this._suppressMarkerCreateEvent=!0),J.prototype.pointerUp.call(this,k),this.setSize(),(Y==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},R.prototype.showTextEditor=function(){var k=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Y){Y.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Y=Number.parseFloat(k.textEditor.style.fontSize);k.textEditor.clientWidth>=Number.parseInt(k.textEditor.style.maxWidth)&&Y>.9;)Y-=.1,k.textEditor.style.fontSize=Math.max(Y,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Y){Y.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Y){if(Y.clipboardData){var ae=Y.clipboardData.getData("text"),q=window.getSelection();if(!q.rangeCount)return!1;q.deleteFromDocument(),q.getRangeAt(0).insertNode(document.createTextNode(ae)),Y.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){k.textEditDivClicked(k.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},R.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var k=this.getTextScale(),Y=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ae=this.textElement.getBBox(),q={x:ae.width*k,y:ae.height*k};Y.x-=q.x/2,Y.y-=q.y/2,this.textEditor.style.top=Y.y+"px",this.textEditor.style.left=Y.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Y.x+"px",this.textEditor.style.fontSize=Math.max(16*k,12)+"px",this.textElement.style.display="none"}},R.prototype.textEditDivClicked=function(k){this.text=k.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},R.prototype.select=function(){J.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},R.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),J.prototype.deselect.call(this)},R.prototype.dblClick=function(k,Y){J.prototype.dblClick.call(this,k,Y),this.showTextEditor()},R.prototype.setColor=function(k){this.textElement&&be.setAttributes(this.textElement,[["fill",k]]),this.color=k,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(k)},R.prototype.setFont=function(k){this.textElement&&be.setAttributes(this.textElement,[["font-family",k]]),this.fontFamily=k,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},R.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},R.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){var Y=k;this.color=Y.color,this.fontFamily=Y.fontFamily,this.padding=Y.padding,this.text=Y.text,this.createVisual(),J.prototype.restoreState.call(this,k),this.setSize()},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y),this.setSize(),this.sizeText(),this.positionTextEditor()},R.typeName="TextMarker",R.title="Text marker",R.icon='',R}(at),we=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.color="transparent",q.lineWidth=3,q.drawing=!1,q.pixelRatio=1,q.color=ae.defaultColor,q.lineWidth=ae.defaultStrokeWidth,q.pixelRatio=ae.freehandPixelRatio,q.setColor=q.setColor.bind(q),q.addCanvas=q.addCanvas.bind(q),q.finishCreation=q.finishCreation.bind(q),q.setLineWidth=q.setLineWidth.bind(q),q.colorPanel=new Me("Color",ae.defaultColorSet,ae.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.lineWidthPanel=new Lt("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),q.lineWidthPanel.onWidthChanged=q.setLineWidth,q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.drawingImage)},R.prototype.createVisual=function(){this.visual=be.createGroup(),this.drawingImage=be.createImage(),this.visual.appendChild(this.drawingImage);var k=be.createTransform();this.visual.transform.baseVal.appendItem(k),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(k,Y){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(k.x,k.y),this.drawing=!0):J.prototype.pointerDown.call(this,k,Y)},R.prototype.manipulate=function(k){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(k.x,k.y),this.canvasContext.stroke()):J.prototype.manipulate.call(this,k)},R.prototype.resize=function(k){J.prototype.resize.call(this,k),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},R.prototype.pointerUp=function(k){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):J.prototype.pointerUp.call(this,k)},R.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},R.prototype.select=function(){this.state==="creating"&&this.finishCreation(),J.prototype.select.call(this)},R.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),J.prototype.deselect.call(this)},R.prototype.finishCreation=function(){for(var k=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Y=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ae=Y[0],q=Y[1],Ie=Y[2],ht=Y[3],Ot=!1,$t=0;$t0&&(Ot=!0,$tht&&(ht=$t),ft>Ie&&(Ie=ft));if(Ot){this.left=ae/this.pixelRatio,this.top=q/this.pixelRatio,this.width=(Ie-ae)/this.pixelRatio,this.height=(ht-q)/this.pixelRatio;var zt=document.createElement("canvas");zt.width=Ie-ae,zt.height=ht-q,zt.getContext("2d").putImageData(this.canvasContext.getImageData(ae,q,Ie-ae,ht-q),0,0),this.drawingImgUrl=zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},R.prototype.setDrawingImage=function(){be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},R.prototype.setColor=function(k){this.color=k,this.colorChanged(k)},R.prototype.setLineWidth=function(k){this.lineWidth=k},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({drawingImgUrl:this.drawingImgUrl},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){this.createVisual(),J.prototype.restoreState.call(this,k),this.drawingImgUrl=k.drawingImgUrl,this.setDrawingImage()},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y),this.setDrawingImage()},R.typeName="FreehandMarker",R.title="Freehand marker",R.icon='',R}(at),Se=function(J){function R(k,Y,ae){var q=J.call(this,k,ae||'')||this;return q.typeBoxes=[],q.currentType=Y,q.setCurrentType=q.setCurrentType.bind(q),q}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2";for(var ae=function(ht){var Ot="both";switch(ht){case 0:Ot="both";break;case 1:Ot="start";break;case 2:Ot="end";break;case 3:Ot="none"}var $t=document.createElement("div");if($t.style.display="flex",$t.style.flexGrow="2",$t.style.alignItems="center",$t.style.justifyContent="space-between",$t.style.padding="5px",$t.style.borderWidth="2px",$t.style.borderStyle="solid",$t.style.borderColor=Ot===q.currentType?q.uiStyleSettings.toolboxAccentColor:"transparent",$t.addEventListener("click",function(){k.setCurrentType(Ot,$t)}),Y.appendChild($t),Ot==="both"||Ot==="start"){var ft=document.createElement("div");ft.style.display="flex",ft.style.alignItems="center",ft.style.minHeight="20px",ft.innerHTML=``,ft.style.marginLeft="5px",$t.appendChild(ft)}var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",zt.appendChild(on),$t.appendChild(zt),Ot==="both"||Ot==="end"){var Wn=document.createElement("div");Wn.style.display="flex",Wn.style.alignItems="center",Wn.style.minHeight="20px",Wn.innerHTML=``,Wn.style.marginRight="5px",$t.appendChild(Wn)}q.typeBoxes.push($t)},q=this,Ie=0;Ie<4;Ie++)ae(Ie);return Y},R.prototype.setCurrentType=function(k,Y){var ae=this;this.currentType=k,this.typeBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},R}(_e),Ee=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.arrowType="end",q.arrowBaseHeight=10,q.arrowBaseWidth=10,q.getArrowPoints=q.getArrowPoints.bind(q),q.setArrowType=q.setArrowType.bind(q),q.arrowTypePanel=new Se("Arrow type","end"),q.arrowTypePanel.onArrowTypeChanged=q.setArrowType,q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.arrow1&&k!==this.arrow2)},R.prototype.getArrowPoints=function(k,Y){var ae=this.arrowBaseWidth+2*this.strokeWidth,q=this.arrowBaseHeight+2*this.strokeWidth;return k-ae/2+","+(Y+q/2)+" "+k+","+(Y-q/2)+" "+(k+ae/2)+","+(Y+q/2)},R.prototype.createTips=function(){this.arrow1=be.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=be.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow2)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="creating"&&this.createTips()},R.prototype.adjustVisual=function(){if(J.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",be.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),be.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Y=this.arrow1.transform.baseVal.getItem(0);Y.setRotate(k,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Y,0);var ae=this.arrow2.transform.baseVal.getItem(0);ae.setRotate(k+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ae,0)}},R.prototype.setArrowType=function(k){this.arrowType=k,this.adjustVisual(),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({arrowType:this.arrowType},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k);var Y=k;this.arrowType=Y.arrowType,this.createTips(),this.adjustVisual()},R.typeName="ArrowMarker",R.title="Arrow marker",R.icon='',R}(ot),ue=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.fillColor=ae.defaultFillColor,q.strokeWidth=0,q.fillPanel=new Me("Color",ae.defaultColorSet,ae.defaultFillColor),q.fillPanel.onColorChanged=q.setFillColor,q}return Ce(R,J),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=J.prototype.getState.call(this);return k.typeName=R.typeName,k},R.typeName="CoverMarker",R.title="Cover marker",R.icon='',R}(dt),de=function(J){function R(k,Y,ae,q){var Ie=J.call(this,k,q||'')||this;return Ie.opacities=[],Ie.opacityBoxes=[],Ie.opacities=Y,Ie.currentOpacity=ae,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return Ce(R,J),R.prototype.getUi=function(){var k=this,Y=document.createElement("div");return Y.style.display="flex",Y.style.overflow="hidden",Y.style.flexGrow="2",Y.style.justifyContent="space-between",this.opacities.forEach(function(ae){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="center",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=ae===k.currentOpacity?k.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){k.setCurrentOpacity(ae,q)}),Y.appendChild(q);var Ie=document.createElement("div");Ie.innerText=100*ae+"%",q.appendChild(Ie),k.opacityBoxes.push(q)}),Y},R.prototype.setCurrentOpacity=function(k,Y){var ae=this;this.currentOpacity=k,this.opacityBoxes.forEach(function(q){q.style.borderColor=q===Y?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},R}(_e),ye=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.setOpacity=q.setOpacity.bind(q),q.fillColor=ae.defaultHighlightColor,q.strokeWidth=0,q.opacity=ae.defaultHighlightOpacity,q.fillPanel=new Me("Color",ae.defaultColorSet,q.fillColor),q.fillPanel.onColorChanged=q.setFillColor,q.opacityPanel=new de("Opacity",ae.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return Ce(R,J),R.prototype.setOpacity=function(k){this.opacity=k,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=J.prototype.getState.call(this);return k.typeName=R.typeName,k},R.typeName="HighlightMarker",R.title="Highlight marker",R.icon='',R}(ue),me='',Le=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.bgColor="transparent",q.tipPosition={x:0,y:0},q.tipBase1Position={x:0,y:0},q.tipBase2Position={x:0,y:0},q.tipMoving=!1,q.color=ae.defaultStrokeColor,q.bgColor=ae.defaultFillColor,q.fontFamily=ae.defaultFontFamily,q.defaultSize={x:100,y:30},q.setBgColor=q.setBgColor.bind(q),q.getTipPoints=q.getTipPoints.bind(q),q.positionTip=q.positionTip.bind(q),q.setTipPoints=q.setTipPoints.bind(q),q.colorPanel=new Me("Text color",ae.defaultColorSet,q.color,''),q.colorPanel.onColorChanged=q.setColor,q.bgColorPanel=new Me("Fill color",ae.defaultColorSet,q.bgColor,me),q.bgColorPanel.onColorChanged=q.setBgColor,q.fontFamilyPanel=new Ge("Font",ae.defaultFontFamilies,ae.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q.tipGrip=new We,q.tipGrip.visual.transform.baseVal.appendItem(be.createTransform()),q.controlBox.appendChild(q.tipGrip.visual),q}return Ce(R,J),R.prototype.ownsTarget=function(k){return J.prototype.ownsTarget.call(this,k)||this.tipGrip.ownsTarget(k)||this.tip===k},R.prototype.createTip=function(){be.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=be.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},R.prototype.pointerDown=function(k,Y){this.state==="new"&&J.prototype.pointerDown.call(this,k,Y),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Y)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):J.prototype.pointerDown.call(this,k,Y)},R.prototype.pointerUp=function(k){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,J.prototype.pointerUp.call(this,k);else{var Y=this.state==="creating";J.prototype.pointerUp.call(this,k),this.setTipPoints(Y),this.positionTip()}},R.prototype.manipulate=function(k){if(this.tipMoving){var Y=this.unrotatePoint(k);this.tipPosition={x:Y.x-this.manipulationStartLeft,y:Y.y-this.manipulationStartTop},this.positionTip()}else J.prototype.manipulate.call(this,k)},R.prototype.setBgColor=function(k){this.bgRectangle&&this.tip&&(be.setAttributes(this.bgRectangle,[["fill",k]]),be.setAttributes(this.tip,[["fill",k]])),this.bgColor=k,this.fillColorChanged(k)},R.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},R.prototype.setTipPoints=function(k){k===void 0&&(k=!1);var Y=Math.min(this.height/2,15),ae=this.height/5;k&&(this.tipPosition={x:Y+ae/2,y:this.height+20});var q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?q',R}($e),Xe=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.strokeColor=ae.defaultColor,q.strokeWidth=ae.defaultStrokeWidth,q.strokeDasharray=ae.defaultStrokeDasharray,q.fillColor=ae.defaultFillColor,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.setOpacity=q.setOpacity.bind(q),q.createVisual=q.createVisual.bind(q),q.strokePanel=new Me("Line color",xe(ae.defaultColorSet,["transparent"]),ae.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.fillPanel=new Me("Fill color",xe(ae.defaultColorSet,["transparent"]),q.fillColor,me),q.fillPanel.onColorChanged=q.setFillColor,q.strokeWidthPanel=new Lt("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new It("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q.opacityPanel=new de("Opacity",ae.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.visual)},R.prototype.createVisual=function(){this.visual=be.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="new"&&(this.createVisual(),this.moveVisual(k),this._state="creating")},R.prototype.manipulate=function(k){J.prototype.manipulate.call(this,k)},R.prototype.resize=function(k){J.prototype.resize.call(this,k),this.setSize()},R.prototype.setSize=function(){J.prototype.setSize.call(this),be.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},R.prototype.pointerUp=function(k){J.prototype.pointerUp.call(this,k),this.setSize()},R.prototype.setStrokeColor=function(k){this.strokeColor=k,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(k),this.stateChanged()},R.prototype.setFillColor=function(k){this.fillColor=k,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(k),this.stateChanged()},R.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},R.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},R.prototype.setOpacity=function(k){this.opacity=k,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){var Y=k;this.fillColor=Y.fillColor,this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.opacity=Y.opacity,this.createVisual(),J.prototype.restoreState.call(this,k),this.setSize()},R.prototype.scale=function(k,Y){J.prototype.scale.call(this,k,Y),this.setSize()},R.typeName="EllipseMarker",R.title="Ellipse marker",R.icon='',R}(at),ut=function(J){function R(k,Y,ae){return J.call(this,k,Y,ae)||this}return Ce(R,J),Object.defineProperty(R.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.tip1&&k!==this.tip2)},R.prototype.createTips=function(){this.tip1=be.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.tip1),this.tip2=be.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.tip2)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.state==="creating"&&this.createTips()},R.prototype.adjustVisual=function(){if(J.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(be.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var k=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Y=this.tip1.transform.baseVal.getItem(0);Y.setRotate(k,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Y,0);var ae=this.tip2.transform.baseVal.getItem(0);ae.setRotate(k+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ae,0)}},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=J.prototype.getState.call(this);return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k),this.createTips(),this.adjustVisual()},R.typeName="MeasurementMarker",R.title="Measurement marker",R.icon='',R}(ot),Dt=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.strokePanel.colors=ae.defaultColorSet,q.fillColor="transparent",q}return Ce(R,J),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=J.prototype.getState.call(this);return k.typeName=R.typeName,k},R.typeName="EllipseFrameMarker",R.title="Ellipse frame marker",R.icon='',R}(Xe),jt=function(){function J(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),J.prototype.addUndoStep=function(R){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(R)||(this.undoStack.push(R),JSON.stringify(this.lastRedoStep)!==JSON.stringify(R)&&this.redoStack.splice(0,this.redoStack.length))},J.prototype.replaceLastUndoStep=function(R){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=R)},J.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},J.prototype.undo=function(){if(this.undoStack.length>1){var R=this.undoStack.pop();return R!==void 0&&this.redoStack.push(R),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},J.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},J}(),Ut=function(J){function R(k,Y,ae){var q=J.call(this,k,Y,ae)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.curveX=0,q.curveY=0,q.manipulationStartCurveX=0,q.manipulationStartCurveY=0,q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.positionGrips=q.positionGrips.bind(q),q.addControlGrips=q.addControlGrips.bind(q),q.adjustVisual=q.adjustVisual.bind(q),q.setupControlBox=q.setupControlBox.bind(q),q.resize=q.resize.bind(q),q.strokeColor=ae.defaultColor,q.strokeWidth=ae.defaultStrokeWidth,q.strokeDasharray=ae.defaultStrokeDasharray,q.strokePanel=new Me("Line color",ae.defaultColorSet,ae.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new Lt("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new It("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return Ce(R,J),R.prototype.ownsTarget=function(k){return!(!J.prototype.ownsTarget.call(this,k)&&k!==this.visual&&k!==this.selectorCurve&&k!==this.visibleCurve&&!this.curveGrip.ownsTarget(k))},R.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},R.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorCurve=be.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=be.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(k,Y){J.prototype.pointerDown.call(this,k,Y),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=k.x,this.curveY=k.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Y)&&(this.activeGrip=this.curveGrip,this._state="resize")},R.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),be.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},R.prototype.setupControlBox=function(){J.prototype.setupControlBox.call(this),this.curveControlLine1=be.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=be.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},R.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,J.prototype.addControlGrips.call(this)},R.prototype.positionGrips=function(){J.prototype.positionGrips.call(this);var k=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-k/2,this.curveY-k/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},R.prototype.manipulate=function(k){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+k.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+k.y-this.manipulationStartY),J.prototype.manipulate.call(this,k)},R.prototype.resize=function(k){this.activeGrip===this.curveGrip&&(this.curveX=k.x,this.curveY=k.y),J.prototype.resize.call(this,k),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},R.prototype.setStrokeColor=function(k){this.strokeColor=k,this.adjustVisual(),this.colorChanged(k)},R.prototype.setStrokeWidth=function(k){this.strokeWidth=k,this.adjustVisual()},R.prototype.setStrokeDasharray=function(k){this.strokeDasharray=k,this.adjustVisual()},R.prototype.scale=function(k,Y){this.curveX=this.curveX*k,this.curveY=this.curveY*Y,J.prototype.scale.call(this,k,Y)},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var k=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},J.prototype.getState.call(this));return k.typeName=R.typeName,k},R.prototype.restoreState=function(k){J.prototype.restoreState.call(this,k);var Y=k;this.strokeColor=Y.strokeColor,this.strokeWidth=Y.strokeWidth,this.strokeDasharray=Y.strokeDasharray,this.curveX=Y.curveX,this.curveY=Y.curveY,this.createVisual(),this.adjustVisual()},R.typeName="CurveMarker",R.title="Curve marker",R.icon='',R}(it),Ct=function(){function J(R,k){k===void 0&&(k=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=R,this.cancelable=k}return Object.defineProperty(J.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),J.prototype.preventDefault=function(){this._defaultPrevented=!0},J}(),et=function(J){function R(k,Y,ae){var q=J.call(this,k,!1)||this;return q.dataUrl=Y,q.state=ae,q}return Ce(R,J),R}(Ct),st=function(J){function R(k,Y,ae){ae===void 0&&(ae=!1);var q=J.call(this,k,ae)||this;return q.marker=Y,q}return Ce(R,J),R}(Ct),He=function(){function J(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return J.prototype.addEventListener=function(R,k){this[R].push(k)},J.prototype.removeEventListener=function(R,k){var Y=this[R].indexOf(k);Y>-1&&this[R].splice(Y,1)},J}(),pe=function(){function J(R){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ke,this._isOpen=!1,this.undoRedoManager=new jt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new He,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=J.instanceCounter++,this.styles=new _t(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=R,this.targetRoot=document.body,this.width=R.clientWidth,this.height=R.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(J.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,we,Ee,$e,Dt,Xe,ye,Le,ut,ue,ot,Ut]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,we,Ee,$e,Xe,ye,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,we,Ee,$e,ye]},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(R){var k=this;this._availableMarkerTypes.splice(0),R.forEach(function(Y){if(typeof Y=="string"){var ae=k.ALL_MARKER_TYPES.find(function(q){return q.typeName===Y});ae!==void 0&&k._availableMarkerTypes.push(ae)}else k._availableMarkerTypes.push(Y)})},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(R){this._zoomLevel=R,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},J.prototype.show=function(){var R=this;this.styles.styleSheetRoot===void 0&&yt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=yt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(k){return k(new Ct(R))})},J.prototype.render=function(){return je(this,void 0,void 0,function(){var R;return Ue(this,function(k){switch(k.label){case 0:return this.setCurrentMarker(),(R=new mt).naturalSize=this.renderAtNaturalSize,R.imageType=this.renderImageType,R.imageQuality=this.renderImageQuality,R.markersOnly=this.renderMarkersOnly,R.width=this.renderWidth,R.height=this.renderHeight,[4,R.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return k.sent(),[4,R.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,k.sent()]}})})},J.prototype.close=function(R){var k=this;if(R===void 0&&(R=!1),this.isOpen){var Y=!1;R||this.eventListeners.beforeclose.forEach(function(ae){var q=new Ct(k,!0);ae(q),q.defaultPrevented&&(Y=!0)}),Y||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ae){return ae(new Ct(k))}),this.detachEvents(),this._isOpen=!1)}},J.prototype.addMarkersToToolbar=function(){for(var R,k=[],Y=0;Ythis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*R:this.editorCanvas.clientWidth,Y=k',R.title="Powered by marker.js",R.style.display="grid",R.style.alignItems="center",R.style.justifyItems="center",R.style.padding="3px",R.style.width="20px",R.style.height="20px",this.logoUI.appendChild(R),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},J.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},J.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},J.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},J.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var R=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=R+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ct(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(R),1),R.dispose()},J.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},J.prototype.toolbarButtonClicked=function(R,k){if(R==="marker"&&k!==void 0)this.createNewMarker(k);else if(R==="action")switch(k){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},J.prototype.deleteSelectedMarker=function(){var R=this;if(this._currentMarker!==void 0){var k=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ae){var q=new st(R,R._currentMarker,!0);ae(q),q.defaultPrevented&&(k=!0)}),!k){var Y=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ae){return ae(new st(R,Y))})}}},J.prototype.clear=function(){var R=this,k=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var ht=new st(R,void 0,!0);Ie(ht),ht.defaultPrevented&&(k=!0)}),!k)){this.setCurrentMarker();for(var Y=function(Ie){var ht=ae.markers[Ie];ae.setCurrentMarker(ae.markers[Ie]),ae._currentMarker.dispose(),ae.markerImage.removeChild(ae._currentMarker.container),ae.markers.splice(ae.markers.indexOf(ae._currentMarker),1),ae.eventListeners.markerdelete.forEach(function(Ot){return Ot(new st(R,ht))})},ae=this,q=this.markers.length-1;q>=0;q--)Y(q);this.addUndoStep()}},Object.defineProperty(J.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),J.prototype.showNotesEditor=function(){var R;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(R=this._currentMarker.notes)!==null&&R!==void 0?R:"",this.overlayContainer.appendChild(this.notesArea))},J.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},J.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},J.prototype.addUndoStep=function(){var R=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var k=this.getState(),Y=this.undoRedoManager.getLastUndoStep();if(!Y||Y.width===k.width&&Y.height===k.height){var ae=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(k),ae1&&this.panTo({x:R.clientX,y:R.clientY}))},J.prototype.onPointerUp=function(R){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(R.clientX,R.clientY)),this.isDragging=!1,this.addUndoStep()},J.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},J.prototype.onKeyUp=function(R){this._currentMarker===void 0||this.notesArea!==void 0||R.key!=="Delete"&&R.key!=="Backspace"||this.deleteSelectedMarker()},J.prototype.clientToLocalCoordinates=function(R,k){var Y=this.markerImage.getBoundingClientRect();return{x:(R-Y.left)/this.zoomLevel,y:(k-Y.top)/this.zoomLevel}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var R=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=R+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},J.prototype.addLicenseKey=function(R){Ve.addKey(R)},J.prototype.addEventListener=function(R,k){this.eventListeners.addEventListener(R,k)},J.prototype.removeEventListener=function(R,k){this.eventListeners.removeEventListener(R,k)},J.prototype.renderState=function(R){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(R),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(J.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),J.prototype.focus=function(){var R=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(k){return k(new Ct(R))}))},J.prototype.blur=function(){var R=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(k){return k(new Ct(R))}))},J.instanceCounter=0,J}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Re=function(J,R){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,Y){k.__proto__=Y}||function(k,Y){for(var ae in Y)Object.prototype.hasOwnProperty.call(Y,ae)&&(k[ae]=Y[ae])})(J,R)};function lt(J,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function k(){this.constructor=J}Re(J,R),J.prototype=R===null?Object.create(R):(k.prototype=R.prototype,new k)}function Ye(J,R,k,Y){return new(k||(k=Promise))(function(ae,q){function Ie($t){try{Ot(Y.next($t))}catch(ft){q(ft)}}function ht($t){try{Ot(Y.throw($t))}catch(ft){q(ft)}}function Ot($t){var ft;$t.done?ae($t.value):(ft=$t.value,ft instanceof k?ft:new k(function(zt){zt(ft)})).then(Ie,ht)}Ot((Y=Y.apply(J,R||[])).next())})}function Pt(J,R){var k,Y,ae,q,Ie={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return q={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ht(Ot){return function($t){return function(ft){if(k)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(k=1,Y&&(ae=2&ft[0]?Y.return:ft[0]?Y.throw||((ae=Y.return)&&ae.call(Y),0):Y.next)&&!(ae=ae.call(Y,ft[1])).done)return ae;switch(Y=0,ae&&(ft=[2&ft[0],ae.value]),ft[0]){case 0:case 1:ae=ft;break;case 4:return Ie.label++,{value:ft[1],done:!1};case 5:Ie.label++,Y=ft[1],ft=[0];continue;case 7:ft=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(ae=Ie.trys,(ae=ae.length>0&&ae[ae.length-1])||ft[0]!==6&&ft[0]!==2)){Ie=0;continue}if(ft[0]===3&&(!ae||ft[1]>ae[0]&&ft[1]0&&k>0){var Y=new Z(R,k),ae=Y.ratio>=1?20:Y.getHorizontalLength(20),q=Y.ratio<1?20:Y.getVerticalLength(20),Ie=document.createElementNS("http://www.w3.org/2000/svg","svg");Ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ie);var ht=Ke.createDefs();Ie.appendChild(ht);var Ot=Ke.createElement("clipPath",[["id","text-bg-clip"]]);ht.appendChild(Ot);var $t=Ke.createPath(Ke.getHollowRectanglePath((24-ae)/2,(24-q)/2,ae,q,(24-ae)/2+2,(24-q)/2+2,ae-4,q-4));Ie.appendChild($t);var ft=Ke.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ft.appendChild(Ke.createTSpan(R+":"+k)),Ie.appendChild(ft);var zt=ft.getBBox();Ke.setAttributes(ft,[["x",((24-zt.width)/2).toString()],["y",((24-zt.height)/2-zt.y).toString()]]);var on=Ke.createPath(Ke.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(zt.width))/2,(24-Math.ceil(zt.height))/2,Math.ceil(zt.width),Math.ceil(zt.height)));return Ot.appendChild(on),Ke.setAttributes($t,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ie),Ie.outerHTML}return''},J}(),he=function(J){function R(k,Y,ae){var q=J.call(this,k,Y)||this;return q.isDropdownOpen=!1,q.onClick=q.dropdownButtonClicked,q.dropdownButtons=ae,q}return lt(R,J),R.prototype.setupDropdown=function(){var k=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(Y){Y.className=k.className,Y.colorsClassName=k.colorsClassName,k.dropdownBlock.appendChild(Y.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},R.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},R.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},R.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},R.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},R.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},R}(W),Pe=function(){function J(R,k){this.GRIP_SIZE=10,this.color=R,this.fillColor=k,this.visual=Ke.createGroup(),this.visual.appendChild(Ke.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ke.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return J.prototype.ownsTarget=function(R){return R===this.visual||R===this.visual.childNodes[0]||R===this.visual.childNodes[1]},J.prototype.setCenter=function(R,k){this.visual.childNodes.forEach(function(Y){return Ke.setAttributes(Y,[["cx",R.toString()],["cy",k.toString()]])})},J}(),ze=function(){function J(R,k,Y,ae){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=R,this.canvasHeight=k,this.margin=Y,this.container=ae,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(J.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(R){this._aspectRatio=R,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(R){this._isGridVisible=R,this.gridContainer&&Ke.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(R){this._zoomFactor=R,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),J.prototype.open=function(){var R=this;this.cropShadeElement=Ke.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ke.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var k=0;kthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-k.height/2),Ke.setAttributes(this.cropRectElement,[["x",k.x.toString()],["y",k.y.toString()],["width",k.width.toString()],["height",k.height.toString()]]);var Y=k.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(q,Ie){var ht=k.y+Y*(Ie+1);Ke.setAttributes(q,[["x1",""+k.x],["y1",""+ht],["x2",""+(k.x+k.width)],["y2",""+ht]])});var ae=k.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(q,Ie){var ht=k.x+ae*(Ie+1);Ke.setAttributes(q,[["x1",""+ht],["y1",""+k.y],["x2",""+ht],["y2",""+(k.y+k.height)]])}),Ke.setAttributes(this.cropShadeElement,[["d",Ke.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,k.x,k.y,k.width,k.height)]]),this.topLeftGrip.setCenter(k.x,k.y),this.topRightGrip.setCenter(k.x+k.width,k.y),this.bottomLeftGrip.setCenter(k.x,k.y+k.height),this.bottomRightGrip.setCenter(k.x+k.width,k.y+k.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},J.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},J.prototype.clientToLocalCoordinates=function(R,k){var Y=this.container.getBoundingClientRect();return{x:R-Y.left+this.margin,y:k-Y.top+this.margin}},J.prototype.onPointerDown=function(R){this.container.setPointerCapture(R.pointerId),this.previousPoint=this.clientToLocalCoordinates(R.clientX,R.clientY),this.cropRectElement===R.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(R.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(R.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(R.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(R.target)&&(this.activeGrip=this.bottomRightGrip)},J.prototype.onPointerMove=function(R){if(this.isMoving)this.move(this.clientToLocalCoordinates(R.clientX,R.clientY));else if(this.activeGrip){var k=this.clientToLocalCoordinates(R.clientX,R.clientY);this.resize(k)}R.preventDefault()},J.prototype.onPointerUp=function(R){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(R.pointerId)},J.prototype.move=function(R){var k=R.x-this.previousPoint.x,Y=R.y-this.previousPoint.y;this.zoomFactor!==1&&(k=-k/this.zoomFactor,Y=-Y/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+k),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+Y),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=R},J.prototype.resize=function(R){var k=Object.assign({},this.cropRect),Y=R.x-this.previousPoint.x,ae=R.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:k.x+Ythis.canvasWidth*this.zoomFactor&&(Y=this.canvasWidth*this.zoomFactor-k.width),k.width+=Y}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(k.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(Y),k.height=this.aspectRatio.getVerticalLength(k.width)):(k.y+=ae,k.height=this.cropRect.y+this.cropRect.height-k.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?k.height=this.aspectRatio.getVerticalLength(k.width):k.height+=ae}k.width<10&&(k.x=this.cropRect.x,k.width=10),k.height<10&&(k.y=this.cropRect.y,k.height=10),this.previousPoint=R,k.x>=this.margin&&k.y>=this.margin&&k.x-this.margin+k.width<=this.canvasWidth&&k.y-this.margin+k.height<=this.canvasHeight&&(this.cropRect=k,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},J.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var R=this.cropRect.x+this.cropRect.width/2,k=this.cropRect.y+this.cropRect.height/2,Y=this.aspectRatio.getHorizontalLength(this.cropRect.height),ae=this.aspectRatio.getVerticalLength(this.cropRect.width);Y/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=R-this.cropRect.width/2,this.cropRect.y=k-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},J.prototype.getRescaledRect=function(R,k,Y,ae,q,Ie){var ht=Y/R,Ot=ae/k;return{x:(q.x-Ie)*ht+Ie,y:(q.y-Ie)*Ot+Ie,width:q.width*ht,height:q.height*Ot}},J.prototype.scaleCanvas=function(R,k){var Y=this.getRescaledRect(this.canvasWidth,this.canvasHeight,R,k,this.cropRect,this.margin);this.canvasWidth=R,this.canvasHeight=k,this.onCropChange&&this.onCropChange(Y),this.setCropRectangle(Y)},J}(),Rt=function(){function J(R){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=R,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(J.prototype,"angle",{get:function(){return this._angle},set:function(R){this._angle=R,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),J.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},J.prototype.onPointerDown=function(R){this.controlContainer.setPointerCapture(R.pointerId),this.isDragging=!0,this.previousPoint={x:R.clientX,y:R.clientY}},J.prototype.onPointerMove=function(R){this.isDragging&&(this.onAngleChange&&this.onAngleChange((R.clientX-this.previousPoint.x)/5),this.previousPoint.x=R.clientX)},J.prototype.onPointerUp=function(R){this.isDragging&&this.onAngleChange&&this.onAngleChange((R.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(R.pointerId)},J.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var R=this.angleLabelText.getBBox();Ke.setAttributes(this.angleLabelElement,[["x",((this.width-R.width)/2).toString()],["y",(this.height/2).toString()]])}},J.prototype.positionScaleShape=function(){if(this.scaleShape){var R=this.scaleShape.transform.baseVal.getItem(0);R.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(R,0)}},J.prototype.getVisual=function(){var R=document.createElementNS("http://www.w3.org/2000/svg","svg");R.setAttribute("xmlns","http://www.w3.org/2000/svg"),R.setAttribute("width",this.width+"px"),R.setAttribute("height",this.height+"px"),R.setAttribute("viewBox","0 0 "+this.width+" "+this.height),R.style.flexShrink="0",document.body.appendChild(R);for(var k="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,Y=1;Y<=this.width/5+10;Y++){var ae=Y%5==0?this.height/3:this.height/6;k+="h4v"+-ae+"h1v"+ae}k+="v1H0Z",this.scaleShape=Ke.createPath(k);var q=Ke.createTransform();this.scaleShape.transform.baseVal.appendItem(q),R.appendChild(this.scaleShape),this.angleLabelElement=Ke.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ke.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ie=Ke.createTSpan("");return Ie.innerHTML="°",this.angleLabelElement.appendChild(Ie),R.appendChild(this.angleLabelElement),document.body.removeChild(R),R},J}(),Mt=function(){function J(){this.naturalSize=!1,this.imageType="image/png"}return J.prototype.rasterize=function(R,k,Y,ae,q,Ie,ht){var Ot=this;return new Promise(function($t){var ft=document.createElement("canvas");ft.width=R.width.baseVal.value-2*ae,ft.height=R.height.baseVal.value-2*ae;var zt=1,on=1;Ot.naturalSize===!0?(zt=k.naturalWidth/(R.width.baseVal.value-2*ae)/Ie,on=k.naturalHeight/(R.height.baseVal.value-2*ae)/ht,ft.width=k.naturalWidth/Ie,ft.height=k.naturalHeight/ht):Ot.width!==void 0&&Ot.height!==void 0&&(zt=Ot.width/Y.width,on=Ot.height/Y.height,ft.width*=zt,ft.height*=on);var Wn=ft.getContext("2d");Wn.translate(ft.width/2,ft.height/2),Wn.rotate(q*Math.PI/180),Wn.scale(Ie,ht),Wn.translate(-ft.width/2,-ft.height/2),Wn.drawImage(k,0,0,ft.width,ft.height);var Si=document.createElement("canvas");Si.width=Y.width*zt,Si.height=Y.height*on,Si.getContext("2d").putImageData(Wn.getImageData((Y.x-ae)*zt,(Y.y-ae)*on,Y.width*zt,Y.height*on),0,0),$t(Si.toDataURL(Ot.imageType,Ot.imageQuality))})},J}(),Ze=function(){function J(R){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=J.instanceCounter++,this.styles=new gt(this.instanceNo),this.target=R,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(J.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(R){this._zoomToCropEnabled=R,R?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(R){this._isGridVisible=R,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"gridLines",{get:function(){return this._gridLines},set:function(R){this._gridLines=R,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(R){this._rotationAngle=R,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"aspectRatio",{get:function(){var R;return(R=this._aspectRatio)!==null&&R!==void 0?R:this.aspectRatios[0]},set:function(R){this._aspectRatio=R},enumerable:!1,configurable:!0}),J.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},J.prototype.show=function(){this.showUI(),this.open()},J.prototype.close=function(R){R===void 0&&(R=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),R||this.closeEventListeners.forEach(function(k){return k()}),this._isOpen=!1)},J.prototype.addRenderEventListener=function(R){this.renderEventListeners.push(R)},J.prototype.removeRenderEventListener=function(R){this.renderEventListeners.indexOf(R)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(R),1)},J.prototype.addCloseEventListener=function(R){this.closeEventListeners.push(R)},J.prototype.removeCloseEventListener=function(R){this.closeEventListeners.indexOf(R)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(R),1)},J.prototype.setupResizeObserver=function(){var R=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){R.resize(R.target.clientWidth,R.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},J.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var R=1*this.target.clientWidth/this.target.clientHeight,k=this.contentDiv.clientWidth/R>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*R:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,Y=k+2*this.CANVAS_MARGINR+this.CANVAS_MARGIN?this.target.offsetTop-(R+this.CANVAS_MARGIN):0;this.coverDiv.style.top=k+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},J.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},J.prototype.addTopToolbar=function(){var R=this;this.topToolbar=new Wt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new se;k.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(k);var Y=[];this.aspectRatios.forEach(function(on){var Wn=new W(ne.getIcon(on.horizontal,on.vertical),on.horizontal===0&&on.vertical===0?"FREE":on.horizontal+":"+on.vertical);Wn.onClick=function(){return R.ratioButtonClicked(on)},Y.push(Wn)}),this.aspectRatioButton=new he(ne.getIcon(0,0),"Aspect ratio",Y),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,k.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ae=new W('',"Toggle grid");ae.isActive=this.isGridVisible,ae.onClick=function(){R.isGridVisible=!R.isGridVisible,ae.isActive=R.isGridVisible},k.addButton(ae);var q=new W('',"Zoom to selection");if(q.isActive=this.zoomToCropEnabled,q.onClick=function(){R.zoomToCropEnabled=!R.zoomToCropEnabled,q.isActive=R.zoomToCropEnabled},k.addButton(q),!Nt.isLicensed){var Ie=new $;this.topToolbar.addElementBlock(Ie);var ht=document.createElement("div");ht.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ot=document.createElement("a");Ot.style.color="currentColor",Ot.href="https://markerjs.com/products/cropro",Ot.target="_blank",Ot.innerHTML='',ht.appendChild(Ot),Ie.addElement(ht)}var $t=new se;$t.minWidth=3*this.toolbarHeight+"px",$t.contentAlign="end",this.topToolbar.addButtonBlock($t);var ft=new W('',"OK");ft.onClick=this.startRenderAndClose,$t.addButton(ft),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ft.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var zt=new W('',"Close");zt.onClick=this.close,$t.addButton(zt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(zt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},J.prototype.addBottomToolbar=function(){var R=this;this.bottomToolbar=new Wt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var k=new se;k.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(k);var Y=new W('',"Rotate left");Y.onClick=this.rotateLeftButtonClicked,k.addButton(Y);var ae=new W('',"Rotate right");ae.onClick=this.rotateRightButtonClicked,k.addButton(ae);var q=new $;q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(q),this.straightener=new Rt("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function($t){R.rotateBy($t),R.straightener.angle=R.rotationAngle},q.addElement(this.straightener.getUI());var Ie=new se;Ie.minWidth=2*this.toolbarHeight+"px",Ie.contentAlign="end",this.bottomToolbar.addButtonBlock(Ie);var ht=new W('',"Flip horizontal");ht.onClick=this.flipHorizontallyButtonClicked,Ie.addButton(ht);var Ot=new W('',"Flip vertical");Ot.onClick=this.flipVerticallyButtonClicked,Ie.addButton(Ot)},J.prototype.ratioButtonClicked=function(R){this.aspectRatio=R,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},J.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ne.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},J.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Z(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},J.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},J.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},J.prototype.restoreState=function(R){if(R){var k=this.cropLayer.getRescaledRect(R.width,R.height,this.imageWidth,this.imageHeight,R.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(k),this.cropRectChanged(k),this.flippedHorizontally=R.flippedHorizontally,this.flippedVertically=R.flippedVertically,this.applyFlip(),this.rotationAngle=R.rotationAngle,this.applyRotation()}},J.prototype.clientToLocalCoordinates=function(R,k){var Y=this.cropImage.getBoundingClientRect();return{x:R-Y.left,y:k-Y.top}},J.prototype.onWindowResize=function(){this.positionUI()},J.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var R=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=R+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},J.prototype.rotateLeftButtonClicked=function(){var R=this.rotationAngle-90;this.rotationAngle%90!=0&&(R+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(R)},J.prototype.rotateRightButtonClicked=function(){var R=this.rotationAngle+90;this.rotationAngle%90!=0&&(R-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(R)},J.prototype.rotateTo=function(R){R=(R=R>180?R-360:R)<=-180?R+360:R,this.rotationAngle=R,this.applyRotation()},J.prototype.rotateBy=function(R){this.rotateTo((this.rotationAngle+R)%360)},J.prototype.applyRotation=function(){var R=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var k=this.editingTargetRotationContainer.transform.baseVal.getItem(0);k.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(k,0);var Y=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/Y.width,this.imageHeight/Y.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=R},J.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},J.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},J.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},J.prototype.startRenderAndClose=function(){return Ye(this,void 0,void 0,function(){var R,k;return Pt(this,function(Y){switch(Y.label){case 0:return[4,this.render()];case 1:return R=Y.sent(),k=this.getState(),this.renderEventListeners.forEach(function(ae){return ae(R,k)}),this.close(!0),[2]}})})},J.prototype.render=function(){return Ye(this,void 0,void 0,function(){var R;return Pt(this,function(k){switch(k.label){case 0:return(R=new Mt).naturalSize=this.renderAtNaturalSize,R.imageType=this.renderImageType,R.imageQuality=this.renderImageQuality,R.width=this.renderWidth,R.height=this.renderHeight,this.unzoomFromCrop(),Ke.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,R.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return k.sent(),[4,R.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,k.sent()]}})})},J.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Tt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Tt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Tt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var R=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Tt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*R)+`px;
height: `+(this.toolbarHeight-2*R)+`px;
padding: `+R+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Tt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Tt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Tt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Tt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Tt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Tt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*R)+`px;
padding: `+R+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Tt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},J.instanceCounter=0,J}(),kt=D("8hTe"),an=D.n(kt),At=/]*>/g;function pn(J){var R=document.createElement("div");return R.innerHTML=J,R.childNodes.length===0?"":R.childNodes[0].nodeValue}var nn=le.a=function(J){var R=J.value,k=R===void 0?"":R,Y=J.edit,ae=Y===void 0?!1:Y,q=J.className,Ie=J.showTextOnly,ht=J.showLines,Ot=J.replaces,$t=J.zoomImg,ft=J.hasMask,zt=J.style,on=zt===void 0?{}:zt,Wn=J.stylesPrev,Si=Wn===void 0?{}:Wn,hi=String(k),Fn=Object(P.useRef)(),ci=Object(P.useRef)(),Zi=Object(P.useState)(""),yi=Object(H.a)(Zi,2),ri=yi[0],Ci=yi[1],Di=Object(P.useState)("office"),Oi=Object(H.a)(Di,2),Ri=Oi[0],Vi=Oi[1],dr=function(){var wn=new Ze(ci.current);wn.displayMode="popup",wn.addRenderEventListener(function(){var _i=Object(I.a)(n.a.mark(function Nn(Ti){var ii;return n.a.wrap(function(Ni){for(;;)switch(Ni.prev=Ni.next){case 0:return Fn.current.style.display="none",Ni.next=3,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ti}});case 3:ii=Ni.sent,ii!=null&&ii.id&&Ot(ci.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ii==null?void 0:ii.id,"?type=").concat(ii.content_type));case 5:case"end":return Ni.stop()}},Nn)}));return function(Nn){return _i.apply(this,arguments)}}()),wn.show()},rr=function(){var wn=new pe(ci.current);wn.settings.displayMode="popup",wn.addEventListener("render",function(){var _i=Object(I.a)(n.a.mark(function Nn(Ti){var ii;return n.a.wrap(function(Ni){for(;;)switch(Ni.prev=Ni.next){case 0:if(Fn.current.style.display="none",!ci.current){Ni.next=6;break}return Ni.next=4,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ti.dataUrl}});case 4:ii=Ni.sent,ii!=null&&ii.id&&Ot(ci.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ii==null?void 0:ii.id,"?type=").concat(ii.content_type));case 6:case"end":return Ni.stop()}},Nn)}));return function(Nn){return _i.apply(this,arguments)}}()),wn.show(),window.markerArea=wn},ji=Object(P.useMemo)(function(){Fn.current&&(Fn.current.style.zIndex=-1);try{var Hn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_i=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;hi=hi.replace(Hn,"("+te.a.API_SERVER+"/api/attachments/").replace(wn,'"'+te.a.API_SERVER+"/api/attachments/").replace(_i,'"'+te.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(wr){}var Nn=G(hi),Ti=C();if(hi.match(/\[TOC\]/)&&(Nn=Nn.replace("[TOC]
",A()),S()),Nn=Nn.replace(/(__special_katext_id_\d+__)/g,function(wr,Ni){var Xi=Ti[Ni],lr=Xi.type,gr=Xi.expression;return Object(re.renderToString)(pn(gr)||"",{displayMode:lr==="block",throwOnError:!1,output:"html"})}),Nn=Nn.replace(/▁/g,"\u2581\u2581\u2581"),E(),Ie){var ii=document.createElement("div");return ii.innerHTML=Nn,ii.innerText}return setTimeout(function(){return Tr()},500),Nn},[hi]),Wi=Object(P.useRef)();x.WebkitLineClamp=ht,ht&&(on=Object(F.a)(Object(F.a)({},on),x));function hr(Hn){var wn=Hn.target;if(wn.tagName.toUpperCase()==="IMG"){if($t){var _i=wn.getAttribute("src");Ci(_i),Vi("image")}}else if(wn.tagName.toUpperCase()==="A"){var Nn=wn.getAttribute("href");if(Nn.indexOf("office")>-1)Hn.preventDefault(),Ci(Nn),Vi("office");else if(Nn.indexOf("application/pdf")>-1)Hn.preventDefault(),Ci(Nn),Vi("pdf");else if(Nn.indexOf("text/html")>-1)Hn.preventDefault(),Ci(Nn),Vi("html");else if(Nn.startsWith("#")){Hn.preventDefault();var Ti=document.getElementById(Nn.replace("#",""));Ti&&Ti.scrollIntoView(!0)}}}var Tr=function(){var wn,_i=(wn=Wi.current)===null||wn===void 0?void 0:wn.querySelectorAll("video");_i==null||_i.forEach(function(Nn){if(Nn.oncontextmenu=function(){return!1},Nn.src.indexOf(".m3u8")>-1&&!Nn.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Ti=new V.a;Ti.loadSource(Nn.src),Ti.attachMedia(Nn)}}})};Object(P.useEffect)(function(){if(Wi.current&&ji&&(ji.match(At)&&window.PR.prettyPrint()),Wi.current)return Wi.current.addEventListener("click",hr),function(){Wi.current.removeEventListener("click",hr),E(),S()}},[ji,Wi.current,hr]);var ar=function(wn){if(!ae)return;wn.target.nodeName==="IMG"?(Fn.current.style.zIndex=1,Fn.current.style.display="flex",Fn.current.style.width=wn.target.clientWidth+"px",Fn.current.style.height=wn.target.clientHeight+"px",Fn.current.style.top=wn.target.offsetTop+"px",Fn.current.style.left=wn.target.offsetLeft+"px",ci.current.src=wn.target.getAttribute("src")):Fn.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:Wi,style:Object(F.a)({},on),className:"".concat(q||""," markdown-body ").concat(an.a.mdBody),onMouseOver:ar,dangerouslySetInnerHTML:{__html:ji}}),p.a.createElement("div",{ref:Fn,className:an.a.button},p.a.createElement(z.a,null,p.a.createElement(X.a,{onClick:function(){return dr()}},"\u88C1\u526A"),p.a.createElement(X.a,{onClick:function(){return rr()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:ci,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),p.a.createElement(ge.a,{close:!0,data:ri,type:ri!=null&&ri.length?Ri:"",style:Object(F.a)({},Si),onClose:function(){return Ci("")}}))}},"9VGf":function(Be,le,D){"use strict";D.d(le,"a",function(){return M});var Q=D("q1tI"),z=D.n(Q);function M(X,F){var I=Object(Q.useRef)();Object(Q.useEffect)(function(){I.current=X}),Object(Q.useEffect)(function(){function H(){I.current()}if(F!==null){var N=setInterval(H,F);return function(){return clearInterval(N)}}},[F])}},AMnG:function(Be,le,D){"use strict";var Q=D("miYZ"),z=D("tsqr"),M=D("tJVT"),X=D("q1tI"),F=D.n(X),I=D("nWbc"),H=D.n(I),N=D("Ot1p");le.a=function(n){var P=n.id,p=n.activeDiscussIndex,m=n.onReplyDiscuss,d=Object(X.useState)(""),u=Object(M.a)(d,2),o=u[0],h=u[1];function r(i){h(i)}function a(){if(!o){z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}m(P,o),h("")}return F.a.createElement("div",{key:P,className:"discuss-item-editor",style:{display:p===P?"block":"none",width:"100%"}},F.a.createElement(N.a,{miniToolbar:!0,startInit:p===P,defaultValue:o,id:P,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:r}),F.a.createElement("a",{onClick:a,className:"btn-send"},"\u53D1\u9001"))}},BU3w:function(Be,le,D){"use strict";D.d(le,"a",function(){return I});var Q=D("MNnm"),z="rc-util-key";function M(H){if(H.attachTo)return H.attachTo;var N=document.querySelector("head");return N||document.body}function X(H){var N,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Q.a)())return null;var P=document.createElement("style");if((N=n.csp)===null||N===void 0?void 0:N.nonce){var p;P.nonce=(p=n.csp)===null||p===void 0?void 0:p.nonce}P.innerHTML=H;var m=M(n),d=m.firstChild;return n.prepend&&m.prepend?m.prepend(P):n.prepend&&d?m.insertBefore(P,d):m.appendChild(P),P}var F=new Map;function I(H,N){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=M(n);if(!F.has(P)){var p=X("",n),m=p.parentNode;F.set(P,m),m.removeChild(p)}var d=Array.from(F.get(P).children).find(function(a){return a.tagName==="STYLE"&&a[z]===N});if(d){var u,o;if(((u=n.csp)===null||u===void 0?void 0:u.nonce)&&d.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)){var h;d.nonce=(h=n.csp)===null||h===void 0?void 0:h.nonce}return d.innerHTML!==H&&(d.innerHTML=H),d}var r=X(H,n);return r[z]=N,r}},Bd2K:function(Be,le,D){(function(Q){Q(D("VrN/"),D("osHv"))})(function(Q){Q.defineOption("autoCloseTags",!1,function(n,P,p){if(p!=Q.Init&&p&&n.removeKeyMap("autoCloseTags"),!P)return;var m={name:"autoCloseTags"};(typeof P!="object"||P.whenClosing!==!1)&&(m["'/'"]=function(d){return I(d)}),(typeof P!="object"||P.whenOpening!==!1)&&(m["'>'"]=function(d){return X(d)}),n.addKeyMap(m)});var z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=["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 X(n){if(n.getOption("disableInput"))return Q.Pass;for(var P=n.listSelections(),p=[],m=n.getOption("autoCloseTags"),d=0;du.ch&&(i=i.slice(0,i.length-o.end+u.ch));var T=i.toLowerCase();if(!i||o.type=="string"&&(o.end!=u.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==u.ch-o.start-1||S&&H(S,T)>-1||N(n,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(r)||[],i,u,!0))return Q.Pass;var A=typeof m=="object"&&m.emptyTags;if(A&&H(A,i)>-1){p[d]={text:"/>",newPos:Q.Pos(u.line,u.ch+2)};continue}var w=x&&H(x,T)>-1;p[d]={indent:w,text:">"+(w?`
`:"")+""+i+">",newPos:w?Q.Pos(u.line+1,0):Q.Pos(u.line,u.ch+1)}}for(var v=typeof m=="object"&&m.dontIndentOnAutoClose,d=P.length-1;d>=0;d--){var b=p[d];n.replaceRange(b.text,P[d].head,P[d].anchor,"+insert");var g=n.listSelections().slice(0);g[d]={head:b.newPos,anchor:b.newPos},n.setSelections(g),!v&&b.indent&&(n.indentLine(b.newPos.line,null,!0),n.indentLine(b.newPos.line+1,null,!0))}}function F(n,P){for(var p=n.listSelections(),m=[],d=P?"/":"",u=n.getOption("autoCloseTags"),o=typeof u=="object"&&u.dontIndentOnSlash,h=0;h"&&(S+=">"),m[h]=S}if(n.replaceSelections(m),p=n.listSelections(),!o)for(var h=0;h=0&&P[r]==p;r--)++h;m=o.to;for(var r=1;r0){for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"",P=[],p=0;pI,Q.serviceIds.set(I,H),H}function F(I){return function(H,N,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");M(I,H,n,!0)}}},CrYA:function(Be,le,D){var Q=D("MFOe"),z=Q.Global;Be.exports={name:"sessionStorage",read:X,write:F,each:I,remove:H,clearAll:N};function M(){return z.sessionStorage}function X(n){return M().getItem(n)}function F(n,P){return M().setItem(n,P)}function I(n){for(var P=M().length-1;P>=0;P--){var p=M().key(P);n(X(p),p)}}function H(n){return M().removeItem(n)}function N(){return M().clear()}},DlQD:function(Be,le,D){(function(Q,z){Be.exports=z()})(this,function(){"use strict";function Q(we,Se){for(var Ee=0;Eewe.length)&&(Se=we.length);for(var Ee=0,ue=new Array(Se);Ee=we.length?{done:!0}:{done:!1,value:we[ue++]}}}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 Ee=we[Symbol.iterator](),Ee.next.bind(Ee)}function I(we,Se){return Se={exports:{}},we(Se,Se.exports),Se.exports}var H=I(function(we){function Se(){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 Ee(ue){we.exports.defaults=ue}we.exports={defaults:Se(),getDefaults:Se,changeDefaults:Ee}}),N=H.defaults,n=H.getDefaults,P=H.changeDefaults,p=/[&<>"']/,m=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(Se){return o[Se]};function r(we,Se){if(Se){if(p.test(we))return we.replace(m,h)}else if(d.test(we))return we.replace(u,h);return we}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(we){return we.replace(a,function(Se,Ee){return Ee=Ee.toLowerCase(),Ee==="colon"?":":Ee.charAt(0)==="#"?Ee.charAt(1)==="x"?String.fromCharCode(parseInt(Ee.substring(2),16)):String.fromCharCode(+Ee.substring(1)):""})}var s=/(^|[^\[])\^/g;function S(we,Se){we=we.source||we,Se=Se||"";var Ee={replace:function(de,ye){return ye=ye.source||ye,ye=ye.replace(s,"$1"),we=we.replace(de,ye),Ee},getRegex:function(){return new RegExp(we,Se)}};return Ee}var x=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(we,Se,Ee){if(we){var ue;try{ue=decodeURIComponent(i(Ee)).replace(x,"").toLowerCase()}catch(de){return null}if(ue.indexOf("javascript:")===0||ue.indexOf("vbscript:")===0||ue.indexOf("data:")===0)return null}Se&&!T.test(Ee)&&(Ee=f(Se,Ee));try{Ee=encodeURI(Ee).replace(/%25/g,"%")}catch(de){return null}return Ee}var w={},v=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(we,Se){w[" "+we]||(v.test(we)?w[" "+we]=we+"/":w[" "+we]=U(we,"/",!0)),we=w[" "+we];var Ee=we.indexOf(":")===-1;return Se.substring(0,2)==="//"?Ee?Se:we.replace(b,"$1")+Se:Se.charAt(0)==="/"?Ee?Se:we.replace(g,"$1")+Se:we+Se}var C={exec:function(){}};function E(we){for(var Se=1,Ee,ue;Se=0&&Le[ut]==="\\";)Xe=!Xe;return Xe?"|":" |"}),ue=Ee.split(/ \|/),de=0;if(ue.length>Se)ue.splice(Se);else for(;ue.length=ue.length?de.slice(ue.length):de}).join(`
`)}var Oe=function(){function we(Ee){this.options=Ee||B}var Se=we.prototype;return Se.space=function(ue){var de=this.rules.block.newline.exec(ue);if(de)return de[0].length>1?{type:"space",raw:de[0]}:{raw:`
`}},Se.code=function(ue,de){var ye=this.rules.block.code.exec(ue);if(ye){var me=de[de.length-1];if(me&&me.type==="paragraph")return{raw:ye[0],text:ye[0].trimRight()};var Le=ye[0].replace(/^ {4}/gm,"");return{type:"code",raw:ye[0],codeBlockStyle:"indented",text:this.options.pedantic?Le:O(Le,`
`)}}},Se.fences=function(ue){var de=this.rules.block.fences.exec(ue);if(de){var ye=de[0],me=Ae(ye,de[3]||"");return{type:"code",raw:ye,lang:de[2]?de[2].trim():de[2],text:me}}},Se.heading=function(ue){var de=this.rules.block.heading.exec(ue);if(de)return{type:"heading",raw:de[0],depth:de[1].length,text:de[2]}},Se.nptable=function(ue){var de=this.rules.block.nptable.exec(ue);if(de){var ye={type:"table",header:V(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[],raw:de[0]};if(ye.header.length===ye.align.length){var me=ye.align.length,Le;for(Le=0;Le ?/gm,"");return{type:"blockquote",raw:de[0],text:ye}}},Se.list=function(ue){var de=this.rules.block.list.exec(ue);if(de){for(var ye=de[0],me=de[2],Le=me.length>1,Xe=me[me.length-1]===")",ut={type:"list",raw:ye,ordered:Le,start:Le?+me.slice(0,-1):"",loose:!1,items:[]},Dt=de[0].match(this.rules.block.item),jt=!1,Ut,Ct,et,st,He,pe,Re,lt=Dt.length,Ye=0;Ye1||this.options.smartLists&&et!==me)&&(st=Dt.slice(Ye+1).join(`
`),ut.raw=ut.raw.substring(0,ut.raw.length-st.length),Ye=lt-1)),He=jt||/\n\n(?!\s*$)/.test(Ut),Ye!==lt-1&&(jt=Ut.charAt(Ut.length-1)===`
`,He||(He=jt)),He&&(ut.loose=!0),pe=/^\[[ xX]\] /.test(Ut),Re=void 0,pe&&(Re=Ut[1]!==" ",Ut=Ut.replace(/^\[[ xX]\] +/,"")),ut.items.push({type:"list_item",raw:ye,task:pe,checked:Re,loose:He,text:Ut});return ut}},Se.html=function(ue){var de=this.rules.block.html.exec(ue);if(de)return{type:this.options.sanitize?"paragraph":"html",raw:de[0],pre:!this.options.sanitizer&&(de[1]==="pre"||de[1]==="script"||de[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):te(de[0]):de[0]}},Se.def=function(ue){var de=this.rules.block.def.exec(ue);if(de){de[3]&&(de[3]=de[3].substring(1,de[3].length-1));var ye=de[1].toLowerCase().replace(/\s+/g," ");return{tag:ye,raw:de[0],href:de[2],title:de[3]}}},Se.table=function(ue){var de=this.rules.block.table.exec(ue);if(de){var ye={type:"table",header:V(de[1].replace(/^ *| *\| *$/g,"")),align:de[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:de[3]?de[3].replace(/\n$/,"").split(`
`):[]};if(ye.header.length===ye.align.length){ye.raw=de[0];var me=ye.align.length,Le;for(Le=0;Le/i.test(me[0])&&(de=!1),!ye&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?ye=!0:ye&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(ye=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:de,inRawBlock:ye,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):te(me[0]):me[0]}},Se.link=function(ue){var de=this.rules.inline.link.exec(ue);if(de){var ye=re(de[2],"()");if(ye>-1){var me=de[0].indexOf("!")===0?5:4,Le=me+de[1].length+ye;de[2]=de[2].substring(0,ye),de[0]=de[0].substring(0,Le).trim(),de[3]=""}var Xe=de[2],ut="";if(this.options.pedantic){var Dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);Dt?(Xe=Dt[1],ut=Dt[3]):ut=""}else ut=de[3]?de[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var jt=ge(de,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:ut&&ut.replace(this.rules.inline._escapes,"$1")},de[0]);return jt}},Se.reflink=function(ue,de){var ye;if((ye=this.rules.inline.reflink.exec(ue))||(ye=this.rules.inline.nolink.exec(ue))){var me=(ye[2]||ye[1]).replace(/\s+/g," ");if(me=de[me.toLowerCase()],!me||!me.href){var Le=ye[0].charAt(0);return{type:"text",raw:Le,text:Le}}var Xe=ge(ye,me,ye[0]);return Xe}},Se.strong=function(ue,de,ye){ye===void 0&&(ye="");var me=this.rules.inline.strong.start.exec(ue);if(me&&(!me[1]||me[1]&&(ye===""||this.rules.inline.punctuation.exec(ye)))){de=de.slice(-1*ue.length);var Le=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Le.lastIndex=0;for(var Xe;(me=Le.exec(de))!=null;)if(Xe=this.rules.inline.strong.middle.exec(de.slice(0,me.index+3)),Xe)return{type:"strong",raw:ue.slice(0,Xe[0].length),text:ue.slice(2,Xe[0].length-2)}}},Se.em=function(ue,de,ye){ye===void 0&&(ye="");var me=this.rules.inline.em.start.exec(ue);if(me&&(!me[1]||me[1]&&(ye===""||this.rules.inline.punctuation.exec(ye)))){de=de.slice(-1*ue.length);var Le=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Le.lastIndex=0;for(var Xe;(me=Le.exec(de))!=null;)if(Xe=this.rules.inline.em.middle.exec(de.slice(0,me.index+2)),Xe)return{type:"em",raw:ue.slice(0,Xe[0].length),text:ue.slice(1,Xe[0].length-1)}}},Se.codespan=function(ue){var de=this.rules.inline.code.exec(ue);if(de){var ye=de[2].replace(/\n/g," "),me=/[^ ]/.test(ye),Le=ye.startsWith(" ")&&ye.endsWith(" ");return me&&Le&&(ye=ye.substring(1,ye.length-1)),ye=te(ye,!0),{type:"codespan",raw:de[0],text:ye}}},Se.br=function(ue){var de=this.rules.inline.br.exec(ue);if(de)return{type:"br",raw:de[0]}},Se.del=function(ue){var de=this.rules.inline.del.exec(ue);if(de)return{type:"del",raw:de[0],text:de[1]}},Se.autolink=function(ue,de){var ye=this.rules.inline.autolink.exec(ue);if(ye){var me,Le;return ye[2]==="@"?(me=te(this.options.mangle?de(ye[1]):ye[1]),Le="mailto:"+me):(me=te(ye[1]),Le=me),{type:"link",raw:ye[0],text:me,href:Le,tokens:[{type:"text",raw:me,text:me}]}}},Se.url=function(ue,de){var ye;if(ye=this.rules.inline.url.exec(ue)){var me,Le;if(ye[2]==="@")me=te(this.options.mangle?de(ye[0]):ye[0]),Le="mailto:"+me;else{var Xe;do Xe=ye[0],ye[0]=this.rules.inline._backpedal.exec(ye[0])[0];while(Xe!==ye[0]);me=te(ye[0]),ye[1]==="www."?Le="http://"+me:Le=me}return{type:"link",raw:ye[0],text:me,href:Le,tokens:[{type:"text",raw:me,text:me}]}}},Se.inlineText=function(ue,de,ye){var me=this.rules.inline.text.exec(ue);if(me){var Le;return de?Le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):te(me[0]):me[0]:Le=te(this.options.smartypants?ye(me[0]):me[0]),{type:"text",raw:me[0],text:Le}}},we}(),Ce=G.noopTest,je=G.edit,Ue=G.merge,xe={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*|\\n*|\\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:Ce,table:Ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};xe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,xe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,xe.def=je(xe.def).replace("label",xe._label).replace("title",xe._title).getRegex(),xe.bullet=/(?:[*+-]|\d{1,9}[.)])/,xe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,xe.item=je(xe.item,"gm").replace(/bull/g,xe.bullet).getRegex(),xe.list=je(xe.list).replace(/bull/g,xe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xe.def.source+")").getRegex(),xe._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",xe._comment=//,xe.html=je(xe.html,"i").replace("comment",xe._comment).replace("tag",xe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xe.paragraph=je(xe._paragraph).replace("hr",xe.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",xe._tag).getRegex(),xe.blockquote=je(xe.blockquote).replace("paragraph",xe.paragraph).getRegex(),xe.normal=Ue({},xe),xe.gfm=Ue({},xe.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*|$)"}),xe.gfm.nptable=je(xe.gfm.nptable).replace("hr",xe.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",xe._tag).getRegex(),xe.gfm.table=je(xe.gfm.table).replace("hr",xe.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",xe._tag).getRegex(),xe.pedantic=Ue({},xe.normal,{html:je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xe._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:Ce,paragraph:je(xe.normal._paragraph).replace("hr",xe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",xe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",be.punctuation=je(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex(),be._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",be._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",be.em.start=je(be.em.start).replace(/punctuation/g,be._punctuation).getRegex(),be.em.middle=je(be.em.middle).replace(/punctuation/g,be._punctuation).replace(/overlapSkip/g,be._overlapSkip).getRegex(),be.em.endAst=je(be.em.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.em.endUnd=je(be.em.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.start=je(be.strong.start).replace(/punctuation/g,be._punctuation).getRegex(),be.strong.middle=je(be.strong.middle).replace(/punctuation/g,be._punctuation).replace(/blockSkip/g,be._blockSkip).getRegex(),be.strong.endAst=je(be.strong.endAst,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.strong.endUnd=je(be.strong.endUnd,"g").replace(/punctuation/g,be._punctuation).getRegex(),be.blockSkip=je(be._blockSkip,"g").getRegex(),be.overlapSkip=je(be._overlapSkip,"g").getRegex(),be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,be._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])?)+(?![-_])/,be.autolink=je(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex(),be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,be.tag=je(be.tag).replace("comment",xe._comment).replace("attribute",be._attribute).getRegex(),be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,be._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,be.link=je(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex(),be.reflink=je(be.reflink).replace("label",be._label).getRegex(),be.reflinkSearch=je(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex(),be.normal=Ue({},be),be.pedantic=Ue({},be.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:je(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()}),be.gfm=Ue({},be.normal,{escape:je(be.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ue="x"+ue.toString(16)),Se+=""+ue+";";return Se}var ct=function(){function we(Ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ee||mt,this.options.tokenizer=this.options.tokenizer||new Oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ue={block:yt.normal,inline:_t.normal};this.options.pedantic?(ue.block=yt.pedantic,ue.inline=_t.pedantic):this.options.gfm&&(ue.block=yt.gfm,this.options.breaks?ue.inline=_t.breaks:ue.inline=_t.gfm),this.tokenizer.rules=ue}we.lex=function(ue,de){var ye=new we(de);return ye.lex(ue)};var Se=we.prototype;return Se.lex=function(ue){return ue=ue.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ue,this.tokens,!0),this.inline(this.tokens),this.tokens},Se.blockTokens=function(ue,de,ye){de===void 0&&(de=[]),ye===void 0&&(ye=!0),ue=ue.replace(/^ +$/gm,"");for(var me,Le,Xe,ut;ue;){if(me=this.tokenizer.space(ue)){ue=ue.substring(me.raw.length),me.type&&de.push(me);continue}if(me=this.tokenizer.code(ue,de)){ue=ue.substring(me.raw.length),me.type?de.push(me):(ut=de[de.length-1],ut.raw+=`
`+me.raw,ut.text+=`
`+me.text);continue}if(me=this.tokenizer.fences(ue)){ue=ue.substring(me.raw.length),de.push(me);continue}if(me=this.tokenizer.heading(ue)){ue=ue.substring(me.raw.length),de.push(me);continue}if(me=this.tokenizer.nptable(ue)){ue=ue.substring(me.raw.length),de.push(me);continue}if(me=this.tokenizer.hr(ue)){ue=ue.substring(me.raw.length),de.push(me);continue}if(me=this.tokenizer.blockquote(ue)){ue=ue.substring(me.raw.length),me.tokens=this.blockTokens(me.text,[],ye),de.push(me);continue}if(me=this.tokenizer.list(ue)){for(ue=ue.substring(me.raw.length),Xe=me.items.length,Le=0;Le0)for(;(Dt=this.tokenizer.rules.inline.reflinkSearch.exec(ut))!=null;)jt.includes(Dt[0].slice(Dt[0].lastIndexOf("[")+1,-1))&&(ut=ut.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Dt=this.tokenizer.rules.inline.blockSkip.exec(ut))!=null;)ut=ut.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+ut.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ue;){if(Xe=this.tokenizer.escape(ue)){ue=ue.substring(Xe.raw.length),de.push(Xe);continue}if(Xe=this.tokenizer.tag(ue,ye,me)){ue=ue.substring(Xe.raw.length),ye=Xe.inLink,me=Xe.inRawBlock,de.push(Xe);continue}if(Xe=this.tokenizer.link(ue)){ue=ue.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,me)),de.push(Xe);continue}if(Xe=this.tokenizer.reflink(ue,this.tokens.links)){ue=ue.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,me)),de.push(Xe);continue}if(Xe=this.tokenizer.strong(ue,ut,Le)){ue=ue.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ye,me),de.push(Xe);continue}if(Xe=this.tokenizer.em(ue,ut,Le)){ue=ue.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ye,me),de.push(Xe);continue}if(Xe=this.tokenizer.codespan(ue)){ue=ue.substring(Xe.raw.length),de.push(Xe);continue}if(Xe=this.tokenizer.br(ue)){ue=ue.substring(Xe.raw.length),de.push(Xe);continue}if(Xe=this.tokenizer.del(ue)){ue=ue.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ye,me),de.push(Xe);continue}if(Xe=this.tokenizer.autolink(ue,nt)){ue=ue.substring(Xe.raw.length),de.push(Xe);continue}if(!ye&&(Xe=this.tokenizer.url(ue,nt))){ue=ue.substring(Xe.raw.length),de.push(Xe);continue}if(Xe=this.tokenizer.inlineText(ue,me,xt)){ue=ue.substring(Xe.raw.length),Le=Xe.raw.slice(-1),de.push(Xe);continue}if(ue){var Ut="Infinite loop on byte: "+ue.charCodeAt(0);if(this.options.silent){console.error(Ut);break}else throw new Error(Ut)}}return de},z(we,null,[{key:"rules",get:function(){return{block:yt,inline:_t}}}]),we}(),wt=H.defaults,_e=G.cleanUrl,Me=G.escape,ve=function(){function we(Ee){this.options=Ee||wt}var Se=we.prototype;return Se.code=function(ue,de,ye){var me=(de||"").match(/\S*/)[0];if(this.options.highlight){var Le=this.options.highlight(ue,me);Le!=null&&Le!==ue&&(ye=!0,ue=Le)}return me?''+(ye?ue:Me(ue,!0))+`
`:""+(ye?ue:Me(ue,!0))+`
`},Se.blockquote=function(ue){return`
`+ue+`
`},Se.html=function(ue){return ue},Se.heading=function(ue,de,ye,me){return this.options.headerIds?"
`:""+ue+"
`},Se.hr=function(){return this.options.xhtml?`
`:`
`},Se.list=function(ue,de,ye){var me=de?"ol":"ul",Le=de&&ye!==1?' start="'+ye+'"':"";return"<"+me+Le+`>
`+ue+""+me+`>
`},Se.listitem=function(ue){return""+ue+`
`},Se.checkbox=function(ue){return" "},Se.paragraph=function(ue){return""+ue+`
`},Se.table=function(ue,de){return de&&(de=""+de+""),`
`},Se.tablerow=function(ue){return`
`+ue+`
`},Se.tablecell=function(ue,de){var ye=de.header?"th":"td",me=de.align?"<"+ye+' align="'+de.align+'">':"<"+ye+">";return me+ue+""+ye+`>
`},Se.strong=function(ue){return""+ue+""},Se.em=function(ue){return""+ue+""},Se.codespan=function(ue){return""+ue+""},Se.br=function(){return this.options.xhtml?"
":"
"},Se.del=function(ue){return""+ue+""},Se.link=function(ue,de,ye){if(ue=_e(this.options.sanitize,this.options.baseUrl,ue),ue===null)return ye;var me='"+ye+"",me},Se.image=function(ue,de,ye){if(ue=_e(this.options.sanitize,this.options.baseUrl,ue),ue===null)return ye;var me='
":">",me},Se.text=function(ue){return ue},we}(),Te=function(){function we(){}var Se=we.prototype;return Se.strong=function(ue){return ue},Se.em=function(ue){return ue},Se.codespan=function(ue){return ue},Se.del=function(ue){return ue},Se.html=function(ue){return ue},Se.text=function(ue){return ue},Se.link=function(ue,de,ye){return""+ye},Se.image=function(ue,de,ye){return""+ye},Se.br=function(){return""},we}(),We=function(){function we(){this.seen={}}var Se=we.prototype;return Se.slug=function(ue){var de=ue.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(de)){var ye=de;do this.seen[ye]++,de=ye+"-"+this.seen[ye];while(this.seen.hasOwnProperty(de))}return this.seen[de]=0,de},we}(),Je=H.defaults,at=G.unescape,dt=function(){function we(Ee){this.options=Ee||Je,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new We}we.parse=function(ue,de){var ye=new we(de);return ye.parse(ue)};var Se=we.prototype;return Se.parse=function(ue,de){de===void 0&&(de=!0);var ye="",me,Le,Xe,ut,Dt,jt,Ut,Ct,et,st,He,pe,Re,lt,Ye,Pt,Nt,Ke,gt=ue.length;for(me=0;me0&&Ye.tokens[0].type==="text"?(Ye.tokens[0].text=Ke+" "+Ye.tokens[0].text,Ye.tokens[0].tokens&&Ye.tokens[0].tokens.length>0&&Ye.tokens[0].tokens[0].type==="text"&&(Ye.tokens[0].tokens[0].text=Ke+" "+Ye.tokens[0].tokens[0].text)):Ye.tokens.unshift({type:"text",text:Ke}):lt+=Ke),lt+=this.parse(Ye.tokens,Re),et+=this.renderer.listitem(lt,Nt,Pt);ye+=this.renderer.list(et,He,pe);continue}case"html":{ye+=this.renderer.html(st.text);continue}case"paragraph":{ye+=this.renderer.paragraph(this.parseInline(st.tokens));continue}case"text":{for(et=st.tokens?this.parseInline(st.tokens):st.text;me+1An error occurred:
"+Ne(Xe.message+"",!0)+"
";throw Xe}}Ge.options=Ge.setOptions=function(we){return Lt(Ge.defaults,we),it(Ge.defaults),Ge},Ge.getDefaults=ke,Ge.defaults=ot,Ge.use=function(we){var Se=Lt({},we);if(we.renderer&&function(){var ue=Ge.defaults.renderer||new ve,de=function(Le){var Xe=ue[Le];ue[Le]=function(){for(var ut=arguments.length,Dt=new Array(ut),jt=0;jt=0;d--){if(!M(m[d]))continue;var u=m[d].split("="),o=unescape(u[0]),h=unescape(u[1]);p(h,o)}}function H(p,m){if(!p)return;X.cookie=escape(p)+"="+escape(m)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function N(p){if(!p||!P(p))return;X.cookie=escape(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function n(){I(function(p,m){N(m)})}function P(p){return new RegExp("(?:^|;\\s*)"+escape(p).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(X.cookie)}},E2g8:function(Be,le,D){(function(Q,z){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/(function(M,X){Be.exports=X()})(this,function(){"use strict";function M(ve){var Te=typeof ve;return ve!==null&&(Te==="object"||Te==="function")}function X(ve){return typeof ve=="function"}var F=void 0;Array.isArray?F=Array.isArray:F=function(ve){return Object.prototype.toString.call(ve)==="[object Array]"};var I=F,H=0,N=void 0,n=void 0,P=function(Te,We){T[H]=Te,T[H+1]=We,H+=2,H===2&&(n?n(A):v())};function p(ve){n=ve}function m(ve){P=ve}var d=typeof window!="undefined"?window:void 0,u=d||{},o=u.MutationObserver||u.WebKitMutationObserver,h=typeof self=="undefined"&&typeof Q!="undefined"&&{}.toString.call(Q)==="[object process]",r=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function a(){return function(){return Q.nextTick(A)}}function i(){return typeof N!="undefined"?function(){N(A)}:x()}function s(){var ve=0,Te=new o(A),We=document.createTextNode("");return Te.observe(We,{characterData:!0}),function(){We.data=ve=++ve%2}}function S(){var ve=new MessageChannel;return ve.port1.onmessage=A,function(){return ve.port2.postMessage(0)}}function x(){var ve=setTimeout;return function(){return ve(A,1)}}var T=new Array(1e3);function A(){for(var ve=0;ve`,triples:"",explode:"[]{}"},M=Q.Pos;Q.defineOption("autoCloseBrackets",!1,function(o,h,r){r&&r!=Q.Init&&(o.removeKeyMap(F),o.state.closeBrackets=null),h&&(I(X(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(F))});function X(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:z[h]}var F={Backspace:n,Enter:P};function I(o){for(var h=0;h=0;i--){var S=a[i].head;o.replaceRange("",M(S.line,S.ch-1),M(S.line,S.ch+1),"+delete")}}function P(o){var h=N(o),r=h&&X(h,"explode");if(!r||o.getOption("disableInput"))return Q.Pass;for(var a=o.listSelections(),i=0;i0;return{anchor:new M(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new M(o.head.line,o.head.ch+(h?1:-1))}}function m(o,h){var r=N(o);if(!r||o.getOption("disableInput"))return Q.Pass;var a=X(r,"pairs"),i=a.indexOf(h);if(i==-1)return Q.Pass;for(var s=X(r,"closeBefore"),S=X(r,"triples"),x=a.charAt(i+1)==h,T=o.listSelections(),A=i%2==0,w,v=0;v=0&&o.getRange(g,M(g.line,g.ch+3))==h+h+h?f="skipThree":f="skip";else if(x&&g.ch>1&&S.indexOf(h)>=0&&o.getRange(M(g.line,g.ch-2),g)==h+h){if(g.ch>2&&/\bstring/.test(o.getTokenTypeAt(M(g.line,g.ch-2))))return Q.Pass;f="addFour"}else if(x){var E=g.ch==0?" ":o.getRange(M(g.line,g.ch-1),g);if(!Q.isWordChar(C)&&E!=h&&!Q.isWordChar(E))f="both";else return Q.Pass}else if(A&&(C.length===0||/\s/.test(C)||s.indexOf(C)>-1))f="both";else return Q.Pass;if(!w)w=f;else if(w!=f)return Q.Pass}var _=i%2?a.charAt(i-1):h,U=i%2?h:a.charAt(i+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var j=0;j<3;j++)o.execCommand("goCharRight");else if(w=="surround"){for(var L=o.getSelections(),j=0;j ").concat($);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","error",Z),!fe.ENABLE_ERROR)return;console.error?console.error(Z):console.warn?console.warn(Z):console.log(Z)}},{key:"i",value:function(W,$){(!W||fe.FORCE_GLOBAL_TAG)&&(W=fe.GLOBAL_TAG);var Z="[".concat(W,"] > ").concat($);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","info",Z),!fe.ENABLE_INFO)return;console.info?console.info(Z):console.log(Z)}},{key:"w",value:function(W,$){(!W||fe.FORCE_GLOBAL_TAG)&&(W=fe.GLOBAL_TAG);var Z="[".concat(W,"] > ").concat($);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","warn",Z),!fe.ENABLE_WARN)return;console.warn?console.warn(Z):console.log(Z)}},{key:"d",value:function(W,$){(!W||fe.FORCE_GLOBAL_TAG)&&(W=fe.GLOBAL_TAG);var Z="[".concat(W,"] > ").concat($);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","debug",Z),!fe.ENABLE_DEBUG)return;console.debug?console.debug(Z):console.log(Z)}},{key:"v",value:function(W,$){(!W||fe.FORCE_GLOBAL_TAG)&&(W=fe.GLOBAL_TAG);var Z="[".concat(W,"] > ").concat($);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","verbose",Z),!fe.ENABLE_VERBOSE)return;console.log(Z)}}]),fe}();H.GLOBAL_TAG="flv.js",H.FORCE_GLOBAL_TAG=!1,H.ENABLE_ERROR=!0,H.ENABLE_INFO=!0,H.ENABLE_WARN=!0,H.ENABLE_DEBUG=!0,H.ENABLE_VERBOSE=!0,H.ENABLE_CALLBACK=!1,H.emitter=new I.a;var N=H,n=function(){function fe(){Object(Q.a)(this,fe),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(z.a)(fe,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),fe}(),P=n,p=D("yKVA"),m=D("879j"),d=function(){function fe(se){Object(Q.a)(this,fe),this._message=se}return Object(z.a)(fe,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),fe}(),u=function(fe){Object(p.a)(W,fe);var se=Object(m.a)(W);function W($){return Object(Q.a)(this,W),se.call(this,$)}return Object(z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(d),o=function(fe){Object(p.a)(W,fe);var se=Object(m.a)(W);function W($){return Object(Q.a)(this,W),se.call(this,$)}return Object(z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(d),h=function(fe){Object(p.a)(W,fe);var se=Object(m.a)(W);function W($){return Object(Q.a)(this,W),se.call(this,$)}return Object(z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(d),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},a={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},i=function(){function fe(se){Object(Q.a)(this,fe),this._type=se||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(z.a)(fe,[{key:"destroy",value:function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===r.kConnecting||this._status===r.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,$){throw new h("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new h("Unimplemented abstract function!")}}]),fe}(),s=D("oZsa");function S(fe,se){for(;!Object.prototype.hasOwnProperty.call(fe,se)&&!(fe=Object(s.a)(fe),fe===null););return fe}function x(fe,se,W){return typeof Reflect!="undefined"&&Reflect.get?x=Reflect.get:x=function(Z,ne,he){var Pe=S(Z,ne);if(!Pe)return;var ze=Object.getOwnPropertyDescriptor(Pe,ne);return ze.get?ze.get.call(he):ze.value},x(fe,se,W||fe)}var T={};function A(){var fe=self.navigator.userAgent.toLowerCase(),se=/(edge)\/([\w.]+)/.exec(fe)||/(opr)[\/]([\w.]+)/.exec(fe)||/(chrome)[ \/]([\w.]+)/.exec(fe)||/(iemobile)[\/]([\w.]+)/.exec(fe)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(fe)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(fe)||/(webkit)[ \/]([\w.]+)/.exec(fe)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(fe)||/(msie) ([\w.]+)/.exec(fe)||fe.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(fe)||fe.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(fe)||[],W=/(ipad)/.exec(fe)||/(ipod)/.exec(fe)||/(windows phone)/.exec(fe)||/(iphone)/.exec(fe)||/(kindle)/.exec(fe)||/(android)/.exec(fe)||/(windows)/.exec(fe)||/(mac)/.exec(fe)||/(linux)/.exec(fe)||/(cros)/.exec(fe)||[],$={browser:se[5]||se[3]||se[1]||"",version:se[2]||se[4]||"0",majorVersion:se[4]||se[2]||"0",platform:W[0]||""},Z={};if($.browser){Z[$.browser]=!0;var ne=$.majorVersion.split(".");Z.version={major:parseInt($.majorVersion,10),string:$.version},ne.length>1&&(Z.version.minor=parseInt(ne[1],10)),ne.length>2&&(Z.version.build=parseInt(ne[2],10))}if($.platform&&(Z[$.platform]=!0),(Z.chrome||Z.opr||Z.safari)&&(Z.webkit=!0),Z.rv||Z.iemobile){Z.rv&&delete Z.rv;var he="msie";$.browser=he,Z[he]=!0}if(Z.edge){delete Z.edge;var Pe="msedge";$.browser=Pe,Z[Pe]=!0}if(Z.opr){var ze="opera";$.browser=ze,Z[ze]=!0}if(Z.safari&&Z.android){var Rt="android";$.browser=Rt,Z[Rt]=!0}Z.name=$.browser,Z.platform=$.platform;for(var Mt in T)T.hasOwnProperty(Mt)&&delete T[Mt];Object.assign(T,Z)}A();var w=T,v=function(fe){Object(p.a)(W,fe);var se=Object(m.a)(W);function W($,Z){var ne;return Object(Q.a)(this,W),ne=se.call(this,"fetch-stream-loader"),ne.TAG="FetchStreamLoader",ne._seekHandler=$,ne._config=Z,ne._needStash=!0,ne._requestAbort=!1,ne._contentLength=null,ne._receivedLength=0,ne}return Object(z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),x(Object(s.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(Z,ne){var he=this;this._dataSource=Z,this._range=ne;var Pe=Z.url;this._config.reuseRedirectedURL&&Z.redirectedURL!=null&&(Pe=Z.redirectedURL);var ze=this._seekHandler.getConfig(Pe,ne),Rt=new self.Headers;if(typeof ze.headers=="object"){var Mt=ze.headers;for(var Ze in Mt)Mt.hasOwnProperty(Ze)&&Rt.append(Ze,Mt[Ze])}var kt={method:"GET",headers:Rt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var an in this._config.headers)Rt.append(an,this._config.headers[an]);Z.cors===!1&&(kt.mode="same-origin"),Z.withCredentials&&(kt.credentials="include"),Z.referrerPolicy&&(kt.referrerPolicy=Z.referrerPolicy),this._status=r.kConnecting,self.fetch(ze.url,kt).then(function(At){if(he._requestAbort){he._requestAbort=!1,he._status=r.kIdle;return}if(At.ok&&At.status>=200&&At.status<=299){if(At.url!==ze.url&&he._onURLRedirect){var pn=he._seekHandler.removeURLParameters(At.url);he._onURLRedirect(pn)}var nn=At.headers.get("Content-Length");return nn!=null&&(he._contentLength=parseInt(nn),he._contentLength!==0&&(he._onContentLengthKnown&&he._onContentLengthKnown(he._contentLength))),he._pump.call(he,At.body.getReader())}else if(he._status=r.kError,he._onError)he._onError(a.HTTP_STATUS_CODE_INVALID,{code:At.status,msg:At.statusText});else throw new d("FetchStreamLoader: Http code invalid, "+At.status+" "+At.statusText)}).catch(function(At){if(he._status=r.kError,he._onError)he._onError(a.EXCEPTION,{code:-1,msg:At.message});else throw At})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(Z){var ne=this;return Z.read().then(function(he){if(he.done)if(ne._contentLength!==null&&ne._receivedLength=15048,ne=w.msedge?Z:!0;return self.fetch&&self.ReadableStream&&ne}catch(he){return!1}}}]),W}(i),b=v,g=function(fe){Object(p.a)(W,fe);var se=Object(m.a)(W);function W($,Z){var ne;return Object(Q.a)(this,W),ne=se.call(this,"xhr-moz-chunked-loader"),ne.TAG="MozChunkedLoader",ne._seekHandler=$,ne._config=Z,ne._needStash=!0,ne._xhr=null,ne._requestAbort=!1,ne._contentLength=null,ne._receivedLength=0,ne}return Object(z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),x(Object(s.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(Z,ne){this._dataSource=Z,this._range=ne;var he=Z.url;this._config.reuseRedirectedURL&&Z.redirectedURL!=null&&(he=Z.redirectedURL);var Pe=this._seekHandler.getConfig(he,ne);this._requestURL=Pe.url;var ze=this._xhr=new XMLHttpRequest;if(ze.open("GET",Pe.url,!0),ze.responseType="moz-chunked-arraybuffer",ze.onreadystatechange=this._onReadyStateChange.bind(this),ze.onprogress=this._onProgress.bind(this),ze.onloadend=this._onLoadEnd.bind(this),ze.onerror=this._onXhrError.bind(this),Z.withCredentials&&(ze.withCredentials=!0),typeof Pe.headers=="object"){var Rt=Pe.headers;for(var Mt in Rt)Rt.hasOwnProperty(Mt)&&ze.setRequestHeader(Mt,Rt[Mt])}if(typeof this._config.headers=="object"){var Ze=this._config.headers;for(var kt in Ze)Ze.hasOwnProperty(kt)&&ze.setRequestHeader(kt,Ze[kt])}this._status=r.kConnecting,ze.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=r.kComplete}},{key:"_onReadyStateChange",value:function(Z){var ne=Z.target;if(ne.readyState===2){if(ne.responseURL!=null&&ne.responseURL!==this._requestURL&&this._onURLRedirect){var he=this._seekHandler.removeURLParameters(ne.responseURL);this._onURLRedirect(he)}if(ne.status!==0&&(ne.status<200||ne.status>299))if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("MozChunkedLoader: Http code invalid, "+ne.status+" "+ne.statusText);else this._status=r.kBuffering}}},{key:"_onProgress",value:function(Z){if(this._status===r.kError)return;this._contentLength===null&&(Z.total!==null&&Z.total!==0&&(this._contentLength=Z.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var ne=Z.target.response,he=this._range.from+this._receivedLength;this._receivedLength+=ne.byteLength,this._onDataArrival&&this._onDataArrival(ne,he,this._receivedLength)}},{key:"_onLoadEnd",value:function(Z){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===r.kError)return;this._status=r.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(Z){this._status=r.kError;var ne=0,he=null;if(this._contentLength&&Z.loaded=200&&ne.status<=299){if(this._status=r.kBuffering,ne.responseURL!=null){var he=this._seekHandler.removeURLParameters(ne.responseURL);ne.responseURL!==this._currentRequestURL&&he!==this._currentRedirectedURL&&(this._currentRedirectedURL=he,this._onURLRedirect&&this._onURLRedirect(he))}var Pe=ne.getResponseHeader("Content-Length");if(Pe!=null&&this._contentLength==null){var ze=parseInt(Pe);ze>0&&(this._contentLength=ze,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("MSStreamLoader: Http code invalid, "+ne.status+" "+ne.statusText);else if(ne.readyState===3&&(ne.status>=200&&ne.status<=299)){this._status=r.kBuffering;var Rt=ne.response;this._reader.readAsArrayBuffer(Rt)}}},{key:"_xhrOnError",value:function(Z){this._status=r.kError;var ne=a.EXCEPTION,he={code:-1,msg:Z.constructor.name+" "+Z.type};if(this._onError)this._onError(ne,he);else throw new d(he.msg)}},{key:"_msrOnProgress",value:function(Z){var ne=Z.target,he=ne.result;if(he==null){this._doReconnectIfNeeded();return}var Pe=he.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=he.byteLength;var ze=this._totalRange.from+this._receivedLength;this._receivedLength+=Pe.byteLength,this._onDataArrival&&this._onDataArrival(Pe,ze,this._receivedLength),he.byteLength>=this._bufferLimit&&(N.v(this.TAG,"MSStream buffer exceeded max size near ".concat(ze+Pe.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(he=this._range.from+this._contentLength-1)),this._currentRequestRange={from:ne,to:he},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(Z,ne){this._lastTimeLoaded=0;var he=Z.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?he=this._currentRedirectedURL:Z.redirectedURL!=null&&(he=Z.redirectedURL));var Pe=this._seekHandler.getConfig(he,ne);this._currentRequestURL=Pe.url;var ze=this._xhr=new XMLHttpRequest;if(ze.open("GET",Pe.url,!0),ze.responseType="arraybuffer",ze.onreadystatechange=this._onReadyStateChange.bind(this),ze.onprogress=this._onProgress.bind(this),ze.onload=this._onLoad.bind(this),ze.onerror=this._onXhrError.bind(this),Z.withCredentials&&(ze.withCredentials=!0),typeof Pe.headers=="object"){var Rt=Pe.headers;for(var Mt in Rt)Rt.hasOwnProperty(Mt)&&ze.setRequestHeader(Mt,Rt[Mt])}if(typeof this._config.headers=="object"){var Ze=this._config.headers;for(var kt in Ze)Ze.hasOwnProperty(kt)&&ze.setRequestHeader(kt,Ze[kt])}ze.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=r.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(Z){var ne=Z.target;if(ne.readyState===2){if(ne.responseURL!=null){var he=this._seekHandler.removeURLParameters(ne.responseURL);ne.responseURL!==this._currentRequestURL&&he!==this._currentRedirectedURL&&(this._currentRedirectedURL=he,this._onURLRedirect&&this._onURLRedirect(he))}if(ne.status>=200&&ne.status<=299){if(this._waitForTotalLength)return;this._status=r.kBuffering}else if(this._status=r.kError,this._onError)this._onError(a.HTTP_STATUS_CODE_INVALID,{code:ne.status,msg:ne.statusText});else throw new d("RangeLoader: Http code invalid, "+ne.status+" "+ne.statusText)}}},{key:"_onProgress",value:function(Z){if(this._status===r.kError)return;if(this._contentLength===null){var ne=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,ne=!0;var he=Z.total;this._internalAbort(),he!=null&he!==0&&(this._totalLength=he)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,ne){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Pe=Z.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Z.loaded,this._speedSampler.addBytes(Pe)}},{key:"_normalizeSpeed",value:function(Z){var ne=this._chunkSizeKBList,he=ne.length-1,Pe=0,ze=0,Rt=he;if(Z=ne[Pe]&&Z=3&&(ne=this._speedSampler.currentKBps)),ne!==0){var he=this._normalizeSpeed(ne);this._currentSpeedNormalized!==he&&(this._currentSpeedNormalized=he,this._currentChunkSizeKB=he)}var Pe=Z.target.response,ze=this._range.from+this._receivedLength;this._receivedLength+=Pe.byteLength;var Rt=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var Pe=Z.split("&"),ze=0;ze0;Rt[0]!==this._startName&&Rt[0]!==this._endName&&(Mt&&(he+="&"),he+=Pe[ze])}return he.length===0?$:$+"?"+he}}]),fe}(),V=O,te=function(){function fe(se,W,$){Object(Q.a)(this,fe),this.TAG="IOController",this._config=W,this._extraData=$,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=se,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(se.url),this._refTotalLength=se.filesize?se.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new P,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(z.a)(fe,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===U?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new B(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var $=W.seekParamStart||"bstart",Z=W.seekParamEnd||"bend";this._seekHandler=new V($,Z)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new o("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new o("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=L;else if(b.isSupported())this._loaderClass=b;else if(f.isSupported())this._loaderClass=f;else if(U.isSupported())this._loaderClass=U;else throw new d("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,$){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer($),this._loader.destroy(),this._loader=null;var Z={from:W,to:-1};this._currentRange={from:Z.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Z),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new o("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var $=this._stashSize;$+1024*1024*10){var ne=new Uint8Array(this._stashBuffer,0,this._stashUsed),he=new Uint8Array(Z,0,$);he.set(ne,0)}this._stashBuffer=Z,this._bufferSize=$}},{key:"_normalizeSpeed",value:function(W){var $=this._speedNormalizeList,Z=$.length-1,ne=0,he=0,Pe=Z;if(W<$[0])return $[0];for(;he<=Pe;){if(ne=he+Math.floor((Pe-he)/2),ne===Z||W>=$[ne]&&W<$[ne+1])return $[ne];$[ne]=512&&W<=1024?$=Math.floor(W*1.5):$=W*2,$>8192&&($=8192);var Z=$*1024+1024*1024*1;this._bufferSize0){var pn=this._stashBuffer.slice(0,this._stashUsed),nn=this._dispatchChunks(pn,this._stashByteStart);if(nn0){var J=new Uint8Array(pn,nn);At.set(J,0),this._stashUsed=J.byteLength,this._stashByteStart+=nn}}else this._stashUsed=0,this._stashByteStart+=nn;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var R=this._dispatchChunks(W,$);if(Rthis._bufferSize&&(this._expandBuffer(k),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array(W,R),0),this._stashUsed+=k,this._stashByteStart=$+R}}}else if(this._stashUsed===0){var Pe=this._dispatchChunks(W,$);if(Pethis._bufferSize&&this._expandBuffer(ze);var Rt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Rt.set(new Uint8Array(W,Pe),0),this._stashUsed+=ze,this._stashByteStart=$+Pe}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var Mt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Mt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var Ze=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Ze0){var kt=new Uint8Array(this._stashBuffer,Ze);Mt.set(kt,0)}this._stashUsed-=Ze,this._stashByteStart+=Ze}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var $=this._stashBuffer.slice(0,this._stashUsed),Z=this._dispatchChunks($,this._stashByteStart),ne=$.byteLength-Z;if(Z<$.byteLength)if(W)N.w(this.TAG,"".concat(ne," bytes unconsumed data remain when flush buffer, dropped"));else{if(Z>0){var he=new Uint8Array(this._stashBuffer,0,this._bufferSize),Pe=new Uint8Array($,Z);he.set(Pe,0),this._stashUsed=Pe.byteLength,this._stashByteStart+=Z}return 0}return this._stashUsed=0,this._stashByteStart=0,ne}return 0}},{key:"_onLoaderComplete",value:function(W,$){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,$){N.e(this.TAG,"Loader error, code = ".concat($.code,", msg = ").concat($.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=a.UNRECOVERABLE_EARLY_EOF);switch(W){case a.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var Z=this._currentRange.to+1;Z0){var $=fe.getConfig();W.emit("change",$)}}},{key:"registerListener",value:function(W){fe.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){fe.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){N.emitter.addListener("log",W),N.emitter.listenerCount("log")>0&&(N.ENABLE_CALLBACK=!0,fe._notifyChange())}},{key:"removeLogListener",value:function(W){N.emitter.removeListener("log",W),N.emitter.listenerCount("log")===0&&(N.ENABLE_CALLBACK=!1,fe._notifyChange())}}]),fe}();xe.emitter=new I.a;var be=xe,Ve=function(){function fe(){Object(Q.a)(this,fe),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(z.a)(fe,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,$=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&W&&$}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var $=this.keyframesIndex,Z=this._search($.times,W);return{index:Z,milliseconds:$.times[Z],fileposition:$.filepositions[Z]}}},{key:"_search",value:function(W,$){var Z=0,ne=W.length-1,he=0,Pe=0,ze=ne;for($=W[he]&&$=128){se.push(String.fromCharCode(ne&65535)),$+=2;continue}}}else if(W[$]<240){if(yt(W,$,2)){var he=(W[$]&15)<<12|(W[$+1]&63)<<6|W[$+2]&63;if(he>=2048&&(he&63488)!==55296){se.push(String.fromCharCode(he&65535)),$+=3;continue}}}else if(W[$]<248&&yt(W,$,3)){var Pe=(W[$]&7)<<18|(W[$+1]&63)<<12|(W[$+2]&63)<<6|W[$+3]&63;if(Pe>65536&&Pe<1114112){Pe-=65536,se.push(String.fromCharCode(Pe>>>10|55296)),se.push(String.fromCharCode(Pe&1023|56320)),$+=4;continue}}}se.push(String.fromCharCode(65533)),++$}return se.join("")}var xt=_t,nt=function(){var fe=new ArrayBuffer(2);return new DataView(fe).setInt16(0,256,!0),new Int16Array(fe)[0]===256}(),ct=function(){function fe(){Object(Q.a)(this,fe)}return Object(z.a)(fe,null,[{key:"parseScriptData",value:function(W,$,Z){var ne={};try{var he=fe.parseValue(W,$,Z),Pe=fe.parseValue(W,$+he.size,Z-he.size);ne[he.data]=Pe.data}catch(ze){N.e("AMF",ze.toString())}return ne}},{key:"parseObject",value:function(W,$,Z){if(Z<3)throw new u("Data not enough when parse ScriptDataObject");var ne=fe.parseString(W,$,Z),he=fe.parseValue(W,$+ne.size,Z-ne.size),Pe=he.objectEnd;return{data:{name:ne.data,value:he.data},size:ne.size+he.size,objectEnd:Pe}}},{key:"parseVariable",value:function(W,$,Z){return fe.parseObject(W,$,Z)}},{key:"parseString",value:function(W,$,Z){if(Z<2)throw new u("Data not enough when parse String");var ne=new DataView(W,$,Z),he=ne.getUint16(0,!nt),Pe;return he>0?Pe=xt(new Uint8Array(W,$+2,he)):Pe="",{data:Pe,size:2+he}}},{key:"parseLongString",value:function(W,$,Z){if(Z<4)throw new u("Data not enough when parse LongString");var ne=new DataView(W,$,Z),he=ne.getUint32(0,!nt),Pe;return he>0?Pe=xt(new Uint8Array(W,$+4,he)):Pe="",{data:Pe,size:4+he}}},{key:"parseDate",value:function(W,$,Z){if(Z<10)throw new u("Data size invalid when parse Date");var ne=new DataView(W,$,Z),he=ne.getFloat64(0,!nt),Pe=ne.getInt16(8,!nt);return he+=Pe*60*1e3,{data:new Date(he),size:8+2}}},{key:"parseValue",value:function(W,$,Z){if(Z<1)throw new u("Data not enough when parse Value");var ne=new DataView(W,$,Z),he=1,Pe=ne.getUint8(0),ze,Rt=!1;try{switch(Pe){case 0:ze=ne.getFloat64(1,!nt),he+=8;break;case 1:{var Mt=ne.getUint8(1);ze=!!Mt,he+=1;break}case 2:{var Ze=fe.parseString(W,$+1,Z-1);ze=Ze.data,he+=Ze.size;break}case 3:{ze={};var kt=0;for((ne.getUint32(Z-4,!nt)&16777215)===9&&(kt=3);he32)throw new o("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var $=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,$}var Z=this._current_word_bits_left?this._current_word:0;Z=Z>>>32-this._current_word_bits_left;var ne=W-this._current_word_bits_left;this._fillCurrentWord();var he=Math.min(ne,this._current_word_bits_left),Pe=this._current_word>>>32-he;return this._current_word<<=he,this._current_word_bits_left-=he,Z=Z<>>W)!==0)return this._current_word<<=W,this._current_word_bits_left-=W,W;return this._fillCurrentWord(),W+this._skipLeadingZero()}},{key:"readUEG",value:function(){var W=this._skipLeadingZero();return this.readBits(W+1)-1}},{key:"readSEG",value:function(){var W=this.readUEG();return W&1?W+1>>>1:-1*(W>>>1)}}]),fe}(),Me=_e,ve=function(){function fe(){Object(Q.a)(this,fe)}return Object(z.a)(fe,null,[{key:"_ebsp2rbsp",value:function(W){for(var $=W,Z=$.byteLength,ne=new Uint8Array(Z),he=0,Pe=0;Pe=2&&($[Pe]===3&&$[Pe-1]===0&&$[Pe-2]===0))continue;ne[he]=$[Pe],he++}return new Uint8Array(ne.buffer,0,he)}},{key:"parseSPS",value:function(W){var $=fe._ebsp2rbsp(W),Z=new Me($);Z.readByte();var ne=Z.readByte();Z.readByte();var he=Z.readByte();Z.readUEG();var Pe=fe.getProfileString(ne),ze=fe.getLevelString(he),Rt=1,Mt=420,Ze=[0,420,422,444],kt=8;if((ne===100||ne===110||ne===122||ne===244||ne===44||ne===83||ne===86||ne===118||ne===128||ne===138||ne===144)&&(Rt=Z.readUEG(),Rt===3&&Z.readBits(1),Rt<=3&&(Mt=Ze[Rt]),kt=Z.readUEG()+8,Z.readUEG(),Z.readBits(1),Z.readBool()))for(var an=Rt!==3?8:12,At=0;At0&&ci<16?(ft=Zi[ci-1],zt=yi[ci-1]):ci===255&&(ft=Z.readByte()<<8|Z.readByte(),zt=Z.readByte()<<8|Z.readByte())}if(Z.readBool()&&Z.readBool(),Z.readBool()&&(Z.readBits(4),Z.readBool()&&Z.readBits(24)),Z.readBool()&&(Z.readUEG(),Z.readUEG()),Z.readBool()){var ri=Z.readBits(32),Ci=Z.readBits(32);Wn=Z.readBool(),Si=Ci,hi=ri*2,on=Si/hi}}var Di=1;(ft!==1||zt!==1)&&(Di=ft/zt);var Oi=0,Ri=0;if(Rt===0)Oi=1,Ri=2-ae;else{var Vi=Rt===3?1:2,dr=Rt===1?2:1;Oi=Vi,Ri=dr*(2-ae)}var rr=(k+1)*16,ji=(2-ae)*((Y+1)*16);rr-=(q+Ie)*Oi,ji-=(ht+Ot)*Ri;var Wi=Math.ceil(rr*Di);return Z.destroy(),Z=null,{profile_string:Pe,level_string:ze,bit_depth:kt,ref_frames:R,chroma_format:Mt,chroma_format_string:fe.getChromaFormatString(Mt),frame_rate:{fixed:Wn,fps:on,fps_den:hi,fps_num:Si},sar_ratio:{width:ft,height:zt},codec_size:{width:rr,height:ji},present_size:{width:Wi,height:ji}}}},{key:"_skipScalingList",value:function(W,$){for(var Z=8,ne=8,he=0,Pe=0;Pe<$;Pe++)ne!==0&&(he=W.readSEG(),ne=(Z+he+256)%256),Z=ne===0?Z:ne}},{key:"getProfileString",value:function(W){switch(W){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(W){return(W/10).toFixed(1)}},{key:"getChromaFormatString",value:function(W){switch(W){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),fe}(),Te=ve,We={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},Je=We;function at(fe){return fe>>>8&255|(fe&255)<<8}function dt(fe){return(fe&4278190080)>>>24|(fe&16711680)>>>8|(fe&65280)<<8|(fe&255)<<24}function Lt(fe,se){return fe[se]<<24|fe[se+1]<<16|fe[se+2]<<8|fe[se+3]}var It=function(){function fe(se,W){Object(Q.a)(this,fe),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=se.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=se.hasAudioTrack,this._hasVideo=se.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new mt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var $=new ArrayBuffer(2);return new DataView($).setInt16(0,256,!0),new Int16Array($)[0]===256}()}return Object(z.a)(fe,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new mt}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,$){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new u("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var Z=0,ne=this._littleEndian;if($===0)if(W.byteLength>13){var he=fe.probe(W);Z=he.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,$+Z!==this._dataOffset&&N.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Pe=new DataView(W,Z),ze=Pe.getUint32(0,!ne);ze!==0&&N.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Z+=4}for(;ZW.byteLength)break;var Mt=Rt.getUint8(0),Ze=Rt.getUint32(0,!ne)&16777215;if(Z+11+Ze+4>W.byteLength)break;if(Mt!==8&&Mt!==9&&Mt!==18){N.w(this.TAG,"Unsupported tag type ".concat(Mt,", skipped")),Z+=11+Ze+4;continue}var kt=Rt.getUint8(4),an=Rt.getUint8(5),At=Rt.getUint8(6),pn=Rt.getUint8(7),nn=At|an<<8|kt<<16|pn<<24,J=Rt.getUint32(7,!ne)&16777215;J!==0&&N.w(this.TAG,"Meet tag which has StreamID != 0!");var R=Z+11;switch(Mt){case 8:this._parseAudioData(W,R,Ze,nn);break;case 9:this._parseVideoData(W,R,Ze,nn,$+Z);break;case 18:this._parseScriptData(W,R,Ze);break}var k=Rt.getUint32(11+Ze,!ne);k!==11+Ze&&N.w(this.TAG,"Invalid PrevTagSize ".concat(k)),Z+=11+Ze+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),Z}},{key:"_parseScriptData",value:function(W,$,Z){var ne=wt.parseScriptData(W,$,Z);if(ne.hasOwnProperty("onMetaData")){if(ne.onMetaData==null||typeof ne.onMetaData!="object"){N.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&N.w(this.TAG,"Found another onMetaData tag!"),this._metadata=ne;var he=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},he)),typeof he.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=he.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof he.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=he.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof he.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=he.audiodatarate),typeof he.videodatarate=="number"&&(this._mediaInfo.videoDataRate=he.videodatarate),typeof he.width=="number"&&(this._mediaInfo.width=he.width),typeof he.height=="number"&&(this._mediaInfo.height=he.height),typeof he.duration=="number"){if(!this._durationOverrided){var Pe=Math.floor(he.duration*this._timescale);this._duration=Pe,this._mediaInfo.duration=Pe}}else this._mediaInfo.duration=0;if(typeof he.framerate=="number"){var ze=Math.floor(he.framerate*1e3);if(ze>0){var Rt=ze/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Rt,this._referenceFrameRate.fps_num=ze,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Rt}}if(typeof he.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Mt=he.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Mt),he.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=he,N.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(ne).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},ne)))}},{key:"_parseKeyframesIndex",value:function(W){for(var $=[],Z=[],ne=1;ne>>4;if(Rt!==2&&Rt!==10){this._onError(Je.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Rt);return}var Mt=0,Ze=(ze&12)>>>2;if(Ze>=0&&Ze<=4)Mt=this._flvSoundRateTable[Ze];else{this._onError(Je.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Ze);return}var kt=(ze&2)>>>1,an=ze&1,At=this._audioMetadata,pn=this._audioTrack;if(At||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),At=this._audioMetadata={},At.type="audio",At.id=pn.id,At.timescale=this._timescale,At.duration=this._duration,At.audioSampleRate=Mt,At.channelCount=an===0?1:2),Rt===10){var nn=this._parseAACAudioData(W,$+1,Z-1);if(nn==null)return;if(nn.packetType===0){At.config&&N.w(this.TAG,"Found another AudioSpecificConfig!");var J=nn.data;At.audioSampleRate=J.samplingRate,At.channelCount=J.channelCount,At.codec=J.codec,At.originalCodec=J.originalCodec,At.config=J.config,At.refSampleDuration=1024/At.audioSampleRate*At.timescale,N.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",At);var R=this._mediaInfo;R.audioCodec=At.originalCodec,R.audioSampleRate=At.audioSampleRate,R.audioChannelCount=At.channelCount,R.hasVideo?R.videoCodec!=null&&(R.mimeType='video/x-flv; codecs="'+R.videoCodec+","+R.audioCodec+'"'):R.mimeType='video/x-flv; codecs="'+R.audioCodec+'"',R.isComplete()&&this._onMediaInfo(R)}else if(nn.packetType===1){var k=this._timestampBase+ne,Y={unit:nn.data,length:nn.data.byteLength,dts:k,pts:k};pn.samples.push(Y),pn.length+=nn.data.length}else N.e(this.TAG,"Flv: Unsupported AAC data type ".concat(nn.packetType))}else if(Rt===2){if(!At.codec){var ae=this._parseMP3AudioData(W,$+1,Z-1,!0);if(ae==null)return;At.audioSampleRate=ae.samplingRate,At.channelCount=ae.channelCount,At.codec=ae.codec,At.originalCodec=ae.originalCodec,At.refSampleDuration=1152/At.audioSampleRate*At.timescale,N.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",At);var q=this._mediaInfo;q.audioCodec=At.codec,q.audioSampleRate=At.audioSampleRate,q.audioChannelCount=At.channelCount,q.audioDataRate=ae.bitRate,q.hasVideo?q.videoCodec!=null&&(q.mimeType='video/x-flv; codecs="'+q.videoCodec+","+q.audioCodec+'"'):q.mimeType='video/x-flv; codecs="'+q.audioCodec+'"',q.isComplete()&&this._onMediaInfo(q)}var Ie=this._parseMP3AudioData(W,$+1,Z-1,!1);if(Ie==null)return;var ht=this._timestampBase+ne,Ot={unit:Ie,length:Ie.byteLength,dts:ht,pts:ht};pn.samples.push(Ot),pn.length+=Ie.length}}},{key:"_parseAACAudioData",value:function(W,$,Z){if(Z<=1){N.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var ne={},he=new Uint8Array(W,$,Z);return ne.packetType=he[0],he[0]===0?ne.data=this._parseAACAudioSpecificConfig(W,$+1,Z-1):ne.data=he.subarray(1),ne}},{key:"_parseAACAudioSpecificConfig",value:function(W,$,Z){var ne=new Uint8Array(W,$,Z),he=null,Pe=0,ze=0,Rt=null,Mt=0,Ze=null;if(Pe=ze=ne[0]>>>3,Mt=(ne[0]&7)<<1|ne[1]>>>7,Mt<0||Mt>=this._mpegSamplingRates.length){this._onError(Je.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var kt=this._mpegSamplingRates[Mt],an=(ne[1]&120)>>>3;if(an<0||an>=8){this._onError(Je.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Pe===5&&(Ze=(ne[1]&7)<<1|ne[2]>>>7,Rt=(ne[2]&124)>>>2);var At=self.navigator.userAgent.toLowerCase();return At.indexOf("firefox")!==-1?Mt>=6?(Pe=5,he=new Array(4),Ze=Mt-3):(Pe=2,he=new Array(2),Ze=Mt):At.indexOf("android")!==-1?(Pe=2,he=new Array(2),Ze=Mt):(Pe=5,Ze=Mt,he=new Array(4),Mt>=6?Ze=Mt-3:an===1&&(Pe=2,he=new Array(2),Ze=Mt)),he[0]=Pe<<3,he[0]|=(Mt&15)>>>1,he[1]=(Mt&15)<<7,he[1]|=(an&15)<<3,Pe===5&&(he[1]|=(Ze&15)>>>1,he[2]=(Ze&1)<<7,he[2]|=2<<2,he[3]=0),{config:he,samplingRate:kt,channelCount:an,codec:"mp4a.40."+Pe,originalCodec:"mp4a.40."+ze}}},{key:"_parseMP3AudioData",value:function(W,$,Z,ne){if(Z<4){N.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var he=this._littleEndian,Pe=new Uint8Array(W,$,Z),ze=null;if(ne){if(Pe[0]!==255)return;var Rt=Pe[1]>>>3&3,Mt=(Pe[1]&6)>>1,Ze=(Pe[2]&240)>>>4,kt=(Pe[2]&12)>>>2,an=Pe[3]>>>6&3,At=an!==3?2:1,pn=0,nn=0,J=34,R="mp3";switch(Rt){case 0:pn=this._mpegAudioV25SampleRateTable[kt];break;case 2:pn=this._mpegAudioV20SampleRateTable[kt];break;case 3:pn=this._mpegAudioV10SampleRateTable[kt];break}switch(Mt){case 1:J=34,Ze>>4,Rt=Pe&15;if(Rt!==7){this._onError(Je.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(Rt));return}this._parseAVCVideoPacket(W,$+1,Z-1,ne,he,ze)}},{key:"_parseAVCVideoPacket",value:function(W,$,Z,ne,he,Pe){if(Z<4){N.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var ze=this._littleEndian,Rt=new DataView(W,$,Z),Mt=Rt.getUint8(0),Ze=Rt.getUint32(0,!ze)&16777215,kt=Ze<<8>>8;if(Mt===0)this._parseAVCDecoderConfigurationRecord(W,$+4,Z-4);else if(Mt===1)this._parseAVCVideoData(W,$+4,Z-4,ne,he,Pe,kt);else if(!(Mt===2)){this._onError(Je.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Mt));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,$,Z){if(Z<7){N.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var ne=this._videoMetadata,he=this._videoTrack,Pe=this._littleEndian,ze=new DataView(W,$,Z);ne?typeof ne.avcc!="undefined"&&N.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),ne=this._videoMetadata={},ne.type="video",ne.id=he.id,ne.timescale=this._timescale,ne.duration=this._duration);var Rt=ze.getUint8(0),Mt=ze.getUint8(1),Ze=ze.getUint8(2),kt=ze.getUint8(3);if(Rt!==1||Mt===0){this._onError(Je.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(ze.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Je.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var an=ze.getUint8(5)&31;if(an===0){this._onError(Je.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else an>1&&N.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(an));for(var At=6,pn=0;pn1&&N.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat($t));At++;for(var ft=0;ft<$t;ft++){var zt=ze.getUint16(At,!Pe);if(At+=2,zt===0)continue;At+=zt}ne.avcc=new Uint8Array(Z),ne.avcc.set(new Uint8Array(W,$,Z),0),N.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",ne)}},{key:"_parseAVCVideoData",value:function(W,$,Z,ne,he,Pe,ze){for(var Rt=this._littleEndian,Mt=new DataView(W,$,Z),Ze=[],kt=0,an=0,At=this._naluLengthSize,pn=this._timestampBase+ne,nn=Pe===1;an=Z){N.w(this.TAG,"Malformed Nalu near timestamp ".concat(pn,", offset = ").concat(an,", dataSize = ").concat(Z));break}var J=Mt.getUint32(an,!Rt);if(At===3&&(J>>>=8),J>Z-At){N.w(this.TAG,"Malformed Nalus near timestamp ".concat(pn,", NaluSize > DataSize!"));return}var R=Mt.getUint8(an+At)&31;R===5&&(nn=!0);var k=new Uint8Array(W,$+an,At+J),Y={type:R,data:k};Ze.push(Y),kt+=k.byteLength,an+=At+J}if(Ze.length){var ae=this._videoTrack,q={units:Ze,length:kt,isKeyframe:nn,dts:pn,cts:ze,pts:pn+ze};nn&&(q.fileposition=he),ae.samples.push(q),ae.length+=kt}}}],[{key:"probe",value:function(W){var $=new Uint8Array(W),Z={match:!1};if($[0]!==70||$[1]!==76||$[2]!==86||$[3]!==1)return Z;var ne=($[4]&4)>>>2!==0,he=($[4]&1)!==0,Pe=Lt($,5);return Pe<9?Z:{match:!0,consumed:Pe,dataOffset:Pe,hasAudioTrack:ne,hasVideoTrack:he}}}]),fe}(),Ne=It,ke=function(){function fe(){Object(Q.a)(this,fe)}return Object(z.a)(fe,null,[{key:"init",value:function(){fe.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in fe.types)fe.types.hasOwnProperty(W)&&(fe.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var $=fe.constants={};$.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),$.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),$.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),$.STSC=$.STCO=$.STTS,$.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),$.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),$.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),$.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),$.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var $=8,Z=null,ne=Array.prototype.slice.call(arguments,1),he=ne.length,Pe=0;Pe>>24&255,Z[1]=$>>>16&255,Z[2]=$>>>8&255,Z[3]=$&255,Z.set(W,4);for(var ze=8,Rt=0;Rt>>24&255,W>>>16&255,W>>>8&255,W&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(W){return fe.box(fe.types.trak,fe.tkhd(W),fe.mdia(W))}},{key:"tkhd",value:function(W){var $=W.id,Z=W.duration,ne=W.presentWidth,he=W.presentHeight;return fe.box(fe.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&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,ne>>>8&255,ne&255,0,0,he>>>8&255,he&255,0,0]))}},{key:"mdia",value:function(W){return fe.box(fe.types.mdia,fe.mdhd(W),fe.hdlr(W),fe.minf(W))}},{key:"mdhd",value:function(W){var $=W.timescale,Z=W.duration;return fe.box(fe.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var $=null;return W.type==="audio"?$=fe.constants.HDLR_AUDIO:$=fe.constants.HDLR_VIDEO,fe.box(fe.types.hdlr,$)}},{key:"minf",value:function(W){var $=null;return W.type==="audio"?$=fe.box(fe.types.smhd,fe.constants.SMHD):$=fe.box(fe.types.vmhd,fe.constants.VMHD),fe.box(fe.types.minf,$,fe.dinf(),fe.stbl(W))}},{key:"dinf",value:function(){var W=fe.box(fe.types.dinf,fe.box(fe.types.dref,fe.constants.DREF));return W}},{key:"stbl",value:function(W){var $=fe.box(fe.types.stbl,fe.stsd(W),fe.box(fe.types.stts,fe.constants.STTS),fe.box(fe.types.stsc,fe.constants.STSC),fe.box(fe.types.stsz,fe.constants.STSZ),fe.box(fe.types.stco,fe.constants.STCO));return $}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.mp3(W)):fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.mp4a(W)):fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.avc1(W))}},{key:"mp3",value:function(W){var $=W.channelCount,Z=W.audioSampleRate,ne=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,$,0,16,0,0,0,0,Z>>>8&255,Z&255,0,0]);return fe.box(fe.types[".mp3"],ne)}},{key:"mp4a",value:function(W){var $=W.channelCount,Z=W.audioSampleRate,ne=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,$,0,16,0,0,0,0,Z>>>8&255,Z&255,0,0]);return fe.box(fe.types.mp4a,ne,fe.esds(W))}},{key:"esds",value:function(W){var $=W.config||[],Z=$.length,ne=new Uint8Array([0,0,0,0,3,23+Z,0,1,0,4,15+Z,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Z]).concat($).concat([6,1,2]));return fe.box(fe.types.esds,ne)}},{key:"avc1",value:function(W){var $=W.avcc,Z=W.codecWidth,ne=W.codecHeight,he=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,Z>>>8&255,Z&255,ne>>>8&255,ne&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return fe.box(fe.types.avc1,he,fe.box(fe.types.avcC,$))}},{key:"mvex",value:function(W){return fe.box(fe.types.mvex,fe.trex(W))}},{key:"trex",value:function(W){var $=W.id,Z=new Uint8Array([0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return fe.box(fe.types.trex,Z)}},{key:"moof",value:function(W,$){return fe.box(fe.types.moof,fe.mfhd(W.sequenceNumber),fe.traf(W,$))}},{key:"mfhd",value:function(W){var $=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return fe.box(fe.types.mfhd,$)}},{key:"traf",value:function(W,$){var Z=W.id,ne=fe.box(fe.types.tfhd,new Uint8Array([0,0,0,0,Z>>>24&255,Z>>>16&255,Z>>>8&255,Z&255])),he=fe.box(fe.types.tfdt,new Uint8Array([0,0,0,0,$>>>24&255,$>>>16&255,$>>>8&255,$&255])),Pe=fe.sdtp(W),ze=fe.trun(W,Pe.byteLength+16+16+8+16+8+8);return fe.box(fe.types.traf,ne,he,ze,Pe)}},{key:"sdtp",value:function(W){for(var $=W.samples||[],Z=$.length,ne=new Uint8Array(4+Z),he=0;he>>24&255,ne>>>16&255,ne>>>8&255,ne&255,$>>>24&255,$>>>16&255,$>>>8&255,$&255],0);for(var ze=0;ze>>24&255,Rt>>>16&255,Rt>>>8&255,Rt&255,Mt>>>24&255,Mt>>>16&255,Mt>>>8&255,Mt&255,Ze.isLeading<<2|Ze.dependsOn,Ze.isDependedOn<<6|Ze.hasRedundancy<<4|Ze.isNonSync,0,0,kt>>>24&255,kt>>>16&255,kt>>>8&255,kt&255],12+16*ze)}return fe.box(fe.types.trun,Pe)}},{key:"mdat",value:function(W){return fe.box(fe.types.mdat,W)}}]),fe}();ke.init();var it=ke,ot=function(){function fe(){Object(Q.a)(this,fe)}return Object(z.a)(fe,null,[{key:"getSilentFrame",value:function(W,$){if(W==="mp4a.40.2"){if($===1)return new Uint8Array([0,200,0,128,35,128]);if($===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if($===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if($===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if($===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($===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if($===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($===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($===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),fe}(),Ge=ot,$e=function fe(se,W,$,Z,ne){Object(Q.a)(this,fe),this.dts=se,this.pts=W,this.duration=$,this.originalDts=Z,this.isSyncPoint=ne,this.fileposition=null},we=function(){function fe(){Object(Q.a)(this,fe),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(z.a)(fe,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),fe}(),Se=function(){function fe(){Object(Q.a)(this,fe),this._list=[]}return Object(z.a)(fe,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var $=this._list;if(W.length===0)return;$.length>0&&W[0].originalDts<$[$.length-1].originalDts&&this.clear(),Array.prototype.push.apply($,W)}},{key:"getLastSyncPointBeforeDts",value:function(W){if(this._list.length==0)return null;var $=this._list,Z=0,ne=$.length-1,he=0,Pe=0,ze=ne;for(W<$[0].dts&&(Z=0,Pe=ze+1);Pe<=ze;)if(he=Pe+Math.floor((ze-Pe)/2),he===ne||W>=$[he].dts&&W<$[he+1].dts){Z=he;break}else $[he].dts$[ne].lastSample.originalDts&&W<$[ne+1].originalBeginDts){ze=ne;break}else $[ne].originalBeginDts=$[ne].lastSample.originalDts&&(ne===$.length-1||ne<$.length-1&&Z.originalBeginDts<$[ne+1].originalBeginDts)?he=ne+1:$.length>0&&(he=this._searchNearestSegmentBefore(Z.originalBeginDts)+1),this._lastAppendLocation=he,this._list.splice(he,0,Z)}},{key:"getLastSegmentBefore",value:function(W){var $=this._searchNearestSegmentBefore(W);return $>=0?this._list[$]:null}},{key:"getLastSampleBefore",value:function(W){var $=this.getLastSegmentBefore(W);return $!=null?$.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var $=this._searchNearestSegmentBefore(W),Z=this._list[$].syncPoints;Z.length===0&&$>0;)$--,Z=this._list[$].syncPoints;return Z.length>0?Z[Z.length-1]:null}}]),fe}(),ue=function(){function fe(se){Object(Q.a)(this,fe),this.TAG="MP4Remuxer",this._config=se,this._isLive=se.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ee("audio"),this._videoSegmentInfoList=new Ee("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(w.chrome&&(w.version.major<50||w.version.major===50&&w.version.build<2661)),this._fillSilentAfterSeek=w.msedge||w.msie,this._mp3UseMpegAudio=!w.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(z.a)(fe,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,$){if(!this._onMediaSegment)throw new u("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,$),this._remuxVideo($),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,$){var Z=null,ne="mp4",he=$.codec;if(W==="audio")this._audioMeta=$,$.codec==="mp3"&&this._mp3UseMpegAudio?(ne="mpeg",he="",Z=new Uint8Array):Z=it.generateInitSegment($);else if(W==="video")this._videoMeta=$,Z=it.generateInitSegment($);else return;if(!this._onInitSegment)throw new u("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:Z.buffer,codec:he,container:"".concat(W,"/").concat(ne),mediaDuration:$.duration})}},{key:"_calculateDtsBase",value:function(W,$){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),$.samples&&$.samples.length&&(this._videoDtsBase=$.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,$=this._audioStashedLastSample,Z={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(Z.samples.push(W),Z.length=W.length);var ne={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};$!=null&&(ne.samples.push($),ne.length=$.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Z,!0),this._remuxAudio(ne,!0)}},{key:"_remuxAudio",value:function(W,$){if(this._audioMeta==null)return;var Z=W,ne=Z.samples,he=void 0,Pe=-1,ze=-1,Rt=-1,Mt=this._audioMeta.refSampleDuration,Ze=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,kt=this._dtsBaseInited&&this._audioNextDts===void 0,an=!1;if(!ne||ne.length===0)return;if(ne.length===1&&!$)return;var At=0,pn=null,nn=0;Ze?(At=0,nn=Z.length):(At=8,nn=8+Z.length);var J=null;if(ne.length>1&&(J=ne.pop(),nn-=J.length),this._audioStashedLastSample!=null){var R=this._audioStashedLastSample;this._audioStashedLastSample=null,ne.unshift(R),nn+=R.length}J!=null&&(this._audioStashedLastSample=J);var k=ne[0].dts-this._dtsBase;if(this._audioNextDts)he=k-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())he=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(an=!0));else{var Y=this._audioSegmentInfoList.getLastSampleBefore(k);if(Y!=null){var ae=k-(Y.originalDts+Y.duration);ae<=3&&(ae=0);var q=Y.dts+Y.duration+ae;he=k-q}else he=0}if(an){var Ie=k-he,ht=this._videoSegmentInfoList.getLastSegmentBefore(k);if(ht!=null&&ht.beginDts=1?ci=zt[zt.length-1].duration:ci=Math.floor(Mt);var ri=!1,Ci=null;if(ci>Mt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!w.safari){ri=!0;var Di=Math.abs(ci-Mt),Oi=Math.ceil(Di/Mt),Ri=Fn+Mt;N.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(Fn+ci," ms, expected: ").concat(Fn+Math.round(Mt)," ms, ")+"delta: ".concat(Math.round(Di)," ms, generate: ").concat(Oi," frames"));var Vi=Ge.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Vi==null&&(N.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Vi=Si),Ci=[];for(var dr=0;dr0){var ji=Ci[Ci.length-1];ji.duration=rr-ji.dts}var Wi={dts:rr,pts:rr,cts:0,unit:Vi,size:Vi.byteLength,duration:0,originalDts:hi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Ci.push(Wi),nn+=Wi.size,Ri+=Mt}var hr=Ci[Ci.length-1];hr.duration=Fn+ci-hr.dts,ci=Math.round(Mt)}zt.push({dts:Fn,pts:Fn,cts:0,unit:Wn.unit,size:Wn.unit.byteLength,duration:ci,originalDts:hi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ri&&zt.push.apply(zt,Ci)}Ze?pn=new Uint8Array(nn):(pn=new Uint8Array(nn),pn[0]=nn>>>24&255,pn[1]=nn>>>16&255,pn[2]=nn>>>8&255,pn[3]=nn&255,pn.set(it.types.mdat,4));for(var Tr=0;Tr1&&(At=ne.pop(),an-=At.length),this._videoStashedLastSample!=null){var pn=this._videoStashedLastSample;this._videoStashedLastSample=null,ne.unshift(pn),an+=pn.length}At!=null&&(this._videoStashedLastSample=At);var nn=ne[0].dts-this._dtsBase;if(this._videoNextDts)he=nn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())he=0;else{var J=this._videoSegmentInfoList.getLastSampleBefore(nn);if(J!=null){var R=nn-(J.originalDts+J.duration);R<=3&&(R=0);var k=J.dts+J.duration+R;he=nn-k}else he=0}for(var Y=new we,ae=[],q=0;q=1?on=ae[ae.length-1].duration:on=Math.floor(this._videoMeta.refSampleDuration);if(Ot){var hi=new $e($t,zt,on,Ie.dts,!0);hi.fileposition=Ie.fileposition,Y.appendSyncPoint(hi)}ae.push({dts:$t,pts:zt,cts:ft,units:Ie.units,size:Ie.length,isKeyframe:Ot,duration:on,originalDts:ht,flags:{isLeading:0,dependsOn:Ot?2:1,isDependedOn:Ot?1:0,hasRedundancy:0,isNonSync:Ot?0:1}})}kt=new Uint8Array(an),kt[0]=an>>>24&255,kt[1]=an>>>16&255,kt[2]=an>>>8&255,kt[3]=an&255,kt.set(it.types.mdat,4);for(var Fn=0;Fn0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,he=this._demuxer.parseChunks(W,$);else if((ne=Ne.probe(W)).match){this._demuxer=new Ne(ne,this._config),this._remuxer||(this._remuxer=new de(this._config));var Pe=this._mediaDataSource;Pe.duration!=null&&!isNaN(Pe.duration)&&(this._demuxer.overridedDuration=Pe.duration),typeof Pe.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Pe.hasAudio),typeof Pe.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Pe.hasVideo),this._demuxer.timestampBase=Pe.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),he=this._demuxer.parseChunks(W,$)}else ne=null,N.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){Z._internalAbort()}),this._emitter.emit(me.DEMUX_ERROR,Je.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),he=0;return he}},{key:"_onMediaInfo",value:function(W){var $=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,mt.prototype));var Z=Object.assign({},W);Object.setPrototypeOf(Z,mt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Z,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var ne=$._pendingSeekTime;$._pendingSeekTime=null,$.seek(ne)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(me.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(me.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var $=W,Z=$+1;Z0&&Z[0].originalDts===ne&&(ne=Z[0].pts),this._emitter.emit(me.RECOMMEND_SEEKPOINT,ne)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var $=this._mediaInfo.segments[W],Z=Object.assign({},$);Z.duration=this._mediaInfo.duration,Z.segmentCount=this._mediaInfo.segmentCount,delete Z.segments,delete Z.keyframesIndex,this._emitter.emit(me.MEDIA_INFO,Z)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(me.STATISTICS_INFO,W)}}]),fe}(),Xe=Le,ut=function(se){var W="TransmuxingWorker",$=null,Z=nn.bind(this);X.install(),se.addEventListener("message",function(J){switch(J.data.cmd){case"init":$=new Xe(J.data.param[0],J.data.param[1]),$.on(me.IO_ERROR,an.bind(this)),$.on(me.DEMUX_ERROR,At.bind(this)),$.on(me.INIT_SEGMENT,ne.bind(this)),$.on(me.MEDIA_SEGMENT,he.bind(this)),$.on(me.LOADING_COMPLETE,Pe.bind(this)),$.on(me.RECOVERED_EARLY_EOF,ze.bind(this)),$.on(me.MEDIA_INFO,Rt.bind(this)),$.on(me.METADATA_ARRIVED,Mt.bind(this)),$.on(me.SCRIPTDATA_ARRIVED,Ze.bind(this)),$.on(me.STATISTICS_INFO,kt.bind(this)),$.on(me.RECOMMEND_SEEKPOINT,pn.bind(this));break;case"destroy":$&&($.destroy(),$=null),se.postMessage({msg:"destroyed"});break;case"start":$.start();break;case"stop":$.stop();break;case"seek":$.seek(J.data.param);break;case"pause":$.pause();break;case"resume":$.resume();break;case"logging_config":{var R=J.data.param;be.applyConfig(R),R.enableCallback===!0?be.addLogListener(Z):be.removeLogListener(Z);break}}});function ne(J,R){var k={msg:me.INIT_SEGMENT,data:{type:J,data:R}};se.postMessage(k,[R.data])}function he(J,R){var k={msg:me.MEDIA_SEGMENT,data:{type:J,data:R}};se.postMessage(k,[R.data])}function Pe(){var J={msg:me.LOADING_COMPLETE};se.postMessage(J)}function ze(){var J={msg:me.RECOVERED_EARLY_EOF};se.postMessage(J)}function Rt(J){var R={msg:me.MEDIA_INFO,data:J};se.postMessage(R)}function Mt(J){var R={msg:me.METADATA_ARRIVED,data:J};se.postMessage(R)}function Ze(J){var R={msg:me.SCRIPTDATA_ARRIVED,data:J};se.postMessage(R)}function kt(J){var R={msg:me.STATISTICS_INFO,data:J};se.postMessage(R)}function an(J,R){se.postMessage({msg:me.IO_ERROR,data:{type:J,info:R}})}function At(J,R){se.postMessage({msg:me.DEMUX_ERROR,data:{type:J,info:R}})}function pn(J){se.postMessage({msg:me.RECOMMEND_SEEKPOINT,data:J})}function nn(J,R){se.postMessage({msg:"logcat_callback",data:{type:J,logcat:R}})}},Dt=ut,jt=function(){function fe(se,W){if(Object(Q.a)(this,fe),this.TAG="Transmuxer",this._emitter=new I.a,W.enableWorker&&typeof Worker!="undefined")try{var $=D("0r65");this._worker=$(Dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[se,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},be.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:be.getConfig()})}catch(ne){N.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Xe(se,W)}else this._controller=new Xe(se,W);if(this._controller){var Z=this._controller;Z.on(me.IO_ERROR,this._onIOError.bind(this)),Z.on(me.DEMUX_ERROR,this._onDemuxError.bind(this)),Z.on(me.INIT_SEGMENT,this._onInitSegment.bind(this)),Z.on(me.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Z.on(me.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Z.on(me.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Z.on(me.MEDIA_INFO,this._onMediaInfo.bind(this)),Z.on(me.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Z.on(me.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Z.on(me.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Z.on(me.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(z.a)(fe,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),be.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,$){this._emitter.addListener(W,$)}},{key:"off",value:function(W,$){this._emitter.removeListener(W,$)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,$){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(me.INIT_SEGMENT,W,$)})}},{key:"_onMediaSegment",value:function(W,$){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(me.MEDIA_SEGMENT,W,$)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(me.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(me.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var $=this;Promise.resolve().then(function(){$._emitter.emit(me.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var $=this;Promise.resolve().then(function(){$._emitter.emit(me.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var $=this;Promise.resolve().then(function(){$._emitter.emit(me.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var $=this;Promise.resolve().then(function(){$._emitter.emit(me.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,$){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(me.IO_ERROR,W,$)})}},{key:"_onDemuxError",value:function(W,$){var Z=this;Promise.resolve().then(function(){Z._emitter.emit(me.DEMUX_ERROR,W,$)})}},{key:"_onRecommendSeekpoint",value:function(W){var $=this;Promise.resolve().then(function(){$._emitter.emit(me.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var $=W.data,Z=$.data;if($.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch($.msg){case me.INIT_SEGMENT:case me.MEDIA_SEGMENT:this._emitter.emit($.msg,Z.type,Z.data);break;case me.LOADING_COMPLETE:case me.RECOVERED_EARLY_EOF:this._emitter.emit($.msg);break;case me.MEDIA_INFO:Object.setPrototypeOf(Z,mt.prototype),this._emitter.emit($.msg,Z);break;case me.METADATA_ARRIVED:case me.SCRIPTDATA_ARRIVED:case me.STATISTICS_INFO:this._emitter.emit($.msg,Z);break;case me.IO_ERROR:case me.DEMUX_ERROR:this._emitter.emit($.msg,Z.type,Z.info);break;case me.RECOMMEND_SEEKPOINT:this._emitter.emit($.msg,Z);break;case"logcat_callback":N.emitter.emit("log",Z.type,Z.logcat);break;default:break}}}]),fe}(),Ut=jt,Ct={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},et=Ct,st=function(){function fe(se){Object(Q.a)(this,fe),this.TAG="MSEController",this._config=se,this._emitter=new I.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Se}return Object(z.a)(fe,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,$){this._emitter.addListener(W,$)}},{key:"off",value:function(W,$){this._emitter.removeListener(W,$)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new u("MediaSource has been attached to an HTMLMediaElement!");var $=this._mediaSource=new window.MediaSource;$.addEventListener("sourceopen",this.e.onSourceOpen),$.addEventListener("sourceended",this.e.onSourceEnded),$.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var $ in this._sourceBuffers){var Z=this._pendingSegments[$];Z.splice(0,Z.length),this._pendingSegments[$]=null,this._pendingRemoveRanges[$]=null,this._lastInitSegments[$]=null;var ne=this._sourceBuffers[$];if(ne){if(W.readyState!=="closed"){try{W.removeSourceBuffer(ne)}catch(he){N.e(this.TAG,he.message)}ne.removeEventListener("error",this.e.onSourceBufferError),ne.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[$]=null,this._sourceBuffers[$]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(he){N.e(this.TAG,he.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,$){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var Z=W,ne="".concat(Z.container);Z.codec&&Z.codec.length>0&&(ne+=";codecs=".concat(Z.codec));var he=!1;if(N.v(this.TAG,"Received Initialization Segment, mimeType: "+ne),this._lastInitSegments[Z.type]=Z,ne!==this._mimeTypes[Z.type]){if(this._mimeTypes[Z.type])N.v(this.TAG,"Notice: ".concat(Z.type," mimeType changed, origin: ").concat(this._mimeTypes[Z.type],", target: ").concat(ne));else{he=!0;try{var Pe=this._sourceBuffers[Z.type]=this._mediaSource.addSourceBuffer(ne);Pe.addEventListener("error",this.e.onSourceBufferError),Pe.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(ze){N.e(this.TAG,ze.message),this._emitter.emit(et.ERROR,{code:ze.code,msg:ze.message});return}}this._mimeTypes[Z.type]=ne}$||this._pendingSegments[Z.type].push(Z),he||this._sourceBuffers[Z.type]&&!this._sourceBuffers[Z.type].updating&&this._doAppendSegments(),w.safari&&Z.container==="audio/mpeg"&&Z.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Z.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var $=W;this._pendingSegments[$.type].push($),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var Z=this._sourceBuffers[$.type];Z&&!Z.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var $ in this._sourceBuffers){if(!this._sourceBuffers[$])continue;var Z=this._sourceBuffers[$];if(this._mediaSource.readyState==="open")try{Z.abort()}catch(Mt){N.e(this.TAG,Mt.message)}this._idrList.clear();var ne=this._pendingSegments[$];if(ne.splice(0,ne.length),this._mediaSource.readyState==="closed")continue;for(var he=0;he=1&&W-ne.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var $ in this._sourceBuffers){var Z=this._sourceBuffers[$];if(Z){for(var ne=Z.buffered,he=!1,Pe=0;Pe=this._config.autoCleanupMaxBackwardDuration){he=!0;var Mt=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[$].push({start:ze,end:Mt})}}else Rt0&&(isNaN($)||Z>$)&&(N.v(this.TAG,"Update MediaSource duration from ".concat($," to ").concat(Z)),this._mediaSource.duration=Z),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var $=this._sourceBuffers[W],Z=this._pendingRemoveRanges[W];Z.length&&!$.updating;){var ne=Z.shift();$.remove(ne.start,ne.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var $ in W){if(!this._sourceBuffers[$]||this._sourceBuffers[$].updating)continue;if(W[$].length>0){var Z=W[$].shift();if(Z.timestampOffset){var ne=this._sourceBuffers[$].timestampOffset,he=Z.timestampOffset/1e3,Pe=Math.abs(ne-he);Pe>.1&&(N.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(ne," to ").concat(he)),this._sourceBuffers[$].timestampOffset=he),delete Z.timestampOffset}if(!Z.data||Z.data.byteLength===0)continue;try{this._sourceBuffers[$].appendBuffer(Z.data),this._isBufferFull=!1,$==="video"&&Z.hasOwnProperty("info")&&this._idrList.appendArray(Z.info.syncPoints)}catch(ze){this._pendingSegments[$].unshift(Z),ze.code===22?(this._isBufferFull||this._emitter.emit(et.BUFFER_FULL),this._isBufferFull=!0):(N.e(this.TAG,ze.message),this._emitter.emit(et.ERROR,{code:ze.code,msg:ze.message}))}}}}},{key:"_onSourceOpen",value:function(){if(N.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var $=W.shift();this.appendInitSegment($,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(et.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){N.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){N.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(et.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){N.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),fe}(),He=st,pe={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Re={NETWORK_EXCEPTION:a.EXCEPTION,NETWORK_STATUS_CODE_INVALID:a.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:a.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:a.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Je.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Je.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Je.CODEC_UNSUPPORTED},lt=function(){function fe(se,W){if(Object(Q.a)(this,fe),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new I.a,this._config=Ae(),typeof W=="object"&&Object.assign(this._config,W),se.type.toLowerCase()!=="flv")throw new o("FlvPlayer requires an flv MediaDataSource input!");se.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=se,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var $=w.chrome&&(w.version.major<50||w.version.major===50&&w.version.build<2661);this._alwaysSeekKeyframe=!!($||w.msedge||w.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(z.a)(fe,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,$){var Z=this;W===Ue.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){Z._emitter.emit(Ue.MEDIA_INFO,Z.mediaInfo)}):W===Ue.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){Z._emitter.emit(Ue.STATISTICS_INFO,Z.statisticsInfo)})),this._emitter.addListener(W,$)}},{key:"off",value:function(W,$){this._emitter.removeListener(W,$)}},{key:"attachMediaElement",value:function(W){var $=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new He(this._config),this._msectl.on(et.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(et.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(et.SOURCE_OPEN,function(){$._mseSourceOpened=!0,$._hasPendingLoad&&($._hasPendingLoad=!1,$.load())}),this._msectl.on(et.ERROR,function(Z){$._emitter.emit(Ue.ERROR,pe.MEDIA_ERROR,Re.MEDIA_MSE_ERROR,Z)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Z){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new u("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new u("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Ut(this._mediaDataSource,this._config),this._transmuxer.on(me.INIT_SEGMENT,function($,Z){W._msectl.appendInitSegment(Z)}),this._transmuxer.on(me.MEDIA_SEGMENT,function($,Z){if(W._msectl.appendMediaSegment(Z),W._config.lazyLoad&&!W._config.isLive){var ne=W._mediaElement.currentTime;Z.info.endDts>=(ne+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(N.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(me.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Ue.LOADING_COMPLETE)}),this._transmuxer.on(me.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Ue.RECOVERED_EARLY_EOF)}),this._transmuxer.on(me.IO_ERROR,function($,Z){W._emitter.emit(Ue.ERROR,pe.NETWORK_ERROR,$,Z)}),this._transmuxer.on(me.DEMUX_ERROR,function($,Z){W._emitter.emit(Ue.ERROR,pe.MEDIA_ERROR,$,{code:-1,msg:Z})}),this._transmuxer.on(me.MEDIA_INFO,function($){W._mediaInfo=$,W._emitter.emit(Ue.MEDIA_INFO,Object.assign({},$))}),this._transmuxer.on(me.METADATA_ARRIVED,function($){W._emitter.emit(Ue.METADATA_ARRIVED,$)}),this._transmuxer.on(me.SCRIPTDATA_ARRIVED,function($){W._emitter.emit(Ue.SCRIPTDATA_ARRIVED,$)}),this._transmuxer.on(me.STATISTICS_INFO,function($){W._statisticsInfo=W._fillStatisticsInfo($),W._emitter.emit(Ue.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(me.RECOMMEND_SEEKPOINT,function($){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=$/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var $=!0,Z=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var he=this._mediaElement.getVideoPlaybackQuality();Z=he.totalVideoFrames,ne=he.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Z=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):$=!1;return $&&(W.decodedFrames=Z,W.droppedFrames=ne),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,$=this._mediaElement.currentTime,Z=0,ne=0,he=0;he=$+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(N.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){N.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var W=this._mediaElement.currentTime,$=this._mediaElement.buffered,Z=!1,ne=0;ne<$.length;ne++){var he=$.start(ne),Pe=$.end(ne);if(W>=he&&W=Pe-this._config.lazyLoadRecoverDuration&&(Z=!0);break}}Z&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Z&&(N.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var $=this._mediaElement.buffered,Z=0;Z<$.length;Z++){var ne=$.start(Z),he=$.end(Z);if(W>=ne&&W0){var he=this._mediaElement.buffered.start(0);(he<1&&W0&&$.currentTime0){var ne=Z.start(0);if(ne<1&&$0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._mediaElement.currentTime=W:this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){var W=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",$={mimeType:W+this._mediaDataSource.type};return this._mediaElement&&($.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&($.width=this._mediaElement.videoWidth,$.height=this._mediaElement.videoHeight)),$}},{key:"statisticsInfo",get:function(){var W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var $=!0,Z=0,ne=0;if(this._mediaElement.getVideoPlaybackQuality){var he=this._mediaElement.getVideoPlaybackQuality();Z=he.totalVideoFrames,ne=he.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Z=this._mediaElement.webkitDecodedFrameCount,ne=this._mediaElement.webkitDroppedFrameCount):$=!1;return $&&(W.decodedFrames=Z,W.droppedFrames=ne),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ue.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ue.STATISTICS_INFO,this.statisticsInfo)}}]),fe}(),Nt=Pt;X.install();function Ke(fe,se){var W=fe;if(W==null||typeof W!="object")throw new o("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new o("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Ye(W,se);default:return new Nt(W,se)}}function gt(){return Ce.supportMSEH264Playback()}function bt(){return Ce.getFeatureList()}var Tt={};Tt.createPlayer=Ke,Tt.isSupported=gt,Tt.getFeatureList=bt,Tt.BaseLoader=i,Tt.LoaderStatus=r,Tt.LoaderErrors=a,Tt.Events=Ue,Tt.ErrorTypes=pe,Tt.ErrorDetails=Re,Tt.FlvPlayer=Ye,Tt.NativePlayer=Nt,Tt.LoggingControl=be,Object.defineProperty(Tt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Wt=le.a=Tt},GgEA:function(Be,le,D){},Gytx:function(Be,le){Be.exports=function(Q,z,M,X){var F=M?M.call(X,Q,z):void 0;if(F!==void 0)return!!F;if(Q===z)return!0;if(typeof Q!="object"||!Q||typeof z!="object"||!z)return!1;var I=Object.keys(Q),H=Object.keys(z);if(I.length!==H.length)return!1;for(var N=Object.prototype.hasOwnProperty.bind(z),n=0;n>>6)+n(128|U&63):n(224|U>>>12&15)+n(128|U>>>6&63)+n(128|U&63)}else{var U=65536+(_.charCodeAt(0)-55296)*1024+(_.charCodeAt(1)-56320);return n(240|U>>>18&7)+n(128|U>>>12&63)+n(128|U>>>6&63)+n(128|U&63)}},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,m=function(_){return _.replace(p,P)},d=function(_){var U=[0,2,1][_.length%3],j=_.charCodeAt(0)<<16|(_.length>1?_.charCodeAt(1):0)<<8|(_.length>2?_.charCodeAt(2):0),L=[H.charAt(j>>>18),H.charAt(j>>>12&63),U>=2?"=":H.charAt(j>>>6&63),U>=1?"=":H.charAt(j&63)];return L.join("")},u=X.btoa&&typeof X.btoa=="function"?function(_){return X.btoa(_)}:function(_){if(_.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return _.replace(/[\s\S]{1,3}/g,d)},o=function(_){return u(m(String(_)))},h=function(_){return _.replace(/[+\/]/g,function(U){return U=="+"?"-":"_"}).replace(/=/g,"")},r=function(_,U){return U?h(o(_)):o(_)},a=function(_){return r(_,!0)},i;X.Uint8Array&&(i=function(_,U){for(var j="",L=0,G=_.length;L>>18)+H.charAt(te>>>12&63)+(typeof O!="undefined"?H.charAt(te>>>6&63):"=")+(typeof V!="undefined"?H.charAt(te&63):"=")}return U?h(j):j});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(_){switch(_.length){case 4:var U=(7&_.charCodeAt(0))<<18|(63&_.charCodeAt(1))<<12|(63&_.charCodeAt(2))<<6|63&_.charCodeAt(3),j=U-65536;return n((j>>>10)+55296)+n((j&1023)+56320);case 3:return n((15&_.charCodeAt(0))<<12|(63&_.charCodeAt(1))<<6|63&_.charCodeAt(2));default:return n((31&_.charCodeAt(0))<<6|63&_.charCodeAt(1))}},x=function(_){return _.replace(s,S)},T=function(_){var U=_.length,j=U%4,L=(U>0?N[_.charAt(0)]<<18:0)|(U>1?N[_.charAt(1)]<<12:0)|(U>2?N[_.charAt(2)]<<6:0)|(U>3?N[_.charAt(3)]:0),G=[n(L>>>16),n(L>>>8&255),n(L&255)];return G.length-=[0,0,2,1][j],G.join("")},A=X.atob&&typeof X.atob=="function"?function(_){return X.atob(_)}:function(_){return _.replace(/\S{1,4}/g,T)},w=function(_){return A(String(_).replace(/[^A-Za-z0-9\+\/]/g,""))},v=function(_){return x(A(_))},b=function(_){return String(_).replace(/[-_]/g,function(U){return U=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(_){return v(b(_))},f;X.Uint8Array&&(f=function(_){return Uint8Array.from(w(b(_)),function(U){return U.charCodeAt(0)})});var C=function(){var _=X.Base64;return X.Base64=F,_};if(X.Base64={VERSION:I,atob:w,btoa:u,fromBase64:g,toBase64:r,utob:m,encode:r,encodeURI:a,btou:x,decode:g,noConflict:C,fromUint8Array:i,toUint8Array:f},typeof Object.defineProperty=="function"){var E=function(_){return{value:_,enumerable:!1,writable:!0,configurable:!0}};X.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(_){return r(this,_)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return r(this,!0)}))}}return X.Meteor&&(Base64=X.Base64),Be.exports?Be.exports.Base64=X.Base64:!(z=[],M=function(){return X.Base64}.apply(le,z),M!==void 0&&(Be.exports=M)),{Base64:X.Base64}})}).call(this,D("IyRk"))},JOrW:function(Be,le,D){Be.exports=D.p+"static/gf.09d89ab3.svg"},JYp7:function(Be,le,D){"use strict";D.d(le,"a",function(){return Q});var Q;(function(z){function M(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}z.is=M;const X=Object.freeze([]);function F(){return X}z.empty=F;function*I(s){yield s}z.single=I;function H(s){return s||X}z.from=H;function N(s){return!s||s[Symbol.iterator]().next().done===!0}z.isEmpty=N;function n(s){return s[Symbol.iterator]().next().value}z.first=n;function P(s,S){for(const x of s)if(S(x))return!0;return!1}z.some=P;function p(s,S){for(const x of s)if(S(x))return x;return}z.find=p;function*m(s,S){for(const x of s)S(x)&&(yield x)}z.filter=m;function*d(s,S){let x=0;for(const T of s)yield S(T,x++)}z.map=d;function*u(...s){for(const S of s)for(const x of S)yield x}z.concat=u;function*o(s){for(const S of s)for(const x of S)yield x}z.concatNested=o;function h(s,S,x){let T=x;for(const A of s)T=S(T,A);return T}z.reduce=h;function*r(s,S,x=s.length){for(S<0&&(S+=s.length),x<0?x+=s.length:x>s.length&&(x=s.length);ST===A){const T=s[Symbol.iterator](),A=S[Symbol.iterator]();for(;;){const w=T.next(),v=A.next();if(w.done!==v.done)return!1;if(w.done)return!0;if(!x(w.value,v.value))return!1}}z.equals=i})(Q||(Q={}))},LdHM:function(Be,le,D){"use strict";D.d(le,"b",function(){return s}),D.d(le,"a",function(){return x});var Q=D("1OyB"),z=D("vuIU"),M=D("Ji7U"),X=D("LK+K"),F=D("q1tI"),I=D("rePB"),H=D("Ff2n"),N=D("ODXe"),n=D("4IlW"),P=D("bX4T"),p=D("YrtM"),m=D("TSYQ"),d=D.n(m),u=D("+nKL"),o=D("8OUc"),h=function(V,te){var re=V.prefixCls,ge=V.id,Ae=V.flattenOptions,Oe=V.childrenAsData,Ce=V.values,je=V.searchValue,Ue=V.multiple,xe=V.defaultActiveFirstOption,be=V.height,Ve=V.itemHeight,mt=V.notFoundContent,yt=V.open,_t=V.menuItemSelectedIcon,xt=V.virtual,nt=V.onSelect,ct=V.onToggleOpen,wt=V.onActiveValue,_e=V.onScroll,Me=V.onMouseEnter,ve="".concat(re,"-item"),Te=Object(p.a)(function(){return Ae},[yt,Ae],function($e,we){return we[0]&&$e[1]!==we[1]}),We=F.useRef(null),Je=function(we){we.preventDefault()},at=function(we){We.current&&We.current.scrollTo({index:we})},dt=function(we){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ee=Te.length,ue=0;ue1&&arguments[1]!==void 0?arguments[1]:!1;return Object(A.a)(O).map(function(te,re){if(!F.isValidElement(te)||!te.type)return null;var ge=te.type.isSelectOptGroup,Ae=te.key,Oe=te.props,Ce=Oe.children,je=Object(H.a)(Oe,["children"]);return V||!ge?w(te):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?re:Ae,"__"),label:Ae},je),{},{options:v(Ce)})}).filter(function(te){return te})}var b=D("2Qr1"),g=D("qNPg"),f=D("U8pU"),C=D("Kwbf"),E=D("WKfj");function _(O){var V=O.mode,te=O.options,re=O.children,ge=O.backfill,Ae=O.allowClear,Oe=O.placeholder,Ce=O.getInputElement,je=O.showSearch,Ue=O.onSearch,xe=O.defaultOpen,be=O.autoFocus,Ve=O.labelInValue,mt=O.value,yt=O.inputValue,_t=O.optionLabelProp,xt=V==="multiple"||V==="tags",nt=je!==void 0?je:xt||V==="combobox",ct=te||v(re);if(Object(C.a)(V!=="tags"||ct.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var wt=ct.some(function(ve){return ve.options?ve.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(C.a)(!wt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(V!=="combobox"||!_t,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(V==="combobox"||!ge,"`backfill` only works with `combobox` mode."),Object(C.a)(V==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),Object(C.b)(V!=="combobox"||!Ce||!Ae||!Oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ue&&!nt&&V!=="combobox"&&V!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!xe||be,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),mt!=null){var _e=Object(E.d)(mt);Object(C.a)(!Ve||_e.every(function(ve){return Object(f.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!xt||Array.isArray(mt),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var Me=null;Object(A.a)(re).some(function(ve){if(!F.isValidElement(ve)||!ve.type)return!1;var Te=ve.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var We=Object(A.a)(ve.props.children).every(function(Je){return!F.isValidElement(Je)||!ve.type||Je.type.isSelectOption?!0:(Me=Je.type,!1)});return!We}return Me=Te,!0}),Me&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Me.displayName||Me.name||Me,"`.")),Object(C.a)(yt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=_,j=Object(g.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:v,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:U,fillOptionsWithMissingValue:b.a}),L=function(O){Object(M.a)(te,O);var V=Object(X.a)(te);function te(){var re;return Object(Q.a)(this,te),re=V.apply(this,arguments),re.selectRef=F.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(z.a)(te,[{key:"render",value:function(){return F.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),te}(F.Component);L.Option=s,L.OptGroup=x;var G=L,B=le.c=G},M8RZ:function(Be,le,D){"use strict";D.d(le,"a",function(){return n});var Q=D("fWQN"),z=D("mtLc"),M=D("yKVA"),X=D("879j"),F=D("q1tI"),I=D.n(F),H=D("i8i4"),N=D.n(H),n=function(P){Object(M.a)(m,P);var p=Object(X.a)(m);function m(d){var u;Object(Q.a)(this,m),u=p.call(this,d);var o=window.document;return u.node=o.createElement("div"),o.body.appendChild(u.node),u}return Object(z.a)(m,[{key:"render",value:function(){var u=this.props.children;return Object(H.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(I.a.Component)},MFOe:function(Be,le,D){(function(Q){var z=I(),M=H(),X=N(),F=typeof window!="undefined"?window:Q;Be.exports={assign:z,create:M,trim:X,bind:n,slice:P,each:p,map:m,pluck:d,isList:u,isFunction:o,isObject:h,Global:F};function I(){return Object.assign?Object.assign:function(a,i,s,S){for(var x=1;xz.a.None;function o(_){return(U,j=null,L)=>{let G=!1,B;return B=_(O=>G?void 0:(B?B.dispose():G=!0,U.call(j,O)),null,L),G&&B.dispose(),B}}u.once=o;function h(_,U){return x((j,L=null,G)=>_(B=>j.call(L,U(B)),null,G))}u.map=h;function r(_,U){return x((j,L=null,G)=>_(B=>{U(B),j.call(L,B)},null,G))}u.forEach=r;function a(_,U){return x((j,L=null,G)=>_(B=>U(B)&&j.call(L,B),null,G))}u.filter=a;function i(_){return _}u.signal=i;function s(..._){return(U,j=null,L)=>Object(z.e)(..._.map(G=>G(B=>U.call(j,B),null,L)))}u.any=s;function S(_,U,j){let L=j;return h(_,G=>(L=U(L,G),L))}u.reduce=S;function x(_){let U;const j=new n({onFirstListenerAdd(){U=_(j.fire,j)},onLastListenerRemove(){U.dispose()}});return j.event}function T(_,U,j=100,L=!1,G){let B,O,V,te=0;const re=new n({leakWarningThreshold:G,onFirstListenerAdd(){B=_(ge=>{te++,O=U(O,ge),L&&!V&&(re.fire(O),O=void 0),clearTimeout(V),V=setTimeout(()=>{const Ae=O;O=void 0,V=void 0,(!L||te>1)&&re.fire(Ae),te=0},j)})},onLastListenerRemove(){B.dispose()}});return re.event}u.debounce=T;function A(_,U=(j,L)=>j===L){let j=!0,L;return a(_,G=>{const B=j||!U(G,L);return j=!1,L=G,B})}u.latch=A;function w(_,U){return[u.filter(_,U),u.filter(_,j=>!U(j))]}u.split=w;function v(_,U=!1,j=[]){let L=j.slice(),G=_(V=>{L?L.push(V):O.fire(V)});const B=()=>{L&&L.forEach(V=>O.fire(V)),L=null},O=new n({onFirstListenerAdd(){G||(G=_(V=>O.fire(V)))},onFirstListenerDidAdd(){L&&(U?setTimeout(B):B())},onLastListenerRemove(){G&&G.dispose(),G=null}});return O.event}u.buffer=v;class b{constructor(_){this.event=_}map(_){return new b(h(this.event,_))}forEach(_){return new b(r(this.event,_))}filter(_){return new b(a(this.event,_))}reduce(_,U){return new b(S(this.event,_,U))}latch(){return new b(A(this.event))}debounce(_,U=100,j=!1,L){return new b(T(this.event,_,U,j,L))}on(_,U,j){return this.event(_,U,j)}once(_,U,j){return o(this.event)(_,U,j)}}function g(_){return new b(_)}u.chain=g;function f(_,U,j=L=>L){const L=(...V)=>O.fire(j(...V)),G=()=>_.on(U,L),B=()=>_.removeListener(U,L),O=new n({onFirstListenerAdd:G,onLastListenerRemove:B});return O.event}u.fromNodeEventEmitter=f;function C(_,U,j=L=>L){const L=(...V)=>O.fire(j(...V)),G=()=>_.addEventListener(U,L),B=()=>_.removeEventListener(U,L),O=new n({onFirstListenerAdd:G,onLastListenerRemove:B});return O.event}u.fromDOMEventEmitter=C;function E(_){return new Promise(U=>o(_)(U))}u.toPromise=E})(F||(F={}));class I{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${I._idPool++}`}start(u){this._stopWatch=new X.a(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}I._idPool=0;let H=-1;class N{constructor(u,o=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let o=H;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||u{const a=this._stacks.get(h)||0;this._stacks.set(h,a-1)}}}class n{constructor(u){var o;this._disposed=!1,this._options=u,this._leakageMon=H>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new I(this._options._profName):void 0}get event(){return this._event||(this._event=(u,o,h)=>{var r;this._listeners||(this._listeners=new M.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(o?[u,o]:u);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,o);const s=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),S=Object(z.i)(()=>{if(s&&s(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const x=this._listeners&&!this._listeners.isEmpty();x||this._options.onLastListenerRemove(this)}});return h instanceof z.b?h.add(S):Array.isArray(h)&&h.push(S),S}),this._event}fire(u){var o,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.a);for(let r of this._listeners)this._deliveryQueue.push([r,u]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,a]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,a):r[0].call(r[1],a)}catch(i){Object(Q.f)(i)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var u,o,h,r,a;this._disposed||(this._disposed=!0,(u=this._listeners)===null||u===void 0||u.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(r=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||r===void 0||r.call(h),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class P extends n{constructor(u){super(u);this._isPaused=0,this._eventQueue=new M.a,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}class p extends P{constructor(u){var o;super(u);this._delay=(o=u.delay)!==null&&o!==void 0?o:100}fire(u){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(u)}}class m{constructor(){this.buffers=[]}wrapEvent(u){return(o,h,r)=>u(a=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>o.call(h,a)):o.call(h,a)},void 0,r)}bufferEvents(u){const o=[];this.buffers.push(o);const h=u();return this.buffers.pop(),o.forEach(r=>r()),h}}class d{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=z.a.None,this.emitter=new n({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Be,le,D){"use strict";(function(Q,z){D.d(le,"b",function(){return h}),D.d(le,"i",function(){return s}),D.d(le,"f",function(){return S}),D.d(le,"d",function(){return x}),D.d(le,"g",function(){return T}),D.d(le,"h",function(){return A}),D.d(le,"c",function(){return w}),D.d(le,"k",function(){return v}),D.d(le,"j",function(){return b}),D.d(le,"a",function(){return g}),D.d(le,"e",function(){return E});var M;const X="en";let F=!1,I=!1,H=!1,N=!1,n=!1,P=!1,p=!1,m,d=X,u,o;const h=typeof self=="object"?self:typeof Q=="object"?Q:{};let r;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?r=h.vscode.process:typeof z!="undefined"&&(r=z);const a=typeof((M=r==null?void 0:r.versions)===null||M===void 0?void 0:M.electron)=="string"&&r.type==="renderer";if(typeof navigator=="object"&&!a)o=navigator.userAgent,F=o.indexOf("Windows")>=0,I=o.indexOf("Macintosh")>=0,p=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=o.indexOf("Linux")>=0,P=!0,m=navigator.language,d=m;else if(typeof r=="object"){F=r.platform==="win32",I=r.platform==="darwin",H=r.platform==="linux",N=H&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,m=X,d=X;const _=r.env.VSCODE_NLS_CONFIG;if(_)try{const U=JSON.parse(_),j=U.availableLanguages["*"];m=U.locale,d=j||X,u=U._translationsConfigFile}catch(U){}n=!0}else console.error("Unable to resolve platform.");let i=0;I?i=1:F?i=3:H&&(i=2);const s=F,S=I,x=H,T=n,A=P,w=p,v=o,b=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let j=[];h.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let B=0,O=j.length;B{const B=++L;j.push({id:B,callback:G}),h.postMessage({vscodeSetImmediateId:B},"*")}}if(typeof(r==null?void 0:r.nextTick)=="function")return r.nextTick.bind(r);const U=Promise.resolve();return j=>U.then(j)}(),g=I||p?2:F?1:3;let f=!0,C=!1;function E(){if(!C){C=!0;const _=new Uint8Array(2);_[0]=1,_[1]=2;const U=new Uint16Array(_.buffer);f=U[0]===(2<<8)+1}return f}}).call(this,D("IyRk"),D("Q2Ig"))},MVJL:function(Be,le,D){Be.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},N0LK:function(Be,le,D){"use strict";D.d(le,"C",function(){return Q}),D.d(le,"v",function(){return M}),D.d(le,"s",function(){return X}),D.d(le,"t",function(){return F}),D.d(le,"U",function(){return I}),D.d(le,"J",function(){return H}),D.d(le,"O",function(){return N}),D.d(le,"p",function(){return n}),D.d(le,"T",function(){return P}),D.d(le,"q",function(){return p}),D.d(le,"N",function(){return m}),D.d(le,"M",function(){return d}),D.d(le,"Q",function(){return u}),D.d(le,"u",function(){return o}),D.d(le,"x",function(){return h}),D.d(le,"I",function(){return r}),D.d(le,"f",function(){return a}),D.d(le,"h",function(){return i}),D.d(le,"g",function(){return s}),D.d(le,"i",function(){return S}),D.d(le,"G",function(){return x}),D.d(le,"H",function(){return T}),D.d(le,"r",function(){return A}),D.d(le,"R",function(){return w}),D.d(le,"d",function(){return v}),D.d(le,"e",function(){return b}),D.d(le,"E",function(){return g}),D.d(le,"F",function(){return f}),D.d(le,"j",function(){return C}),D.d(le,"z",function(){return E}),D.d(le,"K",function(){return U}),D.d(le,"L",function(){return j}),D.d(le,"m",function(){return G}),D.d(le,"k",function(){return O}),D.d(le,"A",function(){return te}),D.d(le,"a",function(){return re}),D.d(le,"n",function(){return ge}),D.d(le,"l",function(){return Ae}),D.d(le,"D",function(){return Oe}),D.d(le,"B",function(){return Ce}),D.d(le,"b",function(){return je}),D.d(le,"S",function(){return Ue}),D.d(le,"o",function(){return xe}),D.d(le,"P",function(){return be}),D.d(le,"w",function(){return Ve}),D.d(le,"c",function(){return mt}),D.d(le,"y",function(){return xt});function Q(_e){return!_e||typeof _e!="string"?!0:_e.trim().length===0}const z=/{(\d+)}/g;function M(_e,...Me){return Me.length===0?_e:_e.replace(z,function(ve,Te){const We=parseInt(Te,10);return isNaN(We)||We<0||We>=Me.length?ve:Me[We]})}function X(_e){return _e.replace(/[<>&]/g,function(Me){switch(Me){case"<":return"<";case">":return">";case"&":return"&";default:return Me}})}function F(_e){return _e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function I(_e,Me=" "){const ve=H(_e,Me);return N(ve,Me)}function H(_e,Me){if(!_e||!Me)return _e;const ve=Me.length;if(ve===0||_e.length===0)return _e;let Te=0;for(;_e.indexOf(Me,Te)===Te;)Te=Te+ve;return _e.substring(Te)}function N(_e,Me){if(!_e||!Me)return _e;const ve=Me.length,Te=_e.length;if(ve===0||Te===0)return _e;let We=Te,Je=-1;for(;!(Je=_e.lastIndexOf(Me,We-1),Je===-1||Je+ve!==We);){if(Je===0)return"";We=Je}return _e.substring(0,We)}function n(_e){return _e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function P(_e){return _e.replace(/\*/g,"")}function p(_e,Me,ve={}){if(!_e)throw new Error("Cannot create regex from empty string");Me||(_e=F(_e)),ve.wholeWord&&(/\B/.test(_e.charAt(0))||(_e="\\b"+_e),/\B/.test(_e.charAt(_e.length-1))||(_e=_e+"\\b"));let Te="";return ve.global&&(Te+="g"),ve.matchCase||(Te+="i"),ve.multiline&&(Te+="m"),ve.unicode&&(Te+="u"),new RegExp(_e,Te)}function m(_e){if(_e.source==="^"||_e.source==="^$"||_e.source==="$"||_e.source==="^\\s*$")return!1;const Me=_e.exec("");return!!(Me&&_e.lastIndex===0)}function d(_e){return(_e.global?"g":"")+(_e.ignoreCase?"i":"")+(_e.multiline?"m":"")+(_e.unicode?"u":"")}function u(_e){return _e.split(/\r\n|\r|\n/)}function o(_e){for(let Me=0,ve=_e.length;Me=0;ve--){const Te=_e.charCodeAt(ve);if(Te!==32&&Te!==9)return ve}return-1}function a(_e,Me){return _eMe?1:0}function i(_e,Me,ve=0,Te=_e.length,We=0,Je=Me.length){for(;veIt)return 1}const at=Te-ve,dt=Je-We;return atdt?1:0}function s(_e,Me){return S(_e,Me,0,_e.length,0,Me.length)}function S(_e,Me,ve=0,Te=_e.length,We=0,Je=Me.length){for(;ve=128||It>=128)return i(_e.toLowerCase(),Me.toLowerCase(),ve,Te,We,Je);x(Lt)&&(Lt-=32),x(It)&&(It-=32);const Ne=Lt-It;if(Ne===0)continue;return Ne}const at=Te-ve,dt=Je-We;return atdt?1:0}function x(_e){return _e>=97&&_e<=122}function T(_e){return _e>=65&&_e<=90}function A(_e,Me){return _e.length===Me.length&&S(_e,Me)===0}function w(_e,Me){const ve=Me.length;return Me.length>_e.length?!1:S(_e,Me,0,ve)===0}function v(_e,Me){let ve,Te=Math.min(_e.length,Me.length);for(ve=0;ve1){const Te=_e.charCodeAt(Me-2);if(g(Te))return C(Te,ve)}return ve}function U(_e,Me){const ve=yt.getInstance(),Te=Me,We=_e.length,Je=E(_e,We,Me);Me+=Je>=65536?2:1;let at=ve.getGraphemeBreakType(Je);for(;Me=65536?2:1,at=Lt}return Me-Te}function j(_e,Me){const ve=yt.getInstance(),Te=Me,We=_(_e,Me);Me-=We>=65536?2:1;let Je=ve.getGraphemeBreakType(We);for(;Me>0;){const at=_(_e,Me),dt=ve.getGraphemeBreakType(at);if(mt(dt,Je))break;Me-=at>=65536?2:1,Je=dt}return Te-Me}const L=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function G(_e){return L.test(_e)}const B=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function O(_e){return B.test(_e)}const V=/^[\t\n\r\x20-\x7E]*$/;function te(_e){return V.test(_e)}const re=/[\u2028\u2029]/;function ge(_e){return re.test(_e)}function Ae(_e){for(let Me=0,ve=_e.length;Me=11904&&_e<=55215||_e>=63744&&_e<=64255||_e>=65281&&_e<=65374}function Ce(_e){return _e>=127462&&_e<=127487||_e===8986||_e===8987||_e===9200||_e===9203||_e>=9728&&_e<=10175||_e===11088||_e===11093||_e>=127744&&_e<=128591||_e>=128640&&_e<=128764||_e>=128992&&_e<=129003||_e>=129280&&_e<=129535||_e>=129648&&_e<=129750}const je=String.fromCharCode(65279);function Ue(_e){return!!(_e&&_e.length>0&&_e.charCodeAt(0)===65279)}function xe(_e,Me=!1){return _e?(Me&&(_e=_e.replace(/\\./g,"")),_e.toLowerCase()!==_e):!1}function be(_e){const Me=90-65+1;return _e=_e%(2*Me),_eMe[3*Te+1])Te=2*Te+1;else return Me[3*Te+2];return 0}}yt._INSTANCE=null;function _t(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function xt(_e,Me){if(_e===0)return 0;const ve=nt(_e,Me);if(ve!==void 0)return ve;const Te=_(Me,_e);return _e-=ct(Te),_e}function nt(_e,Me){let ve=_(Me,_e);for(_e-=ct(ve);wt(ve)||ve===65039||ve===8419;){if(_e===0)return;ve=_(Me,_e),_e-=ct(ve)}if(!Ce(ve))return;if(_e>=0){const Te=_(Me,_e);Te===8205&&(_e-=ct(Te))}return _e}function ct(_e){return _e>=65536?2:1}function wt(_e){return 127995<=_e&&_e<=127999}},NvD2:function(Be,le,D){"use strict";D.d(le,"a",function(){return I});var Q=D("Kwbf");function z(H,N){var n=new Set;return H.forEach(function(P){N.has(P)||n.add(P)}),n}function M(H){var N=H||{},n=N.disabled,P=N.disableCheckbox,p=N.checkable;return!!(n||P)||p===!1}function X(H,N,n,P){for(var p=new Set(H),m=new Set,d=0;d<=n;d+=1){var u=N.get(d)||new Set;u.forEach(function(a){var i=a.key,s=a.node,S=a.children,x=S===void 0?[]:S;p.has(i)&&!P(s)&&x.filter(function(T){return!P(T.node)}).forEach(function(T){p.add(T.key)})})}for(var o=new Set,h=n;h>=0;h-=1){var r=N.get(h)||new Set;r.forEach(function(a){var i=a.parent,s=a.node;if(P(s)||!a.parent||o.has(a.parent.key))return;if(P(a.parent.node)){o.add(i.key);return}var S=!0,x=!1;(i.children||[]).filter(function(T){return!P(T.node)}).forEach(function(T){var A=T.key,w=p.has(A);S&&!w&&(S=!1),!x&&(w||m.has(A))&&(x=!0)}),S&&p.add(i.key),x&&m.add(i.key),o.add(i.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(z(m,p))}}function F(H,N,n,P,p){for(var m=new Set(H),d=new Set(N),u=0;u<=P;u+=1){var o=n.get(u)||new Set;o.forEach(function(i){var s=i.key,S=i.node,x=i.children,T=x===void 0?[]:x;!m.has(s)&&!d.has(s)&&!p(S)&&T.filter(function(A){return!p(A.node)}).forEach(function(A){m.delete(A.key)})})}d=new Set;for(var h=new Set,r=P;r>=0;r-=1){var a=n.get(r)||new Set;a.forEach(function(i){var s=i.parent,S=i.node;if(p(S)||!i.parent||h.has(i.parent.key))return;if(p(i.parent.node)){h.add(s.key);return}var x=!0,T=!1;(s.children||[]).filter(function(A){return!p(A.node)}).forEach(function(A){var w=A.key,v=m.has(w);x&&!v&&(x=!1),!T&&(v||d.has(w))&&(T=!0)}),x||m.delete(s.key),T&&d.add(s.key),h.add(s.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(z(d,m))}}function I(H,N,n,P){var p=[],m;P?m=P:m=M;var d=new Set(H.filter(function(r){var a=!!n[r];return a||p.push(r),a})),u=new Map,o=0;Object.keys(n).forEach(function(r){var a=n[r],i=a.level,s=u.get(i);s||(s=new Set,u.set(i,s)),s.add(a),o=Math.max(o,i)}),Object(Q.a)(!p.length,"Tree missing follow keys: ".concat(p.slice(0,100).map(function(r){return"'".concat(r,"'")}).join(", ")));var h;return N===!0?h=X(d,u,o,m):h=F(d,N.halfCheckedKeys,u,o,m),h}},OLES:function(Be,le,D){"use strict";var Q=D("U8pU"),z=D("VTBJ"),M=D("Ff2n"),X=D("q1tI"),F=D("uciX"),I=D("7ixt"),H=function(d){var u=d.overlay,o=d.prefixCls,h=d.id,r=d.overlayInnerStyle;return X.createElement("div",{className:"".concat(o,"-inner"),id:h,role:"tooltip",style:r},typeof u=="function"?u():u)},N=H,n=function(d,u){var o=d.overlayClassName,h=d.trigger,r=h===void 0?["hover"]:h,a=d.mouseEnterDelay,i=a===void 0?0:a,s=d.mouseLeaveDelay,S=s===void 0?.1:s,x=d.overlayStyle,T=d.prefixCls,A=T===void 0?"rc-tooltip":T,w=d.children,v=d.onVisibleChange,b=d.afterVisibleChange,g=d.transitionName,f=d.animation,C=d.placement,E=C===void 0?"right":C,_=d.align,U=_===void 0?{}:_,j=d.destroyTooltipOnHide,L=j===void 0?!1:j,G=d.defaultVisible,B=d.getTooltipContainer,O=d.overlayInnerStyle,V=Object(M.a)(d,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),te=Object(X.useRef)(null);Object(X.useImperativeHandle)(u,function(){return te.current});var re=Object(z.a)({},V);"visible"in d&&(re.popupVisible=d.visible);var ge=function(){var Ue=d.arrowContent,xe=Ue===void 0?null:Ue,be=d.overlay,Ve=d.id;return[X.createElement("div",{className:"".concat(A,"-arrow"),key:"arrow"},xe),X.createElement(N,{key:"content",prefixCls:A,id:Ve,overlay:be,overlayInnerStyle:O})]},Ae=!1,Oe=!1;if(typeof L=="boolean")Ae=L;else if(L&&Object(Q.a)(L)==="object"){var Ce=L.keepParent;Ae=Ce===!0,Oe=Ce===!1}return X.createElement(F.a,Object.assign({popupClassName:o,prefixCls:A,popup:ge,action:r,builtinPlacements:I.a,popupPlacement:E,ref:te,popupAlign:U,getPopupContainer:B,onPopupVisibleChange:v,afterPopupVisibleChange:b,popupTransitionName:g,popupAnimation:f,defaultPopupVisible:G,destroyPopupOnHide:Ae,autoDestroy:Oe,mouseLeaveDelay:S,popupStyle:x,mouseEnterDelay:i},re),w)},P=Object(X.forwardRef)(n),p=le.a=P},OZM5:function(Be,le,D){"use strict";D.d(le,"b",function(){return P}),D.d(le,"a",function(){return p}),D.d(le,"k",function(){return m}),D.d(le,"h",function(){return d}),D.d(le,"i",function(){return u}),D.d(le,"g",function(){return o}),D.d(le,"c",function(){return h}),D.d(le,"d",function(){return r}),D.d(le,"j",function(){return s}),D.d(le,"e",function(){return S}),D.d(le,"f",function(){return x});var Q=D("KQm4"),z=D("U8pU"),M=D("Ff2n"),X=D("q1tI"),F=D.n(X),I=D("Kwbf"),H=D("WaYH"),N=.25,n=2;function P(T,A){var w=T.slice(),v=w.indexOf(A);return v>=0&&w.splice(v,1),w}function p(T,A){var w=T.slice();return w.indexOf(A)===-1&&w.push(A),w}function m(T){return T.split("-")}function d(T,A){return"".concat(T,"-").concat(A)}function u(T){return T&&T.type&&T.type.isTreeNode}function o(T,A){var w=[T],v=A[T];function b(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(f){var C=f.key,E=f.children;w.push(C),b(E)})}return b(v.children),w}function h(T,A){var w=T.clientY,v=A.selectHandle.getBoundingClientRect(),b=v.top,g=v.bottom,f=v.height,C=Math.max(f*N,n);return w<=b+C?-1:w>=g-C?1:0}function r(T,A){if(!T)return;var w=A.multiple;return w?T.slice():T.length?[T[0]]:T}var a=function(A){return A};function i(T,A){if(!T)return[];var w=A||{},v=w.processProps,b=v===void 0?a:v,g=Array.isArray(T)?T:[T];return g.map(function(f){var C=f.children,E=Object(M.a)(f,["children"]),_=i(C,A);return F.a.createElement(H.a,Object.assign({},b(E)),_)})}function s(T){if(!T)return null;var A;if(Array.isArray(T))A={checkedKeys:T,halfCheckedKeys:void 0};else if(Object(z.a)(T)==="object")A={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return Object(I.a)(!1,"`checkedKeys` is not an array or an object"),null;return A}function S(T,A){var w=new Set;function v(b){if(w.has(b))return;var g=A[b];if(!g)return;w.add(b);var f=g.parent,C=g.node;if(C.disabled)return;f&&v(f.key)}return(T||[]).forEach(function(b){v(b)}),Object(Q.a)(w)}function x(T){var A={};return Object.keys(T).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(A[w]=T[w])}),A}},"OkW/":function(Be,le,D){},Ot1p:function(Be,le,D){"use strict";var Q=D("2qtc"),z=D("kLXV"),M=D("rAM+"),X=D("miYZ"),F=D("tsqr"),I=D("9og8"),H=D("tJVT"),N=D("jrin"),n=D("WmNS"),P=D.n(n),p=D("q1tI"),m=D.n(p),d=D("VrN/"),u=D.n(d),o=D("bdgK"),h=D("p77/"),r=D("Bd2K"),a=D("ELLl"),i=D("19Vz"),s=D("lZu9"),S=D("+NIl"),x=D("kSUc"),T=D("9Bee"),A=function(Le){var Xe=Le.value,ut=Xe===void 0?"":Xe,Dt=Le.className,jt=Le.showTextOnly,Ut=Le.showLines,Ct=Le.style,et=Ct===void 0?{}:Ct,st=Object(p.useMemo)(function(){return""},[ut]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:st}}))},w=D("0Owb"),v=D("dejd"),b=D("C+DQ"),g=D("1vsH"),f=D("m3rI"),C=[{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 E(Le){var Xe=Le.onActionCallback,ut=Le.title,Dt=Le.icon,jt=Le.actionName,Ut=Le.className,Ct=Ut===void 0?"":Ut,et=Le.children;function st(){Xe(jt)}return m.a.createElement("a",{title:ut,className:Ct,onClick:st},m.a.createElement("i",{className:"md-iconfont ".concat(Dt)}),et)}var _=function(Le){var Xe=Le.watch,ut=Le.showNullButton,Dt=Le.onActionCallback,jt=Le.fullScreen,Ut=Le.insertTemp,Ct=Le.hidetoolBar,et=Le.uuid,st=Le.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.F)("_educoder_session"),"&key=").concat(et,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var He=[].concat(C,[{title:"".concat(Xe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Xe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&He.map(function(pe,Re){return m.a.createElement("li",{key:Re},pe.actionName?m.a.createElement(E,Object(w.a)({},pe,{onActionCallback:Dt})):m.a.createElement("span",{className:"v-line"}))}),ut?m.a.createElement("li",null,m.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Dt},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ut&&m.a.createElement("li",null,m.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ut),onActionCallback:Dt},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(E,{icon:"".concat(jt?"icon-shrink":"icon-enlarge"),title:jt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Dt})))},U=D("M8RZ"),j=D("+L6B"),L=D("2/Rp"),G=D("y8nQ"),B=D("Vl3Y"),O=D("5NDa"),V=D("5rEg"),te={labelCol:{span:4},wrapperCol:{span:20}},re=function(Le){var Xe=Le.callback,ut=Le.onCancel;function Dt(jt){Xe(jt)}return m.a.createElement(B.a,Object(w.a)({},te,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Dt}),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(V.a,null)),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(V.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(L.a,{type:"ghost",onClick:ut},"\u53D6\u6D88")))},ge=D("7ahc"),Ae=D("HmJG"),Oe=D("BjJ7"),Ce=B.a.useForm,je={width:280,marginRight:10},Ue={labelCol:{span:5},wrapperCol:{span:19}},xe=function(Le){var Xe=Le.callback,ut=Le.onCancel,Dt=Ce(),jt=Object(H.a)(Dt,1),Ut=jt[0];function Ct(He){Xe(He)}function et(He,pe){if(He.status===-1){F.b.error(He.message);return}Ut.setFieldsValue({src:"/api/attachments/".concat(He.id),type:pe.type})}function st(He){var pe=He.target.files[0];Ve(pe,et)}return m.a.createElement(B.a,Object(w.a)({form:Ut},Ue,{className:"upload-image-panel",onFinish:Ct}),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(V.a,{style:je})),m.a.createElement(be,{onFileChange:st}))),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(V.a,{style:{width:264}})),m.a.createElement(B.a.Item,{style:{textAlign:"right"}},m.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(L.a,{type:"ghost",onClick:ut},"\u53D6\u6D88")))};function be(Le){var Xe=Le.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Xe}))}function Ve(Le,Xe){if(!Le)throw new String("\u6CA1\u6709\u6587\u4EF6");var ut=new FormData;ut.append("editormd-image-file",Le),ut.append("file_param_name","editormd-image-file"),ut.append("byxhr","true");var Dt=new window.XMLHttpRequest;Dt.withCredentials=!0,Dt.addEventListener("load",function(jt){Xe(JSON.parse(jt.target.responseText),Le)},!1),Dt.addEventListener("error",function(jt){console.error(jt)},!1),Dt.open("POST","".concat(Oe.a,"/api/attachments.json")),Dt.send(ut)}var mt=D("giR+"),yt=D("fyUT"),_t=D("7Kak"),xt=D("9yH6"),nt=xt.a.Group,ct={margin:"0 8px"},wt=function(Le){var Xe=Le.callback,ut=Le.onCancel;function Dt(jt){Xe(jt)}return m.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Dt},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:ct},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:ct},"\u884C\u6570"),m.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(yt.a,null)),m.a.createElement("span",{style:ct},"\u5217\u6570"),m.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(yt.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:ct},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(B.a.Item,{name:"align"},m.a.createElement(nt,null,m.a.createElement(xt.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(xt.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(xt.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(xt.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(L.a,{type:"ghost",onClick:ut},"\u53D6\u6D88")))},_e=D("ErOA"),Me=D("7Cbv"),ve="link",Te="upload-image",We="code-block",Je="add-table",at="------------",dt={default:at,left:":".concat(at),center:":".concat(at,":"),right:"".concat(at,":")},Lt=D("9VGf"),It,Ne;function ke(){}var it=0,ot=1e4,Ge="\u2581",$e=`
**\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 we(Le){return/^\d+$/.test(Le)?"".concat(Le,"px"):Le}var Se=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ee=Se?"Cmd":"Ctrl",ue=["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"],de=(It={},Object(N.a)(It,Ee+"-B","bold"),Object(N.a)(It,Ee+"-I","italic"),It),ye=(Ne={},Object(N.a)(Ne,ve,"\u6DFB\u52A0\u94FE\u63A5"),Object(N.a)(Ne,We,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(N.a)(Ne,Te,"\u6DFB\u52A0\u6587\u4EF6"),Object(N.a)(Ne,Je,"\u6DFB\u52A0\u8868\u683C"),Ne),me=le.a=function(Le){var Xe=Le.defaultValue,ut=Xe===void 0?"":Xe,Dt=Le.onChange,jt=Le.width,Ut=jt===void 0?"100%":jt,Ct=Le.height,et=Ct===void 0?400:Ct,st=Le.miniToolbar,He=st===void 0?!1:st,pe=Le.isFocus,Re=pe===void 0?!1:pe,lt=Le.watch,Ye=Le.insertTemp,Pt=Le.mode,Nt=Pt===void 0?"markdown":Pt,Ke=Le.id,gt=Ke===void 0?"markdown-editor-id":Ke,bt=Le.showResizeBar,Tt=bt===void 0?!1:bt,Wt=Le.noStorage,fe=Wt===void 0?!1:Wt,se=Le.showNullButton,W=se===void 0?!1:se,$=Le.hidetoolBar,Z=$===void 0?!1:$,ne=Le.fullScreen,he=ne===void 0?!1:ne,Pe=Le.onBlur,ze=Le.onCMBeforeChange,Rt=Le.onFullScreen,Mt=Le.className,Ze=Mt===void 0?"":Mt,kt=Le.disablePaste,an=kt===void 0?!1:kt,At=Le.placeholder,pn=At===void 0?"":At,nn=Le.values,J=nn===void 0?"":nn,R=Object(p.useState)(null),k=Object(H.a)(R,2),Y=k[0],ae=k[1],q=Object(p.useState)(ut),Ie=Object(H.a)(q,2),ht=Ie[0],Ot=Ie[1],$t=Object(p.useState)(lt),ft=Object(H.a)($t,2),zt=ft[0],on=ft[1],Wn=Object(p.useState)(he),Si=Object(H.a)(Wn,2),hi=Si[0],Fn=Si[1],ci=Object(p.useState)(""),Zi=Object(H.a)(ci,2),yi=Zi[0],ri=Zi[1],Ci=Object(p.useState)(0),Di=Object(H.a)(Ci,2),Oi=Di[0],Ri=Di[1],Vi=Object(p.useState)(et),dr=Object(H.a)(Vi,2),rr=dr[0],ji=dr[1],Wi=Object(p.useState)(!1),hr=Object(H.a)(Wi,2),Tr=hr[0],ar=hr[1],Hn=Object(p.useRef)(Object(Me.a)()),wn=Object(p.useRef)(!1),_i=Object(p.useRef)(),Nn=Object(p.useRef)(),Ti=Object(p.useRef)(),ii=Object(p.useRef)(),wr=Object(p.useRef)(),Ni=function(){var mn=Object(I.a)(P.a.mark(function On(){var yn,jn;return P.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return un.next=2,Object(_e.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Hn.current}});case 2:jn=un.sent,jn!=null&&(yn=jn.attachments)!==null&&yn!==void 0&&yn.length&&(console.log("cm:",Y,Nn),jn.attachments.map(function(Bn){Bn.content_type.indexOf("image")>-1?Y.replaceSelection(".concat(Bn.content_type,")")):Bn.content_type.indexOf("video")>-1?Y.replaceSelection('')):Bn.content_type.indexOf("pdf")>-1?Y.replaceSelection('').concat(Bn.name,"")):Y.replaceSelection("[".concat(Bn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Bn.id,"?type=").concat(Bn.content_type,")"))}));case 4:case"end":return un.stop()}},On)}));return function(){return mn.apply(this,arguments)}}();Object(p.useEffect)(function(){Ot(J),Y==null||Y.setValue(J)},[J]),Object(p.useEffect)(function(){Rt==null||Rt(hi)},[hi]),Object(p.useEffect)(function(){if(Nn.current){var mn=u.a.fromTextArea(Nn.current,{mode:Nt,lineNumbers:!He,lineWrapping:!0,value:ut,autoCloseTags:!0,autoCloseBrackets:!0});Re&&mn.focus();function On(yn,jn){if(an){jn.preventDefault();return}var Qn=jn.clipboardData;if(Qn){var un=Qn.types.toString(),Bn=Qn.items;if(un==="Files"||Qn.types.indexOf("Files")>-1){if(jn.preventDefault(),Nt=="stex")return;try{var Ai,Yi=Bn[1];((Ai=Bn[0])===null||Ai===void 0?void 0:Ai.kind)==="file"&&(Yi=Bn[0]);var Xn=Yi.getAsFile(),yr=Xn.name.split(".").pop();Ve(Xn,function(si){if(si.id){var qe,vt,Gt;(Xn==null||((qe=Xn.type)===null||qe===void 0)?void 0:qe.indexOf("image"))>-1?mn.replaceSelection(".concat(si.content_type,")")):(Xn==null||((vt=Xn.type)===null||vt===void 0)?void 0:vt.indexOf("video"))>-1?mn.replaceSelection('')):(Xn==null||((Gt=Xn.type)===null||Gt===void 0)?void 0:Gt.indexOf("pdf"))>-1?mn.replaceSelection('').concat(Xn.name,"")):ue.includes(yr)?mn.replaceSelection('').concat(Xn.name,"")):mn.replaceSelection("[".concat(Xn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(si.id,"?type=").concat(si.content_type,")"))}else(si==null?void 0:si.status)===401&&(document.location.href="/user/login")})}catch(si){F.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return mn.on("paste",On),mn.on("dragleave",function(yn,jn){Ti.current.classList.remove("mouse-hover-md")}),mn.on("dragover",function(yn,jn){Ti.current.classList.add("mouse-hover-md")}),mn.on("drop",function(yn,jn){Ti.current.classList.add("mouse-hover-md");var Qn;if(Qn=jn.dataTransfer.files,Qn.length>0){jn.preventDefault(),jn.stopPropagation();for(var un=function(Yi){var Xn=Qn[Yi],yr=Xn.name.split(".").pop();Ve(Xn,function(si){if(si.id){var qe,vt,Gt;(Xn==null||((qe=Xn.type)===null||qe===void 0)?void 0:qe.indexOf("image"))>-1?mn.replaceSelection(".concat(si.content_type,")")):(Xn==null||((vt=Xn.type)===null||vt===void 0)?void 0:vt.indexOf("video"))>-1?mn.replaceSelection('')):(Xn==null||((Gt=Xn.type)===null||Gt===void 0)?void 0:Gt.indexOf("pdf"))>-1?mn.replaceSelection('').concat(Xn.name,"")):ue.includes(yr)?mn.replaceSelection('').concat(Xn.name,"")):mn.replaceSelection("[".concat(Xn.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(si.id,"?type=").concat(si.content_type,")"))}else(si==null?void 0:si.status)===401&&(document.location.href="/user/login")})},Bn=0;Bn0||Bn.target.offsetWidth>0)&&(Xi(),Y.setSize("100%","100%"),Y.refresh())}}catch(Ai){Qn.e(Ai)}finally{Qn.f()}});return yn.observe(Nn.current.parentElement),yn}if(Y){var On=mn();return function(){On.unobserve(Nn.current.parentElement)}}},[Y,Xi]),Object(p.useEffect)(function(){if(Y){for(var mn=[],On=function(){var Bn=jn[yn];Qn=Object(H.a)(Bn,2);var Ai=Qn[0],Yi=Qn[1],Xn=Object(N.a)({},Ai,function(){lr(Yi)});mn.push(Xn),Y.addKeyMap(Xn)},yn=0,jn=Object.entries(de);yn0){var mn=new Date().getTime(),On=window.sessionStorage.getItem(gt);mn>=Oi+ot&&(!On||On!==ht)&&(window.sessionStorage.setItem(gt,ht),ar(!0))}},ot),Object(p.useEffect)(function(){on(lt)},[Y,lt]),Object(p.useEffect)(function(){Y&&(Re&&Y.focus())},[Y,Re]),Object(p.useEffect)(function(){if(zt&&Y){var mn=Y.getScrollerElement();function On(yn){var jn=yn.target;if(wr.current){var Qn=jn.scrollTop/jn.scrollHeight;wr.current.scrollTop=wr.current.scrollHeight*Qn}}return mn.addEventListener("scroll",On),function(){mn.removeEventListener("scroll",On)}}},[Y,zt]),Object(p.useEffect)(function(){if(Y&&ze){function mn(On,yn){ze(On,yn)}return Y.on("beforeChange",mn),function(){Y.off("beforeChange",mn)}}},[Y,ze]),Object(p.useEffect)(function(){if(Y&&Pe){function mn(){Pe(Y.getValue())}return Y.on("blur",mn),function(){Y.off("blur",mn)}}},[Y,Pe]),Object(p.useEffect)(function(){if(Y){function mn(On){var yn=On.getValue();Ot(yn),Ri(new Date().getTime()),On.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Dt&&Dt(yn)}return Y.on("change",mn),function(){Y.off("change",mn)}}},[Y,Dt]),Object(p.useEffect)(function(){Y&&(ut==null?(Y.setValue(""),Ot("")):ut!==Y.getValue()&&(Y.setValue(ut),Ot(ut),Y.setCursor(Y.lineCount(),0)))},[Y,ut]);var lr=Object(p.useCallback)(function(mn){var On=Y.getCursor(),yn=Y.getSelection(),jn=yn.split(`
`);switch(mn){case"bold":return Y.replaceSelection("**"+yn+"**"),yn===""&&Y.setCursor(On.line,On.ch+2),Y.focus();case"italic":return Y.replaceSelection("*"+yn+"*"),yn===""&&Y.setCursor(On.line,On.ch+1),Y.focus();case"code":return Y.replaceSelection("`"+yn+"`"),yn===""&&Y.setCursor(On.line,On.ch+1),Y.focus();case"inline-latex":return Y.replaceSelection("`$$"+yn+"$$`"),yn===""&&Y.setCursor(On.line,On.ch+3),Y.focus();case"latex":return Y.replaceSelection("```latex\n"+yn+"\n```"),Y.setCursor(On.line+1,yn.length+1),Y.focus();case"line-break":return Y.replaceSelection(`
`),Y.focus();case"list-ul":return yn===""?Y.replaceSelection("- "+yn):Y.replaceSelection(jn.map(function(Qn){return Qn===""?"":"- ".concat(Qn)}).join(`
`)),Y.focus();case"list-ol":return yn===""?Y.replaceSelection("1. "+yn):Y.replaceSelection(jn.map(function(Qn,un){return Qn===""?"":"".concat(un+1,". ").concat(Qn)}).join(`
`)),Y.focus();case"add-null-ch":return yn===""&&Y.setCursor(On.line,On.ch+1),Y.replaceSelection(Ge),Y.focus();case"inster-template-1":return yn===""&&Y.setCursor(On.line,On.ch),Y.replaceSelection($e),Y.focus();case"eraser":return Y.setValue(""),Y.focus();case"trigger-watch":return on(!zt),Y.focus();case"trigger-full-screen":return Fn(!hi),Y.focus();case ve:ri(ve);return;case We:ri(We);return;case Te:ri(Te);return;case Je:ri(Je);return;default:throw new Error}},[Y,zt,hi]),gr=Object(p.useCallback)(function(mn){ri("");switch(yi){case ve:var On=mn.title,yn=mn.link;return Y.replaceSelection("[".concat(On,"](").concat(yn,")")),Y.focus();case We:var jn=mn.language,Qn=mn.content;return Y.replaceSelection(["```"+jn,Qn,"```"].join(`
`)),Y.focus();case Te:var un=mn.src,Bn=mn.alt;return Bn?Y.replaceSelection(".concat(un,' "').concat(Bn,'" )')):Y.replaceSelection("")),Y.focus();case Je:for(var Ai=mn.row,Yi=mn.col,Xn=mn.align,yr=`
`,si=0;si300&&(Ai=300);var Yi=et+Ai+"px";ji(Yi)}}return mn.addEventListener("mousedown",jn),document.addEventListener("mousemove",un),document.addEventListener("mouseup",Qn),function(){mn.removeEventListener("mousedown",jn),document.removeEventListener("mousemove",un),document.removeEventListener("mouseup",Qn)}}},[Y,ii]),Object(p.useEffect)(function(){ji(et)},[et]);var Cr=we(Ut),Xr=we(rr),vr={width:Cr,height:Xr},Yr=Object(p.useMemo)(function(){if(Oi){var mn=new Date(Oi),On=mn.getHours(),yn=mn.getMinutes(),jn=mn.getSeconds();return On=On<10?"0"+On:On,yn=yn<10?"0"+yn:yn,jn=jn<10?"0"+jn:jn,"".concat(On,":").concat(yn,":").concat(jn)}return 0},[Oi]);function $r(){window.sessionStorage.removeItem(gt),ar(!1),Ri(0)}function fr(){ar(!1),Ri(0),Y.setValue(window.sessionStorage.getItem(gt))}function Qr(mn,On){var yn=Y.getValue();yn=yn.replace(mn,On),Ot(yn),Y==null||Y.setValue(yn)}return m.a.createElement(p.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ti},m.a.createElement("div",{className:"markdown-editor-container ".concat(Ze," ").concat(zt?"on-preview":""," ").concat(He?"mini":""," ").concat(hi?"full-screen":""),style:vr},m.a.createElement(_,{insertTemp:Ye,watch:zt,fullScreen:hi,showNullButton:W,onActionCallback:lr,hidetoolBar:Z,uuid:Hn.current,setOpenPhones:function(){wn.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Nn,placeholder:pn})),zt?m.a.createElement("div",{ref:wr,className:"preview-container"},Nt==="stex"&&m.a.createElement(A,{value:ht}),Nt!=="stex"&&m.a.createElement(T.a,{edit:!0,value:ht,replaces:Qr})):null))),Tt?m.a.createElement("a",{ref:ii,className:"editor-resize"}):null,m.a.createElement(U.a,null,ye[yi]?m.a.createElement(z.a,{centered:!0,title:ye[yi],visible:!0,onCancel:kr,footer:null,className:"markdown-popup-form"},Hr):null))}},P5Jw:function(Be,le,D){"use strict";var Q=D("rHrb"),z=Q.CopyToClipboard;z.CopyToClipboard=z,Be.exports=z},PD8m:function(Be,le){Be.exports={name:"memoryStorage",read:Q,write:z,each:M,remove:X,clearAll:F};var D={};function Q(I){return D[I]}function z(I,H){D[I]=H}function M(I){for(var H in D)D.hasOwnProperty(H)&&I(D[H],H)}function X(I){delete D[I]}function F(I){D={}}},RELg:function(Be,le,D){var Q=D("MFOe"),z=Q.Global;Be.exports={name:"oldIE-userDataStorage",write:H,read:N,each:n,remove:P,clearAll:p};var M="storejs",X=z.document,F=u(),I=(z.navigator?z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function H(o,h){if(I)return;var r=d(o);F(function(a){a.setAttribute(r,h),a.save(M)})}function N(o){if(I)return;var h=d(o),r=null;return F(function(a){r=a.getAttribute(h)}),r}function n(o){F(function(h){for(var r=h.XMLDocument.documentElement.attributes,a=r.length-1;a>=0;a--){var i=r[a];o(h.getAttribute(i.name),i.name)}})}function P(o){var h=d(o);F(function(r){r.removeAttribute(h),r.save(M)})}function p(){F(function(o){var h=o.XMLDocument.documentElement.attributes;o.load(M);for(var r=h.length-1;r>=0;r--)o.removeAttribute(h[r].name);o.save(M)})}var m=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function d(o){return o.replace(/^\d/,"___$&").replace(m,"___")}function u(){if(!X||!X.documentElement||!X.documentElement.addBehavior)return null;var o="script",h,r,a;try{r=new ActiveXObject("htmlfile"),r.open(),r.write("<"+o+">document.w=window"+o+'>'),r.close(),h=r.w.frames[0].document,a=h.createElement("div")}catch(i){a=X.createElement("div"),h=X.body}return function(i){var s=[].slice.call(arguments,0);s.unshift(a),h.appendChild(a),a.addBehavior("#default#userData"),a.load(M),i.apply(this,s),h.removeChild(a);return}}},RpDr:function(Be,le,D){"use strict";D.d(le,"a",function(){return T}),D.d(le,"c",function(){return v});var Q=D("+L6B"),z=D("2/Rp"),M=D("tJVT"),X=D("k1fw"),F=D("jrin"),I=D("5NDa"),H=D("5rEg"),N=D("q1tI"),n=D.n(N),P=D("8Skl"),p=D("y3Kf"),m=D("bdLU"),d=D("J66h"),u=D.n(d),o=D("++UQ"),h=D.n(o),r=D("IxHN"),a=D("9Bee"),i=D("1vsH"),s,S=H.a.TextArea,x={visible:!1,tabIndex:"0"},T=(s={},Object(F.a)(s,m.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(F.a)(s,m.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(F.a)(s,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(F.a)(s,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(F.a)(s,4,"\u7F16\u8BD1\u5931\u8D25"),Object(F.a)(s,5,"\u6267\u884C\u5931\u8D25"),s),A;(function(g){g[g.SET_VISIBLE=0]="SET_VISIBLE",g[g.SET_TABINDEX=1]="SET_TABINDEX"})(A||(A={}));function w(g,f){switch(f.type){case A.SET_VISIBLE:return Object(X.a)(Object(X.a)({},g),{},{visible:f.payload});case A.SET_TABINDEX:return Object(X.a)(Object(X.a)({},g),{},{tabIndex:f.payload});default:throw new Error}}function v(g){var f=g.status,C=g.error_msg,E=g.output,_=g.input,U=g.expected_output,j=g.is_file,L=g.input_file_url,G=g.output_file_url,B=g.expected_output_file_url,O=null,V={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(f){case m.a.NOMATCH:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:_,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!j&&n.a.createElement(a.a,{value:E&&d.Base64.decode(E)||"",style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(G,E)}},E)),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!j&&n.a.createElement(a.a,{value:U&&d.Base64.decode(U)||"",style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(B,U)}},U)));break;case m.a.EXECUTEFAILURE:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:_,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.COMPILEFAILURE:O=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&n.a.createElement(a.a,{value:_,style:V}),j&&n.a.createElement("div",{style:V},n.a.createElement("a",{onClick:function(){return Object(i.y)(L,_)}},_)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.PODFAILURE:O=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case m.a.TIMEOUT:O=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",O," ")}function b(g){var f=g.status,C=g.error_msg,E=g.execute_time,_=g.output,U=g.input,j=g.expected_output,L=g.is_file,G=g.input_file_url,B=g.output_file_url,O=g.expected_output_file_url,V=null;switch(f){case m.a.OK:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",E),n.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),n.a.createElement("pre",null,d.Base64.decode(_)));break;case m.a.NOMATCH:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u8F93\u51FA\uFF1A",_&&d.Base64.decode(_)),n.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",j&&d.Base64.decode(j)));break;case m.a.EXECUTEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.COMPILEFAILURE:V=n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",n.a.createElement("pre",null,U)),n.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),n.a.createElement("pre",{className:"error"},d.Base64.decode(C)));break;case m.a.PODFAILURE:V=n.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case m.a.TIMEOUT:V=n.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return n.a.createElement(n.a.Fragment,null," ",V," ")}le.b=function(g){var f=g.id,C=g.input,E=g.debuging,_=g.submitting,U=g.executingMessage,j=g.debugResult,L=g.onChangeInput,G=g.onDebugCode,B=g.onSubmitCode,O=Object(N.useReducer)(w,x),V=Object(M.a)(O,2),te=V[0],re=V[1],ge=te.visible,Ae=te.tabIndex;Object(N.useEffect)(function(){re({type:A.SET_VISIBLE,payload:!1})},[f]);function Oe(xe){var be=xe.target.id;re({type:A.SET_TABINDEX,payload:be})}function Ce(){re({type:A.SET_VISIBLE,payload:!ge})}var je=Object(N.useMemo)(function(){if(j){var xe=j.status;return n.a.createElement(n.a.Fragment,null,b(j))}return null},[j]);function Ue(){re({type:A.SET_VISIBLE,payload:!0}),re({type:A.SET_TABINDEX,payload:"1"}),G()}return n.a.createElement("div",{className:"test-case-panel"},n.a.createElement("div",{className:"test-case-panel-body ".concat(ge?"active":"")},n.a.createElement("ul",{className:"s-navs"},n.a.createElement("li",null,n.a.createElement("a",{className:Ae==="0"?"active":"",id:"0",onClick:Oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),n.a.createElement("li",null,n.a.createElement("a",{className:Ae==="1"?"active":"",id:"1",onClick:Oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),n.a.createElement("div",{className:"tab-panel-body ".concat(Ae==="0"?"":"hide")},n.a.createElement(S,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:C,onChange:L})),n.a.createElement("div",{className:"tab-panel-body ".concat(Ae==="1"?"":"hide")},E?n.a.createElement(r.a,{message:U}):j?n.a.createElement("section",{style:{height:200}}," ",je," "):n.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),n.a.createElement("a",{className:"btn-collapse ".concat(ge?"up":""),onClick:Ce},ge?n.a.createElement(P.a,null):n.a.createElement(p.a,null)),n.a.createElement("footer",{className:"footer"},n.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),n.a.createElement("div",{className:"flex-container"},n.a.createElement(z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),n.a.createElement(z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),n.a.createElement(z.a,{className:"btn-green",type:"ghost",loading:E,onClick:Ue},"\u8C03\u8BD5\u4EE3\u7801"),n.a.createElement(z.a,{type:"primary",loading:_,disabled:_,onClick:function(){re({type:A.SET_VISIBLE,payload:!1}),B()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(Be,le,D){Be.exports=D.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Be,le,D){var Q=D("wTVA"),z=D("EbDI"),M=D("ZhPi"),X=D("wkBT");function F(I){return Q(I)||z(I)||M(I)||X()}Be.exports=F,Be.exports.__esModule=!0,Be.exports.default=Be.exports},SJMd:function(Be,le){/**
* @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 D,Q,z,M=!1,X,F;window.PR_SHOULD_USE_CONTINUATION=!0;var I,H;(function(){var N=window,n=["break,continue,do,else,for,if,return,while"],P=[n,"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"],p=[P,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[p,"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"],d=[p,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[p,"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=[p,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],r="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",a=[n,"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"],i=[n,"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"],s=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[m,u,d,h,r,a,i,s],x=/^(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",A="kwd",w="com",v="typ",b="lit",g="pun",f="pln",C="tag",E="dec",_="src",U="atn",j="atv",L="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(nt){for(var ct=0,wt=!1,_e=!1,Me=0,ve=nt.length;Me122||(ue<65||Ee>90||it.push([Math.max(65,Ee)|32,Math.min(ue,90)|32]),ue<97||Ee>122||it.push([Math.max(97,Ee)&~32,Math.min(ue,122)&~32]))}}it.sort(function(Le,Xe){return Le[0]-Xe[0]||Xe[1]-Le[1]});for(var de=[],ye=[],$e=0;$eme[0]&&(me[1]+1>me[0]&&Ge.push("-"),Ge.push(at(me[1])))}return Ge.push("]"),Ge.join("")}function Lt(Ne){for(var ke=Ne.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")),it=ke.length,ot=[],Ge=0,$e=0;Ge=2&&Ee==="["?ke[Ge]=dt(we):Ee!=="\\"&&(ke[Ge]=we.replace(/[a-zA-Z]/g,function(ye){var me=ye.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return ke.join("")}for(var It=[],Me=0,ve=nt.length;Me=0;)wt[It.charAt(Ne)]=Lt;var ke=Lt[1],it=""+ke;Je.hasOwnProperty(it)||(We.push(ke),Je[it]=null)}We.push(/[\0-\uffff]/),_e=B(We)})();var Me=ct.length,ve=function(Te){for(var We=Te.sourceCode,Je=Te.basePos,at=Te.sourceNode,dt=[Je,f],Lt=0,It=We.match(_e)||[],Ne={},ke=0,it=It.length;ke=5&&Ge.substring(0,5)==="lang-",we&&!($e&&typeof $e[1]=="string")&&(we=!1,Ge=_),we||(Ne[ot]=Ge)}var ue=Lt;if(Lt+=ot.length,!we)dt.push(Je+ue,Ge);else{var de=$e[1],ye=ot.indexOf(de),me=ye+de.length;$e[2]&&(me=ot.length-$e[2].length,ye=me-de.length);var Le=Ge.substring(5);V(at,Je+ue,ot.substring(0,ye),ve,dt),V(at,Je+ue+ye,de,be(Le,de),dt),V(at,Je+ue+me,ot.substring(me),ve,dt)}}Te.decorations=dt};return ve}function Ae(nt){var ct=[],wt=[];nt.tripleQuotedStrings?ct.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):nt.multiLineStrings?ct.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ct.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),nt.verbatimStrings&&wt.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var _e=nt.hashComments;_e&&(nt.cStyleComments?(_e>1?ct.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ct.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),wt.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ct.push([w,/^#[^\r\n]*/,null,"#"])),nt.cStyleComments&&(wt.push([w,/^\/\/[^\r\n]*/,null]),wt.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Me=nt.regexLiterals;if(Me){var ve=Me>1?"":`
\r`,Te=ve?".":"[\\S\\s]",We="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";wt.push(["lang-regex",RegExp("^"+G+"("+We+")")])}var Je=nt.types;Je&&wt.push([v,Je]);var at=(""+nt.keywords).replace(/^ | $/g,"");at.length&&wt.push([A,new RegExp("^(?:"+at.replace(/[\s,]+/g,"|")+")\\b"),null]),ct.push([f,/^\s+/,null,` \r
\xA0`]);var dt="^.[^\\s\\w.$@'\"`/\\\\]*";return nt.regexLiterals&&(dt+="(?!s*/)"),wt.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[f,/^\\[\s\S]?/,null],[g,new RegExp(dt),null]),ge(ct,wt)}var Oe=Ae({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(nt,ct,wt){for(var _e=/(?:^|\s)nocode(?:\s|$)/,Me=/\r\n?|\n/,ve=nt.ownerDocument,Te=ve.createElement("li");nt.firstChild;)Te.appendChild(nt.firstChild);var We=[Te];function Je(ke){var it=ke.nodeType;if(it==1&&!_e.test(ke.className))if(ke.nodeName==="br")at(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var ot=ke.firstChild;ot;ot=ot.nextSibling)Je(ot);else if((it==3||it==4)&&wt){var Ge=ke.nodeValue,$e=Ge.match(Me);if($e){var we=Ge.substring(0,$e.index);ke.nodeValue=we;var Se=Ge.substring($e.index+$e[0].length);if(Se){var Ee=ke.parentNode;Ee.insertBefore(ve.createTextNode(Se),ke.nextSibling)}at(ke),we||ke.parentNode.removeChild(ke)}}}function at(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function it($e,we){var Se=we?$e.cloneNode(!1):$e,Ee=$e.parentNode;if(Ee){var ue=it(Ee,1),de=$e.nextSibling;ue.appendChild(Se);for(var ye=de;ye;ye=de)de=ye.nextSibling,ue.appendChild(ye)}return Se}for(var ot=it(ke.nextSibling,0),Ge;(Ge=ot.parentNode)&&Ge.nodeType===1;)ot=Ge;We.push(ot)}for(var dt=0;dt=Ee&&(Je+=2),ve>=ue&&(Lt+=2)}}finally{Ge&&(Ge.style.display=$e)}}var Ue={};function xe(nt,ct){for(var wt=ct.length;--wt>=0;){var _e=ct[wt];Ue.hasOwnProperty(_e)?N.console&&console.warn("cannot override language handler %s",_e):Ue[_e]=nt}}function be(nt,ct){return nt&&Ue.hasOwnProperty(nt)||(nt=/^\s*]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^