(window.webpackJsonp=window.webpackJsonp||[]).push([[107,3,5,7,8,17],{"+NIl":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(Q,O){"use strict";function j(o,i){o.cmdState.push(i)}function D(o){return o.cmdState.length>0?o.cmdState[o.cmdState.length-1]:null}function B(o){var i=o.cmdState.pop();i&&i.closeBracket()}function I(o){for(var i=o.cmdState,d=i.length-1;d>=0;d--){var s=i[d];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function v(o,i,d){return function(){this.name=o,this.bracketNo=0,this.style=i,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var T={};T.importmodule=v("importmodule","tag",["string","builtin"]),T.documentclass=v("documentclass","tag",["","atom"]),T.usepackage=v("usepackage","tag",["atom"]),T.begin=v("begin","tag",["atom"]),T.end=v("end","tag",["atom"]),T.label=v("label","tag",["atom"]),T.ref=v("ref","tag",["atom"]),T.eqref=v("eqref","tag",["atom"]),T.cite=v("cite","tag",["atom"]),T.bibitem=v("bibitem","tag",["atom"]),T.Bibitem=v("Bibitem","tag",["atom"]),T.RBibitem=v("RBibitem","tag",["atom"]),T.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(o,i){o.f=i}function n(o,i){var d;if(o.match(/^\\[a-zA-Z@]+/)){var s=o.current().slice(1);return d=T.hasOwnProperty(s)?T[s]:T.DEFAULT,d=new d,j(i,d),E(i,c),d.style}if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/\\]/))return"tag";if(o.match("\\["))return E(i,function(a,p){return u(a,p,"\\]")}),"keyword";if(o.match("\\("))return E(i,function(a,p){return u(a,p,"\\)")}),"keyword";if(o.match("$$"))return E(i,function(a,p){return u(a,p,"$$")}),"keyword";if(o.match("$"))return E(i,function(a,p){return u(a,p,"$")}),"keyword";var A=o.next();if(A=="%")return o.skipToEnd(),"comment";if(A=="}"||A=="]"){if(d=D(i),d)d.closeBracket(A),E(i,c);else return"error";return"bracket"}else return A=="{"||A=="["?(d=T.DEFAULT,d=new d,j(i,d),"bracket"):/\d/.test(A)?(o.eatWhile(/[\w.%]/),"atom"):(o.eatWhile(/[\w\-_]/),d=I(i),d.name=="begin"&&(d.argument=o.current()),d.styleIdentifier())}function u(o,i,d){if(o.eatSpace())return null;if(d&&o.match(d))return E(i,n),"keyword";if(o.match(/^\\[a-zA-Z@]+/))return"tag";if(o.match(/^[a-zA-Z]+/))return"variable-2";if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/]/))return"tag";if(o.match(/^[\^_&]/))return"tag";if(o.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(o.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=o.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(o.skipToEnd(),"comment"):"error"}function c(o,i){var d=o.peek(),s;return d=="{"||d=="["?(s=D(i),s.openBracket(d),o.eat(d),E(i,n),"bracket"):/[ \t\r]/.test(d)?(o.eat(d),null):(E(i,n),B(i),n(o,i))}return{startState:function(){var o=O.inMathMode?function(i,d){return u(i,d)}:n;return{cmdState:[],f:o}},copyState:function(o){return{cmdState:o.cmdState.slice(),f:o.f}},token:function(o,i){return i.f(o,i)},blankLine:function(o){o.f=n,o.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"+ua5":function(qe,pe,G){},"06Qe":function(qe,pe,G){var q=G("ItGF"),Q="urn:schemas-microsoft-com:vml",O=typeof window=="undefined"?null:window,j=!1,D=O&&O.document;function B(T){return I(T)}var I;if(D&&!q.canvasSupported)try{!D.namespaces.zrvml&&D.namespaces.add("zrvml",Q),I=function(T){return D.createElement("')}}catch(T){I=function(E){return D.createElement("<"+E+' xmlns="'+Q+'" class="zrvml">')}}function v(){if(j||!D)return;j=!0;var T=D.styleSheets;T.length<31?D.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):T[0].addRule(".zrvml","behavior:url(#default#VML)")}pe.doc=D,pe.createNode=B,pe.initVML=v},"0s+r":function(qe,pe,G){var q=G("bYtY"),Q=G("QBsz"),O=G("y23F"),j=G("H6uX"),D=G("YH21"),B=G("C0SR"),I="silent";function v(d,s,A){return{type:d,event:A,target:s.target,topTarget:s.topTarget,cancelBubble:!1,offsetX:A.zrX,offsetY:A.zrY,gestureEvent:A.gestureEvent,pinchX:A.pinchX,pinchY:A.pinchY,pinchScale:A.pinchScale,wheelDelta:A.zrDelta,zrByTouch:A.zrByTouch,which:A.which,stop:T}}function T(){D.stop(this.event)}function E(){}E.prototype.dispose=function(){};var n=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],u=function(d,s,A,a){j.call(this),this.storage=d,this.painter=s,this.painterRoot=a,A=A||new E,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,O.call(this),this.setHandlerProxy(A)};u.prototype={constructor:u,setHandlerProxy:function(d){this.proxy&&this.proxy.dispose(),d&&(q.each(n,function(s){d.on&&d.on(s,this[s],this)},this),d.handler=this),this.proxy=d},mousemove:function(d){var s=d.zrX,A=d.zrY,a=o(this,s,A),p=this._hovered,w=p.target;w&&!w.__zr&&(p=this.findHover(p.x,p.y),w=p.target);var S=this._hovered=a?{x:s,y:A}:this.findHover(s,A),x=S.target,L=this.proxy;L.setCursor&&L.setCursor(x?x.cursor:"default"),w&&x!==w&&this.dispatchToElement(p,"mouseout",d),this.dispatchToElement(S,"mousemove",d),x&&x!==w&&this.dispatchToElement(S,"mouseover",d)},mouseout:function(d){var s=d.zrEventControl,A=d.zrIsToLocalDOM;s!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",d),s!=="no_globalout"&&(!A&&this.trigger("globalout",{type:"globalout",event:d}))},resize:function(d){this._hovered={}},dispatch:function(d,s){var A=this[d];A&&A.call(this,s)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(d){var s=this.proxy;s.setCursor&&s.setCursor(d)},dispatchToElement:function(d,s,A){d=d||{};var a=d.target;if(a&&a.silent)return;for(var p="on"+s,w=v(s,d,A);a&&!(a[p]&&(w.cancelBubble=a[p].call(a,w)),a.trigger(s,w),a=a.parent,w.cancelBubble););w.cancelBubble||(this.trigger(s,w),this.painter&&this.painter.eachOtherLayer(function(S){typeof S[p]=="function"&&S[p].call(S,w),S.trigger&&S.trigger(s,w)}))},findHover:function(d,s,A){for(var a=this.storage.getDisplayList(),p={x:d,y:s},w=a.length-1;w>=0;w--){var S;if(a[w]!==A&&!a[w].ignore&&(S=c(a[w],d,s))&&(!p.topTarget&&(p.topTarget=a[w]),S!==I)){p.target=a[w];break}}return p},processGesture:function(d,s){this._gestureMgr||(this._gestureMgr=new B);var A=this._gestureMgr;s==="start"&&A.clear();var a=A.recognize(d,this.findHover(d.zrX,d.zrY,null).target,this.proxy.dom);if(s==="end"&&A.clear(),a){var p=a.type;d.gestureEvent=p,this.dispatchToElement({target:a.target},p,a.event)}}},q.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(d){u.prototype[d]=function(s){var A=s.zrX,a=s.zrY,p=o(this,A,a),w,S;if((d!=="mouseup"||!p)&&(w=this.findHover(A,a),S=w.target),d==="mousedown")this._downEl=S,this._downPoint=[s.zrX,s.zrY],this._upEl=S;else if(d==="mouseup")this._upEl=S;else if(d==="click"){if(this._downEl!==this._upEl||!this._downPoint||Q.dist(this._downPoint,[s.zrX,s.zrY])>4)return;this._downPoint=null}this.dispatchToElement(w,d,s)}});function c(d,s,A){if(d[d.rectHover?"rectContain":"contain"](s,A)){for(var a=d,p;a;){if(a.clipPath&&!a.clipPath.contain(s,A))return!1;a.silent&&(p=!0),a=a.parent}return p?I:!0}return!1}function o(d,s,A){var a=d.painter;return s<0||s>a.getWidth()||A<0||A>a.getHeight()}q.mixin(u,j),q.mixin(u,O);var i=u;qe.exports=i},"19Vz":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){q.defineOption("placeholder","",function(v,T,E){var n=E&&E!=q.Init;if(T&&!n)v.on("blur",D),v.on("change",B),v.on("swapDoc",B),q.on(v.getInputField(),"compositionupdate",v.state.placeholderCompose=function(){j(v)}),B(v);else if(!T&&n){v.off("blur",D),v.off("change",B),v.off("swapDoc",B),q.off(v.getInputField(),"compositionupdate",v.state.placeholderCompose),Q(v);var u=v.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}T&&!v.hasFocus()&&D(v)});function Q(v){v.state.placeholder&&(v.state.placeholder.parentNode.removeChild(v.state.placeholder),v.state.placeholder=null)}function O(v){Q(v);var T=v.state.placeholder=document.createElement("pre");T.style.cssText="height: 0; overflow: visible",T.style.direction=v.getOption("direction"),T.className="CodeMirror-placeholder CodeMirror-line-like";var E=v.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),T.appendChild(E),v.display.lineSpace.insertBefore(T,v.display.lineSpace.firstChild)}function j(v){setTimeout(function(){var T=!1,E=v.getInputField();E.nodeName=="TEXTAREA"?T=!E.value:v.lineCount()==1&&(T=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),T?O(v):Q(v)},20)}function D(v){I(v)&&O(v)}function B(v){var T=v.getWrapperElement(),E=I(v);T.className=T.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?O(v):Q(v)}function I(v){return v.lineCount()===1&&v.getLine(0)===""}})},"1Jh7":function(qe,pe,G){var q=G("y+Vt"),Q=G("T6xi"),O=q.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(j,D){Q.buildPath(j,D,!1)}});qe.exports=O},"1MYJ":function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var O=this.__dirtyPath,j=this.shape.paths,D=0;D=this._maxSize&&n>0){var c=v.head;v.remove(c),delete T[c.key],E=c.value,this._lastRemovedEntry=c}u?u.value=I:u=new Q(I),u.key=B,v.insertEntry(u),T[B]=u}return E},j.get=function(B){var I=this._map[B],v=this._list;if(I!=null)return I!==v.tail&&(v.remove(I),v.insertEntry(I)),I.value},j.clear=function(){this._list.clear(),this._map={}};var D=O;qe.exports=D},"1bdT":function(qe,pe,G){var q=G("3gBT"),Q=G("H6uX"),O=G("DN4a"),j=G("vWvF"),D=G("bYtY"),B=function(v){O.call(this,v),Q.call(this,v),j.call(this,v),this.id=v.id||q()};B.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(v,T){switch(this.draggable){case"horizontal":T=0;break;case"vertical":v=0;break}var E=this.transform;E||(E=this.transform=[1,0,0,1,0,0]),E[4]+=v,E[5]+=T,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(v,T){},attrKV:function(v,T){if(v==="position"||v==="scale"||v==="origin"){if(T){var E=this[v];E||(E=this[v]=[]),E[0]=T[0],E[1]=T[1]}}else this[v]=T},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(v,T){if(typeof v=="string")this.attrKV(v,T);else if(D.isObject(v))for(var E in v)v.hasOwnProperty(E)&&this.attrKV(E,v[E]);return this.dirty(!1),this},setClipPath:function(v){var T=this.__zr;T&&v.addSelfToZr(T),this.clipPath&&this.clipPath!==v&&this.removeClipPath(),this.clipPath=v,v.__zr=T,v.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var v=this.clipPath;v&&(v.__zr&&v.removeSelfFromZr(v.__zr),v.__zr=null,v.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(v){this.__zr=v;var T=this.animators;if(T)for(var E=0;E")):null:f.match("--")?g(i("comment","-->")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),g(d(1))):null:f.eat("?")?(f.eatWhile(/[\w\._\-]/),C.tokenize=i("meta","?>"),"meta"):(E=f.eat("/")?"closeTag":"openTag",C.tokenize=c,"tag bracket");if(m=="&"){var F;return f.eat("#")?f.eat("x")?F=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):F=f.eatWhile(/[\d]/)&&f.eat(";"):F=f.eatWhile(/[\w\.\-:]/)&&f.eat(";"),F?"atom":"error"}else return f.eatWhile(/[^&<]/),null}u.isInText=!0;function c(f,C){var g=f.next();if(g==">"||g=="/"&&f.eat(">"))return C.tokenize=u,E=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return E="equals",null;if(g=="<"){C.tokenize=u,C.state=p,C.tagName=C.tagStart=null;var m=C.tokenize(f,C);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(g)?(C.tokenize=o(g),C.stringStartCol=f.column(),C.tokenize(f,C)):(f.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(f){var C=function(g,m){for(;!g.eol();)if(g.next()==f){m.tokenize=c;break}return"string"};return C.isInAttribute=!0,C}function i(f,C){return function(g,m){for(;!g.eol();){if(g.match(C)){m.tokenize=u;break}g.next()}return f}}function d(f){return function(C,g){for(var m;(m=C.next())!=null;){if(m=="<")return g.tokenize=d(f+1),g.tokenize(C,g);if(m==">")if(f==1){g.tokenize=u;break}else return g.tokenize=d(f-1),g.tokenize(C,g)}return"meta"}}function s(f,C,g){this.prev=f.context,this.tagName=C,this.indent=f.indented,this.startOfLine=g,(I.doNotIndent.hasOwnProperty(C)||f.context&&f.context.noIndent)&&(this.noIndent=!0)}function A(f){f.context&&(f.context=f.context.prev)}function a(f,C){for(var g;;){if(!f.context)return;if(g=f.context.tagName,!I.contextGrabbers.hasOwnProperty(g)||!I.contextGrabbers[g].hasOwnProperty(C))return;A(f)}}function p(f,C,g){return f=="openTag"?(g.tagStart=C.column(),w):f=="closeTag"?S:p}function w(f,C,g){return f=="word"?(g.tagName=C.current(),n="tag",b):I.allowMissingTagName&&f=="endTag"?(n="tag bracket",b(f,C,g)):(n="error",w)}function S(f,C,g){if(f=="word"){var m=C.current();return g.context&&g.context.tagName!=m&&I.implicitlyClosed.hasOwnProperty(g.context.tagName)&&A(g),g.context&&g.context.tagName==m||I.matchClosing===!1?(n="tag",x):(n="tag error",L)}else return I.allowMissingTagName&&f=="endTag"?(n="tag bracket",x(f,C,g)):(n="error",L)}function x(f,C,g){return f!="endTag"?(n="error",x):(A(g),p)}function L(f,C,g){return n="error",x(f,C,g)}function b(f,C,g){if(f=="word")return n="attribute",h;if(f=="endTag"||f=="selfcloseTag"){var m=g.tagName,F=g.tagStart;return g.tagName=g.tagStart=null,f=="selfcloseTag"||I.autoSelfClosers.hasOwnProperty(m)?a(g,m):(a(g,m),g.context=new s(g,m,F==g.indented)),p}return n="error",b}function h(f,C,g){return f=="equals"?r:(I.allowMissing||(n="error"),b(f,C,g))}function r(f,C,g){return f=="string"?l:f=="word"&&I.allowUnquoted?(n="string",b):(n="error",b(f,C,g))}function l(f,C,g){return f=="string"?l:b(f,C,g)}return{startState:function(f){var C={tokenize:u,state:p,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;E=null;var g=C.tokenize(f,C);return(g||E)&&g!="comment"&&(n=null,C.state=C.state(E||g,f,C),n&&(g=n=="error"?g+" error":n)),g},indent:function(f,C,g){var m=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+B;if(m&&m.noIndent)return q.Pass;if(f.tokenize!=c&&f.tokenize!=u)return g?g.match(/^(\s*)/)[0].length:0;if(f.tagName)return I.multilineTagIndentPastTag!==!1?f.tagStart+f.tagName.length+2:f.tagStart+B*(I.multilineTagIndentFactor||1);if(I.alignCDATA&&/$/,blockCommentStart:"",configuration:I.htmlMode?"html":"xml",helperType:I.htmlMode?"html":"xml",skipAttribute:function(f){f.state==r&&(f.state=b)},xmlCurrentTag:function(f){return f.tagName?{name:f.tagName,close:f.type=="closeTag"}:null},xmlCurrentContext:function(f){for(var C=[],g=f.context;g;g=g.prev)g.tagName&&C.push(g.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})})},"1eJ8":function(qe,pe,G){qe.exports={md:"md___1fRow"}},"1j5w":function(qe,pe,G){"use strict";G.d(pe,"d",function(){return ct}),G.d(pe,"b",function(){return De}),G.d(pe,"c",function(){return ht}),G.d(pe,"a",function(){return kt});var q=G("VTBJ"),Q=G("1OyB"),O=G("vuIU"),j=G("JX7q"),D=G("Ji7U"),B=G("LK+K"),I=G("q1tI"),v=G("I8Z2"),T=G("BGR+"),E=G("wx14"),n=G("rePB"),u=G("4IlW"),c=G("2GS6"),o=G("Gytx"),i=G.n(o),d=G("TSYQ"),s=G.n(d),A=G("U8pU"),a=G("ODXe"),p=/iPhone/i,w=/iPod/i,S=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,b=/\bAndroid(?:.+)SD4930UR\b/i,h=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,r=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,f=/BlackBerry/i,C=/BB10/i,g=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,F=/Mobile(?:.+)Firefox\b/i;function P(St,ut){return St.test(ut)}function z(St){var ut=St||(typeof navigator!="undefined"?navigator.userAgent:""),nt=ut.split("[FBAN");if(typeof nt[1]!="undefined"){var tt=nt,Ce=Object(a.a)(tt,1);ut=Ce[0]}if(nt=ut.split("Twitter"),typeof nt[1]!="undefined"){var Pe=nt,pt=Object(a.a)(Pe,1);ut=pt[0]}var it={apple:{phone:P(p,ut)&&!P(r,ut),ipod:P(w,ut),tablet:!P(p,ut)&&P(S,ut)&&!P(r,ut),device:(P(p,ut)||P(w,ut)||P(S,ut))&&!P(r,ut)},amazon:{phone:P(b,ut),tablet:!P(b,ut)&&P(h,ut),device:P(b,ut)||P(h,ut)},android:{phone:!P(r,ut)&&P(b,ut)||!P(r,ut)&&P(x,ut),tablet:!P(r,ut)&&!P(b,ut)&&!P(x,ut)&&(P(h,ut)||P(L,ut)),device:!P(r,ut)&&(P(b,ut)||P(h,ut)||P(x,ut)||P(L,ut))||P(/\bokhttp\b/i,ut)},windows:{phone:P(r,ut),tablet:P(l,ut),device:P(r,ut)||P(l,ut)},other:{blackberry:P(f,ut),blackberry10:P(C,ut),opera:P(g,ut),firefox:P(F,ut),chrome:P(m,ut),device:P(f,ut)||P(C,ut)||P(g,ut)||P(F,ut)||P(m,ut)},any:null,phone:null,tablet:null};return it.any=it.apple.device||it.android.device||it.windows.device||it.other.device,it.phone=it.apple.phone||it.android.phone||it.windows.phone,it.tablet=it.apple.tablet||it.android.tablet||it.windows.tablet,it}var Z=Object(q.a)(Object(q.a)({},z()),{},{isMobile:z}),V=Z;function M(){}function J(St,ut,nt){var tt=ut||"";return St.key||"".concat(tt,"item_").concat(nt)}function X(St){return"".concat(St,"-menu-")}function re(St,ut){var nt=-1;I.Children.forEach(St,function(tt){nt+=1,tt&&tt.type&&tt.type.isMenuItemGroup?I.Children.forEach(tt.props.children,function(Ce){nt+=1,ut(Ce,nt)}):ut(tt,nt)})}function se(St,ut,nt){if(!St||nt.find)return;I.Children.forEach(St,function(tt){if(tt){var Ce=tt.type;if(!Ce||!(Ce.isSubMenu||Ce.isMenuItem||Ce.isMenuItemGroup))return;ut.indexOf(tt.key)!==-1?nt.find=!0:tt.props.children&&se(tt.props.children,ut,nt)}})}var _e=["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"],ge=function(ut){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=ut&&typeof ut.getBoundingClientRect=="function"&&ut.getBoundingClientRect().width;if(tt){if(nt){var Ce=getComputedStyle(ut),Pe=Ce.marginLeft,pt=Ce.marginRight;tt+=+Pe.replace("px","")+ +pt.replace("px","")}tt=+tt.toFixed(6)}return tt||0},we=function(ut,nt,tt){ut&&Object(A.a)(ut.style)==="object"&&(ut.style[nt]=tt)},Re=function(){return V.any},He=G("KQm4"),Se=G("Ff2n"),Te=G("i8i4"),$e=G("bdgK"),bt=G("uciX"),Ie=G("8XRh"),ze={adjustX:1,adjustY:1},at={topLeft:{points:["bl","tl"],overflow:ze,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ze,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ze,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ze,offset:[4,0]}},Ae={topLeft:{points:["bl","tl"],overflow:ze,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ze,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ze,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ze,offset:[4,0]}},ne=at,ae=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},xe=function(ut,nt,tt){var Ce=X(nt),Pe=ut.getState();ut.setState({defaultActiveFirst:Object(q.a)(Object(q.a)({},Pe.defaultActiveFirst),{},Object(n.a)({},Ce,tt))})},Fe=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.onDestroy=function(Xe){Ce.props.onDestroy(Xe)},Ce.onKeyDown=function(Xe){var mt=Xe.keyCode,Pt=Ce.menuInstance,Rt=Ce.props,Qt=Rt.isOpen,Ir=Rt.store;if(mt===u.a.ENTER)return Ce.onTitleClick(Xe),xe(Ir,Ce.props.eventKey,!0),!0;if(mt===u.a.RIGHT)return Qt?Pt.onKeyDown(Xe):(Ce.triggerOpenChange(!0),xe(Ir,Ce.props.eventKey,!0)),!0;if(mt===u.a.LEFT){var Fr;if(Qt)Fr=Pt.onKeyDown(Xe);else return;return Fr||(Ce.triggerOpenChange(!1),Fr=!0),Fr}return Qt&&(mt===u.a.UP||mt===u.a.DOWN)?Pt.onKeyDown(Xe):void 0},Ce.onOpenChange=function(Xe){Ce.props.onOpenChange(Xe)},Ce.onPopupVisibleChange=function(Xe){Ce.triggerOpenChange(Xe,Xe?"mouseenter":"mouseleave")},Ce.onMouseEnter=function(Xe){var mt=Ce.props,Pt=mt.eventKey,Rt=mt.onMouseEnter,Qt=mt.store;xe(Qt,Ce.props.eventKey,!1),Rt({key:Pt,domEvent:Xe})},Ce.onMouseLeave=function(Xe){var mt=Ce.props,Pt=mt.parentMenu,Rt=mt.eventKey,Qt=mt.onMouseLeave;Pt.subMenuInstance=Object(j.a)(Ce),Qt({key:Rt,domEvent:Xe})},Ce.onTitleMouseEnter=function(Xe){var mt=Ce.props,Pt=mt.eventKey,Rt=mt.onItemHover,Qt=mt.onTitleMouseEnter;Rt({key:Pt,hover:!0}),Qt({key:Pt,domEvent:Xe})},Ce.onTitleMouseLeave=function(Xe){var mt=Ce.props,Pt=mt.parentMenu,Rt=mt.eventKey,Qt=mt.onItemHover,Ir=mt.onTitleMouseLeave;Pt.subMenuInstance=Object(j.a)(Ce),Qt({key:Rt,hover:!1}),Ir({key:Rt,domEvent:Xe})},Ce.onTitleClick=function(Xe){var mt=Object(j.a)(Ce),Pt=mt.props;if(Pt.onTitleClick({key:Pt.eventKey,domEvent:Xe}),Pt.triggerSubMenuAction==="hover")return;Ce.triggerOpenChange(!Pt.isOpen,"click"),xe(Pt.store,Ce.props.eventKey,!1)},Ce.onSubMenuClick=function(Xe){typeof Ce.props.onClick=="function"&&Ce.props.onClick(Ce.addKeyPath(Xe))},Ce.onSelect=function(Xe){Ce.props.onSelect(Xe)},Ce.onDeselect=function(Xe){Ce.props.onDeselect(Xe)},Ce.getPrefixCls=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu")},Ce.getActiveClassName=function(){return"".concat(Ce.getPrefixCls(),"-active")},Ce.getDisabledClassName=function(){return"".concat(Ce.getPrefixCls(),"-disabled")},Ce.getSelectedClassName=function(){return"".concat(Ce.getPrefixCls(),"-selected")},Ce.getOpenClassName=function(){return"".concat(Ce.props.rootPrefixCls,"-submenu-open")},Ce.saveMenuInstance=function(Xe){Ce.menuInstance=Xe},Ce.addKeyPath=function(Xe){return Object(q.a)(Object(q.a)({},Xe),{},{keyPath:(Xe.keyPath||[]).concat(Ce.props.eventKey)})},Ce.triggerOpenChange=function(Xe,mt){var Pt=Ce.props.eventKey,Rt=function(){Ce.onOpenChange({key:Pt,item:Object(j.a)(Ce),trigger:mt,open:Xe})};mt==="mouseenter"?Ce.mouseenterTimeout=setTimeout(function(){Rt()},0):Rt()},Ce.isChildrenSelected=function(){var Xe={find:!1};return se(Ce.props.children,Ce.props.selectedKeys,Xe),Xe.find},Ce.isOpen=function(){return Ce.props.openKeys.indexOf(Ce.props.eventKey)!==-1},Ce.adjustWidth=function(){if(!Ce.subMenuTitle||!Ce.menuInstance)return;var Xe=Te.findDOMNode(Ce.menuInstance);if(Xe.offsetWidth>=Ce.subMenuTitle.offsetWidth)return;Xe.style.minWidth="".concat(Ce.subMenuTitle.offsetWidth,"px")},Ce.saveSubMenuTitle=function(Xe){Ce.subMenuTitle=Xe},Ce.getBaseProps=function(){var Xe=Object(j.a)(Ce),mt=Xe.props;return{mode:mt.mode==="horizontal"?"vertical":mt.mode,visible:Ce.props.isOpen,level:mt.level+1,inlineIndent:mt.inlineIndent,focusable:!1,onClick:Ce.onSubMenuClick,onSelect:Ce.onSelect,onDeselect:Ce.onDeselect,onDestroy:Ce.onDestroy,selectedKeys:mt.selectedKeys,eventKey:"".concat(mt.eventKey,"-menu-"),openKeys:mt.openKeys,motion:mt.motion,onOpenChange:Ce.onOpenChange,subMenuOpenDelay:mt.subMenuOpenDelay,parentMenu:Object(j.a)(Ce),subMenuCloseDelay:mt.subMenuCloseDelay,forceSubMenuRender:mt.forceSubMenuRender,triggerSubMenuAction:mt.triggerSubMenuAction,builtinPlacements:mt.builtinPlacements,defaultActiveFirst:mt.store.getState().defaultActiveFirst[X(mt.eventKey)],multiple:mt.multiple,prefixCls:mt.rootPrefixCls,id:Ce.internalMenuId,manualRef:Ce.saveMenuInstance,itemIcon:mt.itemIcon,expandIcon:mt.expandIcon,direction:mt.direction}},Ce.getMotion=function(Xe,mt){var Pt=Object(j.a)(Ce),Rt=Pt.haveRendered,Qt=Ce.props,Ir=Qt.motion,Fr=Qt.rootPrefixCls,wr=Object(q.a)(Object(q.a)({},Ir),{},{leavedClassName:"".concat(Fr,"-hidden"),removeOnLeave:!1,motionAppear:Rt||!mt||Xe!=="inline"});return wr};var Pe=tt.store,pt=tt.eventKey,it=Pe.getState(),xt=it.defaultActiveFirst;Ce.isRootMenu=!1;var _t=!1;return xt&&(_t=xt[pt]),xe(Pe,pt,_t),Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ce=this,Pe=this.props,pt=Pe.mode,it=Pe.parentMenu,xt=Pe.manualRef;if(xt&&xt(this),pt!=="horizontal"||!it.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ce=this.props,Pe=Ce.onDestroy,pt=Ce.eventKey;Pe&&Pe(pt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Ce){var Pe=this,pt=this.getBaseProps(),it=this.getMotion(pt.mode,pt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||pt.visible||pt.forceSubMenuRender,!this.haveOpened)return I.createElement("div",null);var xt=pt.direction;return I.createElement(Ie.default,Object.assign({visible:pt.visible},it),function(_t){var Xe=_t.className,mt=_t.style,Pt=s()("".concat(pt.prefixCls,"-sub"),Xe,Object(n.a)({},"".concat(pt.prefixCls,"-rtl"),xt==="rtl"));return I.createElement(je,Object.assign({},pt,{id:Pe.internalMenuId,className:Pt,style:mt}),Ce)})}},{key:"render",value:function(){var Ce,Pe=Object(q.a)({},this.props),pt=Pe.isOpen,it=this.getPrefixCls(),xt=Pe.mode==="inline",_t=s()(it,"".concat(it,"-").concat(Pe.mode),(Ce={},Object(n.a)(Ce,Pe.className,!!Pe.className),Object(n.a)(Ce,this.getOpenClassName(),pt),Object(n.a)(Ce,this.getActiveClassName(),Pe.active||pt&&!xt),Object(n.a)(Ce,this.getDisabledClassName(),Pe.disabled),Object(n.a)(Ce,this.getSelectedClassName(),this.isChildrenSelected()),Ce));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(ae+=1,this.internalMenuId="$__$".concat(ae,"$Menu")));var Xe={},mt={},Pt={};Pe.disabled||(Xe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},mt={onClick:this.onTitleClick},Pt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Rt={},Qt=Pe.direction;xt&&(Qt==="rtl"?Rt.paddingRight=Pe.inlineIndent*Pe.level:Rt.paddingLeft=Pe.inlineIndent*Pe.level);var Ir={};this.props.isOpen&&(Ir={"aria-owns":this.internalMenuId});var Fr=null;Pe.mode!=="horizontal"&&(Fr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Fr=I.createElement(this.props.expandIcon,Object(q.a)({},this.props))));var wr=I.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Rt,className:"".concat(it,"-title"),role:"button"},Pt,mt,{"aria-expanded":pt},Ir,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,Fr||I.createElement("i",{className:"".concat(it,"-arrow")})),Kt=this.renderChildren(Pe.children),Ur=Pe.parentMenu.isRootMenu?Pe.parentMenu.props.getPopupContainer:function(et){return et.parentNode},Kr=ce[Pe.mode],Rr=Pe.popupOffset?{offset:Pe.popupOffset}:{},pr=Pe.mode==="inline"?"":Pe.popupClassName;pr+=Qt==="rtl"?" ".concat(it,"-rtl"):"";var Or=Pe.disabled,pn=Pe.triggerSubMenuAction,un=Pe.subMenuOpenDelay,fe=Pe.forceSubMenuRender,be=Pe.subMenuCloseDelay,Ue=Pe.builtinPlacements;_e.forEach(function(et){return delete Pe[et]}),delete Pe.onClick;var rt=Qt==="rtl"?Object.assign({},Ae,Ue):Object.assign({},at,Ue);return delete Pe.direction,I.createElement("li",Object.assign({},Pe,Xe,{className:_t,role:"menuitem"}),xt&&wr,xt&&Kt,!xt&&I.createElement(bt.a,{prefixCls:it,popupClassName:s()("".concat(it,"-popup"),pr),getPopupContainer:Ur,builtinPlacements:rt,popupPlacement:Kr,popupVisible:pt,popupAlign:Rr,popup:Kt,action:Or?[]:[pn],mouseEnterDelay:un,mouseLeaveDelay:be,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fe},wr))}}]),nt}(I.Component);Fe.defaultProps={onMouseEnter:M,onMouseLeave:M,onTitleMouseEnter:M,onTitleMouseLeave:M,onTitleClick:M,manualRef:M,mode:"vertical",title:""};var ke=Object(v.b)(function(St,ut){var nt=St.openKeys,tt=St.activeKey,Ce=St.selectedKeys,Pe=ut.eventKey,pt=ut.subMenuKey;return{isOpen:nt.indexOf(Pe)>-1,active:tt[pt]===Pe,selectedKeys:Ce}})(Fe);ke.isSubMenu=!0;var ct=ke,ft="menuitem-overflowed",yt=.5,Et=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.resizeObserver=null,tt.mutationObserver=null,tt.originalTotalWidth=0,tt.overflowedItems=[],tt.menuItemSizes=[],tt.cancelFrameId=null,tt.state={lastVisibleIndex:void 0},tt.getMenuItemNodes=function(){var Ce=tt.props.prefixCls,Pe=Te.findDOMNode(Object(j.a)(tt));return Pe?[].slice.call(Pe.children).filter(function(pt){return pt.className.split(" ").indexOf("".concat(Ce,"-overflowed-submenu"))<0}):[]},tt.getOverflowedSubMenuItem=function(Ce,Pe,pt){var it=tt.props,xt=it.overflowedIndicator,_t=it.level,Xe=it.mode,mt=it.prefixCls,Pt=it.theme;if(_t!==1||Xe!=="horizontal")return null;var Rt=tt.props.children[0],Qt=Rt.props,Ir=Qt.children,Fr=Qt.title,wr=Qt.style,Kt=Object(Se.a)(Qt,["children","title","style"]),Ur=Object(q.a)({},wr),Kr="".concat(Ce,"-overflowed-indicator"),Rr="".concat(Ce,"-overflowed-indicator");Pe.length===0&&pt!==!0?Ur=Object(q.a)(Object(q.a)({},Ur),{},{display:"none"}):pt&&(Ur=Object(q.a)(Object(q.a)({},Ur),{},{visibility:"hidden",position:"absolute"}),Kr="".concat(Kr,"-placeholder"),Rr="".concat(Rr,"-placeholder"));var pr=Pt?"".concat(mt,"-").concat(Pt):"",Or={};return _e.forEach(function(pn){Kt[pn]!==void 0&&(Or[pn]=Kt[pn])}),I.createElement(ct,Object.assign({title:xt,className:"".concat(mt,"-overflowed-submenu"),popupClassName:pr},Or,{key:Kr,eventKey:Rr,disabled:!1,style:Ur}),Pe)},tt.setChildrenWidthAndResize=function(){if(tt.props.mode!=="horizontal")return;var Ce=Te.findDOMNode(Object(j.a)(tt));if(!Ce)return;var Pe=Ce.children;if(!Pe||Pe.length===0)return;var pt=Ce.children[Pe.length-1];we(pt,"display","inline-block");var it=tt.getMenuItemNodes(),xt=it.filter(function(_t){return _t.className.split(" ").indexOf(ft)>=0});xt.forEach(function(_t){we(_t,"display","inline-block")}),tt.menuItemSizes=it.map(function(_t){return ge(_t,!0)}),xt.forEach(function(_t){we(_t,"display","none")}),tt.overflowedIndicatorWidth=ge(Ce.children[Ce.children.length-1],!0),tt.originalTotalWidth=tt.menuItemSizes.reduce(function(_t,Xe){return _t+Xe},0),tt.handleResize(),we(pt,"display","none")},tt.handleResize=function(){if(tt.props.mode!=="horizontal")return;var Ce=Te.findDOMNode(Object(j.a)(tt));if(!Ce)return;var Pe=ge(Ce);tt.overflowedItems=[];var pt=0,it;tt.originalTotalWidth>Pe+yt&&(it=-1,tt.menuItemSizes.forEach(function(xt){pt+=xt,pt+tt.overflowedIndicatorWidth<=Pe&&(it+=1)})),tt.setState({lastVisibleIndex:it})},tt}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){var Ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=Te.findDOMNode(this);if(!Pe)return;this.resizeObserver=new $e.default(function(pt){pt.forEach(function(){var it=Ce.cancelFrameId;cancelAnimationFrame(it),Ce.cancelFrameId=requestAnimationFrame(Ce.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(pt){Ce.resizeObserver.observe(pt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ce.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(pt){Ce.resizeObserver.observe(pt)}),Ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{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(Ce){var Pe=this,pt=this.state.lastVisibleIndex;return(Ce||[]).reduce(function(it,xt,_t){var Xe=xt;if(Pe.props.mode==="horizontal"){var mt=Pe.getOverflowedSubMenuItem(xt.props.eventKey,[]);pt!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(_t>pt&&(Xe=I.cloneElement(xt,{style:{display:"none"},eventKey:"".concat(xt.props.eventKey,"-hidden"),className:"".concat(ft)})),_t===pt+1&&(Pe.overflowedItems=Ce.slice(pt+1).map(function(Rt){return I.cloneElement(Rt,{key:Rt.props.eventKey,mode:"vertical-left"})}),mt=Pe.getOverflowedSubMenuItem(xt.props.eventKey,Pe.overflowedItems)));var Pt=[].concat(Object(He.a)(it),[mt,Xe]);return _t===Ce.length-1&&Pt.push(Pe.getOverflowedSubMenuItem(xt.props.eventKey,[],!0)),Pt}return[].concat(Object(He.a)(it),[Xe])},[])}},{key:"render",value:function(){var Ce=this.props,Pe=Ce.visible,pt=Ce.prefixCls,it=Ce.overflowedIndicator,xt=Ce.mode,_t=Ce.level,Xe=Ce.tag,mt=Ce.children,Pt=Ce.theme,Rt=Object(Se.a)(Ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Qt=Xe;return I.createElement(Qt,Object.assign({},Rt),this.renderChildren(mt))}}]),nt}(I.Component);Et.defaultProps={tag:"div",className:""};var Ot=Et;function Mt(St){return St.length?St.every(function(ut){return!!ut.props.disabled}):!0}function Qe(St,ut,nt){var tt=St.getState();St.setState({activeKey:Object(q.a)(Object(q.a)({},tt.activeKey),{},Object(n.a)({},ut,nt))})}function Ne(St){return St.eventKey||"0-menu-"}function lt(St,ut){var nt=ut,tt=St.children,Ce=St.eventKey;if(nt){var Pe;if(re(tt,function(pt,it){pt&&pt.props&&!pt.props.disabled&&nt===J(pt,Ce,it)&&(Pe=!0)}),Pe)return nt}return nt=null,St.defaultActiveFirst&&re(tt,function(pt,it){!nt&&pt&&!pt.props.disabled&&(nt=J(pt,Ce,it))}),nt}function dt(St){if(St){var ut=this.instanceArray.indexOf(St);ut!==-1?this.instanceArray[ut]=St:this.instanceArray.push(St)}}var Ye=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;return Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.onKeyDown=function(Pe,pt){var it=Pe.keyCode,xt;if(Ce.getFlatInstanceArray().forEach(function(Xe){Xe&&Xe.props.active&&Xe.onKeyDown&&(xt=Xe.onKeyDown(Pe))}),xt)return 1;var _t=null;return(it===u.a.UP||it===u.a.DOWN)&&(_t=Ce.step(it===u.a.UP?-1:1)),_t?(Pe.preventDefault(),Qe(Ce.props.store,Ne(Ce.props),_t.props.eventKey),typeof pt=="function"&&pt(_t),1):void 0},Ce.onItemHover=function(Pe){var pt=Pe.key,it=Pe.hover;Qe(Ce.props.store,Ne(Ce.props),it?pt:null)},Ce.onDeselect=function(Pe){Ce.props.onDeselect(Pe)},Ce.onSelect=function(Pe){Ce.props.onSelect(Pe)},Ce.onClick=function(Pe){Ce.props.onClick(Pe)},Ce.onOpenChange=function(Pe){Ce.props.onOpenChange(Pe)},Ce.onDestroy=function(Pe){Ce.props.onDestroy(Pe)},Ce.getFlatInstanceArray=function(){return Ce.instanceArray},Ce.step=function(Pe){var pt=Ce.getFlatInstanceArray(),it=Ce.props.store.getState().activeKey[Ne(Ce.props)],xt=pt.length;if(!xt)return null;Pe<0&&(pt=pt.concat().reverse());var _t=-1;if(pt.every(function(Rt,Qt){return Rt&&Rt.props.eventKey===it?(_t=Qt,!1):!0}),!Ce.props.defaultActiveFirst&&_t!==-1&&Mt(pt.slice(_t,xt-1)))return;var Xe=(_t+1)%xt,mt=Xe;do{var Pt=pt[mt];if(!Pt||Pt.props.disabled)mt=(mt+1)%xt;else return Pt}while(mt!==Xe);return null},Ce.renderCommonMenuItem=function(Pe,pt,it){var xt=Ce.props.store.getState(),_t=Object(j.a)(Ce),Xe=_t.props,mt=J(Pe,Xe.eventKey,pt),Pt=Pe.props;if(!Pt||typeof Pe.type=="string")return Pe;var Rt=mt===xt.activeKey,Qt=Object(q.a)(Object(q.a)({mode:Pt.mode||Xe.mode,level:Xe.level,inlineIndent:Xe.inlineIndent,renderMenuItem:Ce.renderMenuItem,rootPrefixCls:Xe.prefixCls,index:pt,parentMenu:Xe.parentMenu,manualRef:Pt.disabled?void 0:Object(c.a)(Pe.ref,dt.bind(Object(j.a)(Ce))),eventKey:mt,active:!Pt.disabled&&Rt,multiple:Xe.multiple,onClick:function(Fr){(Pt.onClick||M)(Fr),Ce.onClick(Fr)},onItemHover:Ce.onItemHover,motion:Xe.motion,subMenuOpenDelay:Xe.subMenuOpenDelay,subMenuCloseDelay:Xe.subMenuCloseDelay,forceSubMenuRender:Xe.forceSubMenuRender,onOpenChange:Ce.onOpenChange,onDeselect:Ce.onDeselect,onSelect:Ce.onSelect,builtinPlacements:Xe.builtinPlacements,itemIcon:Pt.itemIcon||Ce.props.itemIcon,expandIcon:Pt.expandIcon||Ce.props.expandIcon},it),{},{direction:Xe.direction});return(Xe.mode==="inline"||Re())&&(Qt.triggerSubMenuAction="click"),I.cloneElement(Pe,Qt)},Ce.renderMenuItem=function(Pe,pt,it){if(!Pe)return null;var xt=Ce.props.store.getState(),_t={openKeys:xt.openKeys,selectedKeys:xt.selectedKeys,triggerSubMenuAction:Ce.props.triggerSubMenuAction,subMenuKey:it};return Ce.renderCommonMenuItem(Pe,pt,_t)},tt.store.setState({activeKey:Object(q.a)(Object(q.a)({},tt.store.getState().activeKey),{},Object(n.a)({},tt.eventKey,lt(tt,tt.activeKey)))}),Ce.instanceArray=[],Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ce){return this.props.visible||Ce.visible||this.props.className!==Ce.className||!i()(this.props.style,Ce.style)}},{key:"componentDidUpdate",value:function(Ce){var Pe=this.props,pt="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[Ne(Pe)],it=lt(Pe,pt);if(it!==pt)Qe(Pe.store,Ne(Pe),it);else if("activeKey"in Ce){var xt=lt(Ce,Ce.activeKey);it!==xt&&Qe(Pe.store,Ne(Pe),it)}}},{key:"render",value:function(){var Ce=this,Pe=Object(E.a)({},this.props);this.instanceArray=[];var pt=s()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),it={className:pt,role:Pe.role||"menu"};Pe.id&&(it.id=Pe.id),Pe.focusable&&(it.tabIndex=0,it.onKeyDown=this.onKeyDown);var xt=Pe.prefixCls,_t=Pe.eventKey,Xe=Pe.visible,mt=Pe.level,Pt=Pe.mode,Rt=Pe.overflowedIndicator,Qt=Pe.theme;return _e.forEach(function(Ir){return delete Pe[Ir]}),delete Pe.onClick,I.createElement(Ot,Object.assign({},Pe,{prefixCls:xt,mode:Pt,tag:"ul",level:mt,theme:Qt,visible:Xe,overflowedIndicator:Rt},it),I.Children.map(Pe.children,function(Ir,Fr){return Ce.renderMenuItem(Ir,Fr,_t||"0-menu-")}))}}]),nt}(I.Component);Ye.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:M};var st=Object(v.b)()(Ye),je=st,Le=G("Kwbf");function Me(St,ut,nt){var tt=St.prefixCls,Ce=St.motion,Pe=St.defaultMotions,pt=Pe===void 0?{}:Pe,it=St.openAnimation,xt=St.openTransitionName,_t=ut.switchingModeFromInline;if(Ce)return Ce;if(Object(A.a)(it)==="object"&&it)Object(Le.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof it=="string")return{motionName:"".concat(tt,"-open-").concat(it)};if(xt)return{motionName:xt};var Xe=pt[nt];return Xe||(_t?null:pt.other)}var me=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(tt){var Ce;Object(Q.a)(this,nt),Ce=ut.call(this,tt),Ce.inlineOpenKeys=[],Ce.onSelect=function(it){var xt=Object(j.a)(Ce),_t=xt.props;if(_t.selectable){var Xe=Ce.store.getState(),mt=Xe.selectedKeys,Pt=it.key;_t.multiple?mt=mt.concat([Pt]):mt=[Pt],"selectedKeys"in _t||Ce.store.setState({selectedKeys:mt}),_t.onSelect(Object(q.a)(Object(q.a)({},it),{},{selectedKeys:mt}))}},Ce.onClick=function(it){var xt=Ce.getRealMenuMode(),_t=Object(j.a)(Ce),Xe=_t.store,mt=_t.props.onOpenChange;xt!=="inline"&&!("openKeys"in Ce.props)&&(Xe.setState({openKeys:[]}),mt([])),Ce.props.onClick(it)},Ce.onKeyDown=function(it,xt){Ce.innerMenu.getWrappedInstance().onKeyDown(it,xt)},Ce.onOpenChange=function(it){var xt=Object(j.a)(Ce),_t=xt.props,Xe=Ce.store.getState().openKeys.concat(),mt=!1,Pt=function(Qt){var Ir=!1;if(Qt.open)Ir=Xe.indexOf(Qt.key)===-1,Ir&&Xe.push(Qt.key);else{var Fr=Xe.indexOf(Qt.key);Ir=Fr!==-1,Ir&&Xe.splice(Fr,1)}mt=mt||Ir};Array.isArray(it)?it.forEach(Pt):Pt(it),mt&&("openKeys"in Ce.props||Ce.store.setState({openKeys:Xe}),_t.onOpenChange(Xe))},Ce.onDeselect=function(it){var xt=Object(j.a)(Ce),_t=xt.props;if(_t.selectable){var Xe=Ce.store.getState().selectedKeys.concat(),mt=it.key,Pt=Xe.indexOf(mt);Pt!==-1&&Xe.splice(Pt,1),"selectedKeys"in _t||Ce.store.setState({selectedKeys:Xe}),_t.onDeselect(Object(q.a)(Object(q.a)({},it),{},{selectedKeys:Xe}))}},Ce.onMouseEnter=function(it){Ce.restoreModeVerticalFromInline();var xt=Ce.props.onMouseEnter;xt&&xt(it)},Ce.onTransitionEnd=function(it){var xt=it.propertyName==="width"&&it.target===it.currentTarget,_t=it.target.className,Xe=Object.prototype.toString.call(_t)==="[object SVGAnimatedString]"?_t.animVal:_t,mt=it.propertyName==="font-size"&&Xe.indexOf("anticon")>=0;(xt||mt)&&Ce.restoreModeVerticalFromInline()},Ce.setInnerMenu=function(it){Ce.innerMenu=it},Ce.isRootMenu=!0;var Pe=tt.defaultSelectedKeys,pt=tt.defaultOpenKeys;return"selectedKeys"in tt&&(Pe=tt.selectedKeys||[]),"openKeys"in tt&&(pt=tt.openKeys||[]),Ce.store=Object(v.c)({selectedKeys:Pe,openKeys:pt,activeKey:{"0-menu-":lt(tt,tt.activeKey)}}),Ce.state={switchingModeFromInline:!1},Ce}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ce){this.updateOpentKeysWhenSwitchMode(Ce),this.updateMiniStore();var Pe=this.props,pt=Pe.siderCollapsed,it=Pe.inlineCollapsed,xt=Pe.onOpenChange;(!Ce.inlineCollapsed&&it||!Ce.siderCollapsed&&pt)&&xt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Ce){var Pe=this.props,pt=this.store,it=this.inlineOpenKeys,xt=pt.getState(),_t={};Ce.mode==="inline"&&Pe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Pe||((Pe.inlineCollapsed&&!Ce.inlineCollapsed||Pe.siderCollapsed&&!Ce.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=xt.openKeys.concat(),_t.openKeys=[]),(!Pe.inlineCollapsed&&Ce.inlineCollapsed||!Pe.siderCollapsed&&Ce.siderCollapsed)&&(_t.openKeys=it,this.inlineOpenKeys=[])),Object.keys(_t).length&&pt.setState(_t)}},{key:"updateMenuDisplay",value:function(){var Ce=this.props.collapsedWidth,Pe=this.store,pt=this.prevOpenKeys,it=this.getInlineCollapsed()&&(Ce===0||Ce==="0"||Ce==="0px");it?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):pt&&(this.store.setState({openKeys:pt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ce=this.props.mode,Pe=this.state.switchingModeFromInline,pt=this.getInlineCollapsed();return Pe&&pt?"inline":pt?"vertical":Ce}},{key:"getInlineCollapsed",value:function(){var Ce=this.props,Pe=Ce.inlineCollapsed,pt=Ce.siderCollapsed;return pt!==void 0?pt:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var Ce=this.state.switchingModeFromInline;Ce&&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 Ce=Object(q.a)({},Object(T.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return Ce.className+=" ".concat(Ce.prefixCls,"-root"),Ce.direction==="rtl"&&(Ce.className+=" ".concat(Ce.prefixCls,"-rtl")),Ce=Object(q.a)(Object(q.a)({},Ce),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Me(this.props,this.state,Pe)}),delete Ce.openAnimation,delete Ce.openTransitionName,I.createElement(v.a,{store:this.store},I.createElement(je,Object.assign({},Ce,{ref:this.setInnerMenu}),this.props.children))}}]),nt}(I.Component);me.defaultProps={selectable:!0,onClick:M,onSelect:M,onOpenChange:M,onDeselect:M,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:I.createElement("span",null,"\xB7\xB7\xB7")};var ye=me,Ee=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.onKeyDown=function(Ce){var Pe=Ce.keyCode;return Pe===u.a.ENTER?(tt.onClick(Ce),!0):void 0},tt.onMouseLeave=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.onItemHover,xt=Pe.onMouseLeave;it({key:pt,hover:!1}),xt({key:pt,domEvent:Ce})},tt.onMouseEnter=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.onItemHover,xt=Pe.onMouseEnter;it({key:pt,hover:!0}),xt({key:pt,domEvent:Ce})},tt.onClick=function(Ce){var Pe=tt.props,pt=Pe.eventKey,it=Pe.multiple,xt=Pe.onClick,_t=Pe.onSelect,Xe=Pe.onDeselect,mt=Pe.isSelected,Pt={key:pt,keyPath:[pt],item:Object(j.a)(tt),domEvent:Ce};xt(Pt),it?mt?Xe(Pt):_t(Pt):mt||_t(Pt)},tt.saveNode=function(Ce){tt.node=Ce},tt}return Object(O.a)(nt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ce=this.props;Ce.onDestroy&&Ce.onDestroy(Ce.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 Ce,Pe=Object(q.a)({},this.props),pt=s()(this.getPrefixCls(),Pe.className,(Ce={},Object(n.a)(Ce,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(n.a)(Ce,this.getSelectedClassName(),Pe.isSelected),Object(n.a)(Ce,this.getDisabledClassName(),Pe.disabled),Ce)),it=Object(q.a)(Object(q.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:pt,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?it=Object(q.a)(Object(q.a)({},it),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(it.role="none");var xt={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},_t=Object(q.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?_t.paddingRight=Pe.inlineIndent*Pe.level:_t.paddingLeft=Pe.inlineIndent*Pe.level),_e.forEach(function(mt){return delete Pe[mt]}),delete Pe.direction;var Xe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Xe=I.createElement(this.props.itemIcon,this.props)),I.createElement("li",Object.assign({},Object(T.default)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),it,xt,{style:_t,ref:this.saveNode}),Pe.children,Xe)}}]),nt}(I.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:M,onMouseEnter:M,onMouseLeave:M,manualRef:M};var Oe=Object(v.b)(function(St,ut){var nt=St.activeKey,tt=St.selectedKeys,Ce=ut.eventKey,Pe=ut.subMenuKey;return{active:nt[Pe]===Ce,isSelected:tt.indexOf(Ce)!==-1}})(Ee),De=Oe,Ze=function(St){Object(D.a)(nt,St);var ut=Object(B.a)(nt);function nt(){var tt;return Object(Q.a)(this,nt),tt=ut.apply(this,arguments),tt.renderInnerMenuItem=function(Ce){var Pe=tt.props,pt=Pe.renderMenuItem,it=Pe.index;return pt(Ce,it,tt.props.subMenuKey)},tt}return Object(O.a)(nt,[{key:"render",value:function(){var Ce=Object(E.a)({},this.props),Pe=Ce.className,pt=Pe===void 0?"":Pe,it=Ce.rootPrefixCls,xt="".concat(it,"-item-group-title"),_t="".concat(it,"-item-group-list"),Xe=Ce.title,mt=Ce.children;return _e.forEach(function(Pt){return delete Ce[Pt]}),delete Ce.onClick,delete Ce.direction,I.createElement("li",Object.assign({},Ce,{className:"".concat(pt," ").concat(it,"-item-group")}),I.createElement("div",{className:xt,title:typeof Xe=="string"?Xe:void 0},Xe),I.createElement("ul",{className:_t},I.Children.map(mt,this.renderInnerMenuItem)))}}]),nt}(I.Component);Ze.isMenuItemGroup=!0,Ze.defaultProps={disabled:!0};var ht=Ze,Tt=function(ut){var nt=ut.className,tt=ut.rootPrefixCls,Ce=ut.style;return I.createElement("li",{className:"".concat(nt," ").concat(tt,"-item-divider"),style:Ce})};Tt.defaultProps={disabled:!0,className:"",style:{}};var kt=Tt,It=pe.e=ye},"24YM":function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.SensorTabIndex=pe.SensorClassName=pe.SizeSensorId=void 0;var q="size-sensor-id";pe.SizeSensorId=q;var Q="size-sensor-object";pe.SensorClassName=Q;var O="-1";pe.SensorTabIndex=O},"2DNl":function(qe,pe,G){var q=G("IMiH"),Q=G("loD1"),O=G("59Ip"),j=G("aKvl"),D=G("n1HI"),B=G("hX1E"),I=B.normalizeRadian,v=G("Sj9i"),T=G("hyiK"),E=q.CMD,n=Math.PI*2,u=1e-4;function c(x,L){return Math.abs(x-L)L&&m>h&&m>l&&m>C||m1&&d(),Z=v.cubicAt(L,h,l,C,i[0]),z>1&&(V=v.cubicAt(L,h,l,C,i[1]))),z===2?JL&&C>h&&C>l||C=0&&m<=1){for(var F=0,P=v.quadraticAt(L,h,l,m),z=0;zb||C<-b)return 0;var g=Math.sqrt(b*b-C*C);o[0]=-g,o[1]=g;var m=Math.abs(h-r);if(m<1e-4)return 0;if(m%n<1e-4){h=0,r=n;var F=l?1:-1;return f>=o[0]+x&&f<=o[1]+x?F:0}if(l){var g=h;h=I(r),r=I(g)}else h=I(h),r=I(r);h>r&&(r+=n);for(var P=0,z=0;z<2;z++){var Z=o[z];if(Z+x>f){var V=Math.atan2(C,Z),F=l?1:-1;V<0&&(V=n+V),(V>=h&&V<=r||V+n>=h&&V+n<=r)&&(V>Math.PI/2&&V1&&(b||(l+=T(f,C,g,m,h,r))),F===1&&(f=x[F],C=x[F+1],g=f,m=C);switch(P){case E.M:g=x[F++],m=x[F++],f=g,C=m;break;case E.L:if(b){if(Q.containStroke(f,C,x[F],x[F+1],L,h,r))return!0}else l+=T(f,C,x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.C:if(b){if(O.containStroke(f,C,x[F++],x[F++],x[F++],x[F++],x[F],x[F+1],L,h,r))return!0}else l+=s(f,C,x[F++],x[F++],x[F++],x[F++],x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.Q:if(b){if(j.containStroke(f,C,x[F++],x[F++],x[F],x[F+1],L,h,r))return!0}else l+=A(f,C,x[F++],x[F++],x[F],x[F+1],h,r)||0;f=x[F++],C=x[F++];break;case E.A:var z=x[F++],Z=x[F++],V=x[F++],M=x[F++],J=x[F++],X=x[F++];F+=1;var re=1-x[F++],se=Math.cos(J)*V+z,_e=Math.sin(J)*M+Z;F>1?l+=T(f,C,se,_e,h,r):(g=se,m=_e);var ge=(h-z)*M/V+z;if(b){if(D.containStroke(z,Z,M,J,J+X,re,L,ge,r))return!0}else l+=a(z,Z,M,J,J+X,re,ge,r);f=Math.cos(J+X)*V+z,C=Math.sin(J+X)*M+Z;break;case E.R:g=f=x[F++],m=C=x[F++];var we=x[F++],Re=x[F++],se=g+we,_e=m+Re;if(b){if(Q.containStroke(g,m,se,m,L,h,r)||Q.containStroke(se,m,se,_e,L,h,r)||Q.containStroke(se,_e,g,_e,L,h,r)||Q.containStroke(g,_e,g,m,L,h,r))return!0}else l+=T(se,m,se,_e,h,r),l+=T(g,_e,g,m,h,r);break;case E.Z:if(b){if(Q.containStroke(f,C,g,m,L,h,r))return!0}else l+=T(f,C,g,m,h,r);f=g,C=m;break}}return!b&&!c(C,m)&&(l+=T(f,C,g,m,h,r)||0),l!==0}function w(x,L,b){return p(x,0,!1,L,b)}function S(x,L,b,h){return p(x,L,!0,b,h)}pe.contain=w,pe.containStroke=S},"2fw6":function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(O,j,D){D&&O.moveTo(j.cx+j.r,j.cy),O.arc(j.cx,j.cy,j.r,0,Math.PI*2,!0)}});qe.exports=Q},"3C/r":function(qe,pe){var G=function(Q,O){this.image=Q,this.repeat=O,this.type="pattern"};G.prototype.getCanvasPattern=function(Q){return Q.createPattern(this.image,this.repeat||"repeat")};var q=G;qe.exports=q},"3CBa":function(qe,pe,G){var q=G("hydK"),Q=q.createElement,O=G("bYtY"),j=G("SUKs"),D=G("y+Vt"),B=G("Dagg"),I=G("dqUG"),v=G("DBLp"),T=G("sW+o"),E=G("n6Mw"),n=G("vKoX"),u=G("P47w"),c=u.path,o=u.image,i=u.text;function d(r){return parseInt(r,10)}function s(r){return r instanceof D?c:r instanceof B?o:r instanceof I?i:c}function A(r,l){return l&&r&&l.parentNode!==r}function a(r,l,f){if(A(r,l)&&f){var C=f.nextSibling;C?r.insertBefore(l,C):r.appendChild(l)}}function p(r,l){if(A(r,l)){var f=r.firstChild;f?r.insertBefore(l,f):r.appendChild(l)}}function w(r,l){l&&r&&l.parentNode===r&&r.removeChild(l)}function S(r){return r.__textSvgEl}function x(r){return r.__svgEl}var L=function(r,l,f,C){this.root=r,this.storage=l,this._opts=f=O.extend({},f||{});var g=Q("svg");g.setAttribute("xmlns","http://www.w3.org/2000/svg"),g.setAttribute("version","1.1"),g.setAttribute("baseProfile","full"),g.style.cssText="user-select:none;position:absolute;left:0;top:0;";var m=Q("g");g.appendChild(m);var F=Q("g");g.appendChild(F),this.gradientManager=new T(C,F),this.clipPathManager=new E(C,F),this.shadowManager=new n(C,F);var P=document.createElement("div");P.style.cssText="overflow:hidden;position:relative",this._svgDom=g,this._svgRoot=F,this._backgroundRoot=m,this._viewport=P,r.appendChild(P),P.appendChild(g),this.resize(f.width,f.height),this._visibleList=[]};L.prototype={constructor:L,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},refresh:function(){var r=this.storage.getDisplayList(!0);this._paintList(r)},setBackgroundColor:function(r){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var l=Q("rect");l.setAttribute("width",this.getWidth()),l.setAttribute("height",this.getHeight()),l.setAttribute("x",0),l.setAttribute("y",0),l.setAttribute("id",0),l.style.fill=r,this._backgroundRoot.appendChild(l),this._backgroundNode=l},_paintList:function(r){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var l=this._svgRoot,f=this._visibleList,C=r.length,g=[],m;for(m=0;m=0;--F)if(m[F]===g)return!0;return!1}),f}else return null;else return f[0]},resize:function(r,l){var f=this._viewport;f.style.display="none";var C=this._opts;if(r!=null&&(C.width=r),l!=null&&(C.height=l),r=this._getSize(0),l=this._getSize(1),f.style.display="",this._width!==r||this._height!==l){this._width=r,this._height=l;var g=f.style;g.width=r+"px",g.height=l+"px";var m=this._svgDom;m.setAttribute("width",r),m.setAttribute("height",l)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",r),this._backgroundNode.setAttribute("height",l))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(r){var l=this._opts,f=["width","height"][r],C=["clientWidth","clientHeight"][r],g=["paddingLeft","paddingTop"][r],m=["paddingRight","paddingBottom"][r];if(l[f]!=null&&l[f]!=="auto")return parseFloat(l[f]);var F=this.root,P=document.defaultView.getComputedStyle(F);return(F[C]||d(P[f])||d(F.style[f]))-(d(P[g])||0)-(d(P[m])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var r=encodeURIComponent(this._svgDom.outerHTML.replace(/> \r<`));return"data:image/svg+xml;charset=UTF-8,"+r}};function b(r){return function(){j('In SVG mode painter not support method "'+r+'"')}}O.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(r){L.prototype[r]=b(r)});var h=L;qe.exports=h},"3e3G":function(qe,pe,G){var q=G("bYtY"),Q=G("QuXc"),O=function(D,B,I,v,T){this.x=D==null?.5:D,this.y=B==null?.5:B,this.r=I==null?.5:I,this.type="radial",this.global=T||!1,Q.call(this,v)};O.prototype={constructor:O},q.inherits(O,Q);var j=O;qe.exports=j},"3gBT":function(qe,pe){var G=2311;function q(){return G++}qe.exports=q},"49sm":function(qe,pe){var G={}.toString;qe.exports=Array.isArray||function(q){return G.call(q)=="[object Array]"}},"4fz+":function(qe,pe,G){var q=G("bYtY"),Q=G("1bdT"),O=G("mFDi"),j=function(B){B=B||{},Q.call(this,B);for(var I in B)B.hasOwnProperty(I)&&(this[I]=B[I]);this._children=[],this.__storage=null,this.__dirty=!0};j.prototype={constructor:j,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(B){return this._children[B]},childOfName:function(B){for(var I=this._children,v=0;v=0&&(v.splice(T,0,B),this._doAdd(B))}return this},_doAdd:function(B){B.parent&&B.parent.remove(B),B.parent=this;var I=this.__storage,v=this.__zr;I&&I!==B.__storage&&(I.addToStorage(B),B instanceof j&&B.addChildrenToStorage(I)),v&&v.refresh()},remove:function(B){var I=this.__zr,v=this.__storage,T=this._children,E=q.indexOf(T,B);return E<0?this:(T.splice(E,1),B.parent=null,v&&(v.delFromStorage(B),B instanceof j&&B.delChildrenFromStorage(v)),I&&I.refresh(),this)},removeAll:function(){var B=this._children,I=this.__storage,v,T;for(T=0;T1e-4){b[0]=A-p,b[1]=a-w,h[0]=A+p,h[1]=a+w;return}if(v[0]=B(S)*p+A,v[1]=D(S)*w+a,T[0]=B(x)*p+A,T[1]=D(x)*w+a,r(b,v,T),l(h,v,T),S=S%I,S<0&&(S=S+I),x=x%I,x<0&&(x=x+I),S>x&&!L?x+=I:SS&&(E[0]=B(g)*p+A,E[1]=D(g)*w+a,r(b,E,b),l(h,E,h))}pe.fromPoints=n,pe.fromLine=u,pe.fromCubic=i,pe.fromQuadratic=d,pe.fromArc=s},"55Ip":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return a});var q=G("Ty5D"),Q=G("dI71"),O=G("q1tI"),j=G.n(O),D=G("YS25"),B=G("17x9"),I=G.n(B),v=G("wx14"),T=G("zLVn"),E=G("9R94"),n=function(r){Object(Q.a)(l,r);function l(){for(var C,g=arguments.length,m=new Array(g),F=0;Fj+o&&c>B+o&&c>v+o&&c>E+o||cO+o&&u>D+o&&u>I+o&&u>T+o||u\u5B66\u53F7\uFF1A "+Rt.user_id+"
\u6548\u7387\uFF1A"+((Or=Rt.echart_data)===null||Or===void 0?void 0:Or.myself_eff[1])}else return pr.name+":"+pr.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:(Kt=Rt.echart_data)===null||Kt===void 0?void 0:Kt.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:Rt.username,xAxis:Qt,yAxis:(Ur=Rt.echart_data)===null||Ur===void 0?void 0:Ur.myself_eff[1],value:(Kr=Rt.echart_data)===null||Kr===void 0?void 0:Kr.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},Fr=function(){var Kt,Ur,Kr,Rr;return{title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Or){var pn=Or.value;if(Or.name===Rt.username){var un;return"\u59D3\u540D\uFF1A"+Rt.username+"
\u5B66\u53F7\uFF1A "+Rt.user_id+"
\u5F97\u5206\uFF1A"+((un=Rt.echart_data)===null||un===void 0?void 0:un.myself_object[1])}}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Re,data:(Kt=Rt.echart_data)===null||Kt===void 0?void 0:Kt.consume_list,symbolSize:function(Or){return Math.round(Or[2])},markPoint:{data:[{name:Rt.username,xAxis:(Ur=Rt.echart_data)===null||Ur===void 0?void 0:Ur.myself_object[0],yAxis:(Kr=Rt.echart_data)===null||Kr===void 0?void 0:Kr.myself_object[1],value:(Rr=Rt.echart_data)===null||Rr===void 0?void 0:Rr.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return r.a.createElement(r.a.Fragment,null,r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(v.a,null,r.a.createElement(u.a,{flex:"800px"},r.a.createElement(_e.a,{style:{width:750,height:580},option:Ir()})),r.a.createElement(u.a,{flex:"1"},r.a.createElement("aside",{className:we.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Rt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Rt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",r.a.createElement("span",{className:"ml30 c-orange"},(ht=Rt.echart_data)===null||ht===void 0?void 0:ht.myself_eff[1])),r.a.createElement("li",null,r.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Tt=Rt.echart_data)===null||Tt===void 0?void 0:Tt.myself_eff[0]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",r.a.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(v.a,null,r.a.createElement(u.a,{flex:"800px"},r.a.createElement(_e.a,{style:{width:750,height:580},option:Fr()})),r.a.createElement(u.a,{flex:"1"},r.a.createElement("aside",{className:we.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},Rt.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},Rt.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u80FD\u529B")," ",r.a.createElement("span",{className:"ml30 c-orange"},(kt=Rt.echart_data)===null||kt===void 0?void 0:kt.myself_object[1]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",r.a.createElement("br",null)))))))},Se=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(He),Te=G("giR+"),$e=G("fyUT"),bt=function(Ee){var Oe=Ee.defaultValue,De=Ee.onBlur,Ze=Ee.max,ht=Ee.className,Tt=ht===void 0?"game-score":ht,kt=Object(h.useState)(Oe),It=Object(S.a)(kt,2),St=It[0],ut=It[1];Object(h.useEffect)(function(){ut(Oe)},[Oe]);function nt(Ce){ut(Ce)}function tt(){St!==Oe&&De(St>Ze?Ze:St)}return r.a.createElement($e.a,{max:Ze,min:0,className:Tt,value:St,onChange:nt,onBlur:tt})},Ie=G("OaEy"),ze=G("2fM7"),at=G("ZW9T"),Ae=G("Ot1p"),ne=G("1eJ8"),ae=G.n(ne),ce=ze.a.Option,xe={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Fe;(function(Ee){Ee[Ee.SET_PATH=0]="SET_PATH",Ee[Ee.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Fe||(Fe={}));function ke(Ee,Oe){switch(Oe.type){case Fe.SET_PATH:return Object(w.a)(Object(w.a)({},Ee),{},{selectedPath:Oe.payload});case Fe.GET_PASSED_CONTENT:return Object(w.a)(Object(w.a)({},Ee),{},{passedContent:Oe.payload});default:throw new Error}}var ct=function(Ee){var Oe,De,Ze,ht,Tt=Ee.path,kt=Ee.game_id,It=Ee.onPathChange,St=Ee.autoHeight,ut=Ee.diff_code_count,nt=Ee.data,tt=Ee.game_codes_cn,Ce=Tt.split("\uFF1B").filter(function(Rt){return!!Rt}),Pe=Object(h.useReducer)(ke,{selectedPath:Ce[0],passedContent:{language:"python",content:""}}),pt=Object(S.a)(Pe,2),it=pt[0],xt=pt[1],_t=it.selectedPath,Xe=it.passedContent;function mt(Rt){xt({type:Fe.SET_PATH,payload:Rt})}var Pt={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return console.log(nt,22),r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null," ",r.a.createElement("span",null,tt,tt&&r.a.createElement("span",{className:"ml5 font12 c-grey-999"},Pt[tt])),ut&&r.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ut),r.a.createElement("span",null,r.a.createElement(ze.a,{style:{width:200},value:_t,onChange:mt}," ",Ce.map(function(Rt){return r.a.createElement(ce,{key:Rt,value:Rt},Rt)})," "))," "),(_t==null?void 0:_t.split(".")[1])==="md"&&r.a.createElement(Ae.a,{height:300,autoHeight:St,defaultValue:(nt==null||((Oe=nt.filter(function(Rt){return Rt.path===_t}))===null||Oe===void 0||((De=Oe[0])===null||De===void 0))?void 0:De.content)||"",className:ae.a.md}),(_t==null?void 0:_t.split(".")[1])!=="md"&&r.a.createElement(at.b,{height:300,language:Xe.language,value:(nt==null||((Ze=nt.filter(function(Rt){return Rt.path===_t}))===null||Ze===void 0||((ht=Ze[0])===null||ht===void 0))?void 0:ht.content)||"",autoHeight:St,theme:"default",options:xe}))},ft=G("ErOA"),yt=function(Oe){var De=Oe.shixunHomeworks,Ze=Oe.autoHeight,ht=Oe.dispatch,Tt=De.shixunWorkReport,kt=Tt.stage_list,It=Tt.work_id,St=Object(m.i)(),ut=Object(X.c)(),nt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time"},{title:"\u5185\u5B58\u6D88\u8017(MB)",dataIndex:"ts_mem"}];function tt(it,xt){return Ce.apply(this,arguments)}function Ce(){return Ce=Object(a.a)(b.a.mark(function it(xt,_t){var Xe,mt;return b.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Xe=kt[xt].challenge_id,Rt.next=3,ht({type:"shixunHomeworks/changeScore",payload:{categoryId:St.homeworkId,type:"report",score:_t,challenge_id:Xe}});case 3:return mt=Rt.sent,Rt.next=6,ht({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},St)});case 6:mt.status===0&&d.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return Rt.stop()}},it)})),Ce.apply(this,arguments)}function Pe(it,xt){return Object(ft.c)("student_works/".concat(It,"/rep_passed_content.json"),{path:xt,game_id:it})}var pt=Object(re.p)(5,Tt.shixun_detail);return r.a.createElement(r.a.Fragment,null,pt==null?void 0:pt.map(function(it,xt){return r.a.createElement("div",{key:xt},it.map(function(_t,Xe){var mt;return r.a.createElement("aside",{className:"pl30 pr30",key:Xe},r.a.createElement("div",{className:"".concat(we.a.shixunTitle," mt10")},r.a.createElement("div",null,r.a.createElement("span",{className:"fa fa-code "}),r.a.createElement("strong",{className:"c-black"},"\u7B2C",xt*5+Xe+1,"\u5173 ",r.a.createElement(P.a,{className:"c-black",to:"/tasks/".concat(_t.game_identifier)},_t.subject))),ut?r.a.createElement("span",null,"\u8C03\u5206\uFF1A",r.a.createElement(bt,{className:"game-score",max:kt[Xe].game_score_full,defaultValue:kt[Xe].game_score,onBlur:function(Rt){tt(Xe,Rt)}})):null),r.a.createElement("div",{className:"font16 mt10"},_t.st===0&&(_t.path?r.a.createElement("aside",{className:we.a.shixunWrp},r.a.createElement(ct,{game_codes_cn:_t==null?void 0:_t.game_codes_cn,autoHeight:Ze,path:_t.path,game_id:_t.id,data:_t.game_codes,diff_code_count:_t.diff_code_count,onPathChange:Pe})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),_t.st===1&&(_t.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),r.a.createElement("aside",{className:"mt10 font16"},(mt=_t.outputs)!==null&&mt!==void 0&&mt.length?r.a.createElement(j.a,{columns:nt,pagination:{hideOnSinglePage:!0},dataSource:_t.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},Et=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(yt),Ot=G("5NDa"),Mt=G("5rEg"),Qe=G("y8nQ"),Ne=G("Vl3Y"),lt=function(Oe){var De=Oe.shixunHomeworks,Ze=Oe.dispatch,ht=Object(x.a)(Oe,["shixunHomeworks","dispatch"]),Tt=Object(m.i)(),kt=Object(h.useState)(!1),It=Object(S.a)(kt,2),St=It[0],ut=It[1],nt=Ne.a.useForm(),tt=Object(S.a)(nt,1),Ce=tt[0];Object(h.useEffect)(function(){var pt,it,xt,_t;De.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Ce.setFieldsValue({comment:(pt=De.actionTabs.selectArrs)===null||pt===void 0||((it=pt.data)===null||it===void 0)?void 0:it.work_comment,hidden_comment:(xt=De.actionTabs.selectArrs)===null||xt===void 0||((_t=xt.data)===null||_t===void 0)?void 0:_t.work_comment_hidden})},[De.actionTabs.key]);var Pe=function(){var pt=Object(a.a)(b.a.mark(function it(){var xt,_t;return b.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return xt=Ce.getFieldValue(),mt.next=3,Object(ft.a)("/api/student_works/".concat(Tt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:xt.hidden_comment,comment:xt.comment}});case 3:_t=mt.sent,_t.status===0&&(d.b.success("\u8BC4\u9605\u6210\u529F"),Ce.resetFields(),Ze({type:"shixunHomeworks/setActionTabs",payload:{}}),Ze({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},Tt)}));case 5:case"end":return mt.stop()}},it)}));return function(){return pt.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(A.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:De.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(a.a)(b.a.mark(function pt(){var it;return b.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:it=Ce.getFieldValue(),JSON.stringify(it)==="{}"||it.hidden_comment===""&&it.comment===""?ut(!0):Pe();case 2:case"end":return _t.stop()}},pt)})),onCancel:function(){Ze({type:"shixunHomeworks/setActionTabs",payload:{}})}},r.a.createElement(Ne.a,{form:Ce,onChange:function(){St&&ut(!1)}},r.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Ne.a.Item,{name:"comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),r.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Ne.a.Item,{name:"hidden_comment"},r.a.createElement(Mt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),St&&r.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},dt=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks;return{shixunHomeworks:Oe}})(lt),Ye=G("Xm8N"),st=G("9Bee"),je=G("XYT7"),Le=G("1n7x"),Me=G.n(Le),me=function(Oe){var De,Ze,ht=Oe.shixunHomeworks,Tt=Oe.globalSetting,kt=Oe.loading,It=Oe.dispatch,St=Object(x.a)(Oe,["shixunHomeworks","globalSetting","loading","dispatch"]),ut=Object(h.useState)(Object(w.a)({},Object(m.i)())),nt=Object(S.a)(ut,2),tt=nt[0],Ce=nt[1],Pe=Object(m.i)(),pt=Object(h.useState)([]),it=Object(p.a)(pt),xt=Object(h.useState)({last:!1}),_t=Object(S.a)(xt,2),Xe=_t[0],mt=_t[1],Pt=Object(h.useState)({last:!1}),Rt=Object(S.a)(Pt,2),Qt=Rt[0],Ir=Rt[1],Fr=Object(h.useRef)(),wr=Object(h.useRef)(),Kt=Object(h.useState)(!1),Ur=Object(S.a)(Kt,2),Kr=Ur[0],Rr=Ur[1],pr=Object(h.useState)(!1),Or=Object(S.a)(pr,2),pn=Or[0],un=Or[1],fe=Object(h.useState)(!1),be=Object(S.a)(fe,2),Ue=be[0],rt=be[1],et=ht.shixunWorkReport,Dt=Object(X.c)(),ee=Object(h.useState)(new g.a),U=Object(S.a)(ee,2),N=U[0],$=U[1],le=Object(h.useState)(0),te=Object(S.a)(le,2),Ke=te[0],Ct=te[1],Ut=Object(h.useState)([]),Ht=Object(S.a)(Ut,2),wt=Ht[0],Yt=Ht[1],Xt=Object(h.useState)(!1),qt=Object(S.a)(Xt,2),Ar=qt[0],Br=qt[1],yr=Object(h.useState)(!1),Lr=Object(S.a)(yr,2),cr=Lr[0],Dr=Lr[1];Object(h.useEffect)(function(){return It({type:"globalSetting/footerToggle",payload:!1}),function(){It({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(h.useEffect)(function(){ht.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&wt.length>0&&$r("all")},[wt]),Object(h.useEffect)(function(){Ce(Object(w.a)({},Pe))},[St.location.pathname]);var Pr=function(){document.body.scrollIntoView()};function An(){return zr.apply(this,arguments)}function zr(){return zr=Object(a.a)(b.a.mark(function br(){var dr,tr,nr,$t,vr,mr,xr;return b.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),On.next=3,It({type:"shixunHomeworks/getAllStudentWorks",payload:Object(w.a)(Object(w.a)({},tt),nr)});case 3:$t=On.sent,Yt($t.all_student_works),vr=(dr=$t.all_student_works)===null||dr===void 0?void 0:dr.map(function(Gr){return String(Gr.student_work_id)}).indexOf(tt.homeworkId),vr===((tr=$t.all_student_works)===null||tr===void 0?void 0:tr.length)-1?mt({last:!0}):mt((mr=$t.all_student_works)===null||mr===void 0?void 0:mr[vr+1]),vr===0?Ir({last:!0}):Ir((xr=$t.all_student_works)===null||xr===void 0?void 0:xr[vr-1]);case 8:case"end":return On.stop()}},br)})),zr.apply(this,arguments)}var Jr=function(){document.querySelectorAll("canvas").forEach(function(dr){(!dr.clientWidth||!dr.clientHeight)&&dr.remove()})},bn=function(){Fr.current.offsetHeight>62e3?rt(!1):rt(!0)},$r=function(){var br=Object(a.a)(b.a.mark(function dr(tr){var nr,$t,vr,mr,xr,Er;return b.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(xr=function(){return xr=Object(a.a)(b.a.mark(function Qn(){var wn;return b.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,It({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:wt[nr].student_work_id}});case 2:wn=Ln.sent,Pr(),nr++,setTimeout(Object(a.a)(b.a.mark(function In(){var Jn,Fn,si,Un,gn,kn,er;return b.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:Jr(),Fn=N.folder("".concat(wn==null?void 0:wn.username)),si=document.querySelector("#export-all").children,Un=Me()(),gn=b.a.mark(function gr(Tr){return b.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.next=2,Un.set(vr).from(si[Tr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var on=Object(a.a)(b.a.mark(function Dn(Mr){return b.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(!(Tr"},r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework")},et.course_name)),r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.category.main?"":et.category.category_id)},et.category.category_name)),r.a.createElement(o.a.Item,null,r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),r.a.createElement(o.a.Item,null,et.username))),r.a.createElement("aside",{className:[we.a.title1,"mt20"].join(" ")},r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:1},r.a.createElement(P.a,{to:"/classrooms/".concat(et.course_id,"/shixun_homework/").concat(et.homework_common_id,"/detail")},r.a.createElement(z.a,{className:"font16 c-black"})),r.a.createElement("strong",{className:"font20 ml5"},et.shixun_name),r.a.createElement(re.m,{temporary:!0,status:et.homework_status})),r.a.createElement(u.a,{className:we.a.title1_right},et.view_tpi&&r.a.createElement(E.a,null,r.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),r.a.createElement(P.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(et==null||((De=et.shixun_detail)===null||De===void 0||((Ze=De[0])===null||Ze===void 0))?void 0:Ze.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(X.c)()&&et.homework_end===!1&&!!et.myshixun_id&&r.a.createElement(E.a,{className:"ml10",onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:et.myshixun_identifier}}});case 2:case"end":return tr.stop()}},br)}))},r.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),r.a.createElement(E.a,{className:"ml10",onClick:function(){return $r("")},loading:Kr},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(X.c)()&&(wt==null?void 0:wt.length)>1&&r.a.createElement(E.a,{className:"ml10",onClick:function(){return $r("all")}},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),r.a.createElement("aside",{className:"mt30 relative"})),r.a.createElement("aside",{className:"edu-container bg-white",ref:Fr},r.a.createElement("div",{id:"export-all",ref:wr},r.a.createElement("div",{id:"export-all-1"},r.a.createElement("div",{className:we.a.title},r.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),r.a.createElement("div",null,Object(X.c)()&&r.a.createElement(E.a,{className:"mr20",type:"primary",onClick:function(){It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:et.user_id,data:Object(w.a)({},et)}}})}},r.a.createElement(Z.a,null),et.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),r.a.createElement(B.a,{style:{marginTop:0}}),r.a.createElement(v.a,{className:"pl30 pr30"},r.a.createElement(u.a,null,r.a.createElement("img",{className:we.a.userPic,src:"".concat(J.a.IMG_SERVER,"/images/").concat(et.image_url),alt:et.username})),r.a.createElement(u.a,null,r.a.createElement("span",{className:"font16 ml40"},et.username),r.a.createElement(re.g,{status:et.compelete_status}),r.a.createElement("ul",{className:we.a.userInfo},r.a.createElement("li",null,"\u5B66\u53F7\uFF1A",et.student_id||"--"),r.a.createElement("li",null,"\u5206\u73ED\uFF1A",et.group_name||"--"),r.a.createElement("br",null),r.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},et.complete_count),"/",r.a.createElement("span",{className:"c-red"},et.challenges_count)),r.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},et.current_complete_count||"-"),"/",r.a.createElement("span",{className:"c-red"},et.challenges_count)),r.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",et&&et.efficiency===null?"--":et&&et.efficiency),r.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",et&&et.max_efficiency===null?"--":et&&et.max_efficiency))),r.a.createElement("ul",{className:[we.a.listItem,"mt10"].join(" ")},r.a.createElement("li",null,r.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),r.a.createElement("div",{className:"c-light-black mt20"},et&&et.passed_time===null||et&&et.passed_time==="--"?"--":f()(et&&et.passed_time).format("YYYY-MM-DD HH:mm"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Br(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},et==null?void 0:et.human_training_time_rules)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Dr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},et.time_consuming)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),r.a.createElement("div",{className:"mt20"},et.evaluate_count)),(et==null?void 0:et.eff_score_full)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,r.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.challenge_score),"/",r.a.createElement("span",{className:"c-light-black"},et.challenge_score_full))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6548\u7387\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.eff_score),"/",r.a.createElement("span",{className:"c-light-black"},et.eff_score_full)))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",null,et.late_penalty||"- -"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.work_score),"/",r.a.createElement("span",{className:"c-light-black"},et.all_work_score))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u603B\u8BC4"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},et.overall_appraisal))))),r.a.createElement(B.a,{style:{margin:0}}),(et.work_comment_hidden||et.work_comment)&&r.a.createElement("div",null,r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:1},r.a.createElement("h1",{className:we.a.title},"\u70B9\u8BC4\u5185\u5BB9")),r.a.createElement(u.a,{className:"pr30"},Object(X.c)()&&r.a.createElement(E.a,{onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:A.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:r.a.createElement(V.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(a.a)(b.a.mark(function $t(){var vr;return b.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Object(je.m)({comment_id:et.comment_id,homeworkId:tt.homeworkId});case 2:vr=xr.sent,vr.status===0&&(d.b.success("\u5220\u9664\u6210\u529F"),It({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},tt)}));case 4:case"end":return xr.stop()}},$t)}))()}});case 1:case"end":return tr.stop()}},br)}))},r.a.createElement(M.a,null),"\u5220\u9664"))),r.a.createElement(B.a,{style:{margin:0}}),et.work_comment&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:et.work_comment})),et.work_comment_hidden&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(st.a,{value:et.work_comment_hidden}))),r.a.createElement("h1",{className:we.a.title},"\u9636\u6BB5\u6210\u7EE9"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(j.a,{dataSource:et.stage_list,pagination:!1,columns:cn})),(et==null?void 0:et.work_description)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:we.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(st.a,{value:et==null?void 0:et.work_description}))),r.a.createElement("h1",{className:we.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),r.a.createElement(Se,null),r.a.createElement("h1",{className:we.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),r.a.createElement(Et,{autoHeight:Ue}))),Object(X.c)()&&r.a.createElement("aside",{className:"".concat(we.a.footerBar," ").concat(Kr?we.a.footerBarStatic:"")},r.a.createElement("aside",{className:"edu-container"},r.a.createElement(v.a,{align:"middle"},r.a.createElement(u.a,{flex:"1"},r.a.createElement(P.a,{className:we.a.exitComment,to:"/classrooms/".concat(tt.coursesId,"/shixun_homework/").concat(tt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),r.a.createElement(u.a,{flex:"1",className:"tr"},r.a.createElement(E.a,{type:"default",disabled:Qt==null?void 0:Qt.last,onClick:function(){return mn()}},"\u4E0A\u4E00\u4E2A"),r.a.createElement(E.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:Xe==null?void 0:Xe.last,onClick:function(){return mn("next")}},"\u4E0B\u4E00\u4E2A"),Object(X.c)()&&r.a.createElement(E.a,{type:"primary",onClick:Object(a.a)(b.a.mark(function br(){return b.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:It({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:et.user_id,data:Object(w.a)({},et)}}});case 1:case"end":return tr.stop()}},br)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),r.a.createElement(dt,null),r.a.createElement(Ye.a,null),r.a.createElement(A.a,{visible:Ar,width:860,centered:!0,onCancel:function(){Br(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},r.a.createElement("div",{style:{color:"#333333",fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),r.a.createElement("br",null),r.a.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),r.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),r.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),r.a.createElement("br",null),r.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),r.a.createElement(A.a,{visible:cr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Dr(!1)},width:600},r.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},r.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),r.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},ye=pe.default=Object(F.a)(function(Ee){var Oe=Ee.shixunHomeworks,De=Ee.loading,Ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:Ze,loading:De.effects}})(me)},"6+eU":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return x});var q=G("wx14"),Q=G("rePB"),O=G("VTBJ"),j=G("1OyB"),D=G("vuIU"),B=G("Ji7U"),I=G("LK+K"),v=G("q1tI"),T=G.n(v),E=G("TSYQ"),n=G.n(E),u=function(b){var h,r="".concat(b.rootPrefixCls,"-item"),l=n()(r,"".concat(r,"-").concat(b.page),(h={},Object(Q.a)(h,"".concat(r,"-active"),b.active),Object(Q.a)(h,b.className,!!b.className),Object(Q.a)(h,"".concat(r,"-disabled"),!b.page),h)),f=function(){b.onClick(b.page)},C=function(m){b.onKeyPress(m,b.onClick,b.page)};return T.a.createElement("li",{title:b.showTitle?b.page:null,className:l,onClick:f,onKeyPress:C,tabIndex:"0"},b.itemRender(b.page,"page",T.a.createElement("a",{rel:"nofollow"},b.page)))},c=u,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(L){Object(B.a)(h,L);var b=Object(I.a)(h);function h(){var r;Object(j.a)(this,h);for(var l=arguments.length,f=new Array(l),C=0;C=0||g.relatedTarget.className.indexOf("".concat(z,"-next"))>=0))return;r.setState({goInputText:""}),P(r.getValidValue())},r.go=function(g){var m=r.state.goInputText;if(m==="")return;(g.keyCode===o.ENTER||g.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Object(D.a)(h,[{key:"getValidValue",value:function(){var l=this.state,f=l.goInputText,C=l.current;return!f||isNaN(f)?C:Number(f)}},{key:"getPageSizeOptions",value:function(){var l=this.props,f=l.pageSize,C=l.pageSizeOptions;return C.some(function(g){return g.toString()===f.toString()})?C:C.concat([f.toString()]).sort(function(g,m){var F=isNaN(Number(g))?0:Number(g),P=isNaN(Number(m))?0:Number(m);return F-P})}},{key:"render",value:function(){var l=this,f=this.props,C=f.pageSize,g=f.locale,m=f.rootPrefixCls,F=f.changeSize,P=f.quickGo,z=f.goButton,Z=f.selectComponentClass,V=f.buildOptionText,M=f.selectPrefixCls,J=f.disabled,X=this.state.goInputText,re="".concat(m,"-options"),se=Z,_e=null,ge=null,we=null;if(!F&&!P)return null;var Re=this.getPageSizeOptions();if(F&&se){var He=Re.map(function(Se,Te){return T.a.createElement(se.Option,{key:Te,value:Se.toString()},(V||l.buildOptionText)(Se))});_e=T.a.createElement(se,{disabled:J,prefixCls:M,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Te){return Te.parentNode}},He)}return P&&(z&&(we=typeof z=="boolean"?T.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:J,className:"".concat(re,"-quick-jumper-button")},g.jump_to_confirm):T.a.createElement("span",{onClick:this.go,onKeyUp:this.go},z)),ge=T.a.createElement("div",{className:"".concat(re,"-quick-jumper")},g.jump_to,T.a.createElement("input",{disabled:J,type:"text",value:X,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,we)),T.a.createElement("li",{className:"".concat(re)},_e,ge)}}]),h}(T.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=i,s=G("N2Kk");function A(){}function a(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function p(L,b,h){return h}function w(L,b,h){var r=typeof L=="undefined"?b.pageSize:L;return Math.floor((h.total-1)/r)+1}var S=function(L){Object(B.a)(h,L);var b=Object(I.a)(h);function h(r){var l;Object(j.a)(this,h),l=b.call(this,r),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(w(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(F,P){var z=l.props.prefixCls,Z=F||T.a.createElement("button",{type:"button","aria-label":P,className:"".concat(z,"-item-link")});return typeof F=="function"&&(Z=T.a.createElement(F,Object(O.a)({},l.props))),Z},l.savePaginationNode=function(F){l.paginationNode=F},l.isValid=function(F){return a(F)&&F!==l.state.current},l.shouldDisplayQuickJumper=function(){var F=l.props,P=F.showQuickJumper,z=F.pageSize,Z=F.total;return Z<=z?!1:P},l.handleKeyDown=function(F){(F.keyCode===o.ARROW_UP||F.keyCode===o.ARROW_DOWN)&&F.preventDefault()},l.handleKeyUp=function(F){var P=l.getValidValue(F),z=l.state.currentInputValue;P!==z&&l.setState({currentInputValue:P}),F.keyCode===o.ENTER?l.handleChange(P):F.keyCode===o.ARROW_UP?l.handleChange(P-1):F.keyCode===o.ARROW_DOWN&&l.handleChange(P+1)},l.changePageSize=function(F){var P=l.state.current,z=w(F,l.state,l.props);P=P>z?z:P,z===0&&(P=l.state.current),typeof F=="number"&&("pageSize"in l.props||l.setState({pageSize:F}),"current"in l.props||l.setState({current:P,currentInputValue:P})),l.props.onShowSizeChange(P,F),"onChange"in l.props&&l.props.onChange&&l.props.onChange(P,F)},l.handleChange=function(F){var P=l.props.disabled,z=F;if(l.isValid(z)&&!P){var Z=w(void 0,l.state,l.props);z>Z?z=Z:z<1&&(z=1),"current"in l.props||l.setState({current:z,currentInputValue:z});var V=l.state.pageSize;return l.props.onChange(z,V),z}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current2?z-2:0),V=2;V=C?m=C:m=Number(f),m}},{key:"getShowSizeChanger",value:function(){var l=this.props,f=l.showSizeChanger,C=l.total,g=l.totalBoundaryShowSizeChanger;return typeof f!="undefined"?f:C>g}},{key:"renderPrev",value:function(l){var f=this.props,C=f.prevIcon,g=f.itemRender,m=g(l,"prev",this.getItemIcon(C,"prev page")),F=!this.hasPrev();return Object(v.isValidElement)(m)?Object(v.cloneElement)(m,{disabled:F}):m}},{key:"renderNext",value:function(l){var f=this.props,C=f.nextIcon,g=f.itemRender,m=g(l,"next",this.getItemIcon(C,"next page")),F=!this.hasNext();return Object(v.isValidElement)(m)?Object(v.cloneElement)(m,{disabled:F}):m}},{key:"render",value:function(){var l=this,f=this.props,C=f.prefixCls,g=f.className,m=f.style,F=f.disabled,P=f.hideOnSinglePage,z=f.total,Z=f.locale,V=f.showQuickJumper,M=f.showLessItems,J=f.showTitle,X=f.showTotal,re=f.simple,se=f.itemRender,_e=f.showPrevNextJumpers,ge=f.jumpPrevIcon,we=f.jumpNextIcon,Re=f.selectComponentClass,He=f.selectPrefixCls,Se=f.pageSizeOptions,Te=this.state,$e=Te.current,bt=Te.pageSize,Ie=Te.currentInputValue;if(P===!0&&z<=bt)return null;var ze=w(void 0,this.state,this.props),at=[],Ae=null,ne=null,ae=null,ce=null,xe=null,Fe=V&&V.goButton,ke=M?1:2,ct=$e-1>0?$e-1:0,ft=$e+1=ke*2&&$e!==1+2&&(at[0]=Object(v.cloneElement)(at[0],{className:"".concat(C,"-item-after-jump-prev")}),at.unshift(Ae)),ze-$e>=ke*2&&$e!==ze-2&&(at[at.length-1]=Object(v.cloneElement)(at[at.length-1],{className:"".concat(C,"-item-before-jump-next")}),at.push(ne)),lt!==1&&at.unshift(ae),dt!==ze&&at.push(ce)}var je=null;X&&(je=T.a.createElement("li",{className:"".concat(C,"-total-text")},X(z,[z===0?0:($e-1)*bt+1,$e*bt>z?z:$e*bt])));var Le=!this.hasPrev()||!ze,Me=!this.hasNext()||!ze;return T.a.createElement("ul",Object(q.a)({className:n()(C,g,Object(Q.a)({},"".concat(C,"-disabled"),F)),style:m,unselectable:"unselectable",ref:this.savePaginationNode},yt),je,T.a.createElement("li",{title:J?Z.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(C,"-prev"),Object(Q.a)({},"".concat(C,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(ct)),at,T.a.createElement("li",{title:J?Z.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(C,"-next"),Object(Q.a)({},"".concat(C,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(ft)),T.a.createElement(d,{disabled:F,locale:Z,rootPrefixCls:C,selectComponentClass:Re,selectPrefixCls:He,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:$e,pageSize:bt,pageSizeOptions:Se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Fe}))}}],[{key:"getDerivedStateFromProps",value:function(l,f){var C={};if("current"in l&&(C.current=l.current,l.current!==f.current&&(C.currentInputValue=C.current)),"pageSize"in l&&l.pageSize!==f.pageSize){var g=f.current,m=w(l.pageSize,f,l);g=g>m?m:g,"current"in l||(C.current=g,C.currentInputValue=g),C.pageSize=l.pageSize}return C}}]),h}(T.a.Component);S.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:s.a,style:{},itemRender:p,totalBoundaryShowSizeChanger:50};var x=S},"6GrX":function(qe,pe,G){var q=G("mFDi"),Q=G("Xnb7"),O=G("bYtY"),j=O.getContext,D=O.extend,B=O.retrieve2,I=O.retrieve3,v=O.trim,T={},E=0,n=5e3,u=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,c="12px sans-serif",o={};function i(P,z){o[P]=z}function d(P,z){z=z||c;var Z=P+":"+z;if(T[Z])return T[Z];for(var V=(P+"").split(` `),M=0,J=0,X=V.length;Jn&&(E=0,T={}),E++,T[Z]=M,M}function s(P,z,Z,V,M,J,X,re){return X?a(P,z,Z,V,M,J,X,re):A(P,z,Z,V,M,J,re)}function A(P,z,Z,V,M,J,X){var re=C(P,z,M,J,X),se=d(P,z);M&&(se+=M[1]+M[3]);var _e=re.outerHeight,ge=p(0,se,Z),we=w(0,_e,V),Re=new q(ge,we,se,_e);return Re.lineHeight=re.lineHeight,Re}function a(P,z,Z,V,M,J,X,re){var se=g(P,{rich:X,truncate:re,font:z,textAlign:Z,textPadding:M,textLineHeight:J}),_e=se.outerWidth,ge=se.outerHeight,we=p(0,_e,Z),Re=w(0,ge,V);return new q(we,Re,_e,ge)}function p(P,z,Z){return Z==="right"?P-=z:Z==="center"&&(P-=z/2),P}function w(P,z,Z){return Z==="middle"?P-=z/2:Z==="bottom"&&(P-=z),P}function S(P,z,Z){var V=z.textPosition,M=z.textDistance,J=Z.x,X=Z.y;M=M||0;var re=Z.height,se=Z.width,_e=re/2,ge="left",we="top";switch(V){case"left":J-=M,X+=_e,ge="right",we="middle";break;case"right":J+=M+se,X+=_e,we="middle";break;case"top":J+=se/2,X-=M,ge="center",we="bottom";break;case"bottom":J+=se/2,X+=re+M,ge="center";break;case"inside":J+=se/2,X+=_e,ge="center",we="middle";break;case"insideLeft":J+=M,X+=_e,we="middle";break;case"insideRight":J+=se-M,X+=_e,ge="right",we="middle";break;case"insideTop":J+=se/2,X+=M,ge="center";break;case"insideBottom":J+=se/2,X+=re-M,ge="center",we="bottom";break;case"insideTopLeft":J+=M,X+=M;break;case"insideTopRight":J+=se-M,X+=M,ge="right";break;case"insideBottomLeft":J+=M,X+=re-M,we="bottom";break;case"insideBottomRight":J+=se-M,X+=re-M,ge="right",we="bottom";break}return P=P||{},P.x=J,P.y=X,P.textAlign=ge,P.textVerticalAlign=we,P}function x(P,z,Z){var V={textPosition:P,textDistance:Z};return S({},V,z)}function L(P,z,Z,V,M){if(!z)return"";var J=(P+"").split(` `);M=b(z,Z,V,M);for(var X=0,re=J.length;X=J;re++)X-=J;var se=d(Z,z);return se>X&&(Z="",se=0),X=P-se,V.ellipsis=Z,V.ellipsisWidth=se,V.contentWidth=X,V.containerWidth=P,V}function h(P,z){var Z=z.containerWidth,V=z.font,M=z.contentWidth;if(!Z)return"";var J=d(P,V);if(J<=Z)return P;for(var X=0;;X++){if(J<=M||X>=z.maxIterations){P+=z.ellipsis;break}var re=X===0?r(P,M,z.ascCharWidth,z.cnCharWidth):J>0?Math.floor(P.length*M/J):0;P=P.substr(0,re),J=d(P,V)}return P===""&&(P=z.placeholder),P}function r(P,z,Z,V){for(var M=0,J=0,X=P.length;Jge)P="",X=[];else if(we!=null)for(var Re=b(we-(Z?Z[1]+Z[3]:0),z,M.ellipsis,{minChar:M.minChar,placeholder:M.placeholder}),He=0,Se=X.length;HeV&&m(Z,P.substring(V,J)),m(Z,M[2],M[1]),V=u.lastIndex}VHe)return{lines:[],width:0,height:0};ze.textWidth=d(ze.text,ne);var ce=at.textWidth,xe=ce==null||ce==="auto";if(typeof ce=="string"&&ce.charAt(ce.length-1)==="%")ze.percentWidth=ce,_e.push(ze),ce=0;else{if(xe){ce=ze.textWidth;var Fe=at.textBackgroundColor,ke=Fe&&Fe.image;ke&&(ke=Q.findExistImage(ke),Q.isImageReady(ke)&&(ce=Math.max(ce,ke.width*ae/ke.height)))}var ct=Ae?Ae[1]+Ae[3]:0;ce+=ct;var ft=Re!=null?Re-bt:null;ft!=null&&ftX&&(X=M.line_indent_level));var re={mode:J,parent:M,last_token:M?M.last_token:new c(a.START_BLOCK,""),last_word:M?M.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:X,alignment:0,line_indent_level:M?M.line_indent_level:X,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},Z.prototype._reset=function(M){var J=M.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new u(this._options,J),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(f.BlockStatement);var X=new d(M,this._options);return this._tokens=X.tokenize(),M},Z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M,J=this._reset(this._source_text),X=this._options.eol;this._options.eol==="auto"&&(X=` `,J&&o.lineBreak.test(J||"")&&(X=J.match(o.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 M=this._output.get_code(X),M},Z.prototype.handle_token=function(M,J){M.type===a.START_EXPR?this.handle_start_expr(M):M.type===a.END_EXPR?this.handle_end_expr(M):M.type===a.START_BLOCK?this.handle_start_block(M):M.type===a.END_BLOCK?this.handle_end_block(M):M.type===a.WORD?this.handle_word(M):M.type===a.RESERVED?this.handle_word(M):M.type===a.SEMICOLON?this.handle_semicolon(M):M.type===a.STRING?this.handle_string(M):M.type===a.EQUALS?this.handle_equals(M):M.type===a.OPERATOR?this.handle_operator(M):M.type===a.COMMA?this.handle_comma(M):M.type===a.BLOCK_COMMENT?this.handle_block_comment(M,J):M.type===a.COMMENT?this.handle_comment(M,J):M.type===a.DOT?this.handle_dot(M):M.type===a.EOF?this.handle_eof(M):M.type===a.UNKNOWN?this.handle_unknown(M,J):this.handle_unknown(M,J)},Z.prototype.handle_whitespace_and_comments=function(M,J){var X=M.newlines,re=this._options.keep_array_indentation&&m(this._flags.mode);if(M.comments_before)for(var se=M.comments_before.next();se;)this.handle_whitespace_and_comments(se,J),this.handle_token(se,J),se=M.comments_before.next();if(re)for(var _e=0;_e0,J);else if(this._options.max_preserve_newlines&&X>this._options.max_preserve_newlines&&(X=this._options.max_preserve_newlines),this._options.preserve_newlines&&X>1){this.print_newline(!1,J);for(var ge=1;ge0&&(!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))},Z.prototype.set_mode=function(M){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,M),this._flags=this.create_flags(this._previous_flags,M),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.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))},Z.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||L(this._flags.last_token,["get","set"]))},Z.prototype.start_of_statement=function(M){var J=!1;return J=J||L(this._flags.last_token,["var","let","const"])&&M.type===a.WORD,J=J||x(this._flags.last_token,"do"),J=J||!(this._flags.parent.mode===f.ObjectLiteral&&this._flags.mode===f.Statement)&&L(this._flags.last_token,V)&&!M.newlines,J=J||x(this._flags.last_token,"else")&&!(x(M,"if")&&!M.comments_before),J=J||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===f.ForInitializer||this._previous_flags.mode===f.Conditional),J=J||this._flags.last_token.type===a.WORD&&this._flags.mode===f.BlockStatement&&!this._flags.in_case&&!(M.text==="--"||M.text==="++")&&this._last_last_text!=="function"&&M.type!==a.WORD&&M.type!==a.RESERVED,J=J||this._flags.mode===f.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),J?(this.set_mode(f.Statement),this.indent(),this.handle_whitespace_and_comments(M,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M,L(M,["do","for","if","while"])),!0):!1},Z.prototype.handle_start_expr=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M);var J=f.Expression;if(M.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(M),this.set_mode(J),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}J=f.ArrayLiteral,m(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())),p(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,J=f.ForInitializer):p(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,J=f.Conditional):p(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&M.whitespace_before===""?this._output.space_before_token=!1:(p(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var X=this._tokens.peek(-3);if(this._options.space_after_named_function&&X){var re=this._tokens.peek(-4);L(X,["async","function"])||X.text==="*"&&L(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===f.ObjectLiteral?(X.text==="{"||X.text===","||X.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(M);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&p(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===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(M,M.newlines),this.print_token(M),this.set_mode(J),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Z.prototype.handle_end_expr=function(M){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(M,M.text==="]"&&m(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.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(M),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)},Z.prototype.handle_start_block=function(M){this.handle_whitespace_and_comments(M);var J=this._tokens.peek(),X=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(f.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(f.BlockStatement):X&&(p(X.text,[":",","])&&p(J.type,[a.STRING,a.WORD,a.RESERVED])||p(J.text,["get","set","..."])&&p(X.type,[a.WORD,a.RESERVED]))?p(this._last_last_text,["class","interface"])&&!p(X.text,[":",","])?this.set_mode(f.BlockStatement):this.set_mode(f.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(f.BlockStatement):p(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(f.ObjectLiteral):this.set_mode(f.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!J.comments_before&&J.text==="}",se=re&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,ge=null;this._flags.inline_frame=!0;do if(_e+=1,ge=this._tokens.peek(_e-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==a.EOF&&!(ge.type===a.END_BLOCK&&ge.opened===M))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(se||this._flags.last_token.type===a.EQUALS||L(this._flags.last_token,b)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(m(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(M),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(M),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Z.prototype.handle_end_block=function(M){for(this.handle_whitespace_and_comments(M);this._flags.mode===f.Statement;)this.restore_mode();var J=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!J?this._output.space_before_token=!0:this._options.brace_style==="expand"?J||this.print_newline():J||(m(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(M)},Z.prototype.handle_word=function(M){if(M.type===a.RESERVED){if(p(M.text,["set","get"])&&this._flags.mode!==f.ObjectLiteral)M.type=a.WORD;else if(M.text==="import"&&p(this._tokens.peek().text,["(","."]))M.type=a.WORD;else if(p(M.text,["as","from"])&&!this._flags.import_block)M.type=a.WORD;else if(this._flags.mode===f.ObjectLiteral){var J=this._tokens.peek();J.text===":"&&(M.type=a.WORD)}}if(this.start_of_statement(M)?L(this._flags.last_token,["var","let","const"])&&M.type===a.WORD&&(this._flags.declaration_statement=!0):M.newlines&&!F(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(M),this.print_newline()):this.handle_whitespace_and_comments(M),this._flags.do_block&&!this._flags.do_while)if(x(M,"while")){this._output.space_before_token=!0,this.print_token(M),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&&x(M,"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&&L(M,["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(M),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M)),x(M,"function")){(p(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(p(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!M.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,V)?this._output.space_before_token=!0:x(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===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(F(this._flags.mode)||m(this._flags.mode))||this.print_newline(),this.print_token(M),this._flags.last_word=M.text;return}var X="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?X="SPACE":L(M,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines?X="NEWLINE":(X="SPACE",this._output.space_before_token=!0):X="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===f.BlockStatement?X="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&F(this._flags.mode)?X="SPACE":this._flags.last_token.type===a.STRING?X="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(p(this._last_last_text,["function","yield"])||this._flags.mode===f.ObjectLiteral&&p(this._last_last_text,["{",","]))?X="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?X="SPACE":X="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,X="NEWLINE"),L(M,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?X="SPACE":X="NEWLINE"),L(M,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===f.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.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 X==="NEWLINE"?L(this._flags.last_token,b)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(M,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!L(M,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(M,"if")&&x(M.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(M,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&m(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():X==="SPACE"&&(this._output.space_before_token=!0);M.previous&&(M.previous.type===a.WORD||M.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(M),this._flags.last_word=M.text,M.type===a.RESERVED&&(M.text==="do"?this._flags.do_block=!0:M.text==="if"?this._flags.if_block=!0:M.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(M,"from")&&(this._flags.import_block=!1))},Z.prototype.handle_semicolon=function(M){this.start_of_statement(M)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(M);for(var J=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&x(J,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(M)},Z.prototype.handle_string=function(M){M.text.startsWith("`")&&M.newlines===0&&M.whitespace_before===""&&(M.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(M)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(M),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M):M.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(M.previous.text==="]"||M.previous.text===")")&&M.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(M)},Z.prototype.handle_equals=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0},Z.prototype.handle_comma=function(M){this.handle_whitespace_and_comments(M,!0),this.print_token(M),this._output.space_before_token=!0,this._flags.declaration_statement?(F(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(M)):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(M)},Z.prototype.handle_operator=function(M){var J=M.text==="*"&&(L(this._flags.last_token,["function","yield"])||p(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),X=p(M.text,["-","+"])&&(p(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||p(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(M)){var re=!J;this.handle_whitespace_and_comments(M,re)}if(M.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(M);return}if(M.text==="::"){this.print_token(M);return}if(this._flags.last_token.type===a.OPERATOR&&p(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(M),M.text===":"&&this._flags.in_case){this.print_token(M),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.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 se=!0,_e=!0,ge=!1;if(M.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ge=!0):M.text==="?"&&(this._flags.ternary_depth+=1),!X&&!J&&this._options.preserve_newlines&&p(M.text,A)){var we=M.text===":",Re=we&&ge,He=we&&!ge;switch(this._options.operator_position){case r.before_newline:this._output.space_before_token=!He,this.print_token(M),(!we||Re)&&this.allow_wrap_or_preserved_newline(M),this._output.space_before_token=!0;return;case r.after_newline:this._output.space_before_token=!0,!we||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(M):this._output.space_before_token=!1,this.print_token(M),this._output.space_before_token=!0;return;case r.preserve_newline:He||this.allow_wrap_or_preserved_newline(M),se=!(this._output.just_added_newline()||He),this._output.space_before_token=se,this.print_token(M),this._output.space_before_token=!0;return}}if(J){this.allow_wrap_or_preserved_newline(M),se=!1;var Se=this._tokens.peek();_e=Se&&p(Se.type,[a.WORD,a.RESERVED])}else if(M.text==="...")this.allow_wrap_or_preserved_newline(M),se=this._flags.last_token.type===a.START_BLOCK,_e=!1;else if(p(M.text,["--","++","!","~"])||X){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(M),se=!1,_e=!1,M.newlines&&(M.text==="--"||M.text==="++"||M.text==="~")){var Te=L(this._flags.last_token,b)&&M.newlines;Te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Te,!0)}this._flags.last_token.text===";"&&F(this._flags.mode)&&(se=!0),this._flags.last_token.type===a.RESERVED?se=!0:this._flags.last_token.type===a.END_EXPR?se=!(this._flags.last_token.text==="]"&&(M.text==="--"||M.text==="++")):this._flags.last_token.type===a.OPERATOR&&(se=p(M.text,["--","-","++","+"])&&p(this._flags.last_token.text,["--","-","++","+"]),p(M.text,["+","-"])&&p(this._flags.last_token.text,["--","++"])&&(_e=!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||se,this.print_token(M),this._output.space_before_token=_e},Z.prototype.handle_block_comment=function(M,J){if(this._output.raw){this._output.add_raw_token(M),M.directives&&M.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(M.directives){this.print_newline(!1,J),this.print_token(M),M.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!o.newline.test(M.text)&&!M.newlines){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0;return}else this.print_block_commment(M,J)},Z.prototype.print_block_commment=function(M,J){var X=g(M.text),re,se=!1,_e=!1,ge=M.whitespace_before,we=ge.length;if(this.print_newline(!1,J),this.print_token_line_indentation(M),this._output.add_token(X[0]),this.print_newline(!1,J),X.length>1){for(X=X.slice(1),se=P(X,"*"),_e=z(X,ge),se&&(this._flags.alignment=1),re=0;re=0;o--)if(this.__items[o].match(c))return!0;return!1},E.prototype.set_indent=function(c,o){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.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)},E.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},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(c){this.__items.push(c);var o=c.lastIndexOf(` `);o!==-1?this.__character_count=c.length-o:this.__character_count+=c.length},E.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function n(c,o){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),o=o||"",c.indent_level>0&&(o=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}n.prototype.get_indent_size=function(c,o){var i=this.__base_string_length;return o=o||0,c<0&&(i=0),i+=c*this.__indent_size,i+=o,i},n.prototype.get_indent_string=function(c,o){var i=this.__base_string;return o=o||0,c<0&&(c=0,i=""),o+=c*this.__indent_size,this.__ensure_cache(o),i+=this.__cache[o],i},n.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var c=this.__cache.length,o=0,i="";this.__indent_size&&c>=this.__indent_size&&(o=Math.floor(c/this.__indent_size),c-=o*this.__indent_size,i=new Array(o+1).join(this.__indent_string)),c&&(i+=new Array(c+1).join(" ")),this.__cache.push(i)};function u(c,o){this.__indent_cache=new n(c,o),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(c,o){return this.__indent_cache.get_indent_string(c,o)},u.prototype.get_indent_size=function(c,o){return this.__indent_cache.get_indent_size(c,o)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(c){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===` `&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(` `);return c!==` `&&(i=i.replace(/[\n]/g,c)),i},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(c,o){return c=c||0,o=o||0,this.next_line.set_indent(c,o),this.__lines.length>1?(this.current_line.set_indent(c,o),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(c){for(var o=0;o1&&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},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(c,o){for(var i=this.__lines.length-2;i>=0;){var d=this.__lines[i];if(d.is_empty())break;if(d.item(0).indexOf(c)!==0&&d.item(-1)!==o){this.__lines.splice(i+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},T.exports.Output=u},function(T){function E(n,u,c,o){this.type=n,this.text=u,this.comments_before=null,this.newlines=c||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}T.exports.Token=E},function(T,E){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\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",o="\\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",i="(?:\\\\u[0-9a-fA-F]{4}|["+n+c+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+u+c+o+"])*";E.identifier=new RegExp(i+d,"g"),E.identifierStart=new RegExp(i),E.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+u+c+o+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;E.newline=/[\n\r\u2028\u2029]/,E.lineBreak=new RegExp(`\r |`+E.newline.source),E.allLineBreaks=new RegExp(E.lineBreak.source,"g")},function(T,E,n){var u=n(6).Options,c=["before-newline","after-newline","preserve-newline"];function o(i){u.call(this,i,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var A=0;A>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var r=new RegExp(h),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),f=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+f.join("|")+")$"),g,m=function(P,z){c.call(this,P,z),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Z=new s(this._input),V=new A(this._input).read_options(this._options);this.__patterns={template:V,identifier:V.starting_with(d.identifier).matching(d.identifierMatch),number:Z.matching(S),punct:Z.matching(r),comment:Z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Z.matching(//),include:Z.starting_with(/#include/).until_after(d.lineBreak),shebang:Z.starting_with(/#!/).until_after(d.lineBreak),xml:Z.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:V.until(/['\\\n\r\u2028\u2029]/),double_quote:V.until(/["\\\n\r\u2028\u2029]/),template_text:V.until(/[`\\$]/),template_expression:V.until(/[`}\\]/)}};m.prototype=new c,m.prototype._is_comment=function(P){return P.type===p.COMMENT||P.type===p.BLOCK_COMMENT||P.type===p.UNKNOWN},m.prototype._is_opening=function(P){return P.type===p.START_BLOCK||P.type===p.START_EXPR},m.prototype._is_closing=function(P,z){return(P.type===p.END_BLOCK||P.type===p.END_EXPR)&&z&&(P.text==="]"&&z.text==="["||P.text===")"&&z.text==="("||P.text==="}"&&z.text==="{")},m.prototype._reset=function(){g=!1},m.prototype._get_next_token=function(P,z){var Z=null;this._readWhitespace();var V=this._input.peek();return V===null?this._create_token(p.EOF,""):(Z=Z||this._read_non_javascript(V),Z=Z||this._read_string(V),Z=Z||this._read_word(P),Z=Z||this._read_singles(V),Z=Z||this._read_comment(V),Z=Z||this._read_regexp(V,P),Z=Z||this._read_xml(V,P),Z=Z||this._read_punctuation(),Z=Z||this._create_token(p.UNKNOWN,this._input.next()),Z)},m.prototype._read_word=function(P){var z;if(z=this.__patterns.identifier.read(),z!=="")return z=z.replace(d.allLineBreaks,` `),!(P.type===p.DOT||P.type===p.RESERVED&&(P.text==="set"||P.text==="get"))&&C.test(z)?(z==="in"||z==="of")&&(P.type===p.WORD||P.type===p.STRING)?this._create_token(p.OPERATOR,z):this._create_token(p.RESERVED,z):this._create_token(p.WORD,z);if(z=this.__patterns.number.read(),z!=="")return this._create_token(p.WORD,z)},m.prototype._read_singles=function(P){var z=null;return P==="("||P==="["?z=this._create_token(p.START_EXPR,P):P===")"||P==="]"?z=this._create_token(p.END_EXPR,P):P==="{"?z=this._create_token(p.START_BLOCK,P):P==="}"?z=this._create_token(p.END_BLOCK,P):P===";"?z=this._create_token(p.SEMICOLON,P):P==="."&&L.test(this._input.peek(1))?z=this._create_token(p.DOT,P):P===","&&(z=this._create_token(p.COMMA,P)),z&&this._input.next(),z},m.prototype._read_punctuation=function(){var P=this.__patterns.punct.read();if(P!=="")return P==="="?this._create_token(p.EQUALS,P):P==="?."?this._create_token(p.DOT,P):this._create_token(p.OPERATOR,P)},m.prototype._read_non_javascript=function(P){var z="";if(P==="#"){if(this._is_first_token()&&(z=this.__patterns.shebang.read(),z))return this._create_token(p.UNKNOWN,z.trim()+` `);if(z=this.__patterns.include.read(),z)return this._create_token(p.UNKNOWN,z.trim()+` `);P=this._input.next();var Z="#";if(this._input.hasNext()&&this._input.testChar(x)){do P=this._input.next(),Z+=P;while(this._input.hasNext()&&P!=="#"&&P!=="=");return P==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Z+="{}",this._input.next(),this._input.next())),this._create_token(p.WORD,Z)}this._input.back()}else if(P==="<"&&this._is_first_token()){if(z=this.__patterns.html_comment_start.read(),z){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)z+=this._input.next();return g=!0,this._create_token(p.COMMENT,z)}}else if(g&&P==="-"&&(z=this.__patterns.html_comment_end.read(),z))return g=!1,this._create_token(p.COMMENT,z);return null},m.prototype._read_comment=function(P){var z=null;if(P==="/"){var Z="";if(this._input.peek(1)==="*"){Z=this.__patterns.block_comment.read();var V=w.get_directives(Z);V&&V.ignore==="start"&&(Z+=w.readIgnored(this._input)),Z=Z.replace(d.allLineBreaks,` `),z=this._create_token(p.BLOCK_COMMENT,Z),z.directives=V}else this._input.peek(1)==="/"&&(Z=this.__patterns.comment.read(),z=this._create_token(p.COMMENT,Z))}return z},m.prototype._read_string=function(P){if(P==="`"||P==="'"||P==='"'){var z=this._input.next();return this.has_char_escapes=!1,P==="`"?z+=this._read_string_recursive("`",!0,"${"):z+=this._read_string_recursive(P),this.has_char_escapes&&this._options.unescape_strings&&(z=F(z)),this._input.peek()===P&&(z+=this._input.next()),z=z.replace(d.allLineBreaks,` `),this._create_token(p.STRING,z)}return null},m.prototype._allow_regexp_or_xml=function(P){return P.type===p.RESERVED&&a(P.text,["return","case","throw","else","do","typeof","yield"])||P.type===p.END_EXPR&&P.text===")"&&P.opened.previous.type===p.RESERVED&&a(P.opened.previous.text,["if","while","for"])||a(P.type,[p.COMMENT,p.START_EXPR,p.START_BLOCK,p.START,p.END_BLOCK,p.OPERATOR,p.EQUALS,p.EOF,p.SEMICOLON,p.COMMA])},m.prototype._read_regexp=function(P,z){if(P==="/"&&this._allow_regexp_or_xml(z)){for(var Z=this._input.next(),V=!1,M=!1;this._input.hasNext()&&(V||M||this._input.peek()!==P)&&!this._input.testChar(d.newline);)Z+=this._input.peek(),V?V=!1:(V=this._input.peek()==="\\",this._input.peek()==="["?M=!0:this._input.peek()==="]"&&(M=!1)),this._input.next();return this._input.peek()===P&&(Z+=this._input.next(),Z+=this._input.read(d.identifier)),this._create_token(p.STRING,Z)}return null},m.prototype._read_xml=function(P,z){if(this._options.e4x&&P==="<"&&this._allow_regexp_or_xml(z)){var Z="",V=this.__patterns.xml.read_match();if(V){for(var M=V[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),J=M.indexOf("{")===0,X=0;V;){var re=!!V[1],se=V[2],_e=!!V[V.length-1]||se.slice(0,8)==="![CDATA[";if(!_e&&(se===M||J&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--X:++X),Z+=V[0],X<=0)break;V=this.__patterns.xml.read_match()}return V||(Z+=this._input.match(/[\s\S]*/g)[0]),Z=Z.replace(d.allLineBreaks,` `),this._create_token(p.STRING,Z)}}return null};function F(P){for(var z="",Z=0,V=new u(P),M=null;V.hasNext();)if(M=V.match(/([\s]|[^\\]|\\\\)+/g),M&&(z+=M[0]),V.peek()==="\\"){if(V.next(),V.peek()==="x")M=V.match(/x([0-9A-Fa-f]{2})/g);else if(V.peek()==="u")M=V.match(/u([0-9A-Fa-f]{4})/g);else{z+="\\",V.hasNext()&&(z+=V.next());continue}if(!M)return P;if(Z=parseInt(M[1],16),Z>126&&Z<=255&&M[0].indexOf("x")===0)return P;if(Z>=0&&Z<32){z+="\\"+M[0];continue}else Z===34||Z===39||Z===92?z+="\\"+String.fromCharCode(Z):z+=String.fromCharCode(Z)}return z}m.prototype._read_string_recursive=function(P,z,Z){var V,M;P==="'"?M=this.__patterns.single_quote:P==='"'?M=this.__patterns.double_quote:P==="`"?M=this.__patterns.template_text:P==="}"&&(M=this.__patterns.template_expression);for(var J=M.read(),X="";this._input.hasNext();){if(X=this._input.next(),X===P||!z&&d.newline.test(X)){this._input.back();break}else X==="\\"&&this._input.hasNext()?(V=this._input.peek(),V==="x"||V==="u"?this.has_char_escapes=!0:V==="\r"&&this._input.peek(1)===` `&&this._input.next(),X+=this._input.next()):Z&&(Z==="${"&&X==="$"&&this._input.peek()==="{"&&(X+=this._input.next()),Z===X&&(P==="`"?X+=this._read_string_recursive("}",z,"`"):X+=this._read_string_recursive("`",z,"${"),this._input.hasNext()&&(X+=this._input.next())));X+=M.read(),J+=X}return J},T.exports.Tokenizer=m,T.exports.TOKEN=p,T.exports.positionable_operators=b.slice(),T.exports.line_starters=l.slice()},function(T){var E=RegExp.prototype.hasOwnProperty("sticky");function n(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&u=0&&c=u.length&&this.__input.substring(c-u.length,c).toLowerCase()===u},T.exports.InputScanner=n},function(T,E,n){var u=n(8).InputScanner,c=n(3).Token,o=n(10).TokenStream,i=n(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(A,a){this._input=new u(A),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var A,a=new c(d.START,""),p=null,w=[],S=new o;a.type!==d.EOF;){for(A=this._get_next_token(a,p);this._is_comment(A);)S.add(A),A=this._get_next_token(a,p);S.isEmpty()||(A.comments_before=S,S=new o),A.parent=p,this._is_opening(A)?(w.push(p),p=A):p&&this._is_closing(A,p)&&(A.opened=p,p.closed=A,p=w.pop(),A.parent=p),A.previous=a,a.next=A,this.__tokens.add(A),a=A}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(A,a){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(d.RAW,p):this._create_token(d.EOF,"")},s.prototype._is_comment=function(A){return!1},s.prototype._is_opening=function(A){return!1},s.prototype._is_closing=function(A,a){return!1},s.prototype._create_token=function(A,a){var p=new c(A,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},T.exports.Tokenizer=s,T.exports.TOKEN=d},function(T){function E(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position=0&&n/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new u,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(i){var d=this._create();return d._disabled[i]=!0,d._update(),d},o.prototype.read_options=function(i){var d=this._create();for(var s in c)d._disabled[s]=i.templating.indexOf(s)===-1;return d._update(),d},o.prototype.exclude=function(i){var d=this._create();return d._excluded[i]=!0,d._update(),d},o.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),i+=d,d=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},o.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},o.prototype._read_template=function(){var i="",d=this._input.peek();if(d==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(i=i||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},T.exports.TemplatablePattern=o}],B={};function I(T){var E=B[T];if(E!==void 0)return E.exports;var n=B[T]={exports:{}};return D[T](n,n.exports,I),n.exports}var v=I(0);O=v})();var j=O;!(q=[],Q=function(){return{js_beautify:j}}.apply(pe,q),Q!==void 0&&(qe.exports=Q))})()},"6eGT":function(qe,pe,G){"use strict";function q(Q){return null}pe.a=q},"6fms":function(qe,pe,G){var q=G("SUKs"),Q=G("06Qe"),O=G("bYtY"),j=O.each;function D(T){return parseInt(T,10)}function B(T,E){Q.initVML(),this.root=T,this.storage=E;var n=document.createElement("div"),u=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",u.style.cssText="position:absolute;left:0;top:0;",T.appendChild(n),this._vmlRoot=u,this._vmlViewport=n,this.resize();var c=E.delFromStorage,o=E.addToStorage;E.delFromStorage=function(i){c.call(E,i),i&&(i.onRemove&&i.onRemove(u))},E.addToStorage=function(i){i.onAdd&&i.onAdd(u),o.call(E,i)},this._firstPaint=!0}B.prototype={constructor:B,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var T=this.getViewportRoot();if(T)return{offsetLeft:T.offsetLeft||0,offsetTop:T.offsetTop||0}},refresh:function(){var T=this.storage.getDisplayList(!0,!0);this._paintList(T)},_paintList:function(T){for(var E=this._vmlRoot,n=0;n1&&arguments[1]!==void 0?arguments[1]:0,i=(I[c[o+0]]+I[c[o+1]]+I[c[o+2]]+I[c[o+3]]+"-"+I[c[o+4]]+I[c[o+5]]+"-"+I[c[o+6]]+I[c[o+7]]+"-"+I[c[o+8]]+I[c[o+9]]+"-"+I[c[o+10]]+I[c[o+11]]+I[c[o+12]]+I[c[o+13]]+I[c[o+14]]+I[c[o+15]]).toLowerCase();if(!B(i))throw TypeError("Stringified UUID is invalid");return i}var E=T;function n(c,o,i){c=c||{};var d=c.random||(c.rng||O)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,o){i=i||0;for(var s=0;s<16;++s)o[i+s]=d[s];return o}return E(d)}var u=pe.a=n},"7SHv":function(qe,pe,G){var q=G("LPTA"),Q=q.devicePixelRatio,O=G("bYtY"),j=G("SUKs"),D=G("mFDi"),B=G("BPZU"),I=G("Xmg4"),v=G("mLcG"),T=G("Dagg"),E=G("ItGF"),n=1e5,u=314159,c=.01,o=.001;function i(b){return parseInt(b,10)}function d(b){return b?b.__builtin__?!0:!(typeof b.resize!="function"||typeof b.refresh!="function"):!1}var s=new D(0,0,0,0),A=new D(0,0,0,0);function a(b,h,r){return s.copy(b.getBoundingRect()),b.transform&&s.applyTransform(b.transform),A.width=h,A.height=r,!s.intersect(A)}function p(b,h){if(b===h)return!1;if(!b||!h||b.length!==h.length)return!0;for(var r=0;r=0&&r.splice(l,1),b.__hoverMir=null},clearHover:function(b){for(var h=this._hoverElements,r=0;r15)break}}C.__drawIndex=X,C.__drawIndex0&&b>l[0]){for(g=0;gb);g++);C=r[l[g]]}if(l.splice(g+1,0,b),r[b]=h,!h.virtual)if(C){var F=C.dom;F.nextSibling?m.insertBefore(h.dom,F.nextSibling):m.appendChild(h.dom)}else m.firstChild?m.insertBefore(h.dom,m.firstChild):m.appendChild(h.dom)},eachLayer:function(b,h){var r=this._zlevelList,l,f;for(f=0;f0?c:0),this._needsManuallyCompositing),F.__builtin__||j("ZLevel "+m+" has been used by unkown layer "+F.id),F!==f&&(F.__used=!0,F.__startIndex!==r&&(F.__dirty=!0),F.__startIndex=r,F.incremental?F.__drawIndex=-1:F.__drawIndex=r,h(r),f=F),l.__dirty&&(F.__dirty=!0,F.incremental&&F.__drawIndex<0&&(F.__drawIndex=r))}h(r),this.eachBuiltinLayer(function(P,z){!P.__used&&P.getElementCount()>0&&(P.__dirty=!0,P.__startIndex=P.__endIndex=P.__drawIndex=0),P.__dirty&&P.__drawIndex<0&&(P.__drawIndex=P.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(b){b.clear()},setBackgroundColor:function(b){this._backgroundColor=b},configLayer:function(b,h){if(h){var r=this._layerConfig;r[b]?O.merge(r[b],h,!0):r[b]=h;for(var l=0;l0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function s(A){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(A||[]).forEach(function(p){var w=p.key,S=p.children;Object(D.a)(w!=null,"Tree node must have a certain key: [".concat(a).concat(w,"]"));var x=String(w);Object(D.a)(!d.has(x)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(x)),d.set(x,!0),s(S,"".concat(a).concat(x," > "))})}s(i)}function T(i){function d(s){var A=Object(j.a)(s);return A.map(function(a){if(!Object(B.i)(a))return Object(D.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var p=a.key,w=a.props,S=w.children,x=Object(O.a)(w,["children"]),L=Object(Q.a)({key:p},x),b=d(S);return b.length&&(L.children=b),L}).filter(function(a){return a})}return d(i)}function E(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(d===!0?[]:d),A=[];function a(p){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(S,x){var L=Object(B.h)(w?w.pos:"0",x),b=I(S.key,L),h=Object(Q.a)(Object(Q.a)({},S),{},{parent:w,pos:L,children:null,data:S,isStart:[].concat(Object(q.a)(w?w.isStart:[]),[x===0]),isEnd:[].concat(Object(q.a)(w?w.isEnd:[]),[x===p.length-1])});return A.push(h),d===!0||s.has(b)?h.children=a(S.children||[],h):h.children=[],h})}return a(i),A}function n(i,d,s){var A;s?typeof s=="string"?A=function(w){return w[s]}:typeof s=="function"&&(A=function(w){return s(w)}):A=function(w,S){return I(w.key,S)};function a(p,w,S){var x=p?p.children:i,L=p?Object(B.h)(S.pos,w):"0";if(p){var b=A(p,L),h={node:p,index:w,pos:L,key:b,parentPos:S.node?S.pos:null,level:S.level+1};d(h)}x&&x.forEach(function(r,l){a(r,l,{node:p,pos:L,level:S?S.level+1:-1})})}a(null)}function u(i){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=d.initWrapper,A=d.processEntity,a=d.onProcessFinished,p=arguments.length>2?arguments[2]:void 0,w={},S={},x={posEntities:w,keyEntities:S};return s&&(x=s(x)||x),n(i,function(L){var b=L.node,h=L.index,r=L.pos,l=L.key,f=L.parentPos,C=L.level,g={node:b,index:h,key:l,pos:r,level:C},m=I(l,r);w[r]=g,S[m]=g,g.parent=w[f],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),A&&A(g,x)},p),a&&a(x),x}function c(i,d){var s=d.expandedKeys,A=d.selectedKeys,a=d.loadedKeys,p=d.loadingKeys,w=d.checkedKeys,S=d.halfCheckedKeys,x=d.dragOverNodeKey,L=d.dropPosition,b=d.keyEntities,h=b[i],r={eventKey:i,expanded:s.indexOf(i)!==-1,selected:A.indexOf(i)!==-1,loaded:a.indexOf(i)!==-1,loading:p.indexOf(i)!==-1,checked:w.indexOf(i)!==-1,halfChecked:S.indexOf(i)!==-1,pos:String(h?h.pos:""),dragOver:x===i&&L===0,dragOverGapTop:x===i&&L===-1,dragOverGapBottom:x===i&&L===1};return r}function o(i){var d=i.data,s=i.expanded,A=i.selected,a=i.checked,p=i.loaded,w=i.loading,S=i.halfChecked,x=i.dragOver,L=i.dragOverGapTop,b=i.dragOverGapBottom,h=i.pos,r=i.active,l=Object(Q.a)(Object(Q.a)({},d),{},{expanded:s,selected:A,checked:a,loaded:p,loading:w,halfChecked:S,dragOver:x,dragOverGapTop:L,dragOverGapBottom:b,pos:h,active:r});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8EBN":function(qe,pe,G){(function(q){q(G("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 Q=0;Q-1&&j.substring(I+1,j.length);if(v)return q.findModeByExtension(v)},q.findModeByName=function(j){j=j.toLowerCase();for(var D=0;D=$.length?le.slice($.length):le}).join(` `)}var s=[],A=["
    "],a=new o.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){s.length=0,A=["
      "]}var S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ee,U,N,$){if(U>=ee.length||ee[U].level<=N)return U;var le=ee[U];$.push("
    • "+le.text+""),U++;var te=[];return U=x(ee,U,le.level,te),te.length>0&&($.push("
        "),te.forEach(function(Ke){$.push(Ke)}),$.push("
      ")),$.push("
    • "),U=x(ee,U,N,$),U}function L(){return x(s,0,0,A),A.push("
    "),A.join("")}var b={heading:function(U){var N=p.exec(U);if(N)return{type:"heading",raw:N[0],depth:N[1].length,text:N[2]}},fences:function(U){var N=this.rules.block.fences.exec(U);if(N){var $=N[0],le=d($,N[3]||""),te=N[2]?N[2].trim():N[2];if(["latex","katex","math"].indexOf(te)>=0){var Ke=l(),Ct=le;le=Ke,f[Ke]={type:"block",expression:Ct}}return{type:"code",raw:$,lang:te,text:le}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,r=0,l=function(){return"__special_katext_id_".concat(r++,"__")},f={};function C(){return f}function g(){r=0,f={}}function m(ee){return ee=ee.replace(h,function(U,N){var $=l();return f[$]={type:"inline",expression:N},$}),ee}var F=a.listitem;a.listitem=function(ee){return F(m(ee))};var P=a.paragraph;a.paragraph=function(ee){return P(m(ee))};var z=a.tablecell;a.tablecell=function(ee,U){return z(m(ee),U)},a.code=function(ee,U,N){var $=(U||"").match(/\S*/)[0];return $?["latex","katex","math"].indexOf($)>=0?"

    ".concat(ee,"

    "):'
    ').concat(N?ee:Object(i.escape)(ee,!0),`
    `):'
    '+(N?ee:Object(i.escape)(ee,!0))+"
    "},a.heading=function(ee,U,N){var $=this.options.headerPrefix+N.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:$,level:U,text:ee}),"'+ee+""},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:b,renderer:a});var Z=o.a,V=G("SJMd"),M=G("ulZh"),J=G.n(M),X=G("m3rI"),re=G("Oy/b"),se=G("p5ED"),_e=G("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 ge=function(ee,U){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,$){N.__proto__=$}||function(N,$){for(var le in $)Object.prototype.hasOwnProperty.call($,le)&&(N[le]=$[le])})(ee,U)};function we(ee,U){function N(){this.constructor=ee}ge(ee,U),ee.prototype=U===null?Object.create(U):(N.prototype=U.prototype,new N)}function Re(ee,U,N,$){return new(N||(N=Promise))(function(le,te){function Ke(Ht){try{Ut($.next(Ht))}catch(wt){te(wt)}}function Ct(Ht){try{Ut($.throw(Ht))}catch(wt){te(wt)}}function Ut(Ht){var wt;Ht.done?le(Ht.value):(wt=Ht.value,wt instanceof N?wt:new N(function(Yt){Yt(wt)})).then(Ke,Ct)}Ut(($=$.apply(ee,U||[])).next())})}function He(ee,U){var N,$,le,te,Ke={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ct(Ut){return function(Ht){return function(wt){if(N)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(N=1,$&&(le=2&wt[0]?$.return:wt[0]?$.throw||((le=$.return)&&le.call($),0):$.next)&&!(le=le.call($,wt[1])).done)return le;switch($=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return Ke.label++,{value:wt[1],done:!1};case 5:Ke.label++,$=wt[1],wt=[0];continue;case 7:wt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(le=Ke.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){Ke=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]',"select"),this.addActionButton($,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton($,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton($,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton($,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton($,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton($,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton($,'',"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(te){var Ke=document.createElement("div");Ke.className=""+N.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",te.typeName),Ke.innerHTML=te.icon,Ke.addEventListener("click",function(){N.markerToolbarButtonClicked(Ke,te)}),N.buttons.push(Ke),N.markerButtons.push(Ke)}),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 le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'',"render"),this.addActionButton(le,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ee.prototype.addButtonClickListener=function(U){this.buttonClickListeners.push(U)},ee.prototype.removeButtonClickListener=function(U){this.buttonClickListeners.indexOf(U)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(U),1)},ee.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ee.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var U=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var N=0;N0&&this.buttonClickListeners.forEach(function($){return $("marker",N)}),this.markerButtonOverflowBlock.style.display="none"},ee.prototype.actionToolbarButtonClicked=function(U,N){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($){return $("action",N)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ee.prototype.setActiveButton=function(U){this.resetButtonStyles(),U.className=U.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),U.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ee.prototype.setActiveMarkerButton=function(U){var N=this.markerButtons.find(function($){return $.getAttribute("data-type-name")===U});N&&this.setActiveButton(N)},ee.prototype.setCurrentMarker=function(U){var N=this;this.currentMarker=U,this.buttons.filter(function($){return/delete|notes/.test($.getAttribute("data-action"))}).forEach(function($){N.currentMarker===void 0?($.style.fillOpacity="0.4",$.style.pointerEvents="none"):($.style.fillOpacity="1",$.style.pointerEvents="all")})},ee}(),ae=function(){function ee(U,N,$,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=U,this.displayMode=N,this.uiStyleSettings=$,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ee.prototype.addStyles=function(){var U;this.toolboxStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var N=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ae("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ae("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 Ae("toolbox-panel-row_colors",` background-color: `+((U=this.uiStyleSettings.toolboxBackgroundColor)!==null&&U!==void 0?U:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new Ae("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*N)+`px; padding: `+N+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new at("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new at("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},ee.prototype.show=function(U){var N;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=U,this.uiContainer.className=this.toolboxStyleClass.name+" "+((N=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ee.prototype.setPanelButtons=function(U){var N,$,le=this;this.panels=U,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((N=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(te){var Ke;te.uiStyleSettings=le.uiStyleSettings;var Ct=document.createElement("div");Ct.className=le.toolboxButtonStyleClass.name+" "+((Ke=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:le.toolboxButtonStyleColorsClass.name),Ct.innerHTML=te.icon,Ct.title=te.title,Ct.addEventListener("click",function(){le.panelButtonClick(te)}),le.panelButtons.push(Ct),le.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ee.prototype.panelButtonClick=function(U){var N=this,$=-1;if(U!==this.activePanel){$=this.panels.indexOf(U),this.panelRow.innerHTML="";var le=U.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),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=U}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){N.displayMode==="inline"?N.panelRow.style.display="none":N.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(te,Ke){var Ct,Ut;te.className=N.toolboxButtonStyleClass.name+" "+(Ke===$?""+((Ct=N.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:N.toolboxActiveButtonStyleColorsClass.name):""+((Ut=N.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ut!==void 0?Ut:N.toolboxButtonStyleColorsClass.name))})},ee}(),ce=function(ee,U){this.title=ee,this.icon=U},xe=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=$,Ke.currentColor=le,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.whiteSpace="nowrap",this.colors.forEach(function(le){var te=N.getColorBox(le);$.appendChild(te),N.colorBoxes.push(te)}),$},U.prototype.getColorBox=function(N){var $=this,le=this.uiStyleSettings.toolbarHeight/4,te=this.uiStyleSettings.toolbarHeight-le,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=te-2+"px",Ke.style.height=te-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(te+2)/2+"px",Ke.style.borderColor=N===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){$.setCurrentColor(N,Ke)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=te-2+"px",Ct.style.height=te-2+"px",Ct.style.backgroundColor=N,Ct.style.borderRadius=te/2+"px",N==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.innerHTML=` `),Ke.appendChild(Ct),Ke},U.prototype.setCurrentColor=function(N,$){var le=this;this.currentColor=N,this.colorBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(N)},U}(ce),Fe=function(){function ee(U,N,$){this._state="new",this._isSelected=!1,this._container=U,this._overlayContainer=N,this.globalSettings=$,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ee.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(U){return!1},Object.defineProperty(ee.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ee.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ee.prototype.pointerDown=function(U,N){},ee.prototype.dblClick=function(U,N){},ee.prototype.manipulate=function(U){},ee.prototype.pointerUp=function(U){this.stateChanged()},ee.prototype.dispose=function(){},ee.prototype.addMarkerVisualToContainer=function(U){this.container.childNodes.length>0?this.container.insertBefore(U,this.container.childNodes[0]):this.container.appendChild(U)},ee.prototype.getState=function(){return{typeName:ee.typeName,state:this.state,notes:this.notes}},ee.prototype.restoreState=function(U){this._state=U.state,this.notes=U.notes},ee.prototype.scale=function(U,N){},ee.prototype.colorChanged=function(U){this.onColorChanged&&this.onColorChanged(U),this.stateChanged()},ee.prototype.fillColorChanged=function(U){this.onFillColorChanged&&this.onFillColorChanged(U),this.stateChanged()},ee.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var U=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),U.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(U)&&this.onStateChanged(this)}},ee.typeName="MarkerBase",ee}(),ke=function(){function ee(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ee.prototype.findGripByVisual=function(U){return this.topLeft.ownsTarget(U)?this.topLeft:this.topCenter.ownsTarget(U)?this.topCenter:this.topRight.ownsTarget(U)?this.topRight:this.centerLeft.ownsTarget(U)?this.centerLeft:this.centerRight.ownsTarget(U)?this.centerRight:this.bottomLeft.ownsTarget(U)?this.bottomLeft:this.bottomCenter.ownsTarget(U)?this.bottomCenter:this.bottomRight.ownsTarget(U)?this.bottomRight:void 0},ee}(),ct=function(){function ee(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(U){return U===this.visual||U===this.visual.childNodes[0]||U===this.visual.childNodes[1]},ee}(),ft=function(){function ee(){}return ee.toITransformMatrix=function(U){return{a:U.a,b:U.b,c:U.c,d:U.d,e:U.e,f:U.f}},ee.toSVGMatrix=function(U,N){return U.a=N.a,U.b=N.b,U.c=N.c,U.d=N.d,U.e=N.e,U.f=N.f,U},ee}(),yt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.left=0,te.top=0,te.width=0,te.height=0,te.defaultSize={x:50,y:20},te.offsetX=0,te.offsetY=0,te.rotationAngle=0,te.CB_DISTANCE=10,te._suppressMarkerCreateEvent=!1,te.container.transform.baseVal.appendItem(Te.createTransform()),te.setupControlBox(),te}return we(U,ee),Object.defineProperty(U.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"visual",{get:function(){return this._visual},set:function(N){this._visual=N;var $=Te.createTransform();this._visual.transform.baseVal.appendItem($)},enumerable:!1,configurable:!0}),U.prototype.ownsTarget=function(N){return!!ee.prototype.ownsTarget.call(this,N)||!!(this.controlGrips.findGripByVisual(N)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(N))},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.left=N.x,this.top=N.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(N);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($)){this.activeGrip=this.rotatorGrip;var te=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=te.x-this.width/2,this.top=te.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},U.prototype.pointerUp=function(N){var $=this.state;ee.prototype.pointerUp.call(this,N),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(N),this._state="select",$==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},U.prototype.moveVisual=function(N){this.visual.style.transform="translate("+N.x+"px, "+N.y+"px)"},U.prototype.manipulate=function(N){var $=this.unrotatePoint(N);this.state==="creating"?this.resize(N):this.state==="move"?(this.left=this.manipulationStartLeft+($.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($):this.state==="rotate"&&this.rotate(N)},U.prototype.resize=function(N){var $=this.manipulationStartLeft,le=this.manipulationStartWidth,te=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$=this.manipulationStartLeft+N.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-$;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+N.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:te=this.manipulationStartTop+N.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-te;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+N.y-this.manipulationStartY}le>=0?(this.left=$,this.width=le):(this.left=$+le,this.width=-le),Ke>=0?(this.top=te,this.height=Ke):(this.top=te+Ke,this.height=-Ke),this.setSize()},U.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},U.prototype.rotate=function(N){if(Math.abs(N.x-this.centerX)>.1){var $=Math.sign(N.x-this.centerX);this.rotationAngle=180*Math.atan((N.y-this.centerY)/(N.x-this.centerX))/Math.PI+90*$,this.applyRotation()}},U.prototype.applyRotation=function(){var N=this.container.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(N,0)},U.prototype.rotatePoint=function(N){if(this.rotationAngle===0)return N;var $=this.container.getCTM(),le=Te.createPoint(N.x,N.y);return{x:(le=le.matrixTransform($)).x,y:le.y}},U.prototype.unrotatePoint=function(N){if(this.rotationAngle===0)return N;var $=this.container.getCTM();$=$.inverse();var le=Te.createPoint(N.x,N.y);return{x:(le=le.matrixTransform($)).x,y:le.y}},U.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},U.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},U.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var N=Te.createTransform();N.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(N),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.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 ke,this.addControlGrips(),this.controlBox.style.display="none"},U.prototype.adjustControlBox=function(){var N=this.controlBox.transform.baseVal.getItem(0);N.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(N,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()},U.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()},U.prototype.createGrip=function(){var N=new ct;return N.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(N.visual),N},U.prototype.positionGrips=function(){var N=this.controlGrips.topLeft.GRIP_SIZE,$=-N/2,le=$,te=(this.width+this.CB_DISTANCE)/2-N/2,Ke=(this.height+this.CB_DISTANCE)/2-N/2,Ct=this.height+this.CB_DISTANCE-N/2,Ut=this.width+this.CB_DISTANCE-N/2;this.positionGrip(this.controlGrips.topLeft.visual,$,le),this.positionGrip(this.controlGrips.topCenter.visual,te,le),this.positionGrip(this.controlGrips.topRight.visual,Ut,le),this.positionGrip(this.controlGrips.centerLeft.visual,$,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Ut,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,$,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,te,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Ut,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,te,le-3*this.CB_DISTANCE)},U.prototype.positionGrip=function(N,$,le){var te=N.transform.baseVal.getItem(0);te.setTranslate($,le),N.transform.baseVal.replaceItem(te,0)},U.prototype.hideControlBox=function(){this.controlBox.style.display="none"},U.prototype.showControlBox=function(){this.controlBox.style.display=""},U.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.left=$.left,this.top=$.top,this.width=$.width,this.height=$.height,this.rotationAngle=$.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$.containerTransformMatrix))},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$);var le=this.rotatePoint({x:this.left,y:this.top}),te=this.unrotatePoint({x:le.x*N,y:le.y*$});this.left=te.x,this.top=te.y,this.width=this.width*N,this.height=this.height*$,this.adjustControlBox()},U}(Fe),Et=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.createVisual=te.createVisual.bind(te),te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual)},U.prototype.createVisual=function(){this.visual=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},U.prototype.manipulate=function(N){ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.setSize()},U.prototype.setSize=function(){ee.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},U.prototype.pointerUp=function(N){ee.prototype.pointerUp.call(this,N),this.setSize()},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(N),this.stateChanged()},U.prototype.setFillColor=function(N){this.fillColor=N,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},U.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){var $=N;this.fillColor=$.fillColor,this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.opacity=$.opacity,this.createVisual(),ee.prototype.restoreState.call(this,N),this.setSize()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setSize()},U.title="Rectangle marker",U}(yt),Ot=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=$,Ke.currentWidth=le,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.widths.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.flexGrow="2",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===N.currentWidth?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentWidth(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.innerText=le.toString(),Ke.style.marginRight="5px",te.appendChild(Ke);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Ut=document.createElement("hr");Ut.style.minWidth="20px",Ut.style.border="0px",Ut.style.borderTop=le+"px solid "+N.uiStyleSettings.toolboxColor,Ut.style.flexGrow="2",Ct.appendChild(Ut),te.appendChild(Ct),N.widthBoxes.push(te)}),$},U.prototype.setCurrentWidth=function(N,$){var le=this;this.currentWidth=N,this.widthBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},U}(ce),Mt=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=$,Ke.currentStyle=le,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",this.styles.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/N.styles.length-5+"%",te.style.borderColor=le===N.currentStyle?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentStyle(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Ct=` `;Ke.innerHTML=Ct,te.appendChild(Ke),N.styleBoxes.push(te)}),$},U.prototype.setCurrentStyle=function(N,$){var le=this;this.currentStyle=N,this.styleBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},U}(ce),Qe=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="FrameMarker",U.title="Frame marker",U.icon='',U}(Et),Ne=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},lt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.x1=0,te.y1=0,te.x2=0,te.y2=0,te.defaultLength=50,te.manipulationStartX=0,te.manipulationStartY=0,te.manipulationStartX1=0,te.manipulationStartY1=0,te.manipulationStartX2=0,te.manipulationStartY2=0,te.setupControlBox(),te}return we(U,ee),U.prototype.ownsTarget=function(N){return!!ee.prototype.ownsTarget.call(this,N)||!(!this.grip1.ownsTarget(N)&&!this.grip2.ownsTarget(N))},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.manipulationStartX=N.x,this.manipulationStartY=N.y,this.state==="new"&&(this.x1=N.x,this.y1=N.y,this.x2=N.x,this.y2=N.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($)?this.activeGrip=this.grip1:this.grip2.ownsTarget($)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},U.prototype.pointerUp=function(N){var $=this.state;ee.prototype.pointerUp.call(this,N),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(N),this._state="select",$==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},U.prototype.adjustVisual=function(){},U.prototype.manipulate=function(N){this.state==="creating"?this.resize(N):this.state==="move"?(this.x1=this.manipulationStartX1+N.x-this.manipulationStartX,this.y1=this.manipulationStartY1+N.y-this.manipulationStartY,this.x2=this.manipulationStartX2+N.x-this.manipulationStartX,this.y2=this.manipulationStartY2+N.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(N)},U.prototype.resize=function(N){switch(this.activeGrip){case this.grip1:this.x1=N.x,this.y1=N.y;break;case this.grip2:case void 0:this.x2=N.x,this.y2=N.y}this.adjustVisual(),this.adjustControlBox()},U.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},U.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},U.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},U.prototype.adjustControlBox=function(){this.positionGrips()},U.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},U.prototype.createGrip=function(){var N=new ct;return N.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(N.visual),N},U.prototype.positionGrips=function(){var N=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-N/2,this.y1-N/2),this.positionGrip(this.grip2.visual,this.x2-N/2,this.y2-N/2)},U.prototype.positionGrip=function(N,$,le){var te=N.transform.baseVal.getItem(0);te.setTranslate($,le),N.transform.baseVal.replaceItem(te,0)},U.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ee.prototype.getState.call(this))},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.x1=$.x1,this.y1=$.y1,this.x2=$.x2,this.y2=$.y2},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.x1=this.x1*N,this.y1=this.y1*$,this.x2=this.x2*N,this.y2=this.y2*$,this.adjustVisual(),this.adjustControlBox()},U}(Fe),dt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorLine&&N!==this.visibleLine)},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},U.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.createVisual(),this.adjustVisual()},U.typeName="LineMarker",U.title="Line marker",U.icon='',U}(lt),Ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=$,Ke.currentFont=le,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.overflow="hidden",$.style.flexGrow="2",this.fonts.forEach(function(le){var te=document.createElement("div");te.style.display="inline-block",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/N.fonts.length-5+"%",te.style.borderColor=le===N.currentFont?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentFont(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=le,Ke.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Ct),te.appendChild(Ke),N.fontBoxes.push(te)}),$},U.prototype.setCurrentFont=function(N,$){var le=this;this.currentFont=N,this.fontBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},U}(ce),st=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.color="transparent",te.padding=5,te.DEFAULT_TEXT="your text here",te.text=te.DEFAULT_TEXT,te.isMoved=!1,te.color=le.defaultColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setColor=te.setColor.bind(te),te.setFont=te.setFont.bind(te),te.renderText=te.renderText.bind(te),te.sizeText=te.sizeText.bind(te),te.textEditDivClicked=te.textEditDivClicked.bind(te),te.showTextEditor=te.showTextEditor.bind(te),te.setSize=te.setSize.bind(te),te.positionTextEditor=te.positionTextEditor.bind(te),te.colorPanel=new xe("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.fontFamilyPanel=new Ye("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te}return we(U,ee),U.prototype.ownsTarget=function(N){if(ee.prototype.ownsTarget.call(this,N)||N===this.visual||N===this.textElement||N===this.bgRectangle)return!0;var $=!1;return this.textElement.childNodes.forEach(function(le){le===N&&($=!0)}),$},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.isMoved=!1,this.pointerDownPoint=N,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(N),this._state="creating")},U.prototype.renderText=function(){var N=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($){N.textElement.appendChild(Te.createTSpan($.trim()===""?" ":$.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},U.prototype.getTextScale=function(){var N=this.textElement.getBBox(),$=1;if(N.width>0&&N.height>0){var le=(1*this.width-this.width*this.padding*2/100)/N.width,te=(1*this.height-this.height*this.padding*2/100)/N.height;$=Math.min(le,te)}return $},U.prototype.getTextPosition=function(N){var $=this.textElement.getBBox(),le=0,te=0;return $.width>0&&$.height>0&&(le=(this.width-$.width*N)/2,te=this.height/2-$.height*N/2),{x:le,y:te}},U.prototype.sizeText=function(){var N=this.textElement.getBBox(),$=this.getTextScale(),le=this.getTextPosition($);le.y-=N.y*$,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+$+", "+$+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale($,$))},U.prototype.manipulate=function(N){ee.prototype.manipulate.call(this,N),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(N.x-this.pointerDownPoint.x)>5||Math.abs(N.y-this.pointerDownPoint.y)>5)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.isMoved=!0,this.setSize(),this.sizeText()},U.prototype.setSize=function(){ee.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},U.prototype.pointerUp=function(N){var $=this.state;$==="creating"&&(this._suppressMarkerCreateEvent=!0),ee.prototype.pointerUp.call(this,N),this.setSize(),($==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},U.prototype.showTextEditor=function(){var N=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($){$.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $=Number.parseFloat(N.textEditor.style.fontSize);N.textEditor.clientWidth>=Number.parseInt(N.textEditor.style.maxWidth)&&$>.9;)$-=.1,N.textEditor.style.fontSize=Math.max($,.9)+"em"}),this.textEditor.addEventListener("keyup",function($){$.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($){if($.clipboardData){var le=$.clipboardData.getData("text"),te=window.getSelection();if(!te.rangeCount)return!1;te.deleteFromDocument(),te.getRangeAt(0).insertNode(document.createTextNode(le)),$.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){N.textEditDivClicked(N.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},U.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var N=this.getTextScale(),$=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),te={x:le.width*N,y:le.height*N};$.x-=te.x/2,$.y-=te.y/2,this.textEditor.style.top=$.y+"px",this.textEditor.style.left=$.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$.x+"px",this.textEditor.style.fontSize=Math.max(16*N,12)+"px",this.textElement.style.display="none"}},U.prototype.textEditDivClicked=function(N){this.text=N.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},U.prototype.select=function(){ee.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},U.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ee.prototype.deselect.call(this)},U.prototype.dblClick=function(N,$){ee.prototype.dblClick.call(this,N,$),this.showTextEditor()},U.prototype.setColor=function(N){this.textElement&&Te.setAttributes(this.textElement,[["fill",N]]),this.color=N,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(N)},U.prototype.setFont=function(N){this.textElement&&Te.setAttributes(this.textElement,[["font-family",N]]),this.fontFamily=N,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},U.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},U.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){var $=N;this.color=$.color,this.fontFamily=$.fontFamily,this.padding=$.padding,this.text=$.text,this.createVisual(),ee.prototype.restoreState.call(this,N),this.setSize()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setSize(),this.sizeText(),this.positionTextEditor()},U.typeName="TextMarker",U.title="Text marker",U.icon='',U}(yt),je=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.color="transparent",te.lineWidth=3,te.drawing=!1,te.pixelRatio=1,te.color=le.defaultColor,te.lineWidth=le.defaultStrokeWidth,te.pixelRatio=le.freehandPixelRatio,te.setColor=te.setColor.bind(te),te.addCanvas=te.addCanvas.bind(te),te.finishCreation=te.finishCreation.bind(te),te.setLineWidth=te.setLineWidth.bind(te),te.colorPanel=new xe("Color",le.defaultColorSet,le.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.lineWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.lineWidthPanel.onWidthChanged=te.setLineWidth,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.drawingImage)},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var N=Te.createTransform();this.visual.transform.baseVal.appendItem(N),this.addMarkerVisualToContainer(this.visual)},U.prototype.pointerDown=function(N,$){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(N.x,N.y),this.drawing=!0):ee.prototype.pointerDown.call(this,N,$)},U.prototype.manipulate=function(N){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(N.x,N.y),this.canvasContext.stroke()):ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},U.prototype.pointerUp=function(N){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ee.prototype.pointerUp.call(this,N)},U.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)},U.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.select.call(this)},U.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.deselect.call(this)},U.prototype.finishCreation=function(){for(var N=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=$[0],te=$[1],Ke=$[2],Ct=$[3],Ut=!1,Ht=0;Ht0&&(Ut=!0,HtCt&&(Ct=Ht),wt>Ke&&(Ke=wt));if(Ut){this.left=le/this.pixelRatio,this.top=te/this.pixelRatio,this.width=(Ke-le)/this.pixelRatio,this.height=(Ct-te)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=Ke-le,Yt.height=Ct-te,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(le,te,Ke-le,Ct-te),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},U.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},U.prototype.setColor=function(N){this.color=N,this.colorChanged(N)},U.prototype.setLineWidth=function(N){this.lineWidth=N},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({drawingImgUrl:this.drawingImgUrl},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){this.createVisual(),ee.prototype.restoreState.call(this,N),this.drawingImgUrl=N.drawingImgUrl,this.setDrawingImage()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.setDrawingImage()},U.typeName="FreehandMarker",U.title="Freehand marker",U.icon='',U}(yt),Le=function(ee){function U(N,$,le){var te=ee.call(this,N,le||'')||this;return te.typeBoxes=[],te.currentType=$,te.setCurrentType=te.setCurrentType.bind(te),te}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");$.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2";for(var le=function(Ct){var Ut="both";switch(Ct){case 0:Ut="both";break;case 1:Ut="start";break;case 2:Ut="end";break;case 3:Ut="none"}var Ht=document.createElement("div");if(Ht.style.display="flex",Ht.style.flexGrow="2",Ht.style.alignItems="center",Ht.style.justifyContent="space-between",Ht.style.padding="5px",Ht.style.borderWidth="2px",Ht.style.borderStyle="solid",Ht.style.borderColor=Ut===te.currentType?te.uiStyleSettings.toolboxAccentColor:"transparent",Ht.addEventListener("click",function(){N.setCurrentType(Ut,Ht)}),$.appendChild(Ht),Ut==="both"||Ut==="start"){var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.innerHTML=` `,wt.style.marginLeft="5px",Ht.appendChild(wt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var Xt=document.createElement("hr");if(Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop="3px solid "+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee"),Xt.style.flexGrow="2",Yt.appendChild(Xt),Ht.appendChild(Yt),Ut==="both"||Ut==="end"){var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.innerHTML=` `,qt.style.marginRight="5px",Ht.appendChild(qt)}te.typeBoxes.push(Ht)},te=this,Ke=0;Ke<4;Ke++)le(Ke);return $},U.prototype.setCurrentType=function(N,$){var le=this;this.currentType=N,this.typeBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},U}(ce),Me=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.arrowType="end",te.arrowBaseHeight=10,te.arrowBaseWidth=10,te.getArrowPoints=te.getArrowPoints.bind(te),te.setArrowType=te.setArrowType.bind(te),te.arrowTypePanel=new Le("Arrow type","end"),te.arrowTypePanel.onArrowTypeChanged=te.setArrowType,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.arrow1&&N!==this.arrow2)},U.prototype.getArrowPoints=function(N,$){var le=this.arrowBaseWidth+2*this.strokeWidth,te=this.arrowBaseHeight+2*this.strokeWidth;return N-le/2+","+($+te/2)+" "+N+","+($-te/2)+" "+(N+le/2)+","+($+te/2)},U.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.state==="creating"&&this.createTips()},U.prototype.adjustVisual=function(){if(ee.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.arrow1.transform.baseVal.getItem(0);$.setRotate(N,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(N+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},U.prototype.setArrowType=function(N){this.arrowType=N,this.adjustVisual(),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({arrowType:this.arrowType},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.arrowType=$.arrowType,this.createTips(),this.adjustVisual()},U.typeName="ArrowMarker",U.title="Arrow marker",U.icon='',U}(dt),me=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.fillColor=le.defaultFillColor,te.strokeWidth=0,te.fillPanel=new xe("Color",le.defaultColorSet,le.defaultFillColor),te.fillPanel.onColorChanged=te.setFillColor,te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="CoverMarker",U.title="Cover marker",U.icon='',U}(Et),ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=$,Ke.currentOpacity=le,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return we(U,ee),U.prototype.getUi=function(){var N=this,$=document.createElement("div");return $.style.display="flex",$.style.overflow="hidden",$.style.flexGrow="2",$.style.justifyContent="space-between",this.opacities.forEach(function(le){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="center",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=le===N.currentOpacity?N.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){N.setCurrentOpacity(le,te)}),$.appendChild(te);var Ke=document.createElement("div");Ke.innerText=100*le+"%",te.appendChild(Ke),N.opacityBoxes.push(te)}),$},U.prototype.setCurrentOpacity=function(N,$){var le=this;this.currentOpacity=N,this.opacityBoxes.forEach(function(te){te.style.borderColor=te===$?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},U}(ce),Ee=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.setOpacity=te.setOpacity.bind(te),te.fillColor=le.defaultHighlightColor,te.strokeWidth=0,te.opacity=le.defaultHighlightOpacity,te.fillPanel=new xe("Color",le.defaultColorSet,te.fillColor),te.fillPanel.onColorChanged=te.setFillColor,te.opacityPanel=new ye("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return we(U,ee),U.prototype.setOpacity=function(N){this.opacity=N,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="HighlightMarker",U.title="Highlight marker",U.icon='',U}(me),Oe='',De=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.bgColor="transparent",te.tipPosition={x:0,y:0},te.tipBase1Position={x:0,y:0},te.tipBase2Position={x:0,y:0},te.tipMoving=!1,te.color=le.defaultStrokeColor,te.bgColor=le.defaultFillColor,te.fontFamily=le.defaultFontFamily,te.defaultSize={x:100,y:30},te.setBgColor=te.setBgColor.bind(te),te.getTipPoints=te.getTipPoints.bind(te),te.positionTip=te.positionTip.bind(te),te.setTipPoints=te.setTipPoints.bind(te),te.colorPanel=new xe("Text color",le.defaultColorSet,te.color,''),te.colorPanel.onColorChanged=te.setColor,te.bgColorPanel=new xe("Fill color",le.defaultColorSet,te.bgColor,Oe),te.bgColorPanel.onColorChanged=te.setBgColor,te.fontFamilyPanel=new Ye("Font",le.defaultFontFamilies,le.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te.tipGrip=new ct,te.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),te.controlBox.appendChild(te.tipGrip.visual),te}return we(U,ee),U.prototype.ownsTarget=function(N){return ee.prototype.ownsTarget.call(this,N)||this.tipGrip.ownsTarget(N)||this.tip===N},U.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},U.prototype.pointerDown=function(N,$){this.state==="new"&&ee.prototype.pointerDown.call(this,N,$),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ee.prototype.pointerDown.call(this,N,$)},U.prototype.pointerUp=function(N){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ee.prototype.pointerUp.call(this,N);else{var $=this.state==="creating";ee.prototype.pointerUp.call(this,N),this.setTipPoints($),this.positionTip()}},U.prototype.manipulate=function(N){if(this.tipMoving){var $=this.unrotatePoint(N);this.tipPosition={x:$.x-this.manipulationStartLeft,y:$.y-this.manipulationStartTop},this.positionTip()}else ee.prototype.manipulate.call(this,N)},U.prototype.setBgColor=function(N){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",N]]),Te.setAttributes(this.tip,[["fill",N]])),this.bgColor=N,this.fillColorChanged(N)},U.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},U.prototype.setTipPoints=function(N){N===void 0&&(N=!1);var $=Math.min(this.height/2,15),le=this.height/5;N&&(this.tipPosition={x:$+le/2,y:this.height+20});var te=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?te.1)){var N=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$=this.tip1.transform.baseVal.getItem(0);$.setRotate(N,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(N+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N),this.createTips(),this.adjustVisual()},U.typeName="MeasurementMarker",U.title="Measurement marker",U.icon='',U}(dt),Tt=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokePanel.colors=le.defaultColorSet,te.fillColor="transparent",te}return we(U,ee),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=ee.prototype.getState.call(this);return N.typeName=U.typeName,N},U.typeName="EllipseFrameMarker",U.title="Ellipse frame marker",U.icon='',U}(Ze),kt=function(){function ee(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ee.prototype.addUndoStep=function(U){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(U)||(this.undoStack.push(U),JSON.stringify(this.lastRedoStep)!==JSON.stringify(U)&&this.redoStack.splice(0,this.redoStack.length))},ee.prototype.replaceLastUndoStep=function(U){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=U)},ee.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ee.prototype.undo=function(){if(this.undoStack.length>1){var U=this.undoStack.pop();return U!==void 0&&this.redoStack.push(U),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ee.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ee}(),It=function(ee){function U(N,$,le){var te=ee.call(this,N,$,le)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.curveX=0,te.curveY=0,te.manipulationStartCurveX=0,te.manipulationStartCurveY=0,te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.positionGrips=te.positionGrips.bind(te),te.addControlGrips=te.addControlGrips.bind(te),te.adjustVisual=te.adjustVisual.bind(te),te.setupControlBox=te.setupControlBox.bind(te),te.resize=te.resize.bind(te),te.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.strokePanel=new xe("Line color",le.defaultColorSet,le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new Ot("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new Mt("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return we(U,ee),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.visual&&N!==this.selectorCurve&&N!==this.visibleCurve&&!this.curveGrip.ownsTarget(N))},U.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},U.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.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)},U.prototype.pointerDown=function(N,$){ee.prototype.pointerDown.call(this,N,$),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=N.x,this.curveY=N.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($)&&(this.activeGrip=this.curveGrip,this._state="resize")},U.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},U.prototype.setupControlBox=function(){ee.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.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)},U.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ee.prototype.addControlGrips.call(this)},U.prototype.positionGrips=function(){ee.prototype.positionGrips.call(this);var N=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-N/2,this.curveY-N/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()))},U.prototype.manipulate=function(N){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+N.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+N.y-this.manipulationStartY),ee.prototype.manipulate.call(this,N)},U.prototype.resize=function(N){this.activeGrip===this.curveGrip&&(this.curveX=N.x,this.curveY=N.y),ee.prototype.resize.call(this,N),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},U.prototype.setStrokeColor=function(N){this.strokeColor=N,this.adjustVisual(),this.colorChanged(N)},U.prototype.setStrokeWidth=function(N){this.strokeWidth=N,this.adjustVisual()},U.prototype.setStrokeDasharray=function(N){this.strokeDasharray=N,this.adjustVisual()},U.prototype.scale=function(N,$){this.curveX=this.curveX*N,this.curveY=this.curveY*$,ee.prototype.scale.call(this,N,$)},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){ee.prototype.restoreState.call(this,N);var $=N;this.strokeColor=$.strokeColor,this.strokeWidth=$.strokeWidth,this.strokeDasharray=$.strokeDasharray,this.curveX=$.curveX,this.curveY=$.curveY,this.createVisual(),this.adjustVisual()},U.typeName="CurveMarker",U.title="Curve marker",U.icon='',U}(lt),St=function(){function ee(U,N){N===void 0&&(N=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=U,this.cancelable=N}return Object.defineProperty(ee.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ee.prototype.preventDefault=function(){this._defaultPrevented=!0},ee}(),ut=function(ee){function U(N,$,le){var te=ee.call(this,N,!1)||this;return te.dataUrl=$,te.state=le,te}return we(U,ee),U}(St),nt=function(ee){function U(N,$,le){le===void 0&&(le=!1);var te=ee.call(this,N,le)||this;return te.marker=$,te}return we(U,ee),U}(St),tt=function(){function ee(){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 ee.prototype.addEventListener=function(U,N){this[U].push(N)},ee.prototype.removeEventListener=function(U,N){var $=this[U].indexOf(N);$>-1&&this[U].splice($,1)},ee}(),Ce=function(){function ee(U){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new kt,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 tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ee.instanceCounter++,this.styles=new ze(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=U,this.targetRoot=document.body,this.width=U.clientWidth,this.height=U.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(ee.prototype,"ALL_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Tt,Ze,Ee,De,ht,me,dt,It]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Ze,Ee,De]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,je,Me,st,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(U){var N=this;this._availableMarkerTypes.splice(0),U.forEach(function($){if(typeof $=="string"){var le=N.ALL_MARKER_TYPES.find(function(te){return te.typeName===$});le!==void 0&&N._availableMarkerTypes.push(le)}else N._availableMarkerTypes.push($)})},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(U){this._zoomLevel=U,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ee.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),$e.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ee.prototype.show=function(){var U=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(N){return N(new St(U))})},ee.prototype.render=function(){return Re(this,void 0,void 0,function(){var U;return He(this,function(N){switch(N.label){case 0:return this.setCurrentMarker(),(U=new bt).naturalSize=this.renderAtNaturalSize,U.imageType=this.renderImageType,U.imageQuality=this.renderImageQuality,U.markersOnly=this.renderMarkersOnly,U.width=this.renderWidth,U.height=this.renderHeight,[4,U.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return N.sent(),[4,U.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,N.sent()]}})})},ee.prototype.close=function(U){var N=this;if(U===void 0&&(U=!1),this.isOpen){var $=!1;U||this.eventListeners.beforeclose.forEach(function(le){var te=new St(N,!0);le(te),te.defaultPrevented&&($=!0)}),$||(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(le){return le(new St(N))}),this.detachEvents(),this._isOpen=!1)}},ee.prototype.addMarkersToToolbar=function(){for(var U,N=[],$=0;$this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*U:this.editorCanvas.clientWidth,$=N',U.title="Powered by marker.js",U.style.display="grid",U.style.alignItems="center",U.style.justifyItems="center",U.style.padding="3px",U.style.width="20px",U.style.height="20px",this.logoUI.appendChild(U),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ee.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")},ee.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"},ee.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ee.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 U=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=U+"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 ne(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(U),1),U.dispose()},ee.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())},ee.prototype.toolbarButtonClicked=function(U,N){if(U==="marker"&&N!==void 0)this.createNewMarker(N);else if(U==="action")switch(N){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()}},ee.prototype.deleteSelectedMarker=function(){var U=this;if(this._currentMarker!==void 0){var N=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var te=new nt(U,U._currentMarker,!0);le(te),te.defaultPrevented&&(N=!0)}),!N){var $=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(le){return le(new nt(U,$))})}}},ee.prototype.clear=function(){var U=this,N=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ct=new nt(U,void 0,!0);Ke(Ct),Ct.defaultPrevented&&(N=!0)}),!N)){this.setCurrentMarker();for(var $=function(Ke){var Ct=le.markers[Ke];le.setCurrentMarker(le.markers[Ke]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(Ut){return Ut(new nt(U,Ct))})},le=this,te=this.markers.length-1;te>=0;te--)$(te);this.addUndoStep()}},Object.defineProperty(ee.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ee.prototype.showNotesEditor=function(){var U;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=(U=this._currentMarker.notes)!==null&&U!==void 0?U:"",this.overlayContainer.appendChild(this.notesArea))},ee.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)},ee.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ee.prototype.addUndoStep=function(){var U=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var N=this.getState(),$=this.undoRedoManager.getLastUndoStep();if(!$||$.width===N.width&&$.height===N.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(N),le1&&this.panTo({x:U.clientX,y:U.clientY}))},ee.prototype.onPointerUp=function(U){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(U.clientX,U.clientY)),this.isDragging=!1,this.addUndoStep()},ee.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ee.prototype.onKeyUp=function(U){this._currentMarker===void 0||this.notesArea!==void 0||U.key!=="Delete"&&U.key!=="Backspace"||this.deleteSelectedMarker()},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.markerImage.getBoundingClientRect();return{x:(U-$.left)/this.zoomLevel,y:(N-$.top)/this.zoomLevel}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var U=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=U+"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()},ee.prototype.addLicenseKey=function(U){$e.addKey(U)},ee.prototype.addEventListener=function(U,N){this.eventListeners.addEventListener(U,N)},ee.prototype.removeEventListener=function(U,N){this.eventListeners.removeEventListener(U,N)},ee.prototype.renderState=function(U){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(U),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ee.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ee.prototype.focus=function(){var U=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(N){return N(new St(U))}))},ee.prototype.blur=function(){var U=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(N){return N(new St(U))}))},ee.instanceCounter=0,ee}();/* ********************************** 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 Pe=function(ee,U){return(Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,$){N.__proto__=$}||function(N,$){for(var le in $)Object.prototype.hasOwnProperty.call($,le)&&(N[le]=$[le])})(ee,U)};function pt(ee,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");function N(){this.constructor=ee}Pe(ee,U),ee.prototype=U===null?Object.create(U):(N.prototype=U.prototype,new N)}function it(ee,U,N,$){return new(N||(N=Promise))(function(le,te){function Ke(Ht){try{Ut($.next(Ht))}catch(wt){te(wt)}}function Ct(Ht){try{Ut($.throw(Ht))}catch(wt){te(wt)}}function Ut(Ht){var wt;Ht.done?le(Ht.value):(wt=Ht.value,wt instanceof N?wt:new N(function(Yt){Yt(wt)})).then(Ke,Ct)}Ut(($=$.apply(ee,U||[])).next())})}function xt(ee,U){var N,$,le,te,Ke={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function Ct(Ut){return function(Ht){return function(wt){if(N)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(N=1,$&&(le=2&wt[0]?$.return:wt[0]?$.throw||((le=$.return)&&le.call($),0):$.next)&&!(le=le.call($,wt[1])).done)return le;switch($=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return Ke.label++,{value:wt[1],done:!1};case 5:Ke.label++,$=wt[1],wt=[0];continue;case 7:wt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(le=Ke.trys,(le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){Ke=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]0&&N>0){var $=new Ur(U,N),le=$.ratio>=1?20:$.getHorizontalLength(20),te=$.ratio<1?20:$.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var Ct=Xe.createDefs();Ke.appendChild(Ct);var Ut=Xe.createElement("clipPath",[["id","text-bg-clip"]]);Ct.appendChild(Ut);var Ht=Xe.createPath(Xe.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));Ke.appendChild(Ht);var wt=Xe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);wt.appendChild(Xe.createTSpan(U+":"+N)),Ke.appendChild(wt);var Yt=wt.getBBox();Xe.setAttributes(wt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var Xt=Xe.createPath(Xe.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return Ut.appendChild(Xt),Xe.setAttributes(Ht,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},ee}(),Rr=function(ee){function U(N,$,le){var te=ee.call(this,N,$)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return pt(U,ee),U.prototype.setupDropdown=function(){var N=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function($){$.className=N.className,$.colorsClassName=N.colorsClassName,N.dropdownBlock.appendChild($.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},U.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},U.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},U.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},U.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},U.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},U}(wr),pr=function(){function ee(U,N){this.GRIP_SIZE=10,this.color=U,this.fillColor=N,this.visual=Xe.createGroup(),this.visual.appendChild(Xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Xe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(U){return U===this.visual||U===this.visual.childNodes[0]||U===this.visual.childNodes[1]},ee.prototype.setCenter=function(U,N){this.visual.childNodes.forEach(function($){return Xe.setAttributes($,[["cx",U.toString()],["cy",N.toString()]])})},ee}(),Or=function(){function ee(U,N,$,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=U,this.canvasHeight=N,this.margin=$,this.container=le,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(ee.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(U){this._aspectRatio=U,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(U){this._isGridVisible=U,this.gridContainer&&Xe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(U){this._zoomFactor=U,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ee.prototype.open=function(){var U=this;this.cropShadeElement=Xe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Xe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var N=0;Nthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-N.height/2),Xe.setAttributes(this.cropRectElement,[["x",N.x.toString()],["y",N.y.toString()],["width",N.width.toString()],["height",N.height.toString()]]);var $=N.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,Ke){var Ct=N.y+$*(Ke+1);Xe.setAttributes(te,[["x1",""+N.x],["y1",""+Ct],["x2",""+(N.x+N.width)],["y2",""+Ct]])});var le=N.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,Ke){var Ct=N.x+le*(Ke+1);Xe.setAttributes(te,[["x1",""+Ct],["y1",""+N.y],["x2",""+Ct],["y2",""+(N.y+N.height)]])}),Xe.setAttributes(this.cropShadeElement,[["d",Xe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,N.x,N.y,N.width,N.height)]]),this.topLeftGrip.setCenter(N.x,N.y),this.topRightGrip.setCenter(N.x+N.width,N.y),this.bottomLeftGrip.setCenter(N.x,N.y+N.height),this.bottomRightGrip.setCenter(N.x+N.width,N.y+N.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ee.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)},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.container.getBoundingClientRect();return{x:U-$.left+this.margin,y:N-$.top+this.margin}},ee.prototype.onPointerDown=function(U){this.container.setPointerCapture(U.pointerId),this.previousPoint=this.clientToLocalCoordinates(U.clientX,U.clientY),this.cropRectElement===U.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(U.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(U.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(U.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(U.target)&&(this.activeGrip=this.bottomRightGrip)},ee.prototype.onPointerMove=function(U){if(this.isMoving)this.move(this.clientToLocalCoordinates(U.clientX,U.clientY));else if(this.activeGrip){var N=this.clientToLocalCoordinates(U.clientX,U.clientY);this.resize(N)}U.preventDefault()},ee.prototype.onPointerUp=function(U){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(U.pointerId)},ee.prototype.move=function(U){var N=U.x-this.previousPoint.x,$=U.y-this.previousPoint.y;this.zoomFactor!==1&&(N=-N/this.zoomFactor,$=-$/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+N),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+$),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=U},ee.prototype.resize=function(U){var N=Object.assign({},this.cropRect),$=U.x-this.previousPoint.x,le=U.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:N.x+$this.canvasWidth*this.zoomFactor&&($=this.canvasWidth*this.zoomFactor-N.width),N.width+=$}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(N.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength($),N.height=this.aspectRatio.getVerticalLength(N.width)):(N.y+=le,N.height=this.cropRect.y+this.cropRect.height-N.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?N.height=this.aspectRatio.getVerticalLength(N.width):N.height+=le}N.width<10&&(N.x=this.cropRect.x,N.width=10),N.height<10&&(N.y=this.cropRect.y,N.height=10),this.previousPoint=U,N.x>=this.margin&&N.y>=this.margin&&N.x-this.margin+N.width<=this.canvasWidth&&N.y-this.margin+N.height<=this.canvasHeight&&(this.cropRect=N,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ee.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var U=this.cropRect.x+this.cropRect.width/2,N=this.cropRect.y+this.cropRect.height/2,$=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);$/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=U-this.cropRect.width/2,this.cropRect.y=N-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)}},ee.prototype.getRescaledRect=function(U,N,$,le,te,Ke){var Ct=$/U,Ut=le/N;return{x:(te.x-Ke)*Ct+Ke,y:(te.y-Ke)*Ut+Ke,width:te.width*Ct,height:te.height*Ut}},ee.prototype.scaleCanvas=function(U,N){var $=this.getRescaledRect(this.canvasWidth,this.canvasHeight,U,N,this.cropRect,this.margin);this.canvasWidth=U,this.canvasHeight=N,this.onCropChange&&this.onCropChange($),this.setCropRectangle($)},ee}(),pn=function(){function ee(U){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=U,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(ee.prototype,"angle",{get:function(){return this._angle},set:function(U){this._angle=U,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ee.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},ee.prototype.onPointerDown=function(U){this.controlContainer.setPointerCapture(U.pointerId),this.isDragging=!0,this.previousPoint={x:U.clientX,y:U.clientY}},ee.prototype.onPointerMove=function(U){this.isDragging&&(this.onAngleChange&&this.onAngleChange((U.clientX-this.previousPoint.x)/5),this.previousPoint.x=U.clientX)},ee.prototype.onPointerUp=function(U){this.isDragging&&this.onAngleChange&&this.onAngleChange((U.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(U.pointerId)},ee.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var U=this.angleLabelText.getBBox();Xe.setAttributes(this.angleLabelElement,[["x",((this.width-U.width)/2).toString()],["y",(this.height/2).toString()]])}},ee.prototype.positionScaleShape=function(){if(this.scaleShape){var U=this.scaleShape.transform.baseVal.getItem(0);U.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(U,0)}},ee.prototype.getVisual=function(){var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.setAttribute("xmlns","http://www.w3.org/2000/svg"),U.setAttribute("width",this.width+"px"),U.setAttribute("height",this.height+"px"),U.setAttribute("viewBox","0 0 "+this.width+" "+this.height),U.style.flexShrink="0",document.body.appendChild(U);for(var N="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,$=1;$<=this.width/5+10;$++){var le=$%5==0?this.height/3:this.height/6;N+="h4v"+-le+"h1v"+le}N+="v1H0Z",this.scaleShape=Xe.createPath(N);var te=Xe.createTransform();this.scaleShape.transform.baseVal.appendItem(te),U.appendChild(this.scaleShape),this.angleLabelElement=Xe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Xe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Xe.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),U.appendChild(this.angleLabelElement),document.body.removeChild(U),U},ee}(),un=function(){function ee(){this.naturalSize=!1,this.imageType="image/png"}return ee.prototype.rasterize=function(U,N,$,le,te,Ke,Ct){var Ut=this;return new Promise(function(Ht){var wt=document.createElement("canvas");wt.width=U.width.baseVal.value-2*le,wt.height=U.height.baseVal.value-2*le;var Yt=1,Xt=1;Ut.naturalSize===!0?(Yt=N.naturalWidth/(U.width.baseVal.value-2*le)/Ke,Xt=N.naturalHeight/(U.height.baseVal.value-2*le)/Ct,wt.width=N.naturalWidth/Ke,wt.height=N.naturalHeight/Ct):Ut.width!==void 0&&Ut.height!==void 0&&(Yt=Ut.width/$.width,Xt=Ut.height/$.height,wt.width*=Yt,wt.height*=Xt);var qt=wt.getContext("2d");qt.translate(wt.width/2,wt.height/2),qt.rotate(te*Math.PI/180),qt.scale(Ke,Ct),qt.translate(-wt.width/2,-wt.height/2),qt.drawImage(N,0,0,wt.width,wt.height);var Ar=document.createElement("canvas");Ar.width=$.width*Yt,Ar.height=$.height*Xt,Ar.getContext("2d").putImageData(qt.getImageData(($.x-le)*Yt,($.y-le)*Xt,$.width*Yt,$.height*Xt),0,0),Ht(Ar.toDataURL(Ut.imageType,Ut.imageQuality))})},ee}(),fe=function(){function ee(U){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=ee.instanceCounter++,this.styles=new mt(this.instanceNo),this.target=U,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(U){this._zoomToCropEnabled=U,U?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(U){this._isGridVisible=U,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"gridLines",{get:function(){return this._gridLines},set:function(U){this._gridLines=U,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(U){this._rotationAngle=U,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"aspectRatio",{get:function(){var U;return(U=this._aspectRatio)!==null&&U!==void 0?U:this.aspectRatios[0]},set:function(U){this._aspectRatio=U},enumerable:!1,configurable:!0}),ee.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},ee.prototype.show=function(){this.showUI(),this.open()},ee.prototype.close=function(U){U===void 0&&(U=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),U||this.closeEventListeners.forEach(function(N){return N()}),this._isOpen=!1)},ee.prototype.addRenderEventListener=function(U){this.renderEventListeners.push(U)},ee.prototype.removeRenderEventListener=function(U){this.renderEventListeners.indexOf(U)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(U),1)},ee.prototype.addCloseEventListener=function(U){this.closeEventListeners.push(U)},ee.prototype.removeCloseEventListener=function(U){this.closeEventListeners.indexOf(U)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(U),1)},ee.prototype.setupResizeObserver=function(){var U=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){U.resize(U.target.clientWidth,U.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))},ee.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var U=1*this.target.clientWidth/this.target.clientHeight,N=this.contentDiv.clientWidth/U>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*U:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,$=N+2*this.CANVAS_MARGINU+this.CANVAS_MARGIN?this.target.offsetTop-(U+this.CANVAS_MARGIN):0;this.coverDiv.style.top=N+"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},ee.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ee.prototype.addTopToolbar=function(){var U=this;this.topToolbar=new Qt,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 N=new Fr;N.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(N);var $=[];this.aspectRatios.forEach(function(Xt){var qt=new wr(Kr.getIcon(Xt.horizontal,Xt.vertical),Xt.horizontal===0&&Xt.vertical===0?"FREE":Xt.horizontal+":"+Xt.vertical);qt.onClick=function(){return U.ratioButtonClicked(Xt)},$.push(qt)}),this.aspectRatioButton=new Rr(Kr.getIcon(0,0),"Aspect ratio",$),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,N.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new wr('',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){U.isGridVisible=!U.isGridVisible,le.isActive=U.isGridVisible},N.addButton(le);var te=new wr('',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){U.zoomToCropEnabled=!U.zoomToCropEnabled,te.isActive=U.zoomToCropEnabled},N.addButton(te),!_t.isLicensed){var Ke=new Kt;this.topToolbar.addElementBlock(Ke);var Ct=document.createElement("div");Ct.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ut=document.createElement("a");Ut.style.color="currentColor",Ut.href="https://markerjs.com/products/cropro",Ut.target="_blank",Ut.innerHTML='',Ct.appendChild(Ut),Ke.addElement(Ct)}var Ht=new Fr;Ht.minWidth=3*this.toolbarHeight+"px",Ht.contentAlign="end",this.topToolbar.addButtonBlock(Ht);var wt=new wr('',"OK");wt.onClick=this.startRenderAndClose,Ht.addButton(wt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(wt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new wr('',"Close");Yt.onClick=this.close,Ht.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ee.prototype.addBottomToolbar=function(){var U=this;this.bottomToolbar=new Qt,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 N=new Fr;N.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(N);var $=new wr('',"Rotate left");$.onClick=this.rotateLeftButtonClicked,N.addButton($);var le=new wr('',"Rotate right");le.onClick=this.rotateRightButtonClicked,N.addButton(le);var te=new Kt;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new pn("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(Ht){U.rotateBy(Ht),U.straightener.angle=U.rotationAngle},te.addElement(this.straightener.getUI());var Ke=new Fr;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Ct=new wr('',"Flip horizontal");Ct.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ct);var Ut=new wr('',"Flip vertical");Ut.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Ut)},ee.prototype.ratioButtonClicked=function(U){this.aspectRatio=U,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ee.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Kr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ee.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ur(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ee.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ee.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ee.prototype.restoreState=function(U){if(U){var N=this.cropLayer.getRescaledRect(U.width,U.height,this.imageWidth,this.imageHeight,U.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(N),this.cropRectChanged(N),this.flippedHorizontally=U.flippedHorizontally,this.flippedVertically=U.flippedVertically,this.applyFlip(),this.rotationAngle=U.rotationAngle,this.applyRotation()}},ee.prototype.clientToLocalCoordinates=function(U,N){var $=this.cropImage.getBoundingClientRect();return{x:U-$.left,y:N-$.top}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var U=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=U+"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()},ee.prototype.rotateLeftButtonClicked=function(){var U=this.rotationAngle-90;this.rotationAngle%90!=0&&(U+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(U)},ee.prototype.rotateRightButtonClicked=function(){var U=this.rotationAngle+90;this.rotationAngle%90!=0&&(U-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(U)},ee.prototype.rotateTo=function(U){U=(U=U>180?U-360:U)<=-180?U+360:U,this.rotationAngle=U,this.applyRotation()},ee.prototype.rotateBy=function(U){this.rotateTo((this.rotationAngle+U)%360)},ee.prototype.applyRotation=function(){var U=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var N=this.editingTargetRotationContainer.transform.baseVal.getItem(0);N.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(N,0);var $=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/$.width,this.imageHeight/$.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=U},ee.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ee.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ee.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ee.prototype.startRenderAndClose=function(){return it(this,void 0,void 0,function(){var U,N;return xt(this,function($){switch($.label){case 0:return[4,this.render()];case 1:return U=$.sent(),N=this.getState(),this.renderEventListeners.forEach(function(le){return le(U,N)}),this.close(!0),[2]}})})},ee.prototype.render=function(){return it(this,void 0,void 0,function(){var U;return xt(this,function(N){switch(N.label){case 0:return(U=new un).naturalSize=this.renderAtNaturalSize,U.imageType=this.renderImageType,U.imageQuality=this.renderImageQuality,U.width=this.renderWidth,U.height=this.renderHeight,this.unzoomFromCrop(),Xe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,U.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 N.sent(),[4,U.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,N.sent()]}})})},ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new Rt("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var U=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Rt("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*U)+`px; height: `+(this.toolbarHeight-2*U)+`px; padding: `+U+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Rt("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Rt("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Rt("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 Rt("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*U)+`px; padding: `+U+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Rt("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},ee.instanceCounter=0,ee}(),be=G("8hTe"),Ue=G.n(be),rt=/]*>/g;function et(ee){var U=document.createElement("div");return U.innerHTML=ee,U.childNodes.length===0?"":U.childNodes[0].nodeValue}var Dt=pe.a=function(ee){var U=ee.value,N=U===void 0?"":U,$=ee.edit,le=$===void 0?!1:$,te=ee.className,Ke=ee.showTextOnly,Ct=ee.showLines,Ut=ee.replaces,Ht=ee.zoomImg,wt=ee.hasMask,Yt=ee.style,Xt=Yt===void 0?{}:Yt,qt=ee.stylesPrev,Ar=qt===void 0?{}:qt,Br=String(N),yr=Object(E.useRef)(),Lr=Object(E.useRef)(),cr=Object(E.useState)(""),Dr=Object(I.a)(cr,2),Pr=Dr[0],An=Dr[1],zr=Object(E.useState)("office"),Jr=Object(I.a)(zr,2),bn=Jr[0],$r=Jr[1],en=function(){var $t=new fe(Lr.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var vr=Object(B.a)(T.a.mark(function mr(xr){var Er;return T.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return yr.current.style.display="none",Gr.next=3,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr}});case 3:Er=Gr.sent,Er!=null&&Er.id&&Ut(Lr.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 5:case"end":return Gr.stop()}},mr)}));return function(mr){return vr.apply(this,arguments)}}()),$t.show()},an=function(){var $t=new Ce(Lr.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var vr=Object(B.a)(T.a.mark(function mr(xr){var Er;return T.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(yr.current.style.display="none",!Lr.current){Gr.next=6;break}return Gr.next=4,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr.dataUrl}});case 4:Er=Gr.sent,Er!=null&&Er.id&&Ut(Lr.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 6:case"end":return Gr.stop()}},mr)}));return function(mr){return vr.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},cn=Object(E.useMemo)(function(){yr.current&&(yr.current.style.zIndex=-1);try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,vr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Br=Br.replace(nr,"("+X.a.API_SERVER+"/api/attachments/").replace($t,'"'+X.a.API_SERVER+"/api/attachments/").replace(vr,'"'+X.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(On){}var mr=Z(Br),xr=C();if(Br.match(/\[TOC\]/)&&(mr=mr.replace("

    [TOC]

    ",L()),w()),mr=mr.replace(/(__special_katext_id_\d+__)/g,function(On,Gr){var En=xr[Gr],Qn=En.type,wn=En.expression;return Object(re.renderToString)(et(wn)||"",{displayMode:Qn==="block",throwOnError:!1,output:"html"})}),mr=mr.replace(/▁/g,"\u2581\u2581\u2581"),g(),Ke){var Er=document.createElement("div");return Er.innerHTML=mr,Er.innerText}return setTimeout(function(){return dr()},500),mr},[Br]),mn=Object(E.useRef)();S.WebkitLineClamp=Ct,Ct&&(Xt=Object(D.a)(Object(D.a)({},Xt),S));function br(nr){var $t=nr.target;if($t.tagName.toUpperCase()==="IMG"){if(Ht){var vr=$t.getAttribute("src");An(vr),$r("image")}}else if($t.tagName.toUpperCase()==="A"){var mr=$t.getAttribute("href");if(mr.indexOf("office")>-1)nr.preventDefault(),An(mr),$r("office");else if(mr.indexOf("application/pdf")>-1)nr.preventDefault(),An(mr),$r("pdf");else if(mr.indexOf("text/html")>-1)nr.preventDefault(),An(mr),$r("html");else if(mr.startsWith("#")){nr.preventDefault();var xr=document.getElementById(mr.replace("#",""));xr&&xr.scrollIntoView(!0)}}}var dr=function(){var $t,vr=($t=mn.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");vr==null||vr.forEach(function(mr){if(mr.oncontextmenu=function(){return!1},mr.src.indexOf(".m3u8")>-1&&!mr.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var xr=new J.a;xr.loadSource(mr.src),xr.attachMedia(mr)}}})};Object(E.useEffect)(function(){if(mn.current&&cn&&(cn.match(rt)&&window.PR.prettyPrint()),mn.current)return mn.current.addEventListener("click",br),function(){mn.current.removeEventListener("click",br),g(),w()}},[cn,mn.current,br]);var tr=function($t){if(!le)return;$t.target.nodeName==="IMG"?(yr.current.style.zIndex=1,yr.current.style.display="flex",yr.current.style.width=$t.target.clientWidth+"px",yr.current.style.height=$t.target.clientHeight+"px",yr.current.style.top=$t.target.offsetTop+"px",yr.current.style.left=$t.target.offsetLeft+"px",Lr.current.src=$t.target.getAttribute("src")):yr.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:mn,style:Object(D.a)({},Xt),className:"".concat(te||""," markdown-body ").concat(Ue.a.mdBody),onMouseOver:tr,dangerouslySetInnerHTML:{__html:cn}}),n.a.createElement("div",{ref:yr,className:Ue.a.button},n.a.createElement(Q.a,null,n.a.createElement(j.a,{onClick:function(){return en()}},"\u88C1\u526A"),n.a.createElement(j.a,{onClick:function(){return an()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Lr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(se.a,{close:!0,data:Pr,type:Pr!=null&&Pr.length?bn:"",style:Object(D.a)({},Ar),onClose:function(){return An("")}}))}},"9VGf":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return O});var q=G("q1tI"),Q=G.n(q);function O(j,D){var B=Object(q.useRef)();Object(q.useEffect)(function(){B.current=j}),Object(q.useEffect)(function(){function I(){B.current()}if(D!==null){var v=setInterval(I,D);return function(){return clearInterval(v)}}},[D])}},BPZU:function(qe,pe){var G=32,q=7,Q=256;function O(n){for(var u=0;n>=G;)u|=n&1,n>>=1;return n+u}function j(n,u,c,o){var i=u+1;if(i===c)return 1;if(o(n[i++],n[u])<0){for(;i=0;)i++;return i-u}function D(n,u,c){for(c--;u>>1,i(d,n[a])<0?A=a:s=a+1;var p=o-s;switch(p){case 3:n[s+3]=n[s+2];case 2:n[s+2]=n[s+1];case 1:n[s+1]=n[s];break;default:for(;p>0;)n[s+p]=n[s+p-1],p--}n[s]=d}}function I(n,u,c,o,i,d){var s=0,A=0,a=1;if(d(n,u[c+i])>0){for(A=o-i;a0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}else{for(A=i+1;aA&&(a=A);var p=s;s=i-a,a=i-p}for(s++;s>>1);d(n,u[c+w])>0?s=w+1:a=w}return a}function v(n,u,c,o,i,d){var s=0,A=0,a=1;if(d(n,u[c+i])<0){for(A=i+1;aA&&(a=A);var p=s;s=i-a,a=i-p}else{for(A=o-i;a=0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}for(s++;s>>1);d(n,u[c+w])<0?a=w:s=w+1}return a}function T(n,u){var c=q,o=0,i=Q,d=0,s,A,a=0;o=n.length,o<2*Q&&(i=o>>>1);var p=[];d=o<120?5:o<1542?10:o<119151?19:40,s=[],A=[];function w(r,l){s[a]=r,A[a]=l,a+=1}function S(){for(;a>1;){var r=a-2;if(r>=1&&A[r-1]<=A[r]+A[r+1]||r>=2&&A[r-2]<=A[r]+A[r-1])A[r-1]A[r+1])break;L(r)}}function x(){for(;a>1;){var r=a-2;r>0&&A[r-1]=q||V>=q);if(M)break;z<0&&(z=0),z+=2}if(c=z,c<1&&(c=1),l===1){for(g=0;g=0;g--)n[Z+g]=n[z+g];n[P]=p[F];return}for(var V=c;;){var M=0,J=0,X=!1;do if(u(p[F],n[m])<0){if(n[P--]=n[m--],M++,J=0,--l===0){X=!0;break}}else if(n[P--]=p[F--],J++,M=0,--C===1){X=!0;break}while((M|J)=0;g--)n[Z+g]=n[z+g];if(l===0){X=!0;break}}if(n[P--]=p[F--],--C===1){X=!0;break}if(J=C-I(n[m],p,0,C,C-1,u),J!==0){for(P-=J,F-=J,C-=J,Z=P+1,z=F+1,g=0;g=q||J>=q);if(X)break;V<0&&(V=0),V+=2}if(c=V,c<1&&(c=1),C===1){for(P-=l,m-=l,Z=P+1,z=m+1,g=l-1;g>=0;g--)n[Z+g]=n[z+g];n[P]=p[F]}else{if(C===0)throw new Error;for(z=P-(C-1),g=0;gA&&(a=A),B(n,c,c+a,c+d,u),d=a}s.pushRun(c,d),s.mergeRuns(),i-=d,c+=d}while(i!==0);s.forceMergeRuns()}qe.exports=E},BU3w:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return B});var q=G("MNnm"),Q="rc-util-key";function O(I){if(I.attachTo)return I.attachTo;var v=document.querySelector("head");return v||document.body}function j(I){var v,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(q.a)())return null;var E=document.createElement("style");if((v=T.csp)===null||v===void 0?void 0:v.nonce){var n;E.nonce=(n=T.csp)===null||n===void 0?void 0:n.nonce}E.innerHTML=I;var u=O(T),c=u.firstChild;return T.prepend&&u.prepend?u.prepend(E):T.prepend&&c?u.insertBefore(E,c):u.appendChild(E),E}var D=new Map;function B(I,v){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=O(T);if(!D.has(E)){var n=j("",T),u=n.parentNode;D.set(E,u),u.removeChild(n)}var c=Array.from(D.get(E).children).find(function(A){return A.tagName==="STYLE"&&A[Q]===v});if(c){var o,i;if(((o=T.csp)===null||o===void 0?void 0:o.nonce)&&c.nonce!==((i=T.csp)===null||i===void 0?void 0:i.nonce)){var d;c.nonce=(d=T.csp)===null||d===void 0?void 0:d.nonce}return c.innerHTML!==I&&(c.innerHTML=I),c}var s=j(I,T);return s[Q]=v,s}},Bd2K:function(qe,pe,G){(function(q){q(G("VrN/"),G("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(T,E,n){if(n!=q.Init&&n&&T.removeKeyMap("autoCloseTags"),!E)return;var u={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(u["'/'"]=function(c){return B(c)}),(typeof E!="object"||E.whenOpening!==!1)&&(u["'>'"]=function(c){return j(c)}),T.addKeyMap(u)});var Q=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 j(T){if(T.getOption("disableInput"))return q.Pass;for(var E=T.listSelections(),n=[],u=T.getOption("autoCloseTags"),c=0;co.ch&&(a=a.slice(0,a.length-i.end+o.ch));var x=a.toLowerCase();if(!a||i.type=="string"&&(i.end!=o.ch||!/[\"\']/.test(i.string.charAt(i.string.length-1))||i.string.length==1)||i.type=="tag"&&A.close||i.string.indexOf("/")==o.ch-i.start-1||w&&I(w,x)>-1||v(T,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(s)||[],a,o,!0))return q.Pass;var L=typeof u=="object"&&u.emptyTags;if(L&&I(L,a)>-1){n[c]={text:"/>",newPos:q.Pos(o.line,o.ch+2)};continue}var b=S&&I(S,x)>-1;n[c]={indent:b,text:">"+(b?` `:"")+"",newPos:b?q.Pos(o.line+1,0):q.Pos(o.line,o.ch+1)}}for(var h=typeof u=="object"&&u.dontIndentOnAutoClose,c=E.length-1;c>=0;c--){var r=n[c];T.replaceRange(r.text,E[c].head,E[c].anchor,"+insert");var l=T.listSelections().slice(0);l[c]={head:r.newPos,anchor:r.newPos},T.setSelections(l),!h&&r.indent&&(T.indentLine(r.newPos.line,null,!0),T.indentLine(r.newPos.line+1,null,!0))}}function D(T,E){for(var n=T.listSelections(),u=[],c=E?"/":""&&(w+=">"),u[d]=w}if(T.replaceSelections(u),n=T.listSelections(),!i)for(var d=0;d=0&&E[s]==n;s--)++d;u=i.to;for(var s=1;s0){for(var E=0;E1&&arguments[1]!==void 0?arguments[1]:"",E=[],n=0;n.5?S:w}function E(w,S,x,L,b){var h=w.length;if(b===1)for(var r=0;rb;if(h)w.length=b;else for(var r=L;r=0&&!(V[ce]<=ae);ce--);ce=Math.min(ce,C-2)}else{for(ce=we;ceae);ce++);ce=Math.min(ce-1,C-2)}we=ce,Re=ae;var xe=V[ce+1]-V[ce];if(xe===0)return;if(Se=(ae-V[ce])/xe,f)if($e=M[ce],Te=M[ce===0?ce:ce-1],bt=M[ce>C-2?C-1:ce+1],Ie=M[ce>C-3?C-1:ce+2],m)c(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se,r(ne,b),z);else{var Fe;if(F)Fe=c(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se,ze,1),Fe=d(ze);else{if(P)return T($e,bt,Se);Fe=o(Te,$e,bt,Ie,Se,Se*Se,Se*Se*Se)}l(ne,b,Fe)}else if(m)E(M[ce],M[ce+1],Se,r(ne,b),z);else{var Fe;if(F)E(M[ce],M[ce+1],Se,ze,1),Fe=d(ze);else{if(P)return T(M[ce],M[ce+1],Se);Fe=v(M[ce],M[ce+1],Se)}l(ne,b,Fe)}},Ae=new q({target:w._target,life:Z,loop:w._loop,delay:w._delay,onframe:at,ondestroy:x});return S&&S!=="spline"&&(Ae.easing=S),Ae}var a=function(w,S,x,L){this._tracks={},this._target=w,this._loop=S||!1,this._getter=x||B,this._setter=L||I,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};a.prototype={when:function(w,S){var x=this._tracks;for(var L in S){if(!S.hasOwnProperty(L))continue;if(!x[L]){x[L]=[];var b=this._getter(this._target,L);if(b==null)continue;w!==0&&x[L].push({time:0,value:i(b)})}x[L].push({time:w,value:S[L]})}return this},during:function(w){return this._onframeList.push(w),this},pause:function(){for(var w=0;w1&&E&&E.length>1){var u=O(E)/O(n);!isFinite(u)&&(u=1),v.pinchScale=u;var c=j(E);return v.pinchX=c[0],v.pinchY=c[1],{type:"pinch",target:I[0].target,event:v}}}},B=Q;qe.exports=B},DBLp:function(qe,pe){function G(){}G.prototype={diff:function(D,B,I){I||(I=function(a,p){return a===p}),this.equals=I;var v=this;D=D.slice(),B=B.slice();var T=B.length,E=D.length,n=1,u=T+E,c=[{newPos:-1,components:[]}],o=this.extractCommon(c[0],B,D,0);if(c[0].newPos+1>=T&&o+1>=E){for(var i=[],d=0;d=T&&x+1>=E)return q(v,p.components,B,D);c[a]=p}n++}for(;n<=u;){var A=s();if(A)return A}},pushComponent:function(D,B,I){var v=D[D.length-1];v&&v.added===B&&v.removed===I?D[D.length-1]={count:v.count+1,added:B,removed:I}:D.push({count:1,added:B,removed:I})},extractCommon:function(D,B,I,v){for(var T=B.length,E=I.length,n=D.newPos,u=n-v,c=0;n+1j||u<-j}var B=function(u){u=u||{},u.position||(this.position=[0,0]),u.rotation==null&&(this.rotation=0),u.scale||(this.scale=[1,1]),this.origin=this.origin||null},I=B.prototype;I.transform=null,I.needLocalTransform=function(){return D(this.rotation)||D(this.position[0])||D(this.position[1])||D(this.scale[0]-1)||D(this.scale[1]-1)};var v=[];I.updateTransform=function(){var u=this.parent,c=u&&u.transform,o=this.needLocalTransform(),i=this.transform;if(!(o||c)){i&&O(i);return}i=i||q.create(),o?this.getLocalTransform(i):O(i),c&&(o?q.mul(i,u.transform,i):q.copy(i,u.transform)),this.transform=i;var d=this.globalScaleRatio;if(d!=null&&d!==1){this.getGlobalScale(v);var s=v[0]<0?-1:1,A=v[1]<0?-1:1,a=((v[0]-s)*d+s)/v[0]||0,p=((v[1]-A)*d+A)/v[1]||0;i[0]*=a,i[1]*=a,i[2]*=p,i[3]*=p}this.invTransform=this.invTransform||q.create(),q.invert(this.invTransform,i)},I.getLocalTransform=function(u){return B.getLocalTransform(this,u)},I.setTransform=function(u){var c=this.transform,o=u.dpr||1;c?u.setTransform(o*c[0],o*c[1],o*c[2],o*c[3],o*c[4],o*c[5]):u.setTransform(o,0,0,o,0,0)},I.restoreTransform=function(u){var c=u.dpr||1;u.setTransform(c,0,0,c,0,0)};var T=[],E=q.create();I.setLocalTransform=function(u){if(!u)return;var c=u[0]*u[0]+u[1]*u[1],o=u[2]*u[2]+u[3]*u[3],i=this.position,d=this.scale;D(c-1)&&(c=Math.sqrt(c)),D(o-1)&&(o=Math.sqrt(o)),u[0]<0&&(c=-c),u[3]<0&&(o=-o),i[0]=u[4],i[1]=u[5],d[0]=c,d[1]=o,this.rotation=Math.atan2(-u[1]/o,u[0]/c)},I.decomposeTransform=function(){if(!this.transform)return;var u=this.parent,c=this.transform;u&&u.transform&&(q.mul(T,u.invTransform,c),c=T);var o=this.origin;o&&(o[0]||o[1])&&(E[4]=o[0],E[5]=o[1],q.mul(T,c,E),T[4]-=o[0],T[5]-=o[1],c=T),this.setLocalTransform(c)},I.getGlobalScale=function(u){var c=this.transform;return u=u||[],c?(u[0]=Math.sqrt(c[0]*c[0]+c[1]*c[1]),u[1]=Math.sqrt(c[2]*c[2]+c[3]*c[3]),c[0]<0&&(u[0]=-u[0]),c[3]<0&&(u[1]=-u[1]),u):(u[0]=1,u[1]=1,u)},I.transformCoordToLocal=function(u,c){var o=[u,c],i=this.invTransform;return i&&Q.applyTransform(o,o,i),o},I.transformCoordToGlobal=function(u,c){var o=[u,c],i=this.transform;return i&&Q.applyTransform(o,o,i),o},B.getLocalTransform=function(u,c){c=c||[],O(c);var o=u.origin,i=u.scale||[1,1],d=u.rotation||0,s=u.position||[0,0];return o&&(c[4]-=o[0],c[5]-=o[1]),q.scale(c,c,i),d&&q.rotate(c,c,d),o&&(c[4]+=o[0],c[5]+=o[1]),c[4]+=s[0],c[5]+=s[1],c};var n=B;qe.exports=n},Dagg:function(qe,pe,G){var q=G("Gev7"),Q=G("mFDi"),O=G("bYtY"),j=G("Xnb7");function D(I){q.call(this,I)}D.prototype={constructor:D,type:"image",brush:function(I,v){var T=this.style,E=T.image;T.bind(I,this,v);var n=this._image=j.createOrUpdateImage(E,this._image,this,this.onload);if(!n||!j.isImageReady(n))return;var u=T.x||0,c=T.y||0,o=T.width,i=T.height,d=n.width/n.height;if(o==null&&i!=null?o=i*d:i==null&&o!=null?i=o/d:o==null&&i==null&&(o=n.width,i=n.height),this.setTransform(I),T.sWidth&&T.sHeight){var s=T.sx||0,A=T.sy||0;I.drawImage(n,s,A,T.sWidth,T.sHeight,u,c,o,i)}else if(T.sx&&T.sy){var s=T.sx,A=T.sy,a=o-s,p=i-A;I.drawImage(n,s,A,a,p,u,c,o,i)}else I.drawImage(n,u,c,o,i);T.text!=null&&(this.restoreTransform(I),this.drawRectText(I,this.getBoundingRect()))},getBoundingRect:function(){var I=this.style;return this._rect||(this._rect=new Q(I.x||0,I.y||0,I.width||0,I.height||0)),this._rect}},O.inherits(D,q);var B=D;qe.exports=B},DlQD:function(qe,pe,G){(function(q,Q){qe.exports=Q()})(this,function(){"use strict";function q(je,Le){for(var Me=0;Meje.length)&&(Le=je.length);for(var Me=0,me=new Array(Le);Me=je.length?{done:!0}:{done:!1,value:je[me++]}}}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 Me=je[Symbol.iterator](),Me.next.bind(Me)}function B(je,Le){return Le={exports:{}},je(Le,Le.exports),Le.exports}var I=B(function(je){function Le(){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 Me(me){je.exports.defaults=me}je.exports={defaults:Le(),getDefaults:Le,changeDefaults:Me}}),v=I.defaults,T=I.getDefaults,E=I.changeDefaults,n=/[&<>"']/,u=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(Le){return i[Le]};function s(je,Le){if(Le){if(n.test(je))return je.replace(u,d)}else if(c.test(je))return je.replace(o,d);return je}var A=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(je){return je.replace(A,function(Le,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var p=/(^|[^\[])\^/g;function w(je,Le){je=je.source||je,Le=Le||"";var Me={replace:function(ye,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(p,"$1"),je=je.replace(ye,Ee),Me},getRegex:function(){return new RegExp(je,Le)}};return Me}var S=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(je,Le,Me){if(je){var me;try{me=decodeURIComponent(a(Me)).replace(S,"").toLowerCase()}catch(ye){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}Le&&!x.test(Me)&&(Me=f(Le,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(ye){return null}return Me}var b={},h=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(je,Le){b[" "+je]||(h.test(je)?b[" "+je]=je+"/":b[" "+je]=F(je,"/",!0)),je=b[" "+je];var Me=je.indexOf(":")===-1;return Le.substring(0,2)==="//"?Me?Le:je.replace(r,"$1")+Le:Le.charAt(0)==="/"?Me?Le:je.replace(l,"$1")+Le:je+Le}var C={exec:function(){}};function g(je){for(var Le=1,Me,me;Le=0&&De[ht]==="\\";)Ze=!Ze;return Ze?"|":" |"}),me=Me.split(/ \|/),ye=0;if(me.length>Le)me.splice(Le);else for(;me.length=me.length?ye.slice(me.length):ye}).join(` `)}var ge=function(){function je(Me){this.options=Me||V}var Le=je.prototype;return Le.space=function(me){var ye=this.rules.block.newline.exec(me);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:` `}},Le.code=function(me,ye){var Ee=this.rules.block.code.exec(me);if(Ee){var Oe=ye[ye.length-1];if(Oe&&Oe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var De=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?De:M(De,` `)}}},Le.fences=function(me){var ye=this.rules.block.fences.exec(me);if(ye){var Ee=ye[0],Oe=_e(Ee,ye[3]||"");return{type:"code",raw:Ee,lang:ye[2]?ye[2].trim():ye[2],text:Oe}}},Le.heading=function(me){var ye=this.rules.block.heading.exec(me);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Le.nptable=function(me){var ye=this.rules.block.nptable.exec(me);if(ye){var Ee={type:"table",header:J(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(` `):[],raw:ye[0]};if(Ee.header.length===Ee.align.length){var Oe=Ee.align.length,De;for(De=0;De ?/gm,"");return{type:"blockquote",raw:ye[0],text:Ee}}},Le.list=function(me){var ye=this.rules.block.list.exec(me);if(ye){for(var Ee=ye[0],Oe=ye[2],De=Oe.length>1,Ze=Oe[Oe.length-1]===")",ht={type:"list",raw:Ee,ordered:De,start:De?+Oe.slice(0,-1):"",loose:!1,items:[]},Tt=ye[0].match(this.rules.block.item),kt=!1,It,St,ut,nt,tt,Ce,Pe,pt=Tt.length,it=0;it1||this.options.smartLists&&ut!==Oe)&&(nt=Tt.slice(it+1).join(` `),ht.raw=ht.raw.substring(0,ht.raw.length-nt.length),it=pt-1)),tt=kt||/\n\n(?!\s*$)/.test(It),it!==pt-1&&(kt=It.charAt(It.length-1)===` `,tt||(tt=kt)),tt&&(ht.loose=!0),Ce=/^\[[ xX]\] /.test(It),Pe=void 0,Ce&&(Pe=It[1]!==" ",It=It.replace(/^\[[ xX]\] +/,"")),ht.items.push({type:"list_item",raw:Ee,task:Ce,checked:Pe,loose:tt,text:It});return ht}},Le.html=function(me){var ye=this.rules.block.html.exec(me);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):X(ye[0]):ye[0]}},Le.def=function(me){var ye=this.rules.block.def.exec(me);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Ee=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ye[0],href:ye[2],title:ye[3]}}},Le.table=function(me){var ye=this.rules.block.table.exec(me);if(ye){var Ee={type:"table",header:J(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(` `):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ye[0];var Oe=Ee.align.length,De;for(De=0;De/i.test(Oe[0])&&(ye=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:ye,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):X(Oe[0]):Oe[0]}},Le.link=function(me){var ye=this.rules.inline.link.exec(me);if(ye){var Ee=re(ye[2],"()");if(Ee>-1){var Oe=ye[0].indexOf("!")===0?5:4,De=Oe+ye[1].length+Ee;ye[2]=ye[2].substring(0,Ee),ye[0]=ye[0].substring(0,De).trim(),ye[3]=""}var Ze=ye[2],ht="";if(this.options.pedantic){var Tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ze);Tt?(Ze=Tt[1],ht=Tt[3]):ht=""}else ht=ye[3]?ye[3].slice(1,-1):"";Ze=Ze.trim().replace(/^<([\s\S]*)>$/,"$1");var kt=se(ye,{href:Ze&&Ze.replace(this.rules.inline._escapes,"$1"),title:ht&&ht.replace(this.rules.inline._escapes,"$1")},ye[0]);return kt}},Le.reflink=function(me,ye){var Ee;if((Ee=this.rules.inline.reflink.exec(me))||(Ee=this.rules.inline.nolink.exec(me))){var Oe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Oe=ye[Oe.toLowerCase()],!Oe||!Oe.href){var De=Ee[0].charAt(0);return{type:"text",raw:De,text:De}}var Ze=se(Ee,Oe,Ee[0]);return Ze}},Le.strong=function(me,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.strong.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*me.length);var De=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;De.lastIndex=0;for(var Ze;(Oe=De.exec(ye))!=null;)if(Ze=this.rules.inline.strong.middle.exec(ye.slice(0,Oe.index+3)),Ze)return{type:"strong",raw:me.slice(0,Ze[0].length),text:me.slice(2,Ze[0].length-2)}}},Le.em=function(me,ye,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.em.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*me.length);var De=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;De.lastIndex=0;for(var Ze;(Oe=De.exec(ye))!=null;)if(Ze=this.rules.inline.em.middle.exec(ye.slice(0,Oe.index+2)),Ze)return{type:"em",raw:me.slice(0,Ze[0].length),text:me.slice(1,Ze[0].length-1)}}},Le.codespan=function(me){var ye=this.rules.inline.code.exec(me);if(ye){var Ee=ye[2].replace(/\n/g," "),Oe=/[^ ]/.test(Ee),De=Ee.startsWith(" ")&&Ee.endsWith(" ");return Oe&&De&&(Ee=Ee.substring(1,Ee.length-1)),Ee=X(Ee,!0),{type:"codespan",raw:ye[0],text:Ee}}},Le.br=function(me){var ye=this.rules.inline.br.exec(me);if(ye)return{type:"br",raw:ye[0]}},Le.del=function(me){var ye=this.rules.inline.del.exec(me);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Le.autolink=function(me,ye){var Ee=this.rules.inline.autolink.exec(me);if(Ee){var Oe,De;return Ee[2]==="@"?(Oe=X(this.options.mangle?ye(Ee[1]):Ee[1]),De="mailto:"+Oe):(Oe=X(Ee[1]),De=Oe),{type:"link",raw:Ee[0],text:Oe,href:De,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Le.url=function(me,ye){var Ee;if(Ee=this.rules.inline.url.exec(me)){var Oe,De;if(Ee[2]==="@")Oe=X(this.options.mangle?ye(Ee[0]):Ee[0]),De="mailto:"+Oe;else{var Ze;do Ze=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Ze!==Ee[0]);Oe=X(Ee[0]),Ee[1]==="www."?De="http://"+Oe:De=Oe}return{type:"link",raw:Ee[0],text:Oe,href:De,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Le.inlineText=function(me,ye,Ee){var Oe=this.rules.inline.text.exec(me);if(Oe){var De;return ye?De=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):X(Oe[0]):Oe[0]:De=X(this.options.smartypants?Ee(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:De}}},je}(),we=Z.noopTest,Re=Z.edit,He=Z.merge,Se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Se.def=Re(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex(),Se.bullet=/(?:[*+-]|\d{1,9}[.)])/,Se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Se.item=Re(Se.item,"gm").replace(/bull/g,Se.bullet).getRegex(),Se.list=Re(Se.list).replace(/bull/g,Se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Se.def.source+")").getRegex(),Se._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",Se._comment=//,Se.html=Re(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Se.paragraph=Re(Se._paragraph).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.blockquote=Re(Se.blockquote).replace("paragraph",Se.paragraph).getRegex(),Se.normal=He({},Se),Se.gfm=He({},Se.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*|$)"}),Se.gfm.nptable=Re(Se.gfm.nptable).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.gfm.table=Re(Se.gfm.table).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.pedantic=He({},Se.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:we,paragraph:Re(Se.normal._paragraph).replace("hr",Se.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Te.punctuation=Re(Te.punctuation).replace(/punctuation/g,Te._punctuation).getRegex(),Te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Te.em.start=Re(Te.em.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.middle=Re(Te.em.middle).replace(/punctuation/g,Te._punctuation).replace(/overlapSkip/g,Te._overlapSkip).getRegex(),Te.em.endAst=Re(Te.em.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.endUnd=Re(Te.em.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.start=Re(Te.strong.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.middle=Re(Te.strong.middle).replace(/punctuation/g,Te._punctuation).replace(/blockSkip/g,Te._blockSkip).getRegex(),Te.strong.endAst=Re(Te.strong.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.endUnd=Re(Te.strong.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.blockSkip=Re(Te._blockSkip,"g").getRegex(),Te.overlapSkip=Re(Te._overlapSkip,"g").getRegex(),Te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Te._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])?)+(?![-_])/,Te.autolink=Re(Te.autolink).replace("scheme",Te._scheme).replace("email",Te._email).getRegex(),Te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Te.tag=Re(Te.tag).replace("comment",Se._comment).replace("attribute",Te._attribute).getRegex(),Te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Te.link=Re(Te.link).replace("label",Te._label).replace("href",Te._href).replace("title",Te._title).getRegex(),Te.reflink=Re(Te.reflink).replace("label",Te._label).getRegex(),Te.reflinkSearch=Re(Te.reflinkSearch,"g").replace("reflink",Te.reflink).replace("nolink",Te.nolink).getRegex(),Te.normal=He({},Te),Te.pedantic=He({},Te.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Te._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Te._label).getRegex()}),Te.gfm=He({},Te.normal,{escape:Re(Te.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&&(me="x"+me.toString(16)),Le+="&#"+me+";";return Le}var ne=function(){function je(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||bt,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var me={block:Ie.normal,inline:ze.normal};this.options.pedantic?(me.block=Ie.pedantic,me.inline=ze.pedantic):this.options.gfm&&(me.block=Ie.gfm,this.options.breaks?me.inline=ze.breaks:me.inline=ze.gfm),this.tokenizer.rules=me}je.lex=function(me,ye){var Ee=new je(ye);return Ee.lex(me)};var Le=je.prototype;return Le.lex=function(me){return me=me.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(me,this.tokens,!0),this.inline(this.tokens),this.tokens},Le.blockTokens=function(me,ye,Ee){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!0),me=me.replace(/^ +$/gm,"");for(var Oe,De,Ze,ht;me;){if(Oe=this.tokenizer.space(me)){me=me.substring(Oe.raw.length),Oe.type&&ye.push(Oe);continue}if(Oe=this.tokenizer.code(me,ye)){me=me.substring(Oe.raw.length),Oe.type?ye.push(Oe):(ht=ye[ye.length-1],ht.raw+=` `+Oe.raw,ht.text+=` `+Oe.text);continue}if(Oe=this.tokenizer.fences(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.heading(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.nptable(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.hr(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.blockquote(me)){me=me.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],Ee),ye.push(Oe);continue}if(Oe=this.tokenizer.list(me)){for(me=me.substring(Oe.raw.length),Ze=Oe.items.length,De=0;De0)for(;(Tt=this.tokenizer.rules.inline.reflinkSearch.exec(ht))!=null;)kt.includes(Tt[0].slice(Tt[0].lastIndexOf("[")+1,-1))&&(ht=ht.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Tt=this.tokenizer.rules.inline.blockSkip.exec(ht))!=null;)ht=ht.slice(0,Tt.index)+"["+"a".repeat(Tt[0].length-2)+"]"+ht.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;me;){if(Ze=this.tokenizer.escape(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.tag(me,Ee,Oe)){me=me.substring(Ze.raw.length),Ee=Ze.inLink,Oe=Ze.inRawBlock,ye.push(Ze);continue}if(Ze=this.tokenizer.link(me)){me=me.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Oe)),ye.push(Ze);continue}if(Ze=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Oe)),ye.push(Ze);continue}if(Ze=this.tokenizer.strong(me,ht,De)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.em(me,ht,De)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.codespan(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.br(me)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.del(me)){me=me.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],Ee,Oe),ye.push(Ze);continue}if(Ze=this.tokenizer.autolink(me,Ae)){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(!Ee&&(Ze=this.tokenizer.url(me,Ae))){me=me.substring(Ze.raw.length),ye.push(Ze);continue}if(Ze=this.tokenizer.inlineText(me,Oe,at)){me=me.substring(Ze.raw.length),De=Ze.raw.slice(-1),ye.push(Ze);continue}if(me){var It="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(It);break}else throw new Error(It)}}return ye},Q(je,null,[{key:"rules",get:function(){return{block:Ie,inline:ze}}}]),je}(),ae=I.defaults,ce=Z.cleanUrl,xe=Z.escape,Fe=function(){function je(Me){this.options=Me||ae}var Le=je.prototype;return Le.code=function(me,ye,Ee){var Oe=(ye||"").match(/\S*/)[0];if(this.options.highlight){var De=this.options.highlight(me,Oe);De!=null&&De!==me&&(Ee=!0,me=De)}return Oe?'
    '+(Ee?me:xe(me,!0))+`
    `:"
    "+(Ee?me:xe(me,!0))+`
    `},Le.blockquote=function(me){return`
    `+me+`
    `},Le.html=function(me){return me},Le.heading=function(me,ye,Ee,Oe){return this.options.headerIds?"'+me+" `:""+me+" `},Le.hr=function(){return this.options.xhtml?`
    `:`
    `},Le.list=function(me,ye,Ee){var Oe=ye?"ol":"ul",De=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+De+`> `+me+" `},Le.listitem=function(me){return"
  • "+me+`
  • `},Le.checkbox=function(me){return" "},Le.paragraph=function(me){return"

    "+me+`

    `},Le.table=function(me,ye){return ye&&(ye=""+ye+""),` `+me+` `+ye+`
    `},Le.tablerow=function(me){return` `+me+` `},Le.tablecell=function(me,ye){var Ee=ye.header?"th":"td",Oe=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return Oe+me+" `},Le.strong=function(me){return""+me+""},Le.em=function(me){return""+me+""},Le.codespan=function(me){return""+me+""},Le.br=function(){return this.options.xhtml?"
    ":"
    "},Le.del=function(me){return""+me+""},Le.link=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='",Oe},Le.image=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe=''+Ee+'":">",Oe},Le.text=function(me){return me},je}(),ke=function(){function je(){}var Le=je.prototype;return Le.strong=function(me){return me},Le.em=function(me){return me},Le.codespan=function(me){return me},Le.del=function(me){return me},Le.html=function(me){return me},Le.text=function(me){return me},Le.link=function(me,ye,Ee){return""+Ee},Le.image=function(me,ye,Ee){return""+Ee},Le.br=function(){return""},je}(),ct=function(){function je(){this.seen={}}var Le=je.prototype;return Le.slug=function(me){var ye=me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Ee=ye;do this.seen[Ee]++,ye=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},je}(),ft=I.defaults,yt=Z.unescape,Et=function(){function je(Me){this.options=Me||ft,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new ct}je.parse=function(me,ye){var Ee=new je(ye);return Ee.parse(me)};var Le=je.prototype;return Le.parse=function(me,ye){ye===void 0&&(ye=!0);var Ee="",Oe,De,Ze,ht,Tt,kt,It,St,ut,nt,tt,Ce,Pe,pt,it,xt,_t,Xe,mt=me.length;for(Oe=0;Oe0&&it.tokens[0].type==="text"?(it.tokens[0].text=Xe+" "+it.tokens[0].text,it.tokens[0].tokens&&it.tokens[0].tokens.length>0&&it.tokens[0].tokens[0].type==="text"&&(it.tokens[0].tokens[0].text=Xe+" "+it.tokens[0].tokens[0].text)):it.tokens.unshift({type:"text",text:Xe}):pt+=Xe),pt+=this.parse(it.tokens,Pe),ut+=this.renderer.listitem(pt,_t,xt);Ee+=this.renderer.list(ut,tt,Ce);continue}case"html":{Ee+=this.renderer.html(nt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(nt.tokens));continue}case"text":{for(ut=nt.tokens?this.parseInline(nt.tokens):nt.text;Oe+1An error occurred:

    "+Qe(Ze.message+"",!0)+"
    ";throw Ze}}Ye.options=Ye.setOptions=function(je){return Ot(Ye.defaults,je),lt(Ye.defaults),Ye},Ye.getDefaults=Ne,Ye.defaults=dt,Ye.use=function(je){var Le=Ot({},je);if(je.renderer&&function(){var me=Ye.defaults.renderer||new Fe,ye=function(De){var Ze=me[De];me[De]=function(){for(var ht=arguments.length,Tt=new Array(ht),kt=0;kt`,triples:"",explode:"[]{}"},O=q.Pos;q.defineOption("autoCloseBrackets",!1,function(i,d,s){s&&s!=q.Init&&(i.removeKeyMap(D),i.state.closeBrackets=null),d&&(B(j(d,"pairs")),i.state.closeBrackets=d,i.addKeyMap(D))});function j(i,d){return d=="pairs"&&typeof i=="string"?i:typeof i=="object"&&i[d]!=null?i[d]:Q[d]}var D={Backspace:T,Enter:E};function B(i){for(var d=0;d=0;a--){var w=A[a].head;i.replaceRange("",O(w.line,w.ch-1),O(w.line,w.ch+1),"+delete")}}function E(i){var d=v(i),s=d&&j(d,"explode");if(!s||i.getOption("disableInput"))return q.Pass;for(var A=i.listSelections(),a=0;a0;return{anchor:new O(i.anchor.line,i.anchor.ch+(d?-1:1)),head:new O(i.head.line,i.head.ch+(d?1:-1))}}function u(i,d){var s=v(i);if(!s||i.getOption("disableInput"))return q.Pass;var A=j(s,"pairs"),a=A.indexOf(d);if(a==-1)return q.Pass;for(var p=j(s,"closeBefore"),w=j(s,"triples"),S=A.charAt(a+1)==d,x=i.listSelections(),L=a%2==0,b,h=0;h=0&&i.getRange(l,O(l.line,l.ch+3))==d+d+d?f="skipThree":f="skip";else if(S&&l.ch>1&&w.indexOf(d)>=0&&i.getRange(O(l.line,l.ch-2),l)==d+d){if(l.ch>2&&/\bstring/.test(i.getTokenTypeAt(O(l.line,l.ch-2))))return q.Pass;f="addFour"}else if(S){var g=l.ch==0?" ":i.getRange(O(l.line,l.ch-1),l);if(!q.isWordChar(C)&&g!=d&&!q.isWordChar(g))f="both";else return q.Pass}else if(L&&(C.length===0||/\s/.test(C)||p.indexOf(C)>-1))f="both";else return q.Pass;if(!b)b=f;else if(b!=f)return q.Pass}var m=a%2?A.charAt(a-1):d,F=a%2?d:A.charAt(a+1);i.operation(function(){if(b=="skip")i.execCommand("goCharRight");else if(b=="skipThree")for(var P=0;P<3;P++)i.execCommand("goCharRight");else if(b=="surround"){for(var z=i.getSelections(),P=0;P3&&(v=G.call(v,1));for(var E=B.length,n=0;n4&&(v=G.call(v,1,v.length-1));for(var E=v[v.length-1],n=B.length,u=0;u0)throw new Error("Invalid string. Length must be a multiple of 4");var d=o.indexOf("=");d===-1&&(d=i);var s=d===i?0:4-d%4;return[d,s]}function v(o){var i=I(o),d=i[0],s=i[1];return(d+s)*3/4-s}function T(o,i,d){return(i+d)*3/4-d}function E(o){var i,d=I(o),s=d[0],A=d[1],a=new O(T(o,s,A)),p=0,w=A>0?s-4:s,S;for(S=0;S>16&255,a[p++]=i>>8&255,a[p++]=i&255;return A===2&&(i=Q[o.charCodeAt(S)]<<2|Q[o.charCodeAt(S+1)]>>4,a[p++]=i&255),A===1&&(i=Q[o.charCodeAt(S)]<<10|Q[o.charCodeAt(S+1)]<<4|Q[o.charCodeAt(S+2)]>>2,a[p++]=i>>8&255,a[p++]=i&255),a}function n(o){return q[o>>18&63]+q[o>>12&63]+q[o>>6&63]+q[o&63]}function u(o,i,d){for(var s,A=[],a=i;aw?w:p+a));return s===1?(i=o[d-1],A.push(q[i>>2]+q[i<<4&63]+"==")):s===2&&(i=(o[d-2]<<8)+o[d-1],A.push(q[i>>10]+q[i>>4&63]+q[i<<2&63]+"=")),A.join("")}},HDXh:function(qe,pe,G){"use strict";(function(q){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var Q=G("H7XF"),O=G("kVK+"),j=G("49sm");pe.Buffer=v,pe.SlowBuffer=A,pe.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=q.TYPED_ARRAY_SUPPORT!==void 0?q.TYPED_ARRAY_SUPPORT:D(),pe.kMaxLength=B();function D(){try{var Ae=new Uint8Array(1);return Ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ae.foo()===42&&typeof Ae.subarray=="function"&&Ae.subarray(1,1).byteLength===0}catch(ne){return!1}}function B(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(Ae,ne){if(B()=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return Ae|0}function A(Ae){return+Ae!=Ae&&(Ae=0),v.alloc(+Ae)}v.isBuffer=function(ne){return!!(ne!=null&&ne._isBuffer)},v.compare=function(ne,ae){if(!v.isBuffer(ne)||!v.isBuffer(ae))throw new TypeError("Arguments must be Buffers");if(ne===ae)return 0;for(var ce=ne.length,xe=ae.length,Fe=0,ke=Math.min(ce,xe);Fe>>1;case"base64":return Ie(Ae).length;default:if(ce)return Te(Ae).length;ne=(""+ne).toLowerCase(),ce=!0}}v.byteLength=a;function p(Ae,ne,ae){var ce=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length)return"";if((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)return"";if(ae>>>=0,ne>>>=0,ae<=ne)return"";for(Ae||(Ae="utf8");;)switch(Ae){case"hex":return Z(this,ne,ae);case"utf8":case"utf-8":return g(this,ne,ae);case"ascii":return P(this,ne,ae);case"latin1":case"binary":return z(this,ne,ae);case"base64":return C(this,ne,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,ne,ae);default:if(ce)throw new TypeError("Unknown encoding: "+Ae);Ae=(Ae+"").toLowerCase(),ce=!0}}v.prototype._isBuffer=!0;function w(Ae,ne,ae){var ce=Ae[ne];Ae[ne]=Ae[ae],Ae[ae]=ce}v.prototype.swap16=function(){var ne=this.length;if(ne%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;ae0&&(ne=this.toString("hex",0,ae).match(/.{2}/g).join(" "),this.length>ae&&(ne+=" ... ")),""},v.prototype.compare=function(ne,ae,ce,xe,Fe){if(!v.isBuffer(ne))throw new TypeError("Argument must be a Buffer");if(ae===void 0&&(ae=0),ce===void 0&&(ce=ne?ne.length:0),xe===void 0&&(xe=0),Fe===void 0&&(Fe=this.length),ae<0||ce>ne.length||xe<0||Fe>this.length)throw new RangeError("out of range index");if(xe>=Fe&&ae>=ce)return 0;if(xe>=Fe)return-1;if(ae>=ce)return 1;if(ae>>>=0,ce>>>=0,xe>>>=0,Fe>>>=0,this===ne)return 0;for(var ke=Fe-xe,ct=ce-ae,ft=Math.min(ke,ct),yt=this.slice(xe,Fe),Et=ne.slice(ae,ce),Ot=0;Ot2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,isNaN(ae)&&(ae=xe?0:Ae.length-1),ae<0&&(ae=Ae.length+ae),ae>=Ae.length){if(xe)return-1;ae=Ae.length-1}else if(ae<0)if(xe)ae=0;else return-1;if(typeof ne=="string"&&(ne=v.from(ne,ce)),v.isBuffer(ne))return ne.length===0?-1:x(Ae,ne,ae,ce,xe);if(typeof ne=="number")return ne=ne&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?xe?Uint8Array.prototype.indexOf.call(Ae,ne,ae):Uint8Array.prototype.lastIndexOf.call(Ae,ne,ae):x(Ae,[ne],ae,ce,xe);throw new TypeError("val must be string, number or Buffer")}function x(Ae,ne,ae,ce,xe){var Fe=1,ke=Ae.length,ct=ne.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(Ae.length<2||ne.length<2)return-1;Fe=2,ke/=2,ct/=2,ae/=2}function ft(Qe,Ne){return Fe===1?Qe[Ne]:Qe.readUInt16BE(Ne*Fe)}var yt;if(xe){var Et=-1;for(yt=ae;ytke&&(ae=ke-ct),yt=ae;yt>=0;yt--){for(var Ot=!0,Mt=0;Mtxe&&(ce=xe)):ce=xe;var Fe=ne.length;if(Fe%2!==0)throw new TypeError("Invalid hex string");ce>Fe/2&&(ce=Fe/2);for(var ke=0;keFe)&&(ce=Fe),ne.length>0&&(ce<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");for(var ke=!1;;)switch(xe){case"hex":return L(this,ne,ae,ce);case"utf8":case"utf-8":return b(this,ne,ae,ce);case"ascii":return h(this,ne,ae,ce);case"latin1":case"binary":return r(this,ne,ae,ce);case"base64":return l(this,ne,ae,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,ne,ae,ce);default:if(ke)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),ke=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(Ae,ne,ae){return ne===0&&ae===Ae.length?Q.fromByteArray(Ae):Q.fromByteArray(Ae.slice(ne,ae))}function g(Ae,ne,ae){ae=Math.min(Ae.length,ae);for(var ce=[],xe=ne;xe239?4:Fe>223?3:Fe>191?2:1;if(xe+ct<=ae){var ft,yt,Et,Ot;switch(ct){case 1:Fe<128&&(ke=Fe);break;case 2:ft=Ae[xe+1],(ft&192)===128&&(Ot=(Fe&31)<<6|ft&63,Ot>127&&(ke=Ot));break;case 3:ft=Ae[xe+1],yt=Ae[xe+2],(ft&192)===128&&(yt&192)===128&&(Ot=(Fe&15)<<12|(ft&63)<<6|yt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(ke=Ot));break;case 4:ft=Ae[xe+1],yt=Ae[xe+2],Et=Ae[xe+3],(ft&192)===128&&(yt&192)===128&&(Et&192)===128&&(Ot=(Fe&15)<<18|(ft&63)<<12|(yt&63)<<6|Et&63,Ot>65535&&Ot<1114112&&(ke=Ot))}}ke===null?(ke=65533,ct=1):ke>65535&&(ke-=65536,ce.push(ke>>>10&1023|55296),ke=56320|ke&1023),ce.push(ke),xe+=ct}return F(ce)}var m=4096;function F(Ae){var ne=Ae.length;if(ne<=m)return String.fromCharCode.apply(String,Ae);for(var ae="",ce=0;cece)&&(ae=ce);for(var xe="",Fe=ne;Fece&&(ne=ce),ae<0?(ae+=ce,ae<0&&(ae=0)):ae>ce&&(ae=ce),aeae)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=this[ne],Fe=1,ke=0;++ke0&&(Fe*=256);)xe+=this[ne+--ae]*Fe;return xe},v.prototype.readUInt8=function(ne,ae){return ae||M(ne,1,this.length),this[ne]},v.prototype.readUInt16LE=function(ne,ae){return ae||M(ne,2,this.length),this[ne]|this[ne+1]<<8},v.prototype.readUInt16BE=function(ne,ae){return ae||M(ne,2,this.length),this[ne]<<8|this[ne+1]},v.prototype.readUInt32LE=function(ne,ae){return ae||M(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+this[ne+3]*16777216},v.prototype.readUInt32BE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]*16777216+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},v.prototype.readIntLE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=this[ne],Fe=1,ke=0;++ke=Fe&&(xe-=Math.pow(2,8*ae)),xe},v.prototype.readIntBE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=ae,Fe=1,ke=this[ne+--xe];xe>0&&(Fe*=256);)ke+=this[ne+--xe]*Fe;return Fe*=128,ke>=Fe&&(ke-=Math.pow(2,8*ae)),ke},v.prototype.readInt8=function(ne,ae){return ae||M(ne,1,this.length),this[ne]&128?(255-this[ne]+1)*-1:this[ne]},v.prototype.readInt16LE=function(ne,ae){ae||M(ne,2,this.length);var ce=this[ne]|this[ne+1]<<8;return ce&32768?ce|4294901760:ce},v.prototype.readInt16BE=function(ne,ae){ae||M(ne,2,this.length);var ce=this[ne+1]|this[ne]<<8;return ce&32768?ce|4294901760:ce},v.prototype.readInt32LE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},v.prototype.readInt32BE=function(ne,ae){return ae||M(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},v.prototype.readFloatLE=function(ne,ae){return ae||M(ne,4,this.length),O.read(this,ne,!0,23,4)},v.prototype.readFloatBE=function(ne,ae){return ae||M(ne,4,this.length),O.read(this,ne,!1,23,4)},v.prototype.readDoubleLE=function(ne,ae){return ae||M(ne,8,this.length),O.read(this,ne,!0,52,8)},v.prototype.readDoubleBE=function(ne,ae){return ae||M(ne,8,this.length),O.read(this,ne,!1,52,8)};function J(Ae,ne,ae,ce,xe,Fe){if(!v.isBuffer(Ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>xe||neAe.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,ce=ce|0,!xe){var Fe=Math.pow(2,8*ce)-1;J(this,ne,ae,ce,Fe,0)}var ke=1,ct=0;for(this[ae]=ne&255;++ct=0&&(ct*=256);)this[ae+ke]=ne/ct&255;return ae+ce},v.prototype.writeUInt8=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,1,255,0),v.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),this[ae]=ne&255,ae+1};function X(Ae,ne,ae,ce){ne<0&&(ne=65535+ne+1);for(var xe=0,Fe=Math.min(Ae.length-ae,2);xe>>(ce?xe:1-xe)*8}v.prototype.writeUInt16LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8):X(this,ne,ae,!0),ae+2},v.prototype.writeUInt16BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>8,this[ae+1]=ne&255):X(this,ne,ae,!1),ae+2};function re(Ae,ne,ae,ce){ne<0&&(ne=4294967295+ne+1);for(var xe=0,Fe=Math.min(Ae.length-ae,4);xe>>(ce?xe:3-xe)*8&255}v.prototype.writeUInt32LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[ae+3]=ne>>>24,this[ae+2]=ne>>>16,this[ae+1]=ne>>>8,this[ae]=ne&255):re(this,ne,ae,!0),ae+4},v.prototype.writeUInt32BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>24,this[ae+1]=ne>>>16,this[ae+2]=ne>>>8,this[ae+3]=ne&255):re(this,ne,ae,!1),ae+4},v.prototype.writeIntLE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,!xe){var Fe=Math.pow(2,8*ce-1);J(this,ne,ae,ce,Fe-1,-Fe)}var ke=0,ct=1,ft=0;for(this[ae]=ne&255;++ke>0)-ft&255;return ae+ce},v.prototype.writeIntBE=function(ne,ae,ce,xe){if(ne=+ne,ae=ae|0,!xe){var Fe=Math.pow(2,8*ce-1);J(this,ne,ae,ce,Fe-1,-Fe)}var ke=ce-1,ct=1,ft=0;for(this[ae+ke]=ne&255;--ke>=0&&(ct*=256);)ne<0&&ft===0&&this[ae+ke+1]!==0&&(ft=1),this[ae+ke]=(ne/ct>>0)-ft&255;return ae+ce},v.prototype.writeInt8=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,1,127,-128),v.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),ne<0&&(ne=255+ne+1),this[ae]=ne&255,ae+1},v.prototype.writeInt16LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8):X(this,ne,ae,!0),ae+2},v.prototype.writeInt16BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>8,this[ae+1]=ne&255):X(this,ne,ae,!1),ae+2},v.prototype.writeInt32LE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne&255,this[ae+1]=ne>>>8,this[ae+2]=ne>>>16,this[ae+3]=ne>>>24):re(this,ne,ae,!0),ae+4},v.prototype.writeInt32BE=function(ne,ae,ce){return ne=+ne,ae=ae|0,ce||J(this,ne,ae,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),v.TYPED_ARRAY_SUPPORT?(this[ae]=ne>>>24,this[ae+1]=ne>>>16,this[ae+2]=ne>>>8,this[ae+3]=ne&255):re(this,ne,ae,!1),ae+4};function se(Ae,ne,ae,ce,xe,Fe){if(ae+ce>Ae.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function _e(Ae,ne,ae,ce,xe){return xe||se(Ae,ne,ae,4,34028234663852886e22,-34028234663852886e22),O.write(Ae,ne,ae,ce,23,4),ae+4}v.prototype.writeFloatLE=function(ne,ae,ce){return _e(this,ne,ae,!0,ce)},v.prototype.writeFloatBE=function(ne,ae,ce){return _e(this,ne,ae,!1,ce)};function ge(Ae,ne,ae,ce,xe){return xe||se(Ae,ne,ae,8,17976931348623157e292,-17976931348623157e292),O.write(Ae,ne,ae,ce,52,8),ae+8}v.prototype.writeDoubleLE=function(ne,ae,ce){return ge(this,ne,ae,!0,ce)},v.prototype.writeDoubleBE=function(ne,ae,ce){return ge(this,ne,ae,!1,ce)},v.prototype.copy=function(ne,ae,ce,xe){if(ce||(ce=0),!xe&&xe!==0&&(xe=this.length),ae>=ne.length&&(ae=ne.length),ae||(ae=0),xe>0&&xe=this.length)throw new RangeError("sourceStart out of bounds");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),ne.length-ae=0;--ke)ne[ke+ae]=this[ke+ce];else if(Fe<1e3||!v.TYPED_ARRAY_SUPPORT)for(ke=0;ke>>0,ce=ce===void 0?this.length:ce>>>0,ne||(ne=0);var ke;if(typeof ne=="number")for(ke=ae;ke55295&&ae<57344){if(!xe){if(ae>56319){(ne-=3)>-1&&Fe.push(239,191,189);continue}else if(ke+1===ce){(ne-=3)>-1&&Fe.push(239,191,189);continue}xe=ae;continue}if(ae<56320){(ne-=3)>-1&&Fe.push(239,191,189),xe=ae;continue}ae=(xe-55296<<10|ae-56320)+65536}else xe&&((ne-=3)>-1&&Fe.push(239,191,189));if(xe=null,ae<128){if((ne-=1)<0)break;Fe.push(ae)}else if(ae<2048){if((ne-=2)<0)break;Fe.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((ne-=3)<0)break;Fe.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((ne-=4)<0)break;Fe.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return Fe}function $e(Ae){for(var ne=[],ae=0;ae>8,xe=ae%256,Fe.push(xe),Fe.push(ce);return Fe}function Ie(Ae){return Q.toByteArray(Re(Ae))}function ze(Ae,ne,ae,ce){for(var xe=0;xe=ne.length||xe>=Ae.length);++xe)ne[xe+ae]=Ae[xe];return xe}function at(Ae){return Ae!==Ae}}).call(this,G("IyRk"))},HmJG:function(qe,pe,G){},I8Z2:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return j}),G.d(pe,"b",function(){return c}),G.d(pe,"c",function(){return i});var q=G("q1tI"),Q=function(){var d=function(s,A){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var w in p)p.hasOwnProperty(w)&&(a[w]=p[w])},d(s,A)};return function(s,A){d(s,A);function a(){this.constructor=s}s.prototype=A===null?Object.create(A):(a.prototype=A.prototype,new a)}}(),O=q.createContext(null),j=function(d){Q(s,d);function s(){return d!==null&&d.apply(this,arguments)||this}return s.prototype.render=function(){return q.createElement(O.Provider,{value:this.props.store},this.props.children)},s}(q.Component),D=G("Gytx"),B=G.n(D),I=G("2mql"),v=G.n(I),T=function(){var d=function(s,A){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var w in p)p.hasOwnProperty(w)&&(a[w]=p[w])},d(s,A)};return function(s,A){d(s,A);function a(){this.constructor=s}s.prototype=A===null?Object.create(A):(a.prototype=A.prototype,new a)}}(),E=function(){return E=Object.assign||function(d){for(var s,A=1,a=arguments.length;Athis._ux||s(S-this._yi)>this._uy||this._len<5;return this.addData(I.L,w,S),this._ctx&&x&&(this._needsDash()?this._dashedLineTo(w,S):this._ctx.lineTo(w,S)),x&&(this._xi=w,this._yi=S),this},bezierCurveTo:function(w,S,x,L,b,h){return this.addData(I.C,w,S,x,L,b,h),this._ctx&&(this._needsDash()?this._dashedBezierTo(w,S,x,L,b,h):this._ctx.bezierCurveTo(w,S,x,L,b,h)),this._xi=b,this._yi=h,this},quadraticCurveTo:function(w,S,x,L){return this.addData(I.Q,w,S,x,L),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(w,S,x,L):this._ctx.quadraticCurveTo(w,S,x,L)),this._xi=x,this._yi=L,this},arc:function(w,S,x,L,b,h){return this.addData(I.A,w,S,x,x,L,b-L,0,h?0:1),this._ctx&&this._ctx.arc(w,S,x,L,b,h),this._xi=o(b)*x+w,this._yi=i(b)*x+S,this},arcTo:function(w,S,x,L,b){return this._ctx&&this._ctx.arcTo(w,S,x,L,b),this},rect:function(w,S,x,L){return this._ctx&&this._ctx.rect(w,S,x,L),this.addData(I.R,w,S,x,L),this},closePath:function(){this.addData(I.Z);var w=this._ctx,S=this._x0,x=this._y0;return w&&(this._needsDash()&&this._dashedLineTo(S,x),w.closePath()),this._xi=S,this._yi=x,this},fill:function(w){w&&w.fill(),this.toStatic()},stroke:function(w){w&&w.stroke(),this.toStatic()},setLineDash:function(w){if(w instanceof Array){this._lineDash=w,this._dashIdx=0;for(var S=0,x=0;xS.length&&(this._expandData(),S=this.data);for(var x=0;x0&&m<=w||f<0&&m>=w||f===0&&(C>0&&F<=S||C<0&&F>=S);){if(Z=this._dashIdx,P=b[Z],m+=f*P,F+=C*P,this._dashIdx=(Z+1)%z,f>0&&mr||C>0&&Fl)continue;h[Z%2?"moveTo":"lineTo"](f>=0?u(m,w):c(m,w),C>=0?u(F,S):c(F,S))}f=m-w,C=F-S,this._dashOffset=-d(f*f+C*C)},_dashedBezierTo:function(w,S,x,L,b,h){var r=this._dashSum,l=this._dashOffset,f=this._lineDash,C=this._ctx,g=this._xi,m=this._yi,F,P,z,Z=q.cubicAt,V=0,M=this._dashIdx,J=f.length,X,re,se=0;for(l<0&&(l=r+l),l%=r,F=0;F<1;F+=.1)P=Z(g,w,x,b,F+.1)-Z(g,w,x,b,F),z=Z(m,S,L,h,F+.1)-Z(m,S,L,h,F),V+=d(P*P+z*z);for(;Ml);M++);for(F=(se-l)/V;F<=1;)X=Z(g,w,x,b,F),re=Z(m,S,L,h,F),M%2?C.moveTo(X,re):C.lineTo(X,re),F+=f[M]/V,M=(M+1)%J;M%2!==0&&C.lineTo(b,h),P=b-X,z=h-re,this._dashOffset=-d(P*P+z*z)},_dashedQuadraticTo:function(w,S,x,L){var b=x,h=L;x=(x+2*w)/3,L=(L+2*S)/3,w=(this._xi+2*w)/3,S=(this._yi+2*S)/3,this._dashedBezierTo(w,S,x,L,b,h)},toStatic:function(){var w=this.data;w instanceof Array&&(w.length=this._len,A&&(this.data=new Float32Array(w)))},getBoundingRect:function(){v[0]=v[1]=E[0]=E[1]=Number.MAX_VALUE,T[0]=T[1]=n[0]=n[1]=-Number.MAX_VALUE;for(var w=this.data,S=0,x=0,L=0,b=0,h=0;hf||s(l-h)>C||m===g-1)&&(w.lineTo(r,l),b=r,h=l);break;case I.C:w.bezierCurveTo(S[m++],S[m++],S[m++],S[m++],S[m++],S[m++]),b=S[m-2],h=S[m-1];break;case I.Q:w.quadraticCurveTo(S[m++],S[m++],S[m++],S[m++]),b=S[m-2],h=S[m-1];break;case I.A:var P=S[m++],z=S[m++],Z=S[m++],V=S[m++],M=S[m++],J=S[m++],X=S[m++],re=S[m++],se=Z>V?Z:V,_e=Z>V?1:Z/V,ge=Z>V?V/Z:1,we=Math.abs(Z-V)>.001,Re=M+J;we?(w.translate(P,z),w.rotate(X),w.scale(_e,ge),w.arc(0,0,se,M,Re,1-re),w.scale(1/_e,1/ge),w.rotate(-X),w.translate(-P,-z)):w.arc(P,z,se,M,Re,1-re),m===1&&(x=o(M)*Z+P,L=i(M)*V+z),b=o(Re)*Z+P,h=i(Re)*V+z;break;case I.R:x=b=S[m],L=h=S[m+1],w.rect(S[m++],S[m++],S[m++],S[m++]);break;case I.Z:w.closePath(),b=x,h=L}}}},a.CMD=I;var p=a;qe.exports=p},ItGF:function(qe,pe){var G={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?G={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?G={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?G={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:G=Q(navigator.userAgent);var q=G;function Q(O){var j={},D={},B=O.match(/Firefox\/([\d.]+)/),I=O.match(/MSIE\s([\d.]+)/)||O.match(/Trident\/.+?rv:(([\d.]+))/),v=O.match(/Edge\/([\d.]+)/),T=/micromessenger/i.test(O);return B&&(D.firefox=!0,D.version=B[1]),I&&(D.ie=!0,D.version=I[1]),v&&(D.edge=!0,D.version=v[1]),T&&(D.weChat=!0),{browser:D,os:j,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!D.ie&&!D.edge,pointerEventsSupported:"onpointerdown"in window&&(D.edge||D.ie&&D.version>=11),domSupported:typeof document!="undefined"}}qe.exports=q},K2GJ:function(qe,pe,G){var q=G("fW2E"),Q=G("gut8"),O=Q.ContextCachedBy,j=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],D=function(u){this.extendFrom(u,!1)};function B(u,c,o){var i=c.x==null?0:c.x,d=c.x2==null?1:c.x2,s=c.y==null?0:c.y,A=c.y2==null?0:c.y2;c.global||(i=i*o.width+o.x,d=d*o.width+o.x,s=s*o.height+o.y,A=A*o.height+o.y),i=isNaN(i)?0:i,d=isNaN(d)?1:d,s=isNaN(s)?0:s,A=isNaN(A)?0:A;var a=u.createLinearGradient(i,s,d,A);return a}function I(u,c,o){var i=o.width,d=o.height,s=Math.min(i,d),A=c.x==null?.5:c.x,a=c.y==null?.5:c.y,p=c.r==null?.5:c.r;c.global||(A=A*i+o.x,a=a*d+o.y,p=p*s);var w=u.createRadialGradient(A,a,0,A,a,p);return w}D.prototype={constructor:D,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(u,c,o){var i=this,d=o&&o.style,s=!d||u.__attrCachedBy!==O.STYLE_BIND;u.__attrCachedBy=O.STYLE_BIND;for(var A=0;A0},extendFrom:function(u,c){if(u)for(var o in u)u.hasOwnProperty(o)&&(c===!0||(c===!1?!this.hasOwnProperty(o):u[o]!=null))&&(this[o]=u[o])},set:function(u,c){typeof u=="string"?this[u]=c:this.extendFrom(u,!0)},clone:function(){var u=new this.constructor;return u.extendFrom(this,!0),u},getGradient:function(u,c,o){for(var i=c.type==="radial"?I:B,d=i(u,c,o),s=c.colorStops,A=0;A1&&arguments[1]!==void 0?arguments[1]:1,Me=ke.length,me=0;me1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(M).map(function(X,re){if(!D.isValidElement(X)||!X.type)return null;var se=X.type.isSelectOptGroup,_e=X.key,ge=X.props,we=ge.children,Re=Object(I.a)(ge,["children"]);return J||!se?b(X):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(_e===null?re:_e,"__"),label:_e},Re),{},{options:h(we)})}).filter(function(X){return X})}var r=G("2Qr1"),l=G("qNPg"),f=G("U8pU"),C=G("Kwbf"),g=G("WKfj");function m(M){var J=M.mode,X=M.options,re=M.children,se=M.backfill,_e=M.allowClear,ge=M.placeholder,we=M.getInputElement,Re=M.showSearch,He=M.onSearch,Se=M.defaultOpen,Te=M.autoFocus,$e=M.labelInValue,bt=M.value,Ie=M.inputValue,ze=M.optionLabelProp,at=J==="multiple"||J==="tags",Ae=Re!==void 0?Re:at||J==="combobox",ne=X||h(re);if(Object(C.a)(J!=="tags"||ne.every(function(Fe){return!Fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var ae=ne.some(function(Fe){return Fe.options?Fe.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Fe?Fe.value:Fe.key)=="number"});Object(C.a)(!ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(J!=="combobox"||!ze,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(J==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(C.a)(J==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(C.b)(J!=="combobox"||!we||!_e||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!Ae&&J!=="combobox"&&J!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!Se||Te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),bt!=null){var ce=Object(g.d)(bt);Object(C.a)(!$e||ce.every(function(Fe){return Object(f.a)(Fe)==="object"&&("key"in Fe||"value"in Fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!at||Array.isArray(bt),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var xe=null;Object(L.a)(re).some(function(Fe){if(!D.isValidElement(Fe)||!Fe.type)return!1;var ke=Fe.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var ct=Object(L.a)(Fe.props.children).every(function(ft){return!D.isValidElement(ft)||!Fe.type||ft.type.isSelectOption?!0:(xe=ft.type,!1)});return!ct}return xe=ke,!0}),xe&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(C.a)(Ie===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=m,P=Object(l.a)({prefixCls:"rc-select",components:{optionList:A},convertChildrenToData:h,flattenOptions:r.d,getLabeledValue:r.e,filterOptions:r.b,isValueDisabled:r.g,findValueOption:r.c,warningProps:F,fillOptionsWithMissingValue:r.a}),z=function(M){Object(O.a)(X,M);var J=Object(j.a)(X);function X(){var re;return Object(q.a)(this,X),re=J.apply(this,arguments),re.selectRef=D.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(Q.a)(X,[{key:"render",value:function(){return D.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),X}(D.Component);z.Option=p,z.OptGroup=S;var Z=z,V=pe.c=Z},M8RZ:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return T});var q=G("fWQN"),Q=G("mtLc"),O=G("yKVA"),j=G("879j"),D=G("q1tI"),B=G.n(D),I=G("i8i4"),v=G.n(I),T=function(E){Object(O.a)(u,E);var n=Object(j.a)(u);function u(c){var o;Object(q.a)(this,u),o=n.call(this,c);var i=window.document;return o.node=i.createElement("div"),i.body.appendChild(o.node),o}return Object(Q.a)(u,[{key:"render",value:function(){var o=this.props.children;return Object(I.createPortal)(o,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(B.a.Component)},MEGo:function(qe,pe,G){var q=G("4fz+"),Q=G("Dagg"),O=G("dqUG"),j=G("2fw6"),D=G("x6Kt"),B=G("rmlV"),I=G("yxFR"),v=G("y+Vt"),T=G("h7HQ"),E=G("1Jh7"),n=G("SKnc"),u=G("K2GJ"),c=G("Fofx"),o=G("NC18"),i=o.createFromString,d=G("bYtY"),s=d.isString,A=d.extend,a=d.defaults,p=d.trim,w=d.each,S=/[\s,]+/;function x(X){if(s(X)){var re=new DOMParser;X=re.parseFromString(X,"text/xml")}for(X.nodeType===9&&(X=X.firstChild);X.nodeName.toLowerCase()!=="svg"||X.nodeType!==1;)X=X.nextSibling;return X}function L(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}L.prototype.parse=function(X,re){re=re||{};var se=x(X);if(!se)throw new Error("Illegal svg");var _e=new q;this._root=_e;var ge=se.getAttribute("viewBox")||"",we=parseFloat(se.getAttribute("width")||re.width),Re=parseFloat(se.getAttribute("height")||re.height);isNaN(we)&&(we=null),isNaN(Re)&&(Re=null),g(se,_e,null,!0);for(var He=se.firstChild;He;)this._parseNode(He,_e),He=He.nextSibling;var Se,Te;if(ge){var $e=p(ge).split(S);$e.length>=4&&(Se={x:parseFloat($e[0]||0),y:parseFloat($e[1]||0),width:parseFloat($e[2]),height:parseFloat($e[3])})}if(Se&&we!=null&&Re!=null&&(Te=M(Se,we,Re),!re.ignoreViewBox)){var bt=_e;_e=new q,_e.add(bt),bt.scale=Te.scale.slice(),bt.position=Te.position.slice()}return!re.ignoreRootClip&&we!=null&&Re!=null&&_e.setClipPath(new D({shape:{x:0,y:0,width:we,height:Re}})),{root:_e,width:we,height:Re,viewBoxRect:Se,viewBoxTransform:Te}},L.prototype._parseNode=function(X,re){var se=X.nodeName.toLowerCase();se==="defs"?this._isDefine=!0:se==="text"&&(this._isText=!0);var _e;if(this._isDefine){var ge=h[se];if(ge){var we=ge.call(this,X),Re=X.getAttribute("id");Re&&(this._defs[Re]=we)}}else{var ge=b[se];ge&&(_e=ge.call(this,X,re),re.add(_e))}for(var He=X.firstChild;He;)He.nodeType===1&&this._parseNode(He,_e),He.nodeType===3&&this._isText&&this._parseText(He,_e),He=He.nextSibling;se==="defs"?this._isDefine=!1:se==="text"&&(this._isText=!1)},L.prototype._parseText=function(X,re){if(X.nodeType===1){var se=X.getAttribute("dx")||0,_e=X.getAttribute("dy")||0;this._textX+=parseFloat(se),this._textY+=parseFloat(_e)}var ge=new O({style:{text:X.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});l(re,ge),g(X,ge,this._defs);var we=ge.style.fontSize;we&&we<9&&(ge.style.fontSize=9,ge.scale=ge.scale||[1,1],ge.scale[0]*=we/9,ge.scale[1]*=we/9);var Re=ge.getBoundingRect();return this._textX+=Re.width,re.add(ge),ge};var b={g:function(X,re){var se=new q;return l(re,se),g(X,se,this._defs),se},rect:function(X,re){var se=new D;return l(re,se),g(X,se,this._defs),se.setShape({x:parseFloat(X.getAttribute("x")||0),y:parseFloat(X.getAttribute("y")||0),width:parseFloat(X.getAttribute("width")||0),height:parseFloat(X.getAttribute("height")||0)}),se},circle:function(X,re){var se=new j;return l(re,se),g(X,se,this._defs),se.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),r:parseFloat(X.getAttribute("r")||0)}),se},line:function(X,re){var se=new I;return l(re,se),g(X,se,this._defs),se.setShape({x1:parseFloat(X.getAttribute("x1")||0),y1:parseFloat(X.getAttribute("y1")||0),x2:parseFloat(X.getAttribute("x2")||0),y2:parseFloat(X.getAttribute("y2")||0)}),se},ellipse:function(X,re){var se=new B;return l(re,se),g(X,se,this._defs),se.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),rx:parseFloat(X.getAttribute("rx")||0),ry:parseFloat(X.getAttribute("ry")||0)}),se},polygon:function(X,re){var se=X.getAttribute("points");se&&(se=f(se));var _e=new T({shape:{points:se||[]}});return l(re,_e),g(X,_e,this._defs),_e},polyline:function(X,re){var se=new v;l(re,se),g(X,se,this._defs);var _e=X.getAttribute("points");_e&&(_e=f(_e));var ge=new E({shape:{points:_e||[]}});return ge},image:function(X,re){var se=new Q;return l(re,se),g(X,se,this._defs),se.setStyle({image:X.getAttribute("xlink:href"),x:X.getAttribute("x"),y:X.getAttribute("y"),width:X.getAttribute("width"),height:X.getAttribute("height")}),se},text:function(X,re){var se=X.getAttribute("x")||0,_e=X.getAttribute("y")||0,ge=X.getAttribute("dx")||0,we=X.getAttribute("dy")||0;this._textX=parseFloat(se)+parseFloat(ge),this._textY=parseFloat(_e)+parseFloat(we);var Re=new q;return l(re,Re),g(X,Re,this._defs),Re},tspan:function(X,re){var se=X.getAttribute("x"),_e=X.getAttribute("y");se!=null&&(this._textX=parseFloat(se)),_e!=null&&(this._textY=parseFloat(_e));var ge=X.getAttribute("dx")||0,we=X.getAttribute("dy")||0,Re=new q;return l(re,Re),g(X,Re,this._defs),this._textX+=ge,this._textY+=we,Re},path:function(X,re){var se=X.getAttribute("d")||"",_e=i(se);return l(re,_e),g(X,_e,this._defs),_e}},h={lineargradient:function(X){var re=parseInt(X.getAttribute("x1")||0,10),se=parseInt(X.getAttribute("y1")||0,10),_e=parseInt(X.getAttribute("x2")||10,10),ge=parseInt(X.getAttribute("y2")||0,10),we=new n(re,se,_e,ge);return r(X,we),we},radialgradient:function(X){}};function r(X,re){for(var se=X.firstChild;se;){if(se.nodeType===1){var _e=se.getAttribute("offset");_e.indexOf("%")>0?_e=parseInt(_e,10)/100:_e?_e=parseFloat(_e):_e=0;var ge=se.getAttribute("stop-color")||"#000000";re.addColorStop(_e,ge)}se=se.nextSibling}}function l(X,re){X&&X.__inheritedStyle&&(re.__inheritedStyle||(re.__inheritedStyle={}),a(re.__inheritedStyle,X.__inheritedStyle))}function f(X){for(var re=p(X).split(S),se=[],_e=0;_e0;we-=2){var Re=ge[we],He=ge[we-1];_e=_e||c.create();switch(He){case"translate":Re=p(Re).split(S),c.translate(_e,_e,[parseFloat(Re[0]),parseFloat(Re[1]||0)]);break;case"scale":Re=p(Re).split(S),c.scale(_e,_e,[parseFloat(Re[0]),parseFloat(Re[1]||Re[0])]);break;case"rotate":Re=p(Re).split(S),c.rotate(_e,_e,parseFloat(Re[0]));break;case"skew":Re=p(Re).split(S),console.warn("Skew transform is not supported yet");break;case"matrix":var Re=p(Re).split(S);_e[0]=parseFloat(Re[0]),_e[1]=parseFloat(Re[1]),_e[2]=parseFloat(Re[2]),_e[3]=parseFloat(Re[3]),_e[4]=parseFloat(Re[4]),_e[5]=parseFloat(Re[5]);break}}re.setLocalTransform(_e)}}var Z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function V(X){var re=X.getAttribute("style"),se={};if(!re)return se;var _e={};Z.lastIndex=0;for(var ge;(ge=Z.exec(re))!=null;)_e[ge[1]]=ge[2];for(var we in C)C.hasOwnProperty(we)&&_e[we]!=null&&(se[C[we]]=_e[we]);return se}function M(X,re,se){var _e=re/X.width,ge=se/X.height,we=Math.min(_e,ge),Re=[we,we],He=[-(X.x+X.width/2)*we+re/2,-(X.y+X.height/2)*we+se/2];return{scale:Re,position:He}}function J(X,re){var se=new L;return se.parse(X,re)}pe.parseXML=x,pe.makeViewBoxTransform=M,pe.parseSVG=J},MKOG:function(qe,pe,G){var q=G("bYtY"),Q=G("YH21"),O=Q.Dispatcher,j=G("mLcG"),D=G("Bq2U"),B=function(v){v=v||{},this.stage=v.stage||{},this.onframe=v.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,O.call(this)};B.prototype={constructor:B,addClip:function(v){this._clips.push(v)},addAnimator:function(v){v.animation=this;for(var T=v.getClips(),E=0;E=0&&this._clips.splice(T,1)},removeAnimator:function(v){for(var T=v.getClips(),E=0;E1&&(b*=j(F),h*=j(F));var P=(x===L?-1:1)*j((b*b*(h*h)-b*b*(m*m)-h*h*(g*g))/(b*b*(m*m)+h*h*(g*g)))||0,z=P*b*m/h,Z=P*-h*g/b,V=(a+w)/2+B(C)*z-D(C)*Z,M=(p+S)/2+D(C)*z+B(C)*Z,J=E([1,0],[(g-z)/b,(m-Z)/h]),X=[(g-z)/b,(m-Z)/h],re=[(-1*g-z)/b,(-1*m-Z)/h],se=E(X,re);T(X,re)<=-1&&(se=I),T(X,re)>=1&&(se=0),L===0&&se>0&&(se=se-2*I),L===1&&se<0&&(se=se+2*I),f.addData(l,V,M,b,h,J,se,C,L)}var u=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,c=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function o(a){if(!a)return new Q;for(var p=0,w=0,S=p,x=w,L,b=new Q,h=Q.CMD,r=a.match(u),l=0;l1&&arguments[1]!==void 0?arguments[1]:60,D=null;return function(){for(var B=this,I=arguments.length,v=new Array(I),T=0;T=0;d-=1){var s=v.get(d)||new Set;s.forEach(function(A){var a=A.parent,p=A.node;if(E(p)||!A.parent||i.has(A.parent.key))return;if(E(A.parent.node)){i.add(a.key);return}var w=!0,S=!1;(a.children||[]).filter(function(x){return!E(x.node)}).forEach(function(x){var L=x.key,b=n.has(L);w&&!b&&(w=!1),!S&&(b||u.has(L))&&(S=!0)}),w&&n.add(a.key),S&&u.add(a.key),i.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(Q(u,n))}}function D(I,v,T,E,n){for(var u=new Set(I),c=new Set(v),o=0;o<=E;o+=1){var i=T.get(o)||new Set;i.forEach(function(a){var p=a.key,w=a.node,S=a.children,x=S===void 0?[]:S;!u.has(p)&&!c.has(p)&&!n(w)&&x.filter(function(L){return!n(L.node)}).forEach(function(L){u.delete(L.key)})})}c=new Set;for(var d=new Set,s=E;s>=0;s-=1){var A=T.get(s)||new Set;A.forEach(function(a){var p=a.parent,w=a.node;if(n(w)||!a.parent||d.has(a.parent.key))return;if(n(a.parent.node)){d.add(p.key);return}var S=!0,x=!1;(p.children||[]).filter(function(L){return!n(L.node)}).forEach(function(L){var b=L.key,h=u.has(b);S&&!h&&(S=!1),!x&&(h||c.has(b))&&(x=!0)}),S||u.delete(p.key),x&&c.add(p.key),d.add(p.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(Q(c,u))}}function B(I,v,T,E){var n=[],u;E?u=E:u=O;var c=new Set(I.filter(function(s){var A=!!T[s];return A||n.push(s),A})),o=new Map,i=0;Object.keys(T).forEach(function(s){var A=T[s],a=A.level,p=o.get(a);p||(p=new Set,o.set(a,p)),p.add(A),i=Math.max(i,a)}),Object(q.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var d;return v===!0?d=j(c,o,i,u):d=D(c,v.halfCheckedKeys,o,i,u),d}},OLES:function(qe,pe,G){"use strict";var q=G("U8pU"),Q=G("VTBJ"),O=G("Ff2n"),j=G("q1tI"),D=G("uciX"),B=G("7ixt"),I=function(c){var o=c.overlay,i=c.prefixCls,d=c.id,s=c.overlayInnerStyle;return j.createElement("div",{className:"".concat(i,"-inner"),id:d,role:"tooltip",style:s},typeof o=="function"?o():o)},v=I,T=function(c,o){var i=c.overlayClassName,d=c.trigger,s=d===void 0?["hover"]:d,A=c.mouseEnterDelay,a=A===void 0?0:A,p=c.mouseLeaveDelay,w=p===void 0?.1:p,S=c.overlayStyle,x=c.prefixCls,L=x===void 0?"rc-tooltip":x,b=c.children,h=c.onVisibleChange,r=c.afterVisibleChange,l=c.transitionName,f=c.animation,C=c.placement,g=C===void 0?"right":C,m=c.align,F=m===void 0?{}:m,P=c.destroyTooltipOnHide,z=P===void 0?!1:P,Z=c.defaultVisible,V=c.getTooltipContainer,M=c.overlayInnerStyle,J=Object(O.a)(c,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),X=Object(j.useRef)(null);Object(j.useImperativeHandle)(o,function(){return X.current});var re=Object(Q.a)({},J);"visible"in c&&(re.popupVisible=c.visible);var se=function(){var He=c.arrowContent,Se=He===void 0?null:He,Te=c.overlay,$e=c.id;return[j.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},Se),j.createElement(v,{key:"content",prefixCls:L,id:$e,overlay:Te,overlayInnerStyle:M})]},_e=!1,ge=!1;if(typeof z=="boolean")_e=z;else if(z&&Object(q.a)(z)==="object"){var we=z.keepParent;_e=we===!0,ge=we===!1}return j.createElement(D.a,Object.assign({popupClassName:i,prefixCls:L,popup:se,action:s,builtinPlacements:B.a,popupPlacement:g,ref:X,popupAlign:F,getPopupContainer:V,onPopupVisibleChange:h,afterPopupVisibleChange:r,popupTransitionName:l,popupAnimation:f,defaultPopupVisible:Z,destroyPopupOnHide:_e,autoDestroy:ge,mouseLeaveDelay:w,popupStyle:S,mouseEnterDelay:a},re),b)},E=Object(j.forwardRef)(T),n=pe.a=E},OS9S:function(qe,pe,G){var q=G("bYtY"),Q=q.inherits,O=G("Gev7"),j=G("mFDi");function D(v){O.call(this,v),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}D.prototype.incremental=!0,D.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},D.prototype.addDisplayable=function(v,T){T?this._temporaryDisplayables.push(v):this._displayables.push(v),this.dirty()},D.prototype.addDisplayables=function(v,T){T=T||!1;for(var E=0;E=0&&b.splice(h,1),b}function n(x,L){var b=x.slice();return b.indexOf(L)===-1&&b.push(L),b}function u(x){return x.split("-")}function c(x,L){return"".concat(x,"-").concat(L)}function o(x){return x&&x.type&&x.type.isTreeNode}function i(x,L){var b=[x],h=L[x];function r(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(f){var C=f.key,g=f.children;b.push(C),r(g)})}return r(h.children),b}function d(x,L){var b=x.clientY,h=L.selectHandle.getBoundingClientRect(),r=h.top,l=h.bottom,f=h.height,C=Math.max(f*v,T);return b<=r+C?-1:b>=l-C?1:0}function s(x,L){if(!x)return;var b=L.multiple;return b?x.slice():x.length?[x[0]]:x}var A=function(L){return L};function a(x,L){if(!x)return[];var b=L||{},h=b.processProps,r=h===void 0?A:h,l=Array.isArray(x)?x:[x];return l.map(function(f){var C=f.children,g=Object(O.a)(f,["children"]),m=a(C,L);return D.a.createElement(I.a,Object.assign({},r(g)),m)})}function p(x){if(!x)return null;var L;if(Array.isArray(x))L={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(Q.a)(x)==="object")L={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(B.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function w(x,L){var b=new Set;function h(r){if(b.has(r))return;var l=L[r];if(!l)return;b.add(r);var f=l.parent,C=l.node;if(C.disabled)return;f&&h(f.key)}return(x||[]).forEach(function(r){h(r)}),Object(q.a)(b)}function S(x){var L={};return Object.keys(x).forEach(function(b){(b.startsWith("data-")||b.startsWith("aria-"))&&(L[b]=x[b])}),L}},Ot1p:function(qe,pe,G){"use strict";var q=G("2qtc"),Q=G("kLXV"),O=G("rAM+"),j=G("miYZ"),D=G("tsqr"),B=G("9og8"),I=G("tJVT"),v=G("jrin"),T=G("WmNS"),E=G.n(T),n=G("q1tI"),u=G.n(n),c=G("VrN/"),o=G.n(c),i=G("bdgK"),d=G("p77/"),s=G("Bd2K"),A=G("ELLl"),a=G("19Vz"),p=G("lZu9"),w=G("+NIl"),S=G("kSUc"),x=G("9Bee"),L=function(De){var Ze=De.value,ht=Ze===void 0?"":Ze,Tt=De.className,kt=De.showTextOnly,It=De.showLines,St=De.style,ut=St===void 0?{}:St,nt=Object(n.useMemo)(function(){return""},[ht]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:nt}}))},b=G("0Owb"),h=G("dejd"),r=G("C+DQ"),l=G("1vsH"),f=G("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 g(De){var Ze=De.onActionCallback,ht=De.title,Tt=De.icon,kt=De.actionName,It=De.className,St=It===void 0?"":It,ut=De.children;function nt(){Ze(kt)}return u.a.createElement("a",{title:ht,className:St,onClick:nt},u.a.createElement("i",{className:"md-iconfont ".concat(Tt)}),ut)}var m=function(De){var Ze=De.watch,ht=De.showNullButton,Tt=De.onActionCallback,kt=De.fullScreen,It=De.insertTemp,St=De.hidetoolBar,ut=De.uuid,nt=De.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(l.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(l.F)("_educoder_session"),"&key=").concat(ut,"&api=").concat(encodeURIComponent(f.a.PROXY_SERVER)));var tt=[].concat(C,[{title:"".concat(Ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!St&&tt.map(function(Ce,Pe){return u.a.createElement("li",{key:Pe},Ce.actionName?u.a.createElement(g,Object(b.a)({},Ce,{onActionCallback:Tt})):u.a.createElement("span",{className:"v-line"}))}),ht?u.a.createElement("li",null,u.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tt},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,It&&u.a.createElement("li",null,u.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(It),onActionCallback:Tt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(g,{icon:"".concat(kt?"icon-shrink":"icon-enlarge"),title:kt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tt})))},F=G("M8RZ"),P=G("+L6B"),z=G("2/Rp"),Z=G("y8nQ"),V=G("Vl3Y"),M=G("5NDa"),J=G("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},re=function(De){var Ze=De.callback,ht=De.onCancel;function Tt(kt){Ze(kt)}return u.a.createElement(V.a,Object(b.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Tt}),u.a.createElement(V.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(J.a,null)),u.a.createElement(V.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(J.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},se=G("7ahc"),_e=G("HmJG"),ge=G("BjJ7"),we=V.a.useForm,Re={width:280,marginRight:10},He={labelCol:{span:5},wrapperCol:{span:19}},Se=function(De){var Ze=De.callback,ht=De.onCancel,Tt=we(),kt=Object(I.a)(Tt,1),It=kt[0];function St(tt){Ze(tt)}function ut(tt,Ce){if(tt.status===-1){D.b.error(tt.message);return}It.setFieldsValue({src:"/api/attachments/".concat(tt.id),type:Ce.type})}function nt(tt){var Ce=tt.target.files[0];$e(Ce,ut)}return u.a.createElement(V.a,Object(b.a)({form:It},He,{className:"upload-image-panel",onFinish:St}),u.a.createElement(V.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(V.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},u.a.createElement(J.a,{style:Re})),u.a.createElement(Te,{onFileChange:nt}))),u.a.createElement(V.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(J.a,{style:{width:264}})),u.a.createElement(V.a.Item,{style:{textAlign:"right"}},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))};function Te(De){var Ze=De.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:Ze}))}function $e(De,Ze){if(!De)throw new String("\u6CA1\u6709\u6587\u4EF6");var ht=new FormData;ht.append("editormd-image-file",De),ht.append("file_param_name","editormd-image-file"),ht.append("byxhr","true");var Tt=new window.XMLHttpRequest;Tt.withCredentials=!0,Tt.addEventListener("load",function(kt){Ze(JSON.parse(kt.target.responseText),De)},!1),Tt.addEventListener("error",function(kt){console.error(kt)},!1),Tt.open("POST","".concat(ge.a,"/api/attachments.json")),Tt.send(ht)}var bt=G("giR+"),Ie=G("fyUT"),ze=G("7Kak"),at=G("9yH6"),Ae=at.a.Group,ne={margin:"0 8px"},ae=function(De){var Ze=De.callback,ht=De.onCancel;function Tt(kt){Ze(kt)}return u.a.createElement(V.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Tt},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:ne},"\u884C\u6570"),u.a.createElement(V.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(Ie.a,null)),u.a.createElement("span",{style:ne},"\u5217\u6570"),u.a.createElement(V.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(Ie.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(V.a.Item,{name:"align"},u.a.createElement(Ae,null,u.a.createElement(at.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(at.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(at.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(at.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(z.a,{type:"ghost",onClick:ht},"\u53D6\u6D88")))},ce=G("ErOA"),xe=G("7Cbv"),Fe="link",ke="upload-image",ct="code-block",ft="add-table",yt="------------",Et={default:yt,left:":".concat(yt),center:":".concat(yt,":"),right:"".concat(yt,":")},Ot=G("9VGf"),Mt,Qe;function Ne(){}var lt=0,dt=1e4,Ye="\u2581",st=` **\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 je(De){return/^\d+$/.test(De)?"".concat(De,"px"):De}var Le=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Le?"Cmd":"Ctrl",me=["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"],ye=(Mt={},Object(v.a)(Mt,Me+"-B","bold"),Object(v.a)(Mt,Me+"-I","italic"),Mt),Ee=(Qe={},Object(v.a)(Qe,Fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(v.a)(Qe,ct,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(v.a)(Qe,ke,"\u6DFB\u52A0\u6587\u4EF6"),Object(v.a)(Qe,ft,"\u6DFB\u52A0\u8868\u683C"),Qe),Oe=pe.a=function(De){var Ze=De.defaultValue,ht=Ze===void 0?"":Ze,Tt=De.onChange,kt=De.width,It=kt===void 0?"100%":kt,St=De.height,ut=St===void 0?400:St,nt=De.miniToolbar,tt=nt===void 0?!1:nt,Ce=De.isFocus,Pe=Ce===void 0?!1:Ce,pt=De.watch,it=De.insertTemp,xt=De.mode,_t=xt===void 0?"markdown":xt,Xe=De.id,mt=Xe===void 0?"markdown-editor-id":Xe,Pt=De.showResizeBar,Rt=Pt===void 0?!1:Pt,Qt=De.noStorage,Ir=Qt===void 0?!1:Qt,Fr=De.showNullButton,wr=Fr===void 0?!1:Fr,Kt=De.hidetoolBar,Ur=Kt===void 0?!1:Kt,Kr=De.fullScreen,Rr=Kr===void 0?!1:Kr,pr=De.onBlur,Or=De.onCMBeforeChange,pn=De.onFullScreen,un=De.className,fe=un===void 0?"":un,be=De.disablePaste,Ue=be===void 0?!1:be,rt=De.placeholder,et=rt===void 0?"":rt,Dt=De.values,ee=Dt===void 0?"":Dt,U=Object(n.useState)(null),N=Object(I.a)(U,2),$=N[0],le=N[1],te=Object(n.useState)(ht),Ke=Object(I.a)(te,2),Ct=Ke[0],Ut=Ke[1],Ht=Object(n.useState)(pt),wt=Object(I.a)(Ht,2),Yt=wt[0],Xt=wt[1],qt=Object(n.useState)(Rr),Ar=Object(I.a)(qt,2),Br=Ar[0],yr=Ar[1],Lr=Object(n.useState)(""),cr=Object(I.a)(Lr,2),Dr=cr[0],Pr=cr[1],An=Object(n.useState)(0),zr=Object(I.a)(An,2),Jr=zr[0],bn=zr[1],$r=Object(n.useState)(ut),en=Object(I.a)($r,2),an=en[0],cn=en[1],mn=Object(n.useState)(!1),br=Object(I.a)(mn,2),dr=br[0],tr=br[1],nr=Object(n.useRef)(Object(xe.a)()),$t=Object(n.useRef)(!1),vr=Object(n.useRef)(),mr=Object(n.useRef)(),xr=Object(n.useRef)(),Er=Object(n.useRef)(),On=Object(n.useRef)(),Gr=function(){var er=Object(B.a)(E.a.mark(function hr(){var Jt,gr;return E.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:return Xr.next=2,Object(ce.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:nr.current}});case 2:gr=Xr.sent,gr!=null&&(Jt=gr.attachments)!==null&&Jt!==void 0&&Jt.length&&(console.log("cm:",$,mr),gr.attachments.map(function(Cr){Cr.content_type.indexOf("image")>-1?$.replaceSelection("![,](/api/attachments/".concat(Cr.id,"?type=").concat(Cr.content_type,")")):Cr.content_type.indexOf("video")>-1?$.replaceSelection('')):Cr.content_type.indexOf("pdf")>-1?$.replaceSelection('
    ').concat(Cr.name,"")):$.replaceSelection("[".concat(Cr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Cr.id,"?type=").concat(Cr.content_type,")"))}));case 4:case"end":return Xr.stop()}},hr)}));return function(){return er.apply(this,arguments)}}();Object(n.useEffect)(function(){Ut(ee),$==null||$.setValue(ee)},[ee]),Object(n.useEffect)(function(){pn==null||pn(Br)},[Br]),Object(n.useEffect)(function(){if(mr.current){var er=o.a.fromTextArea(mr.current,{mode:_t,lineNumbers:!tt,lineWrapping:!0,value:ht,autoCloseTags:!0,autoCloseBrackets:!0});Pe&&er.focus();function hr(Jt,gr){if(Ue){gr.preventDefault();return}var Tr=gr.clipboardData;if(Tr){var Xr=Tr.types.toString(),Cr=Tr.items;if(Xr==="Files"||Tr.types.indexOf("Files")>-1){if(gr.preventDefault(),_t=="stex")return;try{var on,Dn=Cr[1];((on=Cr[0])===null||on===void 0?void 0:on.kind)==="file"&&(Dn=Cr[0]);var Mr=Dn.getAsFile(),li=Mr.name.split(".").pop();$e(Mr,function(Nr){if(Nr.id){var jn,Kn,ui;(Mr==null||((jn=Mr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection("![,](/api/attachments/".concat(Nr.id,"?type=").concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('').concat(Mr.name,"")):me.includes(li)?er.replaceSelection('').concat(Mr.name,"")):er.replaceSelection("[".concat(Mr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})}catch(Nr){D.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return er.on("paste",hr),er.on("dragleave",function(Jt,gr){xr.current.classList.remove("mouse-hover-md")}),er.on("dragover",function(Jt,gr){xr.current.classList.add("mouse-hover-md")}),er.on("drop",function(Jt,gr){xr.current.classList.add("mouse-hover-md");var Tr;if(Tr=gr.dataTransfer.files,Tr.length>0){gr.preventDefault(),gr.stopPropagation();for(var Xr=function(Dn){var Mr=Tr[Dn],li=Mr.name.split(".").pop();$e(Mr,function(Nr){if(Nr.id){var jn,Kn,ui;(Mr==null||((jn=Mr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection("![,](/api/attachments/".concat(Nr.id,"?type=").concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('').concat(Mr.name,"")):me.includes(li)?er.replaceSelection('').concat(Mr.name,"")):er.replaceSelection("[".concat(Mr.name,"](").concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})},Cr=0;Cr0||Cr.target.offsetWidth>0)&&(En(),$.setSize("100%","100%"),$.refresh())}}catch(on){Tr.e(on)}finally{Tr.f()}});return Jt.observe(mr.current.parentElement),Jt}if($){var hr=er();return function(){hr.unobserve(mr.current.parentElement)}}},[$,En]),Object(n.useEffect)(function(){if($){for(var er=[],hr=function(){var Cr=gr[Jt];Tr=Object(I.a)(Cr,2);var on=Tr[0],Dn=Tr[1],Mr=Object(v.a)({},on,function(){Qn(Dn)});er.push(Mr),$.addKeyMap(Mr)},Jt=0,gr=Object.entries(ye);Jt0){var er=new Date().getTime(),hr=window.sessionStorage.getItem(mt);er>=Jr+dt&&(!hr||hr!==Ct)&&(window.sessionStorage.setItem(mt,Ct),tr(!0))}},dt),Object(n.useEffect)(function(){Xt(pt)},[$,pt]),Object(n.useEffect)(function(){$&&(Pe&&$.focus())},[$,Pe]),Object(n.useEffect)(function(){if(Yt&&$){var er=$.getScrollerElement();function hr(Jt){var gr=Jt.target;if(On.current){var Tr=gr.scrollTop/gr.scrollHeight;On.current.scrollTop=On.current.scrollHeight*Tr}}return er.addEventListener("scroll",hr),function(){er.removeEventListener("scroll",hr)}}},[$,Yt]),Object(n.useEffect)(function(){if($&&Or){function er(hr,Jt){Or(hr,Jt)}return $.on("beforeChange",er),function(){$.off("beforeChange",er)}}},[$,Or]),Object(n.useEffect)(function(){if($&&pr){function er(){pr($.getValue())}return $.on("blur",er),function(){$.off("blur",er)}}},[$,pr]),Object(n.useEffect)(function(){if($){function er(hr){var Jt=hr.getValue();Ut(Jt),bn(new Date().getTime()),hr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Tt&&Tt(Jt)}return $.on("change",er),function(){$.off("change",er)}}},[$,Tt]),Object(n.useEffect)(function(){$&&(ht==null?($.setValue(""),Ut("")):ht!==$.getValue()&&($.setValue(ht),Ut(ht),$.setCursor($.lineCount(),0)))},[$,ht]);var Qn=Object(n.useCallback)(function(er){var hr=$.getCursor(),Jt=$.getSelection(),gr=Jt.split(` `);switch(er){case"bold":return $.replaceSelection("**"+Jt+"**"),Jt===""&&$.setCursor(hr.line,hr.ch+2),$.focus();case"italic":return $.replaceSelection("*"+Jt+"*"),Jt===""&&$.setCursor(hr.line,hr.ch+1),$.focus();case"code":return $.replaceSelection("`"+Jt+"`"),Jt===""&&$.setCursor(hr.line,hr.ch+1),$.focus();case"inline-latex":return $.replaceSelection("`$$"+Jt+"$$`"),Jt===""&&$.setCursor(hr.line,hr.ch+3),$.focus();case"latex":return $.replaceSelection("```latex\n"+Jt+"\n```"),$.setCursor(hr.line+1,Jt.length+1),$.focus();case"line-break":return $.replaceSelection(`
    `),$.focus();case"list-ul":return Jt===""?$.replaceSelection("- "+Jt):$.replaceSelection(gr.map(function(Tr){return Tr===""?"":"- ".concat(Tr)}).join(` `)),$.focus();case"list-ol":return Jt===""?$.replaceSelection("1. "+Jt):$.replaceSelection(gr.map(function(Tr,Xr){return Tr===""?"":"".concat(Xr+1,". ").concat(Tr)}).join(` `)),$.focus();case"add-null-ch":return Jt===""&&$.setCursor(hr.line,hr.ch+1),$.replaceSelection(Ye),$.focus();case"inster-template-1":return Jt===""&&$.setCursor(hr.line,hr.ch),$.replaceSelection(st),$.focus();case"eraser":return $.setValue(""),$.focus();case"trigger-watch":return Xt(!Yt),$.focus();case"trigger-full-screen":return yr(!Br),$.focus();case Fe:Pr(Fe);return;case ct:Pr(ct);return;case ke:Pr(ke);return;case ft:Pr(ft);return;default:throw new Error}},[$,Yt,Br]),wn=Object(n.useCallback)(function(er){Pr("");switch(Dr){case Fe:var hr=er.title,Jt=er.link;return $.replaceSelection("[".concat(hr,"](").concat(Jt,")")),$.focus();case ct:var gr=er.language,Tr=er.content;return $.replaceSelection(["```"+gr,Tr,"```"].join(` `)),$.focus();case ke:var Xr=er.src,Cr=er.alt;return Cr?$.replaceSelection("![ ".concat(Cr," ]( ").concat(Xr,' "').concat(Cr,'" )')):$.replaceSelection("![,](".concat(Xr,")")),$.focus();case ft:for(var on=er.row,Dn=er.col,Mr=er.align,li=` `,Nr=0;Nr300&&(on=300);var Dn=ut+on+"px";cn(Dn)}}return er.addEventListener("mousedown",gr),document.addEventListener("mousemove",Xr),document.addEventListener("mouseup",Tr),function(){er.removeEventListener("mousedown",gr),document.removeEventListener("mousemove",Xr),document.removeEventListener("mouseup",Tr)}}},[$,Er]),Object(n.useEffect)(function(){cn(ut)},[ut]);var In=je(It),Jn=je(an),Fn={width:In,height:Jn},si=Object(n.useMemo)(function(){if(Jr){var er=new Date(Jr),hr=er.getHours(),Jt=er.getMinutes(),gr=er.getSeconds();return hr=hr<10?"0"+hr:hr,Jt=Jt<10?"0"+Jt:Jt,gr=gr<10?"0"+gr:gr,"".concat(hr,":").concat(Jt,":").concat(gr)}return 0},[Jr]);function Un(){window.sessionStorage.removeItem(mt),tr(!1),bn(0)}function gn(){tr(!1),bn(0),$.setValue(window.sessionStorage.getItem(mt))}function kn(er,hr){var Jt=$.getValue();Jt=Jt.replace(er,hr),Ut(Jt),$==null||$.setValue(Jt)}return u.a.createElement(n.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:xr},u.a.createElement("div",{className:"markdown-editor-container ".concat(fe," ").concat(Yt?"on-preview":""," ").concat(tt?"mini":""," ").concat(Br?"full-screen":""),style:Fn},u.a.createElement(m,{insertTemp:it,watch:Yt,fullScreen:Br,showNullButton:wr,onActionCallback:Qn,hidetoolBar:Ur,uuid:nr.current,setOpenPhones:function(){$t.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:mr,placeholder:et})),Yt?u.a.createElement("div",{ref:On,className:"preview-container"},_t==="stex"&&u.a.createElement(L,{value:Ct}),_t!=="stex"&&u.a.createElement(x.a,{edit:!0,value:Ct,replaces:kn})):null))),Rt?u.a.createElement("a",{ref:Er,className:"editor-resize"}):null,u.a.createElement(F.a,null,Ee[Dr]?u.a.createElement(Q.a,{centered:!0,title:Ee[Dr],visible:!0,onCancel:Ln,footer:null,className:"markdown-popup-form"},qr):null))}},P47w:function(qe,pe,G){var q=G("hydK"),Q=q.createElement,O=G("IMiH"),j=G("mFDi"),D=G("Fofx"),B=G("6GrX"),I=G("pzxd"),v=G("dqUG"),T=O.CMD,E=Array.prototype.join,n="none",u=Math.round,c=Math.sin,o=Math.cos,i=Math.PI,d=Math.PI*2,s=180/i,A=1e-4;function a(X){return u(X*1e4)/1e4}function p(X){return X-A}function w(X,re){var se=re?X.textFill:X.fill;return se!=null&&se!==n}function S(X,re){var se=re?X.textStroke:X.stroke;return se!=null&&se!==n}function x(X,re){re&&L(X,"transform","matrix("+E.call(re,",")+")")}function L(X,re,se){(!se||se.type!=="linear"&&se.type!=="radial")&&X.setAttribute(re,se)}function b(X,re,se){X.setAttributeNS("http://www.w3.org/1999/xlink",re,se)}function h(X,re,se,_e){if(w(re,se)){var ge=se?re.textFill:re.fill;ge=ge==="transparent"?n:ge,L(X,"fill",ge),L(X,"fill-opacity",re.fillOpacity!=null?re.fillOpacity*re.opacity:re.opacity)}else L(X,"fill",n);if(S(re,se)){var we=se?re.textStroke:re.stroke;we=we==="transparent"?n:we,L(X,"stroke",we);var Re=se?re.textStrokeWidth:re.lineWidth,He=!se&&re.strokeNoScale?_e.getLineScale():1;L(X,"stroke-width",Re/He),L(X,"paint-order",se?"stroke":"fill"),L(X,"stroke-opacity",re.strokeOpacity!=null?re.strokeOpacity:re.opacity);var Se=re.lineDash;Se?(L(X,"stroke-dasharray",re.lineDash.join(",")),L(X,"stroke-dashoffset",u(re.lineDashOffset||0))):L(X,"stroke-dasharray",""),re.lineCap&&L(X,"stroke-linecap",re.lineCap),re.lineJoin&&L(X,"stroke-linejoin",re.lineJoin),re.miterLimit&&L(X,"stroke-miterlimit",re.miterLimit)}else L(X,"stroke",n)}function r(X){for(var re=[],se=X.data,_e=X.len(),ge=0;ge<_e;){var we=se[ge++],Re="",He=0;switch(we){case T.M:Re="M",He=2;break;case T.L:Re="L",He=2;break;case T.Q:Re="Q",He=4;break;case T.C:Re="C",He=6;break;case T.A:var Se=se[ge++],Te=se[ge++],$e=se[ge++],bt=se[ge++],Ie=se[ge++],ze=se[ge++],at=se[ge++],Ae=se[ge++],ne=Math.abs(ze),ae=p(ne-d)||(Ae?ze>=d:-ze>=d),ce=ze>0?ze%d:ze%d+d,xe=!1;ae?xe=!0:p(ne)?xe=!1:xe=ce>=i===!!Ae;var Fe=a(Se+$e*o(Ie)),ke=a(Te+bt*c(Ie));ae&&(Ae?ze=d-1e-4:ze=-d+1e-4,xe=!0,ge===9&&re.push("M",Fe,ke));var ct=a(Se+$e*o(Ie+ze)),ft=a(Te+bt*c(Ie+ze));re.push("A",a($e),a(bt),u(at*s),+xe,+Ae,ct,ft);break;case T.Z:Re="Z";break;case T.R:var ct=a(se[ge++]),ft=a(se[ge++]),yt=a(se[ge++]),Et=a(se[ge++]);re.push("M",ct,ft,"L",ct+yt,ft,"L",ct+yt,ft+Et,"L",ct,ft+Et,"L",ct,ft);break}Re&&re.push(Re);for(var Ot=0;OtMt){for(;Et255?255:r}function j(r){return r=Math.round(r),r<0?0:r>360?360:r}function D(r){return r<0?0:r>1?1:r}function B(r){return r.length&&r.charAt(r.length-1)==="%"?O(parseFloat(r)/100*255):O(parseInt(r,10))}function I(r){return r.length&&r.charAt(r.length-1)==="%"?D(parseFloat(r)/100):D(parseFloat(r))}function v(r,l,f){return f<0?f+=1:f>1&&(f-=1),f*6<1?r+(l-r)*f*6:f*2<1?l:f*3<2?r+(l-r)*(2/3-f)*6:r}function T(r,l,f){return r+(l-r)*f}function E(r,l,f,C,g){return r[0]=l,r[1]=f,r[2]=C,r[3]=g,r}function n(r,l){return r[0]=l[0],r[1]=l[1],r[2]=l[2],r[3]=l[3],r}var u=new q(20),c=null;function o(r,l){c&&n(c,l),c=u.put(r,c||l.slice())}function i(r,l){if(!r)return;l=l||[];var f=u.get(r);if(f)return n(l,f);r=r+"";var C=r.replace(/ /g,"").toLowerCase();if(C in Q)return n(l,Q[C]),o(r,l),l;if(C.charAt(0)==="#"){if(C.length===4){var g=parseInt(C.substr(1),16);if(!(g>=0&&g<=4095)){E(l,0,0,0,1);return}return E(l,(g&3840)>>4|(g&3840)>>8,g&240|(g&240)>>4,g&15|(g&15)<<4,1),o(r,l),l}else if(C.length===7){var g=parseInt(C.substr(1),16);if(!(g>=0&&g<=16777215)){E(l,0,0,0,1);return}return E(l,(g&16711680)>>16,(g&65280)>>8,g&255,1),o(r,l),l}return}var m=C.indexOf("("),F=C.indexOf(")");if(m!==-1&&F+1===C.length){var P=C.substr(0,m),z=C.substr(m+1,F-(m+1)).split(","),Z=1;switch(P){case"rgba":if(z.length!==4){E(l,0,0,0,1);return}Z=I(z.pop());case"rgb":if(z.length!==3){E(l,0,0,0,1);return}return E(l,B(z[0]),B(z[1]),B(z[2]),Z),o(r,l),l;case"hsla":if(z.length!==4){E(l,0,0,0,1);return}return z[3]=I(z[3]),d(z,l),o(r,l),l;case"hsl":if(z.length!==3){E(l,0,0,0,1);return}return d(z,l),o(r,l),l;default:return}}E(l,0,0,0,1);return}function d(r,l){var f=(parseFloat(r[0])%360+360)%360/360,C=I(r[1]),g=I(r[2]),m=g<=.5?g*(C+1):g+C-g*C,F=g*2-m;return l=l||[],E(l,O(v(F,m,f+1/3)*255),O(v(F,m,f)*255),O(v(F,m,f-1/3)*255),1),r.length===4&&(l[3]=r[3]),l}function s(r){if(!r)return;var l=r[0]/255,f=r[1]/255,C=r[2]/255,g=Math.min(l,f,C),m=Math.max(l,f,C),F=m-g,P=(m+g)/2,z,Z;if(F===0)z=0,Z=0;else{P<.5?Z=F/(m+g):Z=F/(2-m-g);var V=((m-l)/6+F/2)/F,M=((m-f)/6+F/2)/F,J=((m-C)/6+F/2)/F;l===m?z=J-M:f===m?z=1/3+V-J:C===m&&(z=2/3+M-V),z<0&&(z+=1),z>1&&(z-=1)}var X=[z*360,Z,P];return r[3]!=null&&X.push(r[3]),X}function A(r,l){var f=i(r);if(f){for(var C=0;C<3;C++)l<0?f[C]=f[C]*(1-l)|0:f[C]=(255-f[C])*l+f[C]|0,f[C]>255?f[C]=255:r[C]<0&&(f[C]=0);return h(f,f.length===4?"rgba":"rgb")}}function a(r){var l=i(r);if(l)return((1<<24)+(l[0]<<16)+(l[1]<<8)+ +l[2]).toString(16).slice(1)}function p(r,l,f){if(!(l&&l.length)||!(r>=0&&r<=1))return;f=f||[];var C=r*(l.length-1),g=Math.floor(C),m=Math.ceil(C),F=l[g],P=l[m],z=C-g;return f[0]=O(T(F[0],P[0],z)),f[1]=O(T(F[1],P[1],z)),f[2]=O(T(F[2],P[2],z)),f[3]=D(T(F[3],P[3],z)),f}var w=p;function S(r,l,f){if(!(l&&l.length)||!(r>=0&&r<=1))return;var C=r*(l.length-1),g=Math.floor(C),m=Math.ceil(C),F=i(l[g]),P=i(l[m]),z=C-g,Z=h([O(T(F[0],P[0],z)),O(T(F[1],P[1],z)),O(T(F[2],P[2],z)),D(T(F[3],P[3],z))],"rgba");return f?{color:Z,leftIndex:g,rightIndex:m,value:C}:Z}var x=S;function L(r,l,f,C){if(r=i(r),r)return r=s(r),l!=null&&(r[0]=j(l)),f!=null&&(r[1]=I(f)),C!=null&&(r[2]=I(C)),h(d(r),"rgba")}function b(r,l){if(r=i(r),r&&l!=null)return r[3]=D(l),h(r,"rgba")}function h(r,l){if(!r||!r.length)return;var f=r[0]+","+r[1]+","+r[2];return(l==="rgba"||l==="hsva"||l==="hsla")&&(f+=","+r[3]),l+"("+f+")"}pe.parse=i,pe.lift=A,pe.toHex=a,pe.fastLerp=p,pe.fastMapToColor=w,pe.lerp=S,pe.mapToColor=x,pe.modifyHSL=L,pe.modifyAlpha=b,pe.stringify=h},QuXc:function(qe,pe){var G=function(Q){this.colorStops=Q||[]};G.prototype={constructor:G,addColorStop:function(Q,O){this.colorStops.push({offset:Q,color:O})}};var q=G;qe.exports=q},RDYZ:function(qe,pe,G){var q=G("dMvE");function Q(j){this._target=j.target,this._life=j.life||1e3,this._delay=j.delay||0,this._initialized=!1,this.loop=j.loop==null?!1:j.loop,this.gap=j.gap||0,this.easing=j.easing||"Linear",this.onframe=j.onframe,this.ondestroy=j.ondestroy,this.onrestart=j.onrestart,this._pausedTime=0,this._paused=!1}Q.prototype={constructor:Q,step:function(j,D){if(this._initialized||(this._startTime=j+this._delay,this._initialized=!0),this._paused){this._pausedTime+=D;return}var B=(j-this._startTime-this._pausedTime)/this._life;if(B<0)return;B=Math.min(B,1);var I=this.easing,v=typeof I=="string"?q[I]:I,T=typeof v=="function"?v(B):B;return this.fire("frame",T),B===1?this.loop?(this.restart(j),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(j){var D=(j-this._startTime-this._pausedTime)%this._life;this._startTime=j-D+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(j,D){j="on"+j,this[j]&&this[j](this._target,D)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var O=Q;qe.exports=O},RXMa:function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(O,j){var D=j.cx,B=j.cy,I=Math.PI*2;O.moveTo(D+j.r,B),O.arc(D,B,j.r,0,I,!1),O.moveTo(D+j.r0,B),O.arc(D,B,j.r0,0,I,!0)}});qe.exports=Q},"SA+Z":function(qe,pe,G){var q=G("wTVA"),Q=G("EbDI"),O=G("ZhPi"),j=G("wkBT");function D(B){return q(B)||Q(B)||O(B)||j()}qe.exports=D,qe.exports.__esModule=!0,qe.exports.default=qe.exports},SJMd:function(qe,pe){/** * @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 G,q,Q,O=!1,j,D;window.PR_SHOULD_USE_CONTINUATION=!0;var B,I;(function(){var v=window,T=["break,continue,do,else,for,if,return,while"],E=[T,"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"],n=[E,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[n,"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"],c=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"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"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",d=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",A=[T,"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"],a=[T,"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"],p=[T,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[u,o,c,d,s,A,a,p],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",L="kwd",b="com",h="typ",r="lit",l="pun",f="pln",C="tag",g="dec",m="src",F="atn",P="atv",z="nocode",Z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function V(Ae){for(var ne=0,ae=!1,ce=!1,xe=0,Fe=Ae.length;xe122||(me<65||Me>90||lt.push([Math.max(65,Me)|32,Math.min(me,90)|32]),me<97||Me>122||lt.push([Math.max(97,Me)&~32,Math.min(me,122)&~32]))}}lt.sort(function(De,Ze){return De[0]-Ze[0]||Ze[1]-De[1]});for(var ye=[],Ee=[],st=0;stOe[0]&&(Oe[1]+1>Oe[0]&&Ye.push("-"),Ye.push(yt(Oe[1])))}return Ye.push("]"),Ye.join("")}function Ot(Qe){for(var Ne=Qe.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")),lt=Ne.length,dt=[],Ye=0,st=0;Ye=2&&Me==="["?Ne[Ye]=Et(je):Me!=="\\"&&(Ne[Ye]=je.replace(/[a-zA-Z]/g,function(Ee){var Oe=Ee.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return Ne.join("")}for(var Mt=[],xe=0,Fe=Ae.length;xe=0;)ae[Mt.charAt(Qe)]=Ot;var Ne=Ot[1],lt=""+Ne;ft.hasOwnProperty(lt)||(ct.push(Ne),ft[lt]=null)}ct.push(/[\0-\uffff]/),ce=V(ct)})();var xe=ne.length,Fe=function(ke){for(var ct=ke.sourceCode,ft=ke.basePos,yt=ke.sourceNode,Et=[ft,f],Ot=0,Mt=ct.match(ce)||[],Qe={},Ne=0,lt=Mt.length;Ne=5&&Ye.substring(0,5)==="lang-",je&&!(st&&typeof st[1]=="string")&&(je=!1,Ye=m),je||(Qe[dt]=Ye)}var me=Ot;if(Ot+=dt.length,!je)Et.push(ft+me,Ye);else{var ye=st[1],Ee=dt.indexOf(ye),Oe=Ee+ye.length;st[2]&&(Oe=dt.length-st[2].length,Ee=Oe-ye.length);var De=Ye.substring(5);J(yt,ft+me,dt.substring(0,Ee),Fe,Et),J(yt,ft+me+Ee,ye,Te(De,ye),Et),J(yt,ft+me+Oe,dt.substring(Oe),Fe,Et)}}ke.decorations=Et};return Fe}function _e(Ae){var ne=[],ae=[];Ae.tripleQuotedStrings?ne.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?ne.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&ae.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=Ae.hashComments;ce&&(Ae.cStyleComments?(ce>1?ne.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ae.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([b,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(ae.push([b,/^\/\/[^\r\n]*/,null]),ae.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=Ae.regexLiterals;if(xe){var Fe=xe>1?"":` \r`,ke=Fe?".":"[\\S\\s]",ct="/(?=[^/*"+Fe+"])(?:[^/\\x5B\\x5C"+Fe+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Fe+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";ae.push(["lang-regex",RegExp("^"+Z+"("+ct+")")])}var ft=Ae.types;ft&&ae.push([h,ft]);var yt=(""+Ae.keywords).replace(/^ | $/g,"");yt.length&&ae.push([L,new RegExp("^(?:"+yt.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([f,/^\s+/,null,` \r \xA0`]);var Et="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(Et+="(?!s*/)"),ae.push([r,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[f,/^[a-z_$][a-z_$@0-9]*/i,null],[r,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[f,/^\\[\s\S]?/,null],[l,new RegExp(Et),null]),se(ne,ae)}var ge=_e({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(Ae,ne,ae){for(var ce=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,Fe=Ae.ownerDocument,ke=Fe.createElement("li");Ae.firstChild;)ke.appendChild(Ae.firstChild);var ct=[ke];function ft(Ne){var lt=Ne.nodeType;if(lt==1&&!ce.test(Ne.className))if(Ne.nodeName==="br")yt(Ne),Ne.parentNode&&Ne.parentNode.removeChild(Ne);else for(var dt=Ne.firstChild;dt;dt=dt.nextSibling)ft(dt);else if((lt==3||lt==4)&&ae){var Ye=Ne.nodeValue,st=Ye.match(xe);if(st){var je=Ye.substring(0,st.index);Ne.nodeValue=je;var Le=Ye.substring(st.index+st[0].length);if(Le){var Me=Ne.parentNode;Me.insertBefore(Fe.createTextNode(Le),Ne.nextSibling)}yt(Ne),je||Ne.parentNode.removeChild(Ne)}}}function yt(Ne){for(;!Ne.nextSibling;)if(Ne=Ne.parentNode,!Ne)return;function lt(st,je){var Le=je?st.cloneNode(!1):st,Me=st.parentNode;if(Me){var me=lt(Me,1),ye=st.nextSibling;me.appendChild(Le);for(var Ee=ye;Ee;Ee=ye)ye=Ee.nextSibling,me.appendChild(Ee)}return Le}for(var dt=lt(Ne.nextSibling,0),Ye;(Ye=dt.parentNode)&&Ye.nodeType===1;)dt=Ye;ct.push(dt)}for(var Et=0;Et=Me&&(ft+=2),Fe>=me&&(Ot+=2)}}finally{Ye&&(Ye.style.display=st)}}var He={};function Se(Ae,ne){for(var ae=ne.length;--ae>=0;){var ce=ne[ae];He.hasOwnProperty(ce)?v.console&&console.warn("cannot override language handler %s",ce):He[ce]=Ae}}function Te(Ae,ne){return Ae&&He.hasOwnProperty(Ae)||(Ae=/^\s*]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Se(se([[f,/^[\s]+/,null,` \r `],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[F,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),Se(se([],[[P,/^[\s\S]+/]]),["uq.val"]),Se(_e({keywords:u,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),Se(_e({keywords:"null,true,false"}),["json"]),Se(_e({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),Se(_e({keywords:c,cStyleComments:!0}),["java"]),Se(_e({keywords:p,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Se(_e({keywords:A,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Se(_e({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Se(_e({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Se(_e({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Se(_e({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Se(se([],[[x,/^[\s\S]+/]]),["regex"]);function $e(Ae){var ne=Ae.langExtension;try{var ae=M(Ae.sourceNode,Ae.pre),ce=ae.sourceCode;Ae.sourceCode=ce,Ae.spans=ae.spans,Ae.basePos=0,Te(ne,ce)(Ae),Re(Ae)}catch(xe){v.console&&console.log(xe&&xe.stack||xe)}}function bt(Ae,ne,ae){var ce=ae||!1,xe=ne||null,Fe=document.createElement("div");Fe.innerHTML="
    "+Ae+"
    ",Fe=Fe.firstChild,ce&&we(Fe,ce,!0);var ke={langExtension:xe,numberLines:ce,sourceNode:Fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return $e(ke),Fe.innerHTML}function Ie(Ae,ne){var ae=ne||document.body,ce=ae.ownerDocument||document;function xe(Le){return ae.getElementsByTagName(Le)}for(var Fe=[xe("pre"),xe("code"),xe("xmp")],ke=[],ct=0;ct-B&&rB||r<-B}function i(r,l,f,C,g){var m=1-g;return m*m*(m*r+3*g*l)+g*g*(g*C+3*m*f)}function d(r,l,f,C,g){var m=1-g;return 3*(((l-r)*m+2*(f-l)*g)*m+(C-f)*g*g)}function s(r,l,f,C,g,m){var F=C+3*(l-f)-r,P=3*(f-l*2+r),z=3*(l-r),Z=r-g,V=P*P-3*F*z,M=P*z-9*F*Z,J=z*z-3*P*Z,X=0;if(c(V)&&c(M))if(c(P))m[0]=0;else{var re=-z/P;re>=0&&re<=1&&(m[X++]=re)}else{var se=M*M-4*V*J;if(c(se)){var _e=M/V,re=-P/F+_e,ge=-_e/2;re>=0&&re<=1&&(m[X++]=re),ge>=0&&ge<=1&&(m[X++]=ge)}else if(se>0){var we=D(se),Re=V*P+1.5*F*(-M+we),He=V*P+1.5*F*(-M-we);Re<0?Re=-j(-Re,T):Re=j(Re,T),He<0?He=-j(-He,T):He=j(He,T);var re=(-P-(Re+He))/(3*F);re>=0&&re<=1&&(m[X++]=re)}else{var Se=(2*V*P-3*F*M)/(2*D(V*V*V)),Te=Math.acos(Se)/3,$e=D(V),bt=Math.cos(Te),re=(-P-2*$e*bt)/(3*F),ge=(-P+$e*(bt+v*Math.sin(Te)))/(3*F),Ie=(-P+$e*(bt-v*Math.sin(Te)))/(3*F);re>=0&&re<=1&&(m[X++]=re),ge>=0&&ge<=1&&(m[X++]=ge),Ie>=0&&Ie<=1&&(m[X++]=Ie)}}return X}function A(r,l,f,C,g){var m=6*f-12*l+6*r,F=9*l+3*C-3*r-9*f,P=3*l-3*r,z=0;if(c(F)){if(o(m)){var Z=-P/m;Z>=0&&Z<=1&&(g[z++]=Z)}}else{var V=m*m-4*F*P;if(c(V))g[0]=-m/(2*F);else if(V>0){var M=D(V),Z=(-m+M)/(2*F),J=(-m-M)/(2*F);Z>=0&&Z<=1&&(g[z++]=Z),J>=0&&J<=1&&(g[z++]=J)}}return z}function a(r,l,f,C,g,m){var F=(l-r)*g+r,P=(f-l)*g+l,z=(C-f)*g+f,Z=(P-F)*g+F,V=(z-P)*g+P,M=(V-Z)*g+Z;m[0]=r,m[1]=F,m[2]=Z,m[3]=M,m[4]=M,m[5]=V,m[6]=z,m[7]=C}function p(r,l,f,C,g,m,F,P,z,Z,V){var M,J=.005,X=Infinity,re,se,_e,ge;E[0]=z,E[1]=Z;for(var we=0;we<1;we+=.05)n[0]=i(r,f,g,F,we),n[1]=i(l,C,m,P,we),_e=O(E,n),_e=0&&_e=0&&Z<=1&&(g[z++]=Z)}}else{var V=F*F-4*m*P;if(c(V)){var Z=-F/(2*m);Z>=0&&Z<=1&&(g[z++]=Z)}else if(V>0){var M=D(V),Z=(-F+M)/(2*m),J=(-F-M)/(2*m);Z>=0&&Z<=1&&(g[z++]=Z),J>=0&&J<=1&&(g[z++]=J)}}return z}function L(r,l,f){var C=r+f-2*l;return C===0?.5:(r-l)/C}function b(r,l,f,C,g){var m=(l-r)*C+r,F=(f-l)*C+l,P=(F-m)*C+m;g[0]=r,g[1]=m,g[2]=P,g[3]=P,g[4]=F,g[5]=f}function h(r,l,f,C,g,m,F,P,z){var Z,V=.005,M=Infinity;E[0]=F,E[1]=P;for(var J=0;J<1;J+=.05){n[0]=w(r,f,g,J),n[1]=w(l,C,m,J);var X=O(E,n);X=0&&X=0;--p)if(a[p]===A)return!0;return!1}),s):null:s[0]},c.prototype.update=function(i,d){if(!i)return;var s=this.getDefs(!1);if(i[this._domName]&&s.contains(i[this._domName]))typeof d=="function"&&d(i);else{var A=this.add(i);A&&(i[this._domName]=A)}},c.prototype.addDom=function(i){var d=this.getDefs(!0);d.appendChild(i)},c.prototype.removeDom=function(i){var d=this.getDefs(!1);d&&i[this._domName]&&(d.removeChild(i[this._domName]),i[this._domName]=null)},c.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var d=[];return O.each(this._tagNames,function(s){var A=i.getElementsByTagName(s);d=d.concat([].slice.call(A))}),d},c.prototype.markAllUnused=function(){var i=this.getDoms(),d=this;O.each(i,function(s){s[d._markLabel]=n})},c.prototype.markUsed=function(i){i&&(i[this._markLabel]=u)},c.prototype.removeUnused=function(){var i=this.getDefs(!1);if(!i)return;var d=this.getDoms(),s=this;O.each(d,function(A){A[s._markLabel]!==u&&i.removeChild(A)})},c.prototype.getSvgProxy=function(i){return i instanceof j?v:i instanceof D?T:i instanceof B?E:v},c.prototype.getTextSvgElement=function(i){return i.__textSvgEl},c.prototype.getSvgElement=function(i){return i.__svgEl};var o=c;qe.exports=o},T6xi:function(qe,pe,G){var q=G("YgsL"),Q=G("nCxF");function O(j,D,B){var I=D.points,v=D.smooth;if(I&&I.length>=2){if(v&&v!=="spline"){var T=Q(I,v,B,D.smoothConstraint);j.moveTo(I[0][0],I[0][1]);for(var E=I.length,n=0;n<(B?E:E-1);n++){var u=T[n*2],c=T[n*2+1],o=I[(n+1)%E];j.bezierCurveTo(u[0],u[1],c[0],c[1],o[0],o[1])}}else{v==="spline"&&(I=q(I,B)),j.moveTo(I[0][0],I[0][1]);for(var n=1,i=I.length;n=0;o--)if(this.__items[o].match(c))return!0;return!1},E.prototype.set_indent=function(c,o){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.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)},E.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},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(c){this.__items.push(c);var o=c.lastIndexOf(` `);o!==-1?this.__character_count=c.length-o:this.__character_count+=c.length},E.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function n(c,o){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),o=o||"",c.indent_level>0&&(o=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}n.prototype.get_indent_size=function(c,o){var i=this.__base_string_length;return o=o||0,c<0&&(i=0),i+=c*this.__indent_size,i+=o,i},n.prototype.get_indent_string=function(c,o){var i=this.__base_string;return o=o||0,c<0&&(c=0,i=""),o+=c*this.__indent_size,this.__ensure_cache(o),i+=this.__cache[o],i},n.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var c=this.__cache.length,o=0,i="";this.__indent_size&&c>=this.__indent_size&&(o=Math.floor(c/this.__indent_size),c-=o*this.__indent_size,i=new Array(o+1).join(this.__indent_string)),c&&(i+=new Array(c+1).join(" ")),this.__cache.push(i)};function u(c,o){this.__indent_cache=new n(c,o),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(c,o){return this.__indent_cache.get_indent_string(c,o)},u.prototype.get_indent_size=function(c,o){return this.__indent_cache.get_indent_size(c,o)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(c){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===` `&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(` `);return c!==` `&&(i=i.replace(/[\n]/g,c)),i},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(c,o){return c=c||0,o=o||0,this.next_line.set_indent(c,o),this.__lines.length>1?(this.current_line.set_indent(c,o),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(c){for(var o=0;o1&&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},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(c,o){for(var i=this.__lines.length-2;i>=0;){var d=this.__lines[i];if(d.is_empty())break;if(d.item(0).indexOf(c)!==0&&d.item(-1)!==o){this.__lines.splice(i+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},T.exports.Output=u},,,,function(T){function E(c,o){this.raw_options=n(c,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(c,o){var i=this.raw_options[c],d=o||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(d=i.concat()):typeof i=="string"&&(d=i.split(/[^a-zA-Z0-9_\/\-]+/)),d},E.prototype._get_boolean=function(c,o){var i=this.raw_options[c],d=i===void 0?!!o:!!i;return d},E.prototype._get_characters=function(c,o){var i=this.raw_options[c],d=o||"";return typeof i=="string"&&(d=i.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),d},E.prototype._get_number=function(c,o){var i=this.raw_options[c];o=parseInt(o,10),isNaN(o)&&(o=0);var d=parseInt(i,10);return isNaN(d)&&(d=o),d},E.prototype._get_selection=function(c,o,i){var d=this._get_selection_list(c,o,i);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values: `+o+` You passed in: '`+this.raw_options[c]+"'");return d[0]},E.prototype._get_selection_list=function(c,o,i){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[o[0]],!this._is_valid_selection(i,o))throw new Error("Invalid Default Value!");var d=this._get_array(c,i);if(!this._is_valid_selection(d,o))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values: `+o+` You passed in: '`+this.raw_options[c]+"'");return d},E.prototype._is_valid_selection=function(c,o){return c.length&&o.length&&!c.some(function(i){return o.indexOf(i)===-1})};function n(c,o){var i={};c=u(c);var d;for(d in c)d!==o&&(i[d]=c[d]);if(o&&c[o])for(d in c[o])i[d]=c[o][d];return i}function u(c){var o={},i;for(i in c){var d=i.replace(/-/g,"_");o[d]=c[i]}return o}T.exports.Options=E,T.exports.normalizeOpts=u,T.exports.mergeOpts=n},,function(T){var E=RegExp.prototype.hasOwnProperty("sticky");function n(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&u=0&&c=u.length&&this.__input.substring(c-u.length,c).toLowerCase()===u},T.exports.InputScanner=n},,,,,function(T){function E(n,u){n=typeof n=="string"?n:n.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+u,"g")}E.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(n);c;)u[c[1]]=c[2],c=this.__directive_pattern.exec(n);return u},E.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},T.exports.Directives=E},,function(T,E,n){var u=n(16).Beautifier,c=n(17).Options;function o(i,d){var s=new u(i,d);return s.beautify()}T.exports=o,T.exports.defaultOptions=function(){return new c}},function(T,E,n){var u=n(17).Options,c=n(2).Output,o=n(8).InputScanner,i=n(13).Directives,d=new i(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,a=/\s/,p=/(?:\s|\n)+/g,w=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,S=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function x(L,b){this._source_text=L||"",this._options=new u(b),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}x.prototype.eatString=function(L){var b="";for(this._ch=this._input.next();this._ch;){if(b+=this._ch,this._ch==="\\")b+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return b},x.prototype.eatWhitespace=function(L){for(var b=a.test(this._input.peek()),h=0;a.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===` `&&((h===0||h0&&this._indentLevel--},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,b=this._options.eol;b==="auto"&&(b=` `,L&&s.test(L||"")&&(b=L.match(s)[0])),L=L.replace(A,` `);var h=L.match(/^[\t ]*/)[0];this._output=new c(this._options,h),this._input=new o(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r=0,l=!1,f=!1,C=!1,g=!1,m=!1,F=!1,P=this._ch,z=!1,Z,V,M;Z=this._input.read(p),V=Z!=="",M=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var J=this._input.read(w),X=d.get_directives(J);X&&X.ignore==="start"&&(J+=d.readIgnored(this._input)),this.print_string(J),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(S)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(V),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?g=!0:re==="import"&&(m=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!l&&r===0&&re.indexOf(":")!==-1&&(f=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(V),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")f&&(f=!1,this.outdent()),C?(C=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),m=!1,g=!1,f&&(this.outdent(),f=!1),this.print_string(this._ch),l=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var se=0;se"||this._ch==="+"||this._ch==="~")&&!f&&r===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(V),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var we=M==='"'||M==="'";this.preserveSingleSpace(we||V),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&z&&this._output.add_new_line()}var Re=this._output.get_code(b);return Re},T.exports.Beautifier=x},function(T,E,n){var u=n(6).Options;function c(o){u.call(this,o,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;sD&&(u=v+T,v*=D/u,T*=D/u),E+n>D&&(u=E+n,E*=D/u,n*=D/u),T+E>B&&(u=T+E,T*=B/u,E*=B/u),v+n>B&&(u=v+n,v*=B/u,n*=B/u),q.moveTo(O+v,j),q.lineTo(O+D-T,j),T!==0&&q.arc(O+D-T,j+T,T,-Math.PI/2,0),q.lineTo(O+D,j+B-E),E!==0&&q.arc(O+D-E,j+B-E,E,0,Math.PI/2),q.lineTo(O+n,j+B),n!==0&&q.arc(O+n,j+B-n,n,Math.PI/2,Math.PI),q.lineTo(O,j+v),v!==0&&q.arc(O+v,j+v,v,Math.PI,Math.PI*1.5)}pe.buildPath=G},"VrN/":function(qe,pe,G){(function(q,Q){qe.exports=Q()})(this,function(){"use strict";var q=navigator.userAgent,Q=navigator.platform,O=/gecko\/\d/i.test(q),j=/MSIE \d/.test(q),D=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q),B=/Edge\/(\d+)/.exec(q),I=j||D||B,v=I&&(j?document.documentMode||6:+(B||D)[1]),T=!B&&/WebKit\//.test(q),E=T&&/Qt\/\d+\.\d+/.test(q),n=!B&&/Chrome\//.test(q),u=/Opera\//.test(q),c=/Apple Computer/.test(navigator.vendor),o=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(q),i=/PhantomJS/.test(q),d=!B&&/AppleWebKit/.test(q)&&/Mobile\/\w+/.test(q),s=/Android/.test(q),A=d||s||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(q),a=d||/Mac/.test(Q),p=/\bCrOS\b/.test(q),w=/win/i.test(Q),S=u&&q.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(u=!1,T=!0);var x=a&&(E||u&&(S==null||S<12.11)),L=O||I&&v>=9;function b(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var h=function(e,t){var _=e.className,y=b(t).exec(_);if(y){var R=_.slice(y.index+y[0].length);e.className=_.slice(0,y.index)+(R?y[1]+R:"")}};function r(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function l(e,t){return r(e).appendChild(t)}function f(e,t,_,y){var R=document.createElement(e);if(_&&(R.className=_),y&&(R.style.cssText=y),typeof t=="string")R.appendChild(document.createTextNode(t));else if(t)for(var Y=0;Y=t)return ie+(t-Y);ie+=ue-Y,ie+=_-ie%_,Y=ue+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,t){this.f=t;var _=+new Date+e;(!this.id||_=t)return y+Math.min(ie,t-R);if(R+=Y-y,R+=_-R%_,y=Y+1,R>=t)return y}}var Se=[""];function Te(e){for(;Se.length<=e;)Se.push($e(Se)+" ");return Se[e]}function $e(e){return e[e.length-1]}function bt(e,t){for(var _=[],y=0;y"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ae.test(e))}function ae(e,t){return t?t.source.indexOf("\\w")>-1&&ne(e)?!0:t.test(e):ne(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Fe(e){return e.charCodeAt(0)>=768&&xe.test(e)}function ke(e,t,_){for(;(_<0?t>0:t_?-1:1;;){if(t==_)return t;var R=(t+_)/2,Y=y<0?Math.ceil(R):Math.floor(R);if(Y==t)return e(Y)?t:_;e(Y)?_=Y:t=Y+y}}function ft(e,t,_,y){if(!e)return y(t,_,"ltr",0);for(var R=!1,Y=0;Yt||t==_&&ie.to==t)&&(y(Math.max(ie.from,t),Math.min(ie.to,_),ie.level==1?"rtl":"ltr",Y),R=!0)}R||y(t,_,"ltr")}var yt=null;function Et(e,t,_){var y;yt=null;for(var R=0;Rt)return R;Y.to==t&&(Y.from!=Y.to&&_=="before"?y=R:yt=R),Y.from==t&&(Y.from!=Y.to&&_!="before"?y=R:yt=R)}return y!=null?y:yt}var Ot=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function _(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?t.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var y=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,R=/[stwN]/,Y=/[LRr]/,ie=/[Lb1n]/,ue=/[1n]/;function de(ve,Ve,Je){this.level=ve,this.from=Ve,this.to=Je}return function(ve,Ve){var Je=Ve=="ltr"?"L":"R";if(ve.length==0||Ve=="ltr"&&!y.test(ve))return!1;for(var gt=ve.length,At=[],Ft=0;Ft-1&&(y[t]=R.slice(0,Y).concat(R.slice(Y+1)))}}}function Ye(e,t){var _=lt(e,t);if(!_.length)return;for(var y=Array.prototype.slice.call(arguments,2),R=0;R<_.length;++R)_[R].apply(null,y)}function st(e,t,_){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,_||t.type,e,t),Ee(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var _=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),y=0;y0}function Me(e){e.prototype.on=function(t,_){Ne(this,t,_)},e.prototype.off=function(t,_){dt(this,t,_)}}function me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){me(e),ye(e)}function De(e){return e.target||e.srcElement}function Ze(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),a&&e.ctrlKey&&t==1&&(t=3),t}var ht=function(){if(I&&v<9)return!1;var e=f("div");return"draggable"in e||"dragDrop"in e}(),Tt;function kt(e){if(Tt==null){var t=f("span","\u200B");l(e,f("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(I&&v<8))}var _=Tt?f("span","\u200B"):f("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return _.setAttribute("cm-text",""),_}var It;function St(e){if(It!=null)return It;var t=l(e,document.createTextNode("A\u062EA")),_=g(t,0,1).getBoundingClientRect(),y=g(t,1,2).getBoundingClientRect();return r(e),!_||_.left==_.right?!1:It=y.right-_.right<3}var ut=` b`.split(/\n/).length!=3?function(e){for(var t=0,_=[],y=e.length;t<=y;){var R=e.indexOf(` `,t);R==-1&&(R=e.length);var Y=e.slice(t,e.charAt(R-1)=="\r"?R-1:R),ie=Y.indexOf("\r");ie!=-1?(_.push(Y.slice(0,ie)),t+=ie+1):(_.push(Y),t=R+1)}return _}:function(e){return e.split(/\r\n?|\n/)},nt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(_){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},tt=function(){var e=f("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ce=null;function Pe(e){if(Ce!=null)return Ce;var t=l(e,f("span","x")),_=t.getBoundingClientRect(),y=g(t,0,1).getBoundingClientRect();return Ce=Math.abs(_.left-y.left)>1}var pt={},it={};function xt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),pt[e]=t}function _t(e,t){it[e]=t}function Xe(e){if(typeof e=="string"&&it.hasOwnProperty(e))e=it[e];else if(e&&typeof e.name=="string"&&it.hasOwnProperty(e.name)){var t=it[e.name];typeof t=="string"&&(t={name:t}),e=at(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function mt(e,t){t=Xe(t);var _=pt[t.name];if(!_)return mt(e,"text/plain");var y=_(e,t);if(Pt.hasOwnProperty(t.name)){var R=Pt[t.name];for(var Y in R){if(!R.hasOwnProperty(Y))continue;y.hasOwnProperty(Y)&&(y["_"+Y]=y[Y]),y[Y]=R[Y]}}if(y.name=t.name,t.helperType&&(y.helperType=t.helperType),t.modeProps)for(var ie in t.modeProps)y[ie]=t.modeProps[ie];return y}var Pt={};function Rt(e,t){var _=Pt.hasOwnProperty(e)?Pt[e]:Pt[e]={};M(t,_)}function Qt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var _={};for(var y in t){var R=t[y];R instanceof Array&&(R=R.concat([])),_[y]=R}return _}function Ir(e,t){for(var _;e.innerMode&&!(_=e.innerMode(t),!_||_.mode==e);)t=_.state,e=_.mode;return _||{mode:e,state:t}}function Fr(e,t,_){return e.startState?e.startState(t,_):!0}var wr=function(e,t,_){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=_};wr.prototype.eol=function(){return this.pos>=this.string.length},wr.prototype.sol=function(){return this.pos==this.lineStart},wr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},wr.prototype.next=function(){if(this.post},wr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},wr.prototype.skipToEnd=function(){this.pos=this.string.length},wr.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},wr.prototype.backUp=function(e){this.pos-=e},wr.prototype.column=function(){return this.lastColumnPos0?null:(Y&&t!==!1&&(this.pos+=Y[0].length),Y)}},wr.prototype.current=function(){return this.string.slice(this.start,this.pos)},wr.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},wr.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},wr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Kt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var _=e;!_.lines;)for(var y=0;;++y){var R=_.children[y],Y=R.chunkSize();if(t=e.first&&t_?fe(_,Kt(e,_).text.length):N(t,Kt(e,t.line).text.length)}function N(e,t){var _=e.ch;return _==null||_>t?fe(e.line,t):_<0?fe(e.line,0):e}function $(e,t){for(var _=[],y=0;ythis.maxLookAhead&&(this.maxLookAhead=e),t},te.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},te.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},te.fromSaved=function(e,t,_){return t instanceof le?new te(e,Qt(e.mode,t.state),_,t.lookAhead):new te(e,Qt(e.mode,t),_)},te.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new le(t,this.maxLookAhead):t};function Ke(e,t,_,y){var R=[e.state.modeGen],Y={};Br(e,t.text,e.doc.mode,_,function(ve,Ve){return R.push(ve,Ve)},Y,y);for(var ie=_.state,ue=function(ve){_.baseTokens=R;var Ve=e.state.overlays[ve],Je=1,gt=0;_.state=!0,Br(e,t.text,Ve.mode,_,function(At,Ft){for(var Nt=Je;gtAt&&R.splice(Je,1,At,R[Je+1],jt),Je+=2,gt=Math.min(At,jt)}if(!Ft)return;if(Ve.opaque)R.splice(Nt,Je-Nt,At,"overlay "+Ft),Je=Nt+2;else for(;Nte.options.maxHighlightLength&&Qt(e.doc.mode,y.state),Y=Ke(e,t,y);R&&(y.state=R),t.stateAfter=y.save(!R),t.styles=Y.styles,Y.classes?t.styleClasses=Y.classes:t.styleClasses&&(t.styleClasses=null),_===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ut(e,t,_){var y=e.doc,R=e.display;if(!y.mode.startState)return new te(y,!0,t);var Y=yr(e,t,_),ie=Y>y.first&&Kt(y,Y-1).stateAfter,ue=ie?te.fromSaved(y,ie,Y):new te(y,Fr(y.mode),Y);return y.iter(Y,t,function(de){Ht(e,de.text,ue);var ve=ue.line;de.stateAfter=ve==t-1||ve%5==0||ve>=R.viewFrom&&vet.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var Xt=function(e,t,_){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=_};function qt(e,t,_,y){var R=e.doc,Y=R.mode,ie;t=U(R,t);var ue=Kt(R,t.line),de=Ut(e,t.line,_),ve=new wr(ue.text,e.options.tabSize,de),Ve;for(y&&(Ve=[]);(y||ve.pose.options.maxHighlightLength?(ue=!1,ie&&Ht(e,t,y,Ve.pos),Ve.pos=t.length,Je=null):Je=Ar(Yt(_,Ve,y.state,gt),Y),gt){var At=gt[0].name;At&&(Je="m-"+(Je?At+" "+Je:At))}if(!ue||ve!=Je){for(;deie;--ue){if(ue<=Y.first)return Y.first;var de=Kt(Y,ue-1),ve=de.stateAfter;if(ve&&(!_||ue+(ve instanceof le?ve.lookAhead:0)<=Y.modeFrontier))return ue;var Ve=J(de.text,null,e.options.tabSize);(R==null||y>Ve)&&(R=ue-1,y=Ve)}return R}function Lr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier_;y--){var R=Kt(e,y).stateAfter;if(R&&(!(R instanceof le)||y+R.lookAhead=t:Y.to>t);(y||(y=[])).push(new zr(ie,Y.from,de?null:Y.to))}}return y}function an(e,t,_){var y;if(e)for(var R=0;R=t:Y.to>t);if(ue||Y.from==t&&ie.type=="bookmark"&&(!_||Y.marker.insertLeft)){var de=Y.from==null||(ie.inclusiveLeft?Y.from<=t:Y.from0&&ue)for(var ir=0;ir0)continue;var Ve=[de,1],Je=be(ve.from,ue.from),gt=be(ve.to,ue.to);(Je<0||!ie.inclusiveLeft&&!Je)&&Ve.push({from:ve.from,to:ue.from}),(gt>0||!ie.inclusiveRight&&!gt)&&Ve.push({from:ue.to,to:ve.to}),R.splice.apply(R,Ve),de+=Ve.length-3}return R}function dr(e){var t=e.markedSpans;if(!t)return;for(var _=0;_t)&&(!y||vr(y,Y.marker)<0)&&(y=Y.marker)}return y}function Gr(e,t,_,y,R){var Y=Kt(e,t),ie=Dr&&Y.markedSpans;if(ie)for(var ue=0;ue=0&&Je<=0||Ve<=0&&Je>=0)continue;if(Ve<=0&&(de.marker.inclusiveRight&&R.inclusiveLeft?be(ve.to,_)>=0:be(ve.to,_)>0)||Ve>=0&&(de.marker.inclusiveRight&&R.inclusiveLeft?be(ve.from,y)<=0:be(ve.from,y)<0))return!0}}function En(e){for(var t;t=xr(e);)e=t.find(-1,!0).line;return e}function Qn(e){for(var t;t=Er(e);)e=t.find(1,!0).line;return e}function wn(e){for(var t,_;t=Er(e);)e=t.find(1,!0).line,(_||(_=[])).push(e);return _}function qr(e,t){var _=Kt(e,t),y=En(_);return _==y?t:pr(y)}function Ln(e,t){if(t>e.lastLine())return t;var _=Kt(e,t),y;if(!In(e,_))return t;for(;y=Er(_);)_=y.find(1,!0).line;return pr(_)+1}function In(e,t){var _=Dr&&t.markedSpans;if(_)for(var y=void 0,R=0;R<_.length;++R){if(y=_[R],!y.marker.collapsed)continue;if(y.from==null)return!0;if(y.marker.widgetNode)continue;if(y.from==0&&y.marker.inclusiveLeft&&Jn(e,t,y))return!0}}function Jn(e,t,_){if(_.to==null){var y=_.marker.find(1,!0);return Jn(e,y.line,Jr(y.line.markedSpans,_.marker))}if(_.marker.inclusiveRight&&_.to==t.text.length)return!0;for(var R=void 0,Y=0;Yt.maxLineLength&&(t.maxLineLength=R,t.maxLine=y)})}var gn=function(e,t,_){this.text=e,tr(this,t),this.height=_?_(this):1};gn.prototype.lineNo=function(){return pr(this)},Me(gn);function kn(e,t,_,y){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dr(e),tr(e,_);var R=y?y(e):1;R!=e.height&&Rr(e,R)}function er(e){e.parent=null,dr(e)}var hr={},Jt={};function gr(e,t){if(!e||/^\s*$/.test(e))return null;var _=t.addModeClass?Jt:hr;return _[e]||(_[e]=e.replace(/\S+/g,"cm-$&"))}function Tr(e,t){var _=C("span",null,null,T?"padding-right: .1px":null),y={pre:C("pre",[_],"CodeMirror-line"),content:_,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var R=0;R<=(t.rest?t.rest.length:0);R++){var Y=R?t.rest[R-1]:t.line,ie=void 0;y.pos=0,y.addToken=Cr,St(e.display.measure)&&(ie=Mt(Y,e.doc.direction))&&(y.addToken=Dn(y.addToken,ie)),y.map=[];var ue=t!=e.display.externalMeasured&&pr(Y);li(Y,y,Ct(e,Y,ue)),Y.styleClasses&&(Y.styleClasses.bgClass&&(y.bgClass=z(Y.styleClasses.bgClass,y.bgClass||"")),Y.styleClasses.textClass&&(y.textClass=z(Y.styleClasses.textClass,y.textClass||""))),y.map.length==0&&y.map.push(0,0,y.content.appendChild(kt(e.display.measure))),R==0?(t.measure.map=y.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(y.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(T){var de=y.content.lastChild;(/\bcm-tab\b/.test(de.className)||de.querySelector&&de.querySelector(".cm-tab"))&&(y.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,y.pre),y.pre.className&&(y.textClass=z(y.pre.className,y.textClass||"")),y}function Xr(e){var t=f("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Cr(e,t,_,y,R,Y,ie){if(!t)return;var ue=e.splitSpaces?on(t,e.trailingSpace):t,de=e.cm.state.specialChars,ve=!1,Ve;if(!de.test(t))e.col+=t.length,Ve=document.createTextNode(ue),e.map.push(e.pos,e.pos+t.length,Ve),I&&v<9&&(ve=!0),e.pos+=t.length;else{Ve=document.createDocumentFragment();for(var Je=0;;){de.lastIndex=Je;var gt=de.exec(t),At=gt?gt.index-Je:t.length-Je;if(At){var Ft=document.createTextNode(ue.slice(Je,Je+At));I&&v<9?Ve.appendChild(f("span",[Ft])):Ve.appendChild(Ft),e.map.push(e.pos,e.pos+At,Ft),e.col+=At,e.pos+=At}if(!gt)break;Je+=At+1;var Nt=void 0;if(gt[0]==" "){var jt=e.cm.options.tabSize,Gt=jt-e.col%jt;Nt=Ve.appendChild(f("span",Te(Gt),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),e.col+=Gt}else gt[0]=="\r"||gt[0]==` `?(Nt=Ve.appendChild(f("span",gt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",gt[0]),e.col+=1):(Nt=e.cm.options.specialCharPlaceholder(gt[0]),Nt.setAttribute("cm-text",gt[0]),I&&v<9?Ve.appendChild(f("span",[Nt])):Ve.appendChild(Nt),e.col+=1);e.map.push(e.pos,e.pos+1,Nt),e.pos++}}if(e.trailingSpace=ue.charCodeAt(t.length-1)==32,_||y||R||ve||Y||ie){var Zt=_||"";y&&(Zt+=y),R&&(Zt+=R);var Vt=f("span",[Ve],Zt,Y);if(ie)for(var ir in ie)ie.hasOwnProperty(ir)&&ir!="style"&&ir!="class"&&Vt.setAttribute(ir,ie[ir]);return e.content.appendChild(Vt)}e.content.appendChild(Ve)}function on(e,t){if(e.length>1&&!/ /.test(e))return e;for(var _=t,y="",R=0;Rve&&Je.from<=ve);gt++);if(Je.to>=Ve)return e(_,y,R,Y,ie,ue,de);e(_,y.slice(0,Je.to-ve),R,Y,null,ue,de),Y=null,y=y.slice(Je.to-ve),ve=Je.to}}}function Mr(e,t,_,y){var R=!y&&_.widgetNode;R&&e.map.push(e.pos,e.pos+t,R),!y&&e.cm.display.input.needsContentAttribute&&(R||(R=e.content.appendChild(document.createElement("span"))),R.setAttribute("cm-marker",_.id)),R&&(e.cm.display.input.setUneditable(R),e.content.appendChild(R)),e.pos+=t,e.trailingSpace=!1}function li(e,t,_){var y=e.markedSpans,R=e.text,Y=0;if(!y){for(var ie=1;ie<_.length;ie+=2)t.addToken(t,R.slice(Y,Y=_[ie]),gr(_[ie+1],t.cm.options));return}for(var ue=R.length,de=0,ve=1,Ve="",Je,gt,At=0,Ft,Nt,jt,Gt,Zt;;){if(At==de){Ft=Nt=jt=gt="",Zt=null,Gt=null,At=Infinity;for(var Vt=[],ir=void 0,_r=0;_rde||kr.collapsed&&fr.to==de&&fr.from==de)){if(fr.to!=null&&fr.to!=de&&At>fr.to&&(At=fr.to,Nt=""),kr.className&&(Ft+=" "+kr.className),kr.css&&(gt=(gt?gt+";":"")+kr.css),kr.startStyle&&fr.from==de&&(jt+=" "+kr.startStyle),kr.endStyle&&fr.to==At&&(ir||(ir=[])).push(kr.endStyle,fr.to),kr.title&&((Zt||(Zt={})).title=kr.title),kr.attributes)for(var yn in kr.attributes)(Zt||(Zt={}))[yn]=kr.attributes[yn];kr.collapsed&&(!Gt||vr(Gt.marker,kr)<0)&&(Gt=fr)}else fr.from>de&&At>fr.from&&(At=fr.from)}if(ir)for(var Gn=0;Gn=ue)break;for(var hi=Math.min(ue,At);;){if(Ve){var qn=de+Ve.length;if(!Gt){var Mn=qn>hi?Ve.slice(0,hi-de):Ve;t.addToken(t,Mn,Je?Je+Ft:Ft,jt,de+Mn.length==At?Nt:"",gt,Zt)}if(qn>=hi){Ve=Ve.slice(hi-de),de=hi;break}de=qn,jt=""}Ve=R.slice(Y,Y=_[ve++]),Je=gr(_[ve++],t.cm.options)}}}function Nr(e,t,_){this.line=t,this.rest=wn(t),this.size=this.rest?pr($e(this.rest))-_+1:1,this.node=this.text=null,this.hidden=In(e,t)}function jn(e,t,_){for(var y=[],R,Y=t;Y<_;Y=R){var ie=new Nr(e.doc,Kt(e.doc,Y),Y);R=Y+ie.size,y.push(ie)}return y}var Kn=null;function ui(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function ds(e){var t=e.delayedCallbacks,_=0;do{for(;_2&&Y.push((de.bottom+ve.top)/2-_.top)}}Y.push(_.bottom-_.top)}}function Xn(e,t,_){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var y=0;y_)return{map:e.measure.maps[R],cache:e.measure.caches[R],before:!0}}function ps(e,t){t=En(t);var _=pr(t),y=e.display.externalMeasured=new Nr(e.doc,t,_);y.lineN=_;var R=y.built=Tr(e,y);return y.text=R.pre,l(e.display.lineMeasure,R.pre),y}function Ui(e,t,_,y){return Ti(e,nn(e,t),_,y)}function Aa(e,t){if(t>=e.display.viewFrom&&t=_.lineN&&t<_.lineN+_.size)return _}function nn(e,t){var _=pr(t),y=Aa(e,_);y&&!y.text?y=null:y&&y.changes&&(Gi(e,y,_,bs(e)),e.curOp.forceUpdate=!0),y||(y=ps(e,t));var R=Xn(y,t,_);return{line:t,view:y,rect:null,map:R.map,cache:R.cache,before:R.before,hasHeights:!1}}function Ti(e,t,_,y,R){t.before&&(_=-1);var Y=_+(y||""),ie;return t.cache.hasOwnProperty(Y)?ie=t.cache[Y]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(al(e,t.view,t.rect),t.hasHeights=!0),ie=Do(e,t,_,y),ie.bogus||(t.cache[Y]=ie)),{left:ie.left,right:ie.right,top:R?ie.rtop:ie.top,bottom:R?ie.rbottom:ie.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,t,_){for(var y,R,Y,ie,ue,de,ve=0;vet)&&(Y=de-ue,R=Y-1,t>=de&&(ie="right")),R!=null){if(y=e[ve+2],ue==de&&_==(y.insertLeft?"left":"right")&&(ie=_),_=="left"&&R==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)y=e[(ve-=3)+2],ie="left";if(_=="right"&&R==de-ue)for(;ve=0&&!((_=e[R]).left!=_.right);R--);return _}function Do(e,t,_,y){var R=gs(t.map,_,y),Y=R.node,ie=R.start,ue=R.end,de=R.collapse,ve;if(Y.nodeType==3){for(var Ve=0;Ve<4;Ve++){for(;ie&&Fe(t.line.text.charAt(R.coverStart+ie));)--ie;for(;R.coverStart+ue0&&(de=y="right");var Je;e.options.lineWrapping&&(Je=Y.getClientRects()).length>1?ve=Je[y=="right"?Je.length-1:0]:ve=Y.getBoundingClientRect()}if(I&&v<9&&!ie&&(!ve||!ve.left&&!ve.right)){var gt=Y.parentNode.getClientRects()[0];gt?ve={left:gt.left,right:gt.left+Ia(e.display),top:gt.top,bottom:gt.bottom}:ve=ms}for(var At=ve.top-t.rect.top,Ft=ve.bottom-t.rect.top,Nt=(At+Ft)/2,jt=t.view.measure.heights,Gt=0;Gt=y.text.length?(de=y.text.length,ve="before"):de<=0&&(de=0,ve="after"),!ue)return ie(ve=="before"?de-1:de,ve=="before");function Ve(Ft,Nt,jt){var Gt=ue[Nt],Zt=Gt.level==1;return ie(jt?Ft-1:Ft,Zt!=jt)}var Je=Et(ue,de,ve),gt=yt,At=Ve(de,Je,ve=="before");return gt!=null&&(At.other=Ve(de,gt,ve!="before")),At}function ll(e,t){var _=0;t=U(e.doc,t),e.options.lineWrapping||(_=Ia(e.display)*t.ch);var y=Kt(e.doc,t.line),R=Fn(y)+$a(e.display);return{left:_,right:_,top:R,bottom:R+y.height}}function ca(e,t,_,y,R){var Y=fe(e,t,_);return Y.xRel=R,y&&(Y.outside=y),Y}function Si(e,t,_){var y=e.doc;if(_+=e.display.viewOffset,_<0)return ca(y.first,0,null,-1,-1);var R=Or(y,_),Y=y.first+y.size-1;if(R>Y)return ca(y.first+y.size-1,Kt(y,Y).text.length,null,1,1);t<0&&(t=0);for(var ie=Kt(y,R);;){var ue=cl(e,ie,R,t,_),de=On(ie,ue.ch+(ue.xRel>0||ue.outside>0?1:0));if(!de)return ue;var ve=de.find(1);if(ve.line==R)return ve;ie=Kt(y,R=ve.line)}}function ul(e,t,_,y){y-=Ri(t);var R=t.text.length,Y=ct(function(ie){return Ti(e,_,ie-1).bottom<=y},R,0);return R=ct(function(ie){return Ti(e,_,ie).top>y},Y,R),{begin:Y,end:R}}function Al(e,t,_,y){_||(_=nn(e,t));var R=qa(e,t,Ti(e,_,y),"line").top;return ul(e,t,_,R)}function Oa(e,t,_,y){return e.bottom<=_?!1:e.top>_?!0:(y?e.left:e.right)>t}function cl(e,t,_,y,R){R-=Fn(t);var Y=nn(e,t),ie=Ri(t),ue=0,de=t.text.length,ve=!0,Ve=Mt(t,e.doc.direction);if(Ve){var Je=(e.options.lineWrapping?yu:vu)(e,t,_,Y,Ve,y,R);ve=Je.level!=1,ue=ve?Je.from:Je.to-1,de=ve?Je.to:Je.from-1}var gt=null,At=null,Ft=ct(function(_r){var fr=Ti(e,Y,_r);return fr.top+=ie,fr.bottom+=ie,Oa(fr,y,R,!1)?(fr.top<=R&&fr.left<=y&&(gt=_r,At=fr),!0):!1},ue,de),Nt,jt,Gt=!1;if(At){var Zt=y-At.left=ir.bottom?1:0}return Ft=ke(t.text,Ft,1),ca(_,Ft,jt,Gt,y-Nt)}function vu(e,t,_,y,R,Y,ie){var ue=ct(function(Je){var gt=R[Je],At=gt.level!=1;return Oa(Ei(e,fe(_,At?gt.to:gt.from,At?"before":"after"),"line",t,y),Y,ie,!0)},0,R.length-1),de=R[ue];if(ue>0){var ve=de.level!=1,Ve=Ei(e,fe(_,ve?de.from:de.to,ve?"after":"before"),"line",t,y);Oa(Ve,Y,ie,!0)&&Ve.top>ie&&(de=R[ue-1])}return de}function yu(e,t,_,y,R,Y,ie){var ue=ul(e,t,y,ie),de=ue.begin,ve=ue.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var Ve=null,Je=null,gt=0;gt=ve||At.to<=de)continue;var Ft=At.level!=1,Nt=Ti(e,y,Ft?Math.min(ve,At.to)-1:Math.max(de,At.from)).right,jt=Ntjt)&&(Ve=At,Je=jt)}return Ve||(Ve=R[R.length-1]),Ve.fromve&&(Ve={from:Ve.from,to:ve,level:Ve.level}),Ve}var Zn;function da(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Zn==null){Zn=f("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Zn.appendChild(document.createTextNode("x")),Zn.appendChild(f("br"));Zn.appendChild(document.createTextNode("x"))}l(e.measure,Zn);var _=Zn.offsetHeight/50;return _>3&&(e.cachedTextHeight=_),r(e.measure),_||1}function Ia(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=f("span","xxxxxxxxxx"),_=f("pre",[t],"CodeMirror-line-like");l(e.measure,_);var y=t.getBoundingClientRect(),R=(y.right-y.left)/10;return R>2&&(e.cachedCharWidth=R),R||10}function bs(e){for(var t=e.display,_={},y={},R=t.gutters.clientLeft,Y=t.gutters.firstChild,ie=0;Y;Y=Y.nextSibling,++ie){var ue=e.display.gutterSpecs[ie].className;_[ue]=Y.offsetLeft+Y.clientLeft+R,y[ue]=Y.clientWidth}return{fixedPos:Ra(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:_,gutterWidth:y,wrapperWidth:t.wrapper.clientWidth}}function Ra(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dl(e){var t=da(e.display),_=e.options.lineWrapping,y=_&&Math.max(5,e.display.scroller.clientWidth/Ia(e.display)-3);return function(R){if(In(e.doc,R))return 0;var Y=0;if(R.widgets)for(var ie=0;ie0&&(ve=Kt(e.doc,de.line).text).length==de.ch){var Ve=J(ve,ve.length,e.options.tabSize)-ve.length;de=fe(de.line,Math.max(0,Math.round((Y-xi(e.display).left)/Ia(e.display))-Ve))}return de}function Ji(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var _=e.display.view,y=0;y<_.length;y++)if(t-=_[y].size,t<0)return y}function ti(e,t,_,y){t==null&&(t=e.doc.first),_==null&&(_=e.doc.first+e.doc.size),y||(y=0);var R=e.display;if(y&&_t)&&(R.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=R.viewTo)Dr&&qr(e.doc,t)R.viewFrom?Ni(e):(R.viewFrom+=y,R.viewTo+=y);else if(t<=R.viewFrom&&_>=R.viewTo)Ni(e);else if(t<=R.viewFrom){var Y=to(e,_,_+y,1);Y?(R.view=R.view.slice(Y.index),R.viewFrom=Y.lineN,R.viewTo+=y):Ni(e)}else if(_>=R.viewTo){var ie=to(e,t,t,-1);ie?(R.view=R.view.slice(0,ie.index),R.viewTo=ie.lineN):Ni(e)}else{var ue=to(e,t,t,-1),de=to(e,_,_+y,1);ue&&de?(R.view=R.view.slice(0,ue.index).concat(jn(e,ue.lineN,de.lineN)).concat(R.view.slice(de.index)),R.viewTo+=y):Ni(e)}var ve=R.externalMeasured;ve&&(_=R.lineN&&t=y.viewTo)return;var Y=y.view[Ji(e,t)];if(Y.node==null)return;var ie=Y.changes||(Y.changes=[]);re(ie,_)==-1&&ie.push(_)}function Ni(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function to(e,t,_,y){var R=Ji(e,t),Y,ie=e.display.view;if(!Dr||_==e.doc.first+e.doc.size)return{index:R,lineN:_};for(var ue=e.display.viewFrom,de=0;de0){if(R==ie.length-1)return null;Y=ue+ie[R].size-t,R++}else Y=ue-t;t+=Y,_+=Y}for(;qr(e.doc,_)!=_;){if(R==(y<0?0:ie.length-1))return null;_+=y*ie[R-(y<0?1:0)].size,R+=y}return{index:R,lineN:_}}function hl(e,t,_){var y=e.display,R=y.view;R.length==0||t>=y.viewTo||_<=y.viewFrom?(y.view=jn(e,t,_),y.viewFrom=t):(y.viewFrom>t?y.view=jn(e,t,y.viewFrom).concat(y.view):y.viewFrom_&&(y.view=y.view.slice(0,Ji(e,_)))),y.viewTo=_}function fl(e){for(var t=e.display.view,_=0,y=0;y=e.display.viewTo||ue.to().line0?t.blinker=setInterval(function(){e.hasFocus()||Da(e),t.cursorDiv.style.visibility=(_=!_)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function gl(e){e.state.focused||(e.display.input.focus(),Es(e))}function vl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Da(e))},100)}function Es(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),T&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fo(e)}function Da(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,h(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Uo(e){for(var t=e.display,_=t.lineDiv.offsetTop,y=0;y.005||Ve<-.005)&&(Rr(R.line,ie),ha(R.line),R.rest))for(var Je=0;Jee.display.sizerWidth){var gt=Math.ceil(ue/Ia(e.display));gt>e.display.maxLineLength&&(e.display.maxLineLength=gt,e.display.maxLine=R.line,e.display.maxLineChanged=!0)}}}function ha(e){if(e.widgets)for(var t=0;t=ie&&(Y=Or(t,Fn(Kt(t,de))-e.wrapper.clientHeight),ie=de)}return{from:Y,to:Math.max(ie,Y+1)}}function Eu(e,t){if(st(e,"scrollCursorIntoView"))return;var _=e.display,y=_.sizer.getBoundingClientRect(),R=null;if(t.top+y.top<0?R=!0:t.bottom+y.top>(window.innerHeight||document.documentElement.clientHeight)&&(R=!1),R!=null&&!i){var Y=f("div","\u200B",null,`position: absolute; top: `+(t.top-_.viewOffset-$a(e.display))+`px; height: `+(t.bottom-t.top+Ii(e)+_.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(R),e.display.lineSpace.removeChild(Y)}}function Po(e,t,_,y){y==null&&(y=0);var R;!e.options.lineWrapping&&t==_&&(t=t.ch?fe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,_=t.sticky=="before"?fe(t.line,t.ch+1,"before"):t);for(var Y=0;Y<5;Y++){var ie=!1,ue=Ei(e,t),de=!_||_==t?ue:Ei(e,_);R={left:Math.min(ue.left,de.left),top:Math.min(ue.top,de.top)-y,right:Math.max(ue.left,de.left),bottom:Math.max(ue.bottom,de.bottom)+y};var ve=_s(e,R),Ve=e.doc.scrollTop,Je=e.doc.scrollLeft;if(ve.scrollTop!=null&&(ro(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Ve)>1&&(ie=!0)),ve.scrollLeft!=null&&(fa(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Je)>1&&(ie=!0)),!ie)break}return R}function _u(e,t){var _=_s(e,t);_.scrollTop!=null&&ro(e,_.scrollTop),_.scrollLeft!=null&&fa(e,_.scrollLeft)}function _s(e,t){var _=e.display,y=da(e.display);t.top<0&&(t.top=0);var R=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:_.scroller.scrollTop,Y=Rn(e),ie={};t.bottom-t.top>Y&&(t.bottom=t.top+Y);var ue=e.doc.height+Xi(_),de=t.topue-y;if(t.topR+Y){var Ve=Math.min(t.top,(ve?ue:t.bottom)-Y);Ve!=R&&(ie.scrollTop=Ve)}var Je=e.options.fixedGutter?0:_.gutters.offsetWidth,gt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:_.scroller.scrollLeft-Je,At=ci(e)-_.gutters.offsetWidth,Ft=t.right-t.left>At;return Ft&&(t.right=t.left+At),t.left<10?ie.scrollLeft=0:t.leftAt+gt-3&&(ie.scrollLeft=t.right+(Ft?0:10)-At),ie}function ws(e,t){if(t==null)return;No(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ma(e){No(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function $i(e,t,_){(t!=null||_!=null)&&No(e),t!=null&&(e.curOp.scrollLeft=t),_!=null&&(e.curOp.scrollTop=_)}function wu(e,t){No(e),e.curOp.scrollToPos=t}function No(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var _=ll(e,t.from),y=ll(e,t.to);yl(e,_,y,t.margin)}}function yl(e,t,_,y){var R=_s(e,{left:Math.min(t.left,_.left),top:Math.min(t.top,_.top)-y,right:Math.max(t.right,_.right),bottom:Math.max(t.bottom,_.bottom)+y});$i(e,R.scrollLeft,R.scrollTop)}function ro(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;O||Fa(e,{top:t}),no(e,t,!0),O&&Fa(e),va(e,100)}function no(e,t,_){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!_)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function fa(e,t,_,y){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(_?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!y)return;e.doc.scrollLeft=t,Cl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function io(e){var t=e.display,_=t.gutters.offsetWidth,y=Math.round(e.doc.height+Xi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?_:0,docHeight:y,scrollHeight:y+Ii(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:_}}var pa=function(e,t,_){this.cm=_;var y=this.vert=f("div",[f("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),R=this.horiz=f("div",[f("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");y.tabIndex=R.tabIndex=-1,e(y),e(R),Ne(y,"scroll",function(){y.clientHeight&&t(y.scrollTop,"vertical")}),Ne(R,"scroll",function(){R.clientWidth&&t(R.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,I&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,_=e.scrollHeight>e.clientHeight+1,y=e.nativeBarWidth;if(_){this.vert.style.display="block",this.vert.style.bottom=t?y+"px":"0";var R=e.viewHeight-(t?y:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+R)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=_?y+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(_?y:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(y==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:_?y:0,bottom:t?y:0}},pa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var e=a&&!o?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},pa.prototype.enableZeroWidthBar=function(e,t,_){e.style.pointerEvents="auto";function y(){var R=e.getBoundingClientRect(),Y=_=="vert"?document.elementFromPoint(R.right-1,(R.top+R.bottom)/2):document.elementFromPoint((R.right+R.left)/2,R.bottom-1);Y!=e?e.style.pointerEvents="none":t.set(1e3,y)}t.set(1e3,y)},pa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ao=function(){};ao.prototype.update=function(){return{bottom:0,right:0}},ao.prototype.setScrollLeft=function(){},ao.prototype.setScrollTop=function(){},ao.prototype.clear=function(){};function Hi(e,t){t||(t=io(e));var _=e.display.barWidth,y=e.display.barHeight;bl(e,t);for(var R=0;R<4&&_!=e.display.barWidth||y!=e.display.barHeight;R++)_!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),bl(e,io(e)),_=e.display.barWidth,y=e.display.barHeight}function bl(e,t){var _=e.display,y=_.scrollbars.update(t);_.sizer.style.paddingRight=(_.barWidth=y.right)+"px",_.sizer.style.paddingBottom=(_.barHeight=y.bottom)+"px",_.heightForcer.style.borderBottom=y.bottom+"px solid transparent",y.right&&y.bottom?(_.scrollbarFiller.style.display="block",_.scrollbarFiller.style.height=y.bottom+"px",_.scrollbarFiller.style.width=y.right+"px"):_.scrollbarFiller.style.display="",y.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(_.gutterFiller.style.display="block",_.gutterFiller.style.height=y.bottom+"px",_.gutterFiller.style.width=t.gutterWidth+"px"):_.gutterFiller.style.display=""}var El={native:pa,null:ao};function _l(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&h(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ne(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,_){_=="horizontal"?fa(e,t):ro(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Cu=0;function ma(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Cu},ui(e.curOp)}function ga(e){var t=e.curOp;t&&Zr(t,function(_){for(var y=0;y<_.ops.length;y++)_.ops[y].cm.curOp=null;xu(_)})}function xu(e){for(var t=e.ops,_=0;_=_.viewTo)||_.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new jo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Su(e){e.updatedDisplay=e.mustUpdate&&Cs(e.cm,e.update)}function Bu(e){var t=e.cm,_=t.display;e.updatedDisplay&&Uo(t),e.barMeasure=io(t),_.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ui(t,_.maxLine,_.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(_.scroller.clientWidth,_.sizer.offsetLeft+e.adjustWidthTo+Ii(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,_.sizer.offsetLeft+e.adjustWidthTo-ci(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=_.input.prepareSelection())}function Ho(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var _=+new Date+e.options.workTime,y=Ut(e,t.highlightFrontier),R=[];t.iter(y.line,Math.min(t.first+t.size,e.display.viewTo+500),function(Y){if(y.line>=e.display.viewFrom){var ie=Y.styles,ue=Y.text.length>e.options.maxHighlightLength?Qt(t.mode,y.state):null,de=Ke(e,Y,y,!0);ue&&(y.state=ue),Y.styles=de.styles;var ve=Y.styleClasses,Ve=de.classes;Ve?Y.styleClasses=Ve:ve&&(Y.styleClasses=null);for(var Je=!ie||ie.length!=Y.styles.length||ve!=Ve&&(!ve||!Ve||ve.bgClass!=Ve.bgClass||ve.textClass!=Ve.textClass),gt=0;!Je&>_)return va(e,e.options.workDelay),!0}),t.highlightFrontier=y.line,t.modeFrontier=Math.max(t.modeFrontier,y.line),R.length&&di(e,function(){for(var Y=0;Y=_.viewFrom&&t.visible.to<=_.viewTo&&(_.updateLineNumbers==null||_.updateLineNumbers>=_.viewTo)&&_.renderedView==_.view&&fl(e)==0)return!1;xl(e)&&(Ni(e),t.dims=bs(e));var R=y.first+y.size,Y=Math.max(t.visible.from-e.options.viewportMargin,y.first),ie=Math.min(R,t.visible.to+e.options.viewportMargin);_.viewFromie&&_.viewTo-ie<20&&(ie=Math.min(R,_.viewTo)),Dr&&(Y=qr(e.doc,Y),ie=Ln(e.doc,ie));var ue=Y!=_.viewFrom||ie!=_.viewTo||_.lastWrapHeight!=t.wrapperHeight||_.lastWrapWidth!=t.wrapperWidth;hl(e,Y,ie),_.viewOffset=Fn(Kt(e.doc,_.viewFrom)),e.display.mover.style.top=_.viewOffset+"px";var de=fl(e);if(!ue&&de==0&&!t.force&&_.renderedView==_.view&&(_.updateLineNumbers==null||_.updateLineNumbers>=_.viewTo))return!1;var ve=Ru(e);return de>4&&(_.lineDiv.style.display="none"),Du(e,_.updateLineNumbers,t.dims),de>4&&(_.lineDiv.style.display=""),_.renderedView=_.view,Lu(ve),r(_.cursorDiv),r(_.selectionDiv),_.gutters.style.height=_.sizer.style.minHeight=0,ue&&(_.lastWrapHeight=t.wrapperHeight,_.lastWrapWidth=t.wrapperWidth,va(e,400)),_.updateLineNumbers=null,!0}function wl(e,t){for(var _=t.viewport,y=!0;;y=!1){if(!y||!e.options.lineWrapping||t.oldDisplayWidth==ci(e)){if(_&&_.top!=null&&(_={top:Math.min(e.doc.height+Xi(e.display)-Rn(e),_.top)}),t.visible=ko(e.display,e.doc,_),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else y&&(t.visible=ko(e.display,e.doc,_));if(!Cs(e,t))break;Uo(e);var R=io(e);Zi(e),Hi(e,R),Ts(e,R),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Fa(e,t){var _=new jo(e,t);if(Cs(e,_)){Uo(e),wl(e,_);var y=io(e);Zi(e),Hi(e,y),Ts(e,y),_.finish()}}function Du(e,t,_){var y=e.display,R=e.options.lineNumbers,Y=y.lineDiv,ie=Y.firstChild;function ue(Ft){var Nt=Ft.nextSibling;return T&&a&&e.display.currentWheelTarget==Ft?Ft.style.display="none":Ft.parentNode.removeChild(Ft),Nt}for(var de=y.view,ve=y.viewFrom,Ve=0;Ve-1&&(At=!1),Gi(e,Je,ve,_)),At&&(r(Je.lineNumber),Je.lineNumber.appendChild(document.createTextNode(un(e.options,ve)))),ie=Je.node.nextSibling}ve+=Je.size}for(;ie;)ie=ue(ie)}function xs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ts(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ii(e)+"px"}function Cl(e){var t=e.display,_=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var y=Ra(t)-t.scroller.scrollLeft+e.doc.scrollLeft,R=t.gutters.offsetWidth,Y=y+"px",ie=0;ie<_.length;ie++)if(!_[ie].hidden){e.options.fixedGutter&&(_[ie].gutter&&(_[ie].gutter.style.left=Y),_[ie].gutterBackground&&(_[ie].gutterBackground.style.left=Y));var ue=_[ie].alignable;if(ue)for(var de=0;deie.clientWidth,de=ie.scrollHeight>ie.clientHeight;if(!(y&&ue||R&&de))return;if(R&&a&&T){e:for(var ve=t.target,Ve=Y.view;ve!=ie;ve=ve.parentNode)for(var Je=0;Je=0&&be(e,y.to())<=0)return _}return-1};var tn=function(e,t){this.anchor=e,this.head=t};tn.prototype.from=function(){return Dt(this.anchor,this.head)},tn.prototype.to=function(){return et(this.anchor,this.head)},tn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function oi(e,t,_){var y=e&&e.options.selectionsMayTouch,R=t[_];t.sort(function(gt,At){return be(gt.from(),At.from())}),_=re(t,R);for(var Y=1;Y0:de>=0){var ve=Dt(ue.from(),ie.from()),Ve=et(ue.to(),ie.to()),Je=ue.empty()?ie.from()==ie.head:ue.from()==ue.head;Y<=_&&--_,t.splice(--Y,2,new tn(Je?Ve:ve,Je?ve:Ve))}}return new mi(t,_)}function qi(e,t){return new mi([new tn(e,t||e)],0)}function ea(e){return e.text?fe(e.from.line+e.text.length-1,$e(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Bs(e,t){if(be(e,t.from)<0)return e;if(be(e,t.to)<=0)return ea(t);var _=e.line+t.text.length-(t.to.line-t.from.line)-1,y=e.ch;return e.line==t.to.line&&(y+=ea(t).ch-t.to.ch),fe(_,y)}function Os(e,t){for(var _=[],y=0;y1&&e.remove(ue.line+1,Ft-1),e.insert(ue.line+1,Gt)}Yr(e,"change",e,t)}function ta(e,t,_){function y(R,Y,ie){if(R.linked)for(var ue=0;ue1&&!e.done[e.done.length-2].ranges)return e.done.pop(),$e(e.done)}function Fl(e,t,_,y){var R=e.history;R.undone.length=0;var Y=+new Date,ie,ue;if((R.lastOp==y||R.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&R.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ie=Ml(R,R.lastOp==y)))ue=$e(ie.changes),be(t.from,t.to)==0&&be(t.from,ue.to)==0?ue.to=ea(t):ie.changes.push(Ls(e,t));else{var de=$e(R.done);for((!de||!de.ranges)&&zo(e.sel,R.done),ie={changes:[Ls(e,t)],generation:R.generation},R.done.push(ie);R.done.length>R.undoDepth;)R.done.shift(),R.done[0].ranges||R.done.shift()}R.done.push(_),R.generation=++R.maxGeneration,R.lastModTime=R.lastSelTime=Y,R.lastOp=R.lastSelOp=y,R.lastOrigin=R.lastSelOrigin=t.origin,ue||Ye(e,"historyAdded")}function ku(e,t,_,y){var R=t.charAt(0);return R=="*"||R=="+"&&_.ranges.length==y.ranges.length&&_.somethingSelected()==y.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pu(e,t,_,y){var R=e.history,Y=y&&y.origin;_==R.lastSelOp||Y&&R.lastSelOrigin==Y&&(R.lastModTime==R.lastSelTime&&R.lastOrigin==Y||ku(e,Y,$e(R.done),t))?R.done[R.done.length-1]=t:zo(t,R.done),R.lastSelTime=+new Date,R.lastSelOrigin=Y,R.lastSelOp=_,y&&y.clearRedo!==!1&&Dl(R.undone)}function zo(e,t){var _=$e(t);_&&_.ranges&&_.equals(e)||t.push(e)}function Ul(e,t,_,y){var R=t["spans_"+e.id],Y=0;e.iter(Math.max(e.first,_),Math.min(e.first+e.size,y),function(ie){ie.markedSpans&&((R||(R=t["spans_"+e.id]={}))[Y]=ie.markedSpans),++Y})}function Nu(e){if(!e)return null;for(var t,_=0;_-1&&($e(ue)[Je]=ve[Je],delete ve[Je]))}}return y}function Ds(e,t,_,y){if(y){var R=e.anchor;if(_){var Y=be(t,R)<0;Y!=be(_,R)<0?(R=t,t=_):Y!=be(t,_)<0&&(t=_)}return new tn(R,t)}else return new tn(_||t,t)}function ka(e,t,_,y,R){R==null&&(R=e.cm&&(e.cm.display.shift||e.extend)),$n(e,new mi([Ds(e.sel.primary(),t,_,R)],0),y)}function Bi(e,t,_){for(var y=[],R=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y=t.ch:ue.to>t.ch))){if(R&&(Ye(de,"beforeCursorEnter"),de.explicitlyCleared))if(Y.markedSpans){--ie;continue}else break;if(!de.atomic)continue;if(_){var Je=de.find(y<0?1:-1),gt=void 0;if((y<0?Ve:ve)&&(Je=Us(e,Je,-y,Je&&Je.line==t.line?Y:null)),Je&&Je.line==t.line&&(gt=be(Je,_))&&(y<0?gt<0:gt>0))return na(e,Je,t,y,R)}var At=de.find(y<0?-1:1);return(y<0?ve:Ve)&&(At=Us(e,At,y,At.line==t.line?Y:null)),At?na(e,At,t,y,R):null}}return t}function Xo(e,t,_,y,R){var Y=y||1,ie=na(e,t,_,Y,R)||!R&&na(e,t,_,Y,!0)||na(e,t,_,-Y,R)||!R&&na(e,t,_,-Y,!0);return ie||(e.cantEdit=!0,fe(e.first,0))}function Us(e,t,_,y){return _<0&&t.ch==0?t.line>e.first?U(e,fe(t.line-1)):null:_>0&&t.ch==(y||Kt(e,t.line)).text.length?t.line=0;--R)Hl(e,{from:y[R].from,to:y[R].to,text:R?[""]:t.text,origin:t.origin});else Hl(e,t)}function Hl(e,t){if(t.text.length==1&&t.text[0]==""&&be(t.from,t.to)==0)return;var _=Os(e,t);Fl(e,t,_,e.cm?e.cm.curOp.id:NaN),Ao(e,t,_,cn(e,t));var y=[];ta(e,function(R,Y){!Y&&re(y,R.history)==-1&&(Kl(R.history,t),y.push(R.history)),Ao(R,t,null,cn(R,t))})}function Jo(e,t,_){var y=e.cm&&e.cm.state.suppressEdits;if(y&&!_)return;for(var R=e.history,Y,ie=e.sel,ue=t=="undo"?R.done:R.undone,de=t=="undo"?R.undone:R.done,ve=0;ve=0;--At){var Ft=gt(At);if(Ft)return Ft.v}}function Ql(e,t){if(t==0)return;if(e.first+=t,e.sel=new mi(bt(e.sel.ranges,function(R){return new tn(fe(R.anchor.line+t,R.anchor.ch),fe(R.head.line+t,R.head.ch))}),e.sel.primIndex),e.cm){ti(e.cm,e.first,e.first-t,t);for(var _=e.cm.display,y=_.viewFrom;y<_.viewTo;y++)Pi(e.cm,y,"gutter")}}function Ao(e,t,_,y){if(e.cm&&!e.cm.curOp)return Pn(e.cm,Ao)(e,t,_,y);if(t.to.linee.lastLine())return;if(t.from.lineY&&(t={from:t.from,to:fe(Y,Kt(e,Y).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ur(e,t.from,t.to),_||(_=Os(e,t)),e.cm?Hu(e.cm,t,y):Rs(e,t,y),Go(e,_,ge),e.cantEdit&&Xo(e,fe(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,t,_){var y=e.doc,R=e.display,Y=t.from,ie=t.to,ue=!1,de=Y.line;e.options.lineWrapping||(de=pr(En(Kt(y,Y.line))),y.iter(de,ie.line+1,function(At){if(At==R.maxLine)return ue=!0,!0})),y.sel.contains(t.from,t.to)>-1&&je(e),Rs(y,t,_,dl(e)),e.options.lineWrapping||(y.iter(de,Y.line+t.text.length,function(At){var Ft=si(At);Ft>R.maxLineLength&&(R.maxLine=At,R.maxLineLength=Ft,R.maxLineChanged=!0,ue=!1)}),ue&&(e.curOp.updateMaxLine=!0)),Lr(y,Y.line),va(e,400);var ve=t.text.length-(ie.line-Y.line)-1;t.full?ti(e):Y.line==ie.line&&t.text.length==1&&!Rl(e.doc,t)?Pi(e,Y.line,"text"):ti(e,Y.line,ie.line+1,ve);var Ve=Le(e,"changes"),Je=Le(e,"change");if(Je||Ve){var gt={from:Y,to:ie,text:t.text,removed:t.removed,origin:t.origin};Je&&Yr(e,"change",e,gt),Ve&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(gt)}e.display.selForContextMenu=null}function Na(e,t,_,y,R){var Y;y||(y=_),be(y,_)<0&&(Y=[y,_],_=Y[0],y=Y[1]),typeof t=="string"&&(t=e.splitLines(t)),Pa(e,{from:_,to:y,text:t,origin:R})}function jl(e,t,_,y){_1||!(this.children[0]instanceof ho))){var ue=[];this.collapse(ue),this.children=[new ho(ue)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var ie=R.lines.length%25+25,ue=ie;ue10);e.parent.maybeSpill()},iterN:function(e,t,_){for(var y=0;ye.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Ve,e.display.maxLineChanged=!0)}y!=null&&e&&this.collapsed&&ti(e,y,R+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ra(e.doc)),e&&Yr(e,"markerCleared",e,this,y,R),t&&ga(e),this.parent&&this.parent.clear()},Li.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var _,y,R=0;R0||ie==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=C("span",[Y.replacedWith],"CodeMirror-widget"),y.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),y.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(Gr(e,t.line,t,_,Y)||t.line!=_.line&&Gr(e,_.line,t,_,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");An()}Y.addToHistory&&Fl(e,{from:t,to:_,origin:"markText"},e.sel,NaN);var ue=t.line,de=e.cm,ve;if(e.iter(ue,_.line+1,function(Je){de&&Y.collapsed&&!de.options.lineWrapping&&En(Je)==de.display.maxLine&&(ve=!0),Y.collapsed&&ue!=t.line&&Rr(Je,0),$r(Je,new zr(Y,ue==t.line?t.ch:null,ue==_.line?_.ch:null)),++ue}),Y.collapsed&&e.iter(t.line,_.line+1,function(Je){In(e,Je)&&Rr(Je,0)}),Y.clearOnEnter&&Ne(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(Pr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Zo,Y.atomic=!0),de){if(ve&&(de.curOp.updateMaxLine=!0),Y.collapsed)ti(de,t.line,_.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var Ve=t.line;Ve<=_.line;Ve++)Pi(de,Ve,"text");Y.atomic&&ra(de.doc),Yr(de,"markerAdded",de,Y)}return Y}var Qa=function(e,t){this.markers=e,this.primary=t;for(var _=0;_=0;de--)Pa(this,y[de]);ue?uo(this,ue):this.cm&&Ma(this.cm)}),undo:zn(function(){Jo(this,"undo")}),redo:zn(function(){Jo(this,"redo")}),undoSelection:zn(function(){Jo(this,"undo",!0)}),redoSelection:zn(function(){Jo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,_=0,y=0;y=e.ch)&&t.push(R.marker.parent||R.marker)}return t},findMarks:function(e,t,_){e=U(this,e),t=U(this,t);var y=[],R=e.line;return this.iter(e.line,t.line+1,function(Y){var ie=Y.markedSpans;if(ie)for(var ue=0;ue=de.to||de.from==null&&R!=e.line||de.from!=null&&R==t.line&&de.from>=t.ch)&&(!_||_(de.marker))&&y.push(de.marker.parent||de.marker)}++R}),y},getAllMarks:function(){var e=[];return this.iter(function(t){var _=t.markedSpans;if(_)for(var y=0;y<_.length;++y)_[y].from!=null&&e.push(_[y].marker)}),e},posFromIndex:function(e){var t,_=this.first,y=this.lineSeparator().length;return this.iter(function(R){var Y=R.text.length+y;if(Y>e)return t=e,!0;e-=Y,++_}),U(this,fe(_,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to<_&&(_=e.to);var y=new ni(Kr(this,t,_),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(y.history=this.history),(this.linked||(this.linked=[])).push({doc:y,sharedHist:e.sharedHist}),y.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(y,Ps(this)),y},unlinkDoc:function(e){if(e instanceof _n&&(e=e.doc),this.linked)for(var t=0;t-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ve=e.dataTransfer.getData("Text");if(Ve){var Je;if(t.state.draggingText&&!t.state.draggingText.copy&&(Je=t.listSelections()),Go(t.doc,qi(_,_)),Je)for(var gt=0;gt=0;ue--)Na(e.doc,"",y[ue].from,y[ue].to,"+delete");Ma(e)})}function zs(e,t,_){var y=ke(e.text,t+_,_);return y<0||y>e.text.length?null:y}function Gs(e,t,_){var y=zs(e,t.ch,_);return y==null?null:new fe(t.line,y,_<0?"after":"before")}function es(e,t,_,y,R){if(e){t.doc.direction=="rtl"&&(R=-R);var Y=Mt(_,t.doc.direction);if(Y){var ie=R<0?$e(Y):Y[0],ue=R<0==(ie.level==1),de=ue?"after":"before",ve;if(ie.level>0||t.doc.direction=="rtl"){var Ve=nn(t,_);ve=R<0?_.text.length-1:0;var Je=Ti(t,Ve,ve).top;ve=ct(function(gt){return Ti(t,Ve,gt).top==Je},R<0==(ie.level==1)?ie.from:ie.to-1,ve),de=="before"&&(ve=zs(_,ve,1))}else ve=R<0?ie.to:ie.from;return new fe(y,ve,de)}}return new fe(y,R<0?_.text.length:0,R<0?"before":"after")}function Vs(e,t,_,y){var R=Mt(t,e.doc.direction);if(!R)return Gs(t,_,y);_.ch>=t.text.length?(_.ch=t.text.length,_.sticky="before"):_.ch<=0&&(_.ch=0,_.sticky="after");var Y=Et(R,_.ch,_.sticky),ie=R[Y];if(e.doc.direction=="ltr"&&ie.level%2==0&&(y>0?ie.to>_.ch:ie.from<_.ch))return Gs(t,_,y);var ue=function(Gt,Zt){return zs(t,Gt instanceof fe?Gt.ch:Gt,Zt)},de,ve=function(Gt){return e.options.lineWrapping?(de=de||nn(e,t),Al(e,t,de,Gt)):{begin:0,end:t.text.length}},Ve=ve(_.sticky=="before"?ue(_,-1):_.ch);if(e.doc.direction=="rtl"||ie.level==1){var Je=ie.level==1==y<0,gt=ue(_,Je?1:-1);if(gt!=null&&(Je?gt<=ie.to&><=Ve.end:gt>=ie.from&>>=Ve.begin)){var At=Je?"before":"after";return new fe(_.line,gt,At)}}var Ft=function(Gt,Zt,Vt){for(var ir=function(yn,Gn){return Gn?new fe(_.line,ue(yn,1),"before"):new fe(_.line,yn,"after")};Gt>=0&&Gt0==(_r.level!=1),kr=fr?Vt.begin:ue(Vt.end,-1);if(_r.from<=kr&&kr<_r.to)return ir(kr,fr);if(kr=fr?_r.from:ue(_r.to,-1),Vt.begin<=kr&&kr0?Ve.end:ue(Ve.begin,-1);return jt!=null&&!(y>0&&jt==t.text.length)&&(Nt=Ft(y>0?0:R.length-1,y,ve(jt)),Nt)?Nt:null}var vo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ge)},killLine:function(e){return Di(e,function(t){if(t.empty()){var _=Kt(e.doc,t.head.line).text.length;return t.head.ch==_&&t.head.line0)R=new fe(R.line,R.ch+1),e.replaceRange(Y.charAt(R.ch-1)+Y.charAt(R.ch-2),fe(R.line,R.ch-2),R,"+transpose");else if(R.line>e.doc.first){var ie=Kt(e.doc,R.line-1).text;ie&&(R=new fe(R.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),fe(R.line-1,ie.length-1),R,"+transpose"))}}_.push(new tn(R,R))}e.setSelections(_)})},newlineAndIndent:function(e){return di(e,function(){for(var t=e.listSelections(),_=t.length-1;_>=0;_--)e.replaceRange(e.doc.lineSeparator(),t[_].anchor,t[_].head,"+input");t=e.listSelections();for(var y=0;ye&&be(t,this.pos)==0&&_==this.button};var aa,bo;function eu(e,t){var _=+new Date;return bo&&bo.compare(_,e,t)?(aa=bo=null,"triple"):aa&&aa.compare(_,e,t)?(bo=new ja(_,e,t),aa=null,"double"):(aa=new ja(_,e,t),bo=null,"single")}function is(e){var t=this,_=t.display;if(st(t,e)||_.activeTouch&&_.input.supportsTouch())return;if(_.input.ensurePolled(),_.shift=e.shiftKey,Ci(_,e)){T||(_.scroller.draggable=!1,setTimeout(function(){return _.scroller.draggable=!0},100));return}if(Js(t,e))return;var y=Yi(t,e),R=Ze(e),Y=y?eu(y,R):"single";if(window.focus(),R==1&&t.state.selectingText&&t.state.selectingText(e),y&&tu(t,R,y,Y,e))return;R==1?y?nu(t,y,Y,e):De(e)==_.scroller&&me(e):R==2?(y&&ka(t.doc,y),setTimeout(function(){return _.input.focus()},20)):R==3&&(L?t.display.input.onContextMenu(e):vl(t))}function tu(e,t,_,y,R){var Y="Click";return y=="double"?Y="Double"+Y:y=="triple"&&(Y="Triple"+Y),Y=(t==1?"Left":t==2?"Middle":"Right")+Y,yo(e,qo(Y,R),R,function(ie){if(typeof ie=="string"&&(ie=vo[ie]),!ie)return!1;var ue=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ue=ie(e,_)!=_e}finally{e.state.suppressEdits=!1}return ue})}function ru(e,t,_){var y=e.getOption("configureMouse"),R=y?y(e,t,_):{};if(R.unit==null){var Y=p?_.shiftKey&&_.metaKey:_.altKey;R.unit=Y?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(R.extend==null||e.doc.extend)&&(R.extend=e.doc.extend||_.shiftKey),R.addNew==null&&(R.addNew=a?_.metaKey:_.ctrlKey),R.moveOnDrag==null&&(R.moveOnDrag=!(a?_.altKey:_.ctrlKey)),R}function nu(e,t,_,y){I?setTimeout(V(gl,e),0):e.curOp.focus=F();var R=ru(e,_,y),Y=e.doc.sel,ie;e.options.dragDrop&&ht&&!e.isReadOnly()&&_=="single"&&(ie=Y.contains(t))>-1&&(be((ie=Y.ranges[ie]).from(),t)<0||t.xRel>0)&&(be(ie.to(),t)>0||t.xRel<0)?qu(e,y,t,R):iu(e,y,t,R)}function qu(e,t,_,y){var R=e.display,Y=!1,ie=Pn(e,function(ve){T&&(R.scroller.draggable=!1),e.state.draggingText=!1,dt(R.wrapper.ownerDocument,"mouseup",ie),dt(R.wrapper.ownerDocument,"mousemove",ue),dt(R.scroller,"dragstart",de),dt(R.scroller,"drop",ie),Y||(me(ve),y.addNew||ka(e.doc,_,null,null,y.extend),T&&!c||I&&v==9?setTimeout(function(){R.wrapper.ownerDocument.body.focus({preventScroll:!0}),R.input.focus()},20):R.input.focus())}),ue=function(ve){Y=Y||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},de=function(){return Y=!0};T&&(R.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!y.moveOnDrag,R.scroller.dragDrop&&R.scroller.dragDrop(),Ne(R.wrapper.ownerDocument,"mouseup",ie),Ne(R.wrapper.ownerDocument,"mousemove",ue),Ne(R.scroller,"dragstart",de),Ne(R.scroller,"drop",ie),vl(e),setTimeout(function(){return R.input.focus()},20)}function Eo(e,t,_){if(_=="char")return new tn(t,t);if(_=="word")return e.findWordAt(t);if(_=="line")return new tn(fe(t.line,0),U(e.doc,fe(t.line+1,0)));var y=_(e,t);return new tn(y.from,y.to)}function iu(e,t,_,y){var R=e.display,Y=e.doc;me(t);var ie,ue,de=Y.sel,ve=de.ranges;if(y.addNew&&!y.extend?(ue=Y.sel.contains(_),ue>-1?ie=ve[ue]:ie=new tn(_,_)):(ie=Y.sel.primary(),ue=Y.sel.primIndex),y.unit=="rectangle")y.addNew||(ie=new tn(_,_)),_=Yi(e,t,!0,!0),ue=-1;else{var Ve=Eo(e,_,y.unit);y.extend?ie=Ds(ie,Ve.anchor,Ve.head,y.extend):ie=Ve}y.addNew?ue==-1?(ue=ve.length,$n(Y,oi(e,ve.concat([ie]),ue),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[ue].empty()&&y.unit=="char"&&!y.extend?($n(Y,oi(e,ve.slice(0,ue).concat(ve.slice(ue+1)),0),{scroll:!1,origin:"*mouse"}),de=Y.sel):Ms(Y,ue,ie,we):(ue=0,$n(Y,new mi([ie],0),we),de=Y.sel);var Je=_;function gt(Vt){if(be(Je,Vt)==0)return;if(Je=Vt,y.unit=="rectangle"){for(var ir=[],_r=e.options.tabSize,fr=J(Kt(Y,_.line).text,_.ch,_r),kr=J(Kt(Y,Vt.line).text,Vt.ch,_r),yn=Math.min(fr,kr),Gn=Math.max(fr,kr),Bn=Math.min(_.line,Vt.line),hi=Math.min(e.lastLine(),Math.max(_.line,Vt.line));Bn<=hi;Bn++){var qn=Kt(Y,Bn).text,Mn=He(qn,yn,_r);yn==Gn?ir.push(new tn(fe(Bn,Mn),fe(Bn,Mn))):qn.length>Mn&&ir.push(new tn(fe(Bn,Mn),fe(Bn,He(qn,Gn,_r))))}ir.length||ir.push(new tn(_,_)),$n(Y,oi(e,de.ranges.slice(0,ue).concat(ir),ue),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Vt)}else{var ei=ie,Yn=Eo(e,Vt,y.unit),zt=ei.anchor,xn;be(Yn.anchor,zt)>0?(xn=Yn.head,zt=Dt(ei.from(),Yn.anchor)):(xn=Yn.anchor,zt=et(ei.to(),Yn.head));var Tn=de.ranges.slice(0);Tn[ue]=au(e,new tn(U(Y,zt),xn)),$n(Y,oi(e,Tn,ue),we)}}var At=R.wrapper.getBoundingClientRect(),Ft=0;function Nt(Vt){var ir=++Ft,_r=Yi(e,Vt,!0,y.unit=="rectangle");if(!_r)return;if(be(_r,Je)!=0){e.curOp.focus=F(),gt(_r);var fr=ko(R,Y);(_r.line>=fr.to||_r.lineAt.bottom?20:0;kr&&setTimeout(Pn(e,function(){if(Ft!=ir)return;R.scroller.scrollTop+=kr,Nt(Vt)}),50)}}function jt(Vt){e.state.selectingText=!1,Ft=Infinity,Vt&&(me(Vt),R.input.focus()),dt(R.wrapper.ownerDocument,"mousemove",Gt),dt(R.wrapper.ownerDocument,"mouseup",Zt),Y.history.lastSelOrigin=null}var Gt=Pn(e,function(Vt){Vt.buttons===0||!Ze(Vt)?jt(Vt):Nt(Vt)}),Zt=Pn(e,jt);e.state.selectingText=Zt,Ne(R.wrapper.ownerDocument,"mousemove",Gt),Ne(R.wrapper.ownerDocument,"mouseup",Zt)}function au(e,t){var _=t.anchor,y=t.head,R=Kt(e.doc,_.line);if(be(_,y)==0&&_.sticky==y.sticky)return t;var Y=Mt(R);if(!Y)return t;var ie=Et(Y,_.ch,_.sticky),ue=Y[ie];if(ue.from!=_.ch&&ue.to!=_.ch)return t;var de=ie+(ue.from==_.ch==(ue.level!=1)?0:1);if(de==0||de==Y.length)return t;var ve;if(y.line!=_.line)ve=(y.line-_.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ve=Et(Y,y.ch,y.sticky),Je=Ve-ie||(y.ch-_.ch)*(ue.level==1?-1:1);Ve==de-1||Ve==de?ve=Je<0:ve=Je>0}var gt=Y[de+(ve?-1:0)],At=ve==(gt.level==1),Ft=At?gt.from:gt.to,Nt=At?"after":"before";return _.ch==Ft&&_.sticky==Nt?t:new tn(new fe(_.line,Ft,Nt),y)}function ou(e,t,_,y){var R,Y;if(t.touches)R=t.touches[0].clientX,Y=t.touches[0].clientY;else try{R=t.clientX,Y=t.clientY}catch(gt){return!1}if(R>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;y&&me(t);var ie=e.display,ue=ie.lineDiv.getBoundingClientRect();if(Y>ue.bottom||!Le(e,_))return Ee(t);Y-=ue.top-ie.viewOffset;for(var de=0;de=R){var Ve=Or(e.doc,Y),Je=e.display.gutterSpecs[de];return Ye(e,_,e,Ve,Je.className,t),Ee(t)}}}function Js(e,t){return ou(e,t,"gutterClick",!0)}function Zs(e,t){if(Ci(e.display,t)||Ka(e,t))return;if(st(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Ka(e,t){return Le(e,"gutterContextMenu")?ou(e,t,"gutterContextMenu",!1):!1}function as(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bi(e)}var ji={toString:function(){return"CodeMirror.Init"}},su={},os={};function eA(e){var t=e.optionHandlers;function _(y,R,Y,ie){e.defaults[y]=R,Y&&(t[y]=ie?function(ue,de,ve){ve!=ji&&Y(ue,de,ve)}:Y)}e.defineOption=_,e.Init=ji,_("value","",function(y,R){return y.setValue(R)},!0),_("mode",null,function(y,R){y.doc.modeOption=R,Is(y)},!0),_("indentUnit",2,Is,!0),_("indentWithTabs",!1),_("smartIndent",!0),_("tabSize",4,function(y){so(y),bi(y),ti(y)},!0),_("lineSeparator",null,function(y,R){if(y.doc.lineSep=R,!R)return;var Y=[],ie=y.doc.first;y.doc.iter(function(de){for(var ve=0;;){var Ve=de.text.indexOf(R,ve);if(Ve==-1)break;ve=Ve+R.length,Y.push(fe(ie,Ve))}ie++});for(var ue=Y.length-1;ue>=0;ue--)Na(y.doc,R,Y[ue],fe(Y[ue].line,Y[ue].ch+R.length))}),_("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(y,R,Y){y.state.specialChars=new RegExp(R.source+(R.test(" ")?"":"| "),"g"),Y!=ji&&y.refresh()}),_("specialCharPlaceholder",Xr,function(y){return y.refresh()},!0),_("electricChars",!0),_("inputStyle",A?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),_("spellcheck",!1,function(y,R){return y.getInputField().spellcheck=R},!0),_("autocorrect",!1,function(y,R){return y.getInputField().autocorrect=R},!0),_("autocapitalize",!1,function(y,R){return y.getInputField().autocapitalize=R},!0),_("rtlMoveVisually",!w),_("wholeLineUpdateBefore",!0),_("theme","default",function(y){as(y),oo(y)},!0),_("keyMap","default",function(y,R,Y){var ie=Hn(R),ue=Y!=ji&&Hn(Y);ue&&ue.detach&&ue.detach(y,ie),ie.attach&&ie.attach(y,ue||null)}),_("extraKeys",null),_("configureMouse",null),_("lineWrapping",!1,lu,!0),_("gutters",[],function(y,R){y.display.gutterSpecs=Ss(R,y.options.lineNumbers),oo(y)},!0),_("fixedGutter",!0,function(y,R){y.display.gutters.style.left=R?Ra(y.display)+"px":"0",y.refresh()},!0),_("coverGutterNextToScrollbar",!1,function(y){return Hi(y)},!0),_("scrollbarStyle","native",function(y){_l(y),Hi(y),y.display.scrollbars.setScrollTop(y.doc.scrollTop),y.display.scrollbars.setScrollLeft(y.doc.scrollLeft)},!0),_("lineNumbers",!1,function(y,R){y.display.gutterSpecs=Ss(y.options.gutters,R),oo(y)},!0),_("firstLineNumber",1,oo,!0),_("lineNumberFormatter",function(y){return y},oo,!0),_("showCursorWhenSelecting",!1,Zi,!0),_("resetSelectionOnContextMenu",!0),_("lineWiseCopyCut",!0),_("pasteLinesPerSelection",!0),_("selectionsMayTouch",!1),_("readOnly",!1,function(y,R){R=="nocursor"&&(Da(y),y.display.input.blur()),y.display.input.readOnlyChanged(R)}),_("screenReaderLabel",null,function(y,R){R=R===""?null:R,y.display.input.screenReaderLabelChanged(R)}),_("disableInput",!1,function(y,R){R||y.display.input.reset()},!0),_("dragDrop",!0,tA),_("allowDropFileTypes",null),_("cursorBlinkRate",530),_("cursorScrollMargin",0),_("cursorHeight",1,Zi,!0),_("singleCursorHeightPerLine",!0,Zi,!0),_("workTime",100),_("workDelay",100),_("flattenSpans",!0,so,!0),_("addModeClass",!1,so,!0),_("pollInterval",100),_("undoDepth",200,function(y,R){return y.doc.history.undoDepth=R}),_("historyEventDelay",1250),_("viewportMargin",10,function(y){return y.refresh()},!0),_("maxHighlightLength",1e4,so,!0),_("moveInputWithCursor",!0,function(y,R){R||y.display.input.resetPosition()}),_("tabindex",null,function(y,R){return y.display.input.getField().tabIndex=R||""}),_("autofocus",null),_("direction","ltr",function(y,R){return y.doc.setDirection(R)},!0),_("phrases",null)}function tA(e,t,_){var y=_&&_!=ji;if(!t!=!y){var R=e.display.dragFunctions,Y=t?Ne:dt;Y(e.display.scroller,"dragstart",R.start),Y(e.display.scroller,"dragenter",R.enter),Y(e.display.scroller,"dragover",R.over),Y(e.display.scroller,"dragleave",R.leave),Y(e.display.scroller,"drop",R.drop)}}function lu(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(h(e.display.wrapper,"CodeMirror-wrap"),Un(e)),Mo(e),ti(e),bi(e),setTimeout(function(){return Hi(e)},100)}function _n(e,t){var _=this;if(!(this instanceof _n))return new _n(e,t);this.options=t=t?M(t):{},M(su,t,!1);var y=t.value;typeof y=="string"?y=new ni(y,t.mode,null,t.lineSeparator,t.direction):t.mode&&(y.modeOption=t.mode),this.doc=y;var R=new _n.inputStyles[t.inputStyle](this),Y=this.display=new Mu(e,y,R,t);Y.wrapper.CodeMirror=this,as(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),_l(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new X,keySeq:null,specialChars:null},t.autofocus&&!A&&Y.input.focus(),I&&v<11&&setTimeout(function(){return _.display.input.reset(!0)},20),uu(this),Ks(),ma(this),this.curOp.forceUpdate=!0,Nn(this,y),t.autofocus&&!A||this.hasFocus()?setTimeout(function(){_.hasFocus()&&!_.state.focused&&Es(_)},20):Da(this);for(var ie in os)os.hasOwnProperty(ie)&&os[ie](this,t[ie],ji);xl(this),t.finishInit&&t.finishInit(this);for(var ue=0;ue20*20}Ne(t.scroller,"touchstart",function(de){if(!st(e,de)&&!Y(de)&&!Js(e,de)){t.input.ensurePolled(),clearTimeout(_);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-y.end<=300?y:null},de.touches.length==1&&(t.activeTouch.left=de.touches[0].pageX,t.activeTouch.top=de.touches[0].pageY)}}),Ne(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ne(t.scroller,"touchend",function(de){var ve=t.activeTouch;if(ve&&!Ci(t,de)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Ve=e.coordsChar(t.activeTouch,"page"),Je;!ve.prev||ie(ve,ve.prev)?Je=new tn(Ve,Ve):!ve.prev.prev||ie(ve,ve.prev.prev)?Je=e.findWordAt(Ve):Je=new tn(fe(Ve.line,0),U(e.doc,fe(Ve.line+1,0))),e.setSelection(Je.anchor,Je.head),e.focus(),me(de)}R()}),Ne(t.scroller,"touchcancel",R),Ne(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ro(e,t.scroller.scrollTop),fa(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),Ne(t.scroller,"mousewheel",function(de){return Ol(e,de)}),Ne(t.scroller,"DOMMouseScroll",function(de){return Ol(e,de)}),Ne(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(de){st(e,de)||Oe(de)},over:function(de){st(e,de)||(Ku(e,de),Oe(de))},start:function(de){return js(e,de)},drop:Pn(e,zl),leave:function(de){st(e,de)||Gl(e)}};var ue=t.input.getField();Ne(ue,"keyup",function(de){return $l.call(e,de)}),Ne(ue,"keydown",Pn(e,ns)),Ne(ue,"keypress",Pn(e,ql)),Ne(ue,"focus",function(de){return Es(e,de)}),Ne(ue,"blur",function(de){return Da(e,de)})}var ss=[];_n.defineInitHook=function(e){return ss.push(e)};function Ea(e,t,_,y){var R=e.doc,Y;_==null&&(_="add"),_=="smart"&&(R.mode.indent?Y=Ut(e,t).state:_="prev");var ie=e.options.tabSize,ue=Kt(R,t),de=J(ue.text,null,ie);ue.stateAfter&&(ue.stateAfter=null);var ve=ue.text.match(/^\s*/)[0],Ve;if(!y&&!/\S/.test(ue.text))Ve=0,_="not";else if(_=="smart"&&(Ve=R.mode.indent(Y,ue.text.slice(ve.length),ue.text),Ve==_e||Ve>150)){if(!y)return;_="prev"}_=="prev"?t>R.first?Ve=J(Kt(R,t-1).text,null,ie):Ve=0:_=="add"?Ve=de+e.options.indentUnit:_=="subtract"?Ve=de-e.options.indentUnit:typeof _=="number"&&(Ve=de+_),Ve=Math.max(0,Ve);var Je="",gt=0;if(e.options.indentWithTabs)for(var At=Math.floor(Ve/ie);At;--At)gt+=ie,Je+=" ";if(gtie,de=ut(t),ve=null;if(ue&&y.ranges.length>1)if(_i&&_i.text.join(` `)==t){if(y.ranges.length%_i.text.length==0){ve=[];for(var Ve=0;Ve<_i.text.length;Ve++)ve.push(Y.splitLines(_i.text[Ve]))}}else de.length==y.ranges.length&&e.options.pasteLinesPerSelection&&(ve=bt(de,function(Gt){return[Gt]}));for(var Je=e.curOp.updateInput,gt=y.ranges.length-1;gt>=0;gt--){var At=y.ranges[gt],Ft=At.from(),Nt=At.to();At.empty()&&(_&&_>0?Ft=fe(Ft.line,Ft.ch-_):e.state.overwrite&&!ue?Nt=fe(Nt.line,Math.min(Kt(Y,Nt.line).text.length,Nt.ch+$e(de).length)):ue&&_i&&_i.lineWise&&_i.text.join(` `)==de.join(` `)&&(Ft=Nt=fe(Ft.line,0)));var jt={from:Ft,to:Nt,text:ve?ve[gt%ve.length]:de,origin:R||(ue?"paste":e.state.cutIncoming>ie?"cut":"+input")};Pa(e.doc,jt),Yr(e,"inputRead",e,jt)}t&&!ue&&Co(e,t),Ma(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Je),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function wo(e,t){var _=e.clipboardData&&e.clipboardData.getData("Text");if(_)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&di(t,function(){return $s(t,_,0,null,"paste")}),!0}function Co(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var _=e.doc.sel,y=_.ranges.length-1;y>=0;y--){var R=_.ranges[y];if(R.head.ch>100||y&&_.ranges[y-1].head.line==R.head.line)continue;var Y=e.getModeAt(R.head),ie=!1;if(Y.electricChars){for(var ue=0;ue-1){ie=Ea(e,R.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(Kt(e.doc,R.head.line).text.slice(0,R.head.ch))&&(ie=Ea(e,R.head.line,"smart")));ie&&Yr(e,"electricInput",e,R.head.line)}}function qs(e){for(var t=[],_=[],y=0;yY&&(Ea(this,ue.head.line,y,!0),Y=ue.head.line,ie==this.doc.sel.primIndex&&Ma(this));else{var de=ue.from(),ve=ue.to(),Ve=Math.max(Y,de.line);Y=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Je=Ve;Je0&&Ms(this.doc,ie,new tn(de,gt[ie].to()),ge)}}}),getTokenAt:function(y,R){return qt(this,y,R)},getLineTokens:function(y,R){return qt(this,fe(y),R,!0)},getTokenTypeAt:function(y){y=U(this.doc,y);var R=Ct(this,Kt(this.doc,y.line)),Y=0,ie=(R.length-1)/2,ue=y.ch,de;if(ue==0)de=R[2];else for(;;){var ve=Y+ie>>1;if((ve?R[ve*2-1]:0)>=ue)ie=ve;else if(R[ve*2+1]de&&(y=de,ie=!0),ue=Kt(this.doc,y)}else ue=y;return qa(this,ue,{top:0,left:0},R||"page",Y||ie).top+(ie?this.doc.height-Fn(ue):0)},defaultTextHeight:function(){return da(this.display)},defaultCharWidth:function(){return Ia(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(y,R,Y,ie,ue){var de=this.display;y=Ei(this,U(this.doc,y));var ve=y.bottom,Ve=y.left;if(R.style.position="absolute",R.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(R),de.sizer.appendChild(R),ie=="over")ve=y.top;else if(ie=="above"||ie=="near"){var Je=Math.max(de.wrapper.clientHeight,this.doc.height),gt=Math.max(de.sizer.clientWidth,de.lineSpace.clientWidth);(ie=="above"||y.bottom+R.offsetHeight>Je)&&y.top>R.offsetHeight?ve=y.top-R.offsetHeight:y.bottom+R.offsetHeight<=Je&&(ve=y.bottom),Ve+R.offsetWidth>gt&&(Ve=gt-R.offsetWidth)}R.style.top=ve+"px",R.style.left=R.style.right="",ue=="right"?(Ve=de.sizer.clientWidth-R.offsetWidth,R.style.right="0px"):(ue=="left"?Ve=0:ue=="middle"&&(Ve=(de.sizer.clientWidth-R.offsetWidth)/2),R.style.left=Ve+"px"),Y&&_u(this,{left:Ve,top:ve,right:Ve+R.offsetWidth,bottom:ve+R.offsetHeight})},triggerOnKeyDown:ri(ns),triggerOnKeyPress:ri(ql),triggerOnKeyUp:$l,triggerOnMouseDown:ri(is),execCommand:function(y){if(vo.hasOwnProperty(y))return vo[y].call(null,this)},triggerElectric:ri(function(y){Co(this,y)}),findPosH:function(y,R,Y,ie){var ue=1;R<0&&(ue=-1,R=-R);for(var de=U(this.doc,y),ve=0;ve0&&Ve(Y.charAt(ie-1));)--ie;for(;ue.5||this.options.lineWrapping)&&Mo(this),Ye(this,"refresh",this)}),swapDoc:ri(function(y){var R=this.doc;return R.cm=null,this.state.selectingText&&this.state.selectingText(),Nn(this,y),bi(this),this.display.input.reset(),$i(this,y.scrollLeft,y.scrollTop),this.curOp.forceScroll=!0,Yr(this,"swapDoc",this,R),R}),phrase:function(y){var R=this.options.phrases;return R&&Object.prototype.hasOwnProperty.call(R,y)?R[y]:y},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(y,R,Y){_.hasOwnProperty(y)||(_[y]=e[y]={_global:[]}),_[y][R]=Y},e.registerGlobalHelper=function(y,R,Y,ie){e.registerHelper(y,R,ie),_[y]._global.push({pred:Y,val:ie})}}function ls(e,t,_,y,R){var Y=t,ie=_,ue=Kt(e,t.line),de=R&&e.direction=="rtl"?-_:_;function ve(){var Zt=t.line+de;return Zt=e.first+e.size?!1:(t=new fe(Zt,t.ch,t.sticky),ue=Kt(e,Zt))}function Ve(Zt){var Vt;if(y=="codepoint"){var ir=ue.text.charCodeAt(t.ch+(y>0?0:-1));isNaN(ir)?Vt=null:Vt=new fe(t.line,Math.max(0,Math.min(ue.text.length,t.ch+_*(ir>=55296&&ir<56320?2:1))),-_)}else R?Vt=Vs(e.cm,ue,t,_):Vt=Gs(ue,t,_);if(Vt==null)if(!Zt&&ve())t=es(R,e.cm,ue,t.line,de);else return!1;else t=Vt;return!0}if(y=="char"||y=="codepoint")Ve();else if(y=="column")Ve(!0);else if(y=="word"||y=="group")for(var Je=null,gt=y=="group",At=e.cm&&e.cm.getHelper(t,"wordChars"),Ft=!0;!(_<0&&!Ve(!Ft));Ft=!1){var Nt=ue.text.charAt(t.ch)||` `,jt=ae(Nt,At)?"w":gt&&Nt==` `?"n":!gt||/\s/.test(Nt)?null:"p";if(gt&&!Ft&&!jt&&(jt="s"),Je&&Je!=jt){_<0&&(_=1,Ve(),t.sticky="after");break}if(jt&&(Je=jt),_>0&&!Ve(!Ft))break}var Gt=Xo(e,t,Y,ie,!0);return Ue(Y,Gt)&&(Gt.hitSide=!0),Gt}function du(e,t,_,y){var R=e.doc,Y=t.left,ie;if(y=="page"){var ue=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),de=Math.max(ue-.5*da(e.display),3);ie=(_>0?t.bottom:t.top)+_*de}else y=="line"&&(ie=_>0?t.bottom+3:t.top-3);for(var ve;!(ve=Si(e,Y,ie),!ve.outside);){if(_<0?ie<=0:ie>=R.height){ve.hitSide=!0;break}ie+=_*5}return ve}var sn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};sn.prototype.init=function(e){var t=this,_=this,y=_.cm,R=_.div=e.lineDiv;el(R,y.options.spellcheck,y.options.autocorrect,y.options.autocapitalize);function Y(ue){for(var de=ue.target;de;de=de.parentNode){if(de==R)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(de.className))break}return!1}Ne(R,"paste",function(ue){if(!Y(ue)||st(y,ue)||wo(ue,y))return;v<=11&&setTimeout(Pn(y,function(){return t.updateFromDOM()}),20)}),Ne(R,"compositionstart",function(ue){t.composing={data:ue.data,done:!1}}),Ne(R,"compositionupdate",function(ue){t.composing||(t.composing={data:ue.data,done:!1})}),Ne(R,"compositionend",function(ue){t.composing&&(ue.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ne(R,"touchstart",function(){return _.forceCompositionEnd()}),Ne(R,"input",function(){t.composing||t.readFromDOMSoon()});function ie(ue){if(!Y(ue)||st(y,ue))return;if(y.somethingSelected())_o({lineWise:!1,text:y.getSelections()}),ue.type=="cut"&&y.replaceSelection("",null,"cut");else if(y.options.lineWiseCopyCut){var de=qs(y);_o({lineWise:!0,text:de.text}),ue.type=="cut"&&y.operation(function(){y.setSelections(de.ranges,0,ge),y.replaceSelection("",null,"cut")})}else return;if(ue.clipboardData){ue.clipboardData.clearData();var ve=_i.text.join(` `);if(ue.clipboardData.setData("Text",ve),ue.clipboardData.getData("Text")==ve){ue.preventDefault();return}}var Ve=Au(),Je=Ve.firstChild;y.display.lineSpace.insertBefore(Ve,y.display.lineSpace.firstChild),Je.value=_i.text.join(` `);var gt=document.activeElement;Z(Je),setTimeout(function(){y.display.lineSpace.removeChild(Ve),gt.focus(),gt==R&&_.showPrimarySelection()},50)}Ne(R,"copy",ie),Ne(R,"cut",ie)},sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},sn.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},sn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},sn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},sn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,_=t.doc.sel.primary(),y=_.from(),R=_.to();if(t.display.viewTo==t.display.viewFrom||y.line>=t.display.viewTo||R.line=t.display.viewFrom&&_a(t,y)||{node:ue[0].measure.map[2],offset:0},ve=R.linee.firstLine()&&(y=fe(y.line-1,Kt(e.doc,y.line-1).length)),R.ch==Kt(e.doc,R.line).text.length&&R.linet.viewTo-1)return!1;var Y,ie,ue;y.line==t.viewFrom||(Y=Ji(e,y.line))==0?(ie=pr(t.view[0].line),ue=t.view[0].node):(ie=pr(t.view[Y].line),ue=t.view[Y-1].node.nextSibling);var de=Ji(e,R.line),ve,Ve;if(de==t.view.length-1?(ve=t.viewTo-1,Ve=t.lineDiv.lastChild):(ve=pr(t.view[de+1].line)-1,Ve=t.view[de+1].node.previousSibling),!ue)return!1;for(var Je=e.doc.splitLines(wa(e,ue,Ve,ie,ve)),gt=Ur(e.doc,fe(ie,0),fe(ve,Kt(e.doc,ve).text.length));Je.length>1&>.length>1;)if($e(Je)==$e(gt))Je.pop(),gt.pop(),ve--;else if(Je[0]==gt[0])Je.shift(),gt.shift(),ie++;else break;for(var At=0,Ft=0,Nt=Je[0],jt=gt[0],Gt=Math.min(Nt.length,jt.length);Aty.ch&&Zt.charCodeAt(Zt.length-Ft-1)==Vt.charCodeAt(Vt.length-Ft-1);)At--,Ft++;Je[Je.length-1]=Zt.slice(0,Zt.length-Ft).replace(/^\u200b+/,""),Je[0]=Je[0].slice(At).replace(/\u200b+$/,"");var _r=fe(ie,At),fr=fe(ve,gt.length?$e(gt).length-Ft:0);if(Je.length>1||Je[0]||be(_r,fr))return Na(e.doc,Je,_r,fr,"+input"),!0},sn.prototype.ensurePolled=function(){this.forceCompositionEnd()},sn.prototype.reset=function(){this.forceCompositionEnd()},sn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},sn.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},sn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&di(this.cm,function(){return ti(e.cm)})},sn.prototype.setUneditable=function(e){e.contentEditable="false"},sn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,$s)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},sn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},sn.prototype.onContextMenu=function(){},sn.prototype.resetPosition=function(){},sn.prototype.needsContentAttribute=!0;function _a(e,t){var _=Aa(e,t.line);if(!_||_.hidden)return null;var y=Kt(e.doc,t.line),R=Xn(_,y,t.line),Y=Mt(y,e.doc.direction),ie="left";if(Y){var ue=Et(Y,t.ch);ie=ue%2?"right":"left"}var de=gs(R.map,t.ch,ie);return de.offset=de.collapse=="right"?de.end:de.start,de}function hu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Cn(e,t){return t&&(e.bad=!0),e}function wa(e,t,_,y,R){var Y="",ie=!1,ue=e.doc.lineSeparator(),de=!1;function ve(At){return function(Ft){return Ft.id==At}}function Ve(){ie&&(Y+=ue,de&&(Y+=ue),ie=de=!1)}function Je(At){At&&(Ve(),Y+=At)}function gt(At){if(At.nodeType==1){var Ft=At.getAttribute("cm-text");if(Ft){Je(Ft);return}var Nt=At.getAttribute("cm-marker"),jt;if(Nt){var Gt=e.findMarks(fe(y,0),fe(R+1,0),ve(+Nt));Gt.length&&(jt=Gt[0].find(0))&&Je(Ur(e.doc,jt.from,jt.to).join(ue));return}if(At.getAttribute("contenteditable")=="false")return;var Zt=/^(pre|div|p|li|table|br)$/i.test(At.nodeName);if(!/^br$/i.test(At.nodeName)&&At.textContent.length==0)return;Zt&&Ve();for(var Vt=0;Vt=9&&t.hasSelection&&(t.hasSelection=null),_.poll()}),Ne(R,"paste",function(ie){if(st(y,ie)||wo(ie,y))return;y.state.pasteIncoming=+new Date,_.fastPoll()});function Y(ie){if(st(y,ie))return;if(y.somethingSelected())_o({lineWise:!1,text:y.getSelections()});else if(y.options.lineWiseCopyCut){var ue=qs(y);_o({lineWise:!0,text:ue.text}),ie.type=="cut"?y.setSelections(ue.ranges,null,ge):(_.prevInput="",R.value=ue.text.join(` `),Z(R))}else return;ie.type=="cut"&&(y.state.cutIncoming=+new Date)}Ne(R,"cut",Y),Ne(R,"copy",Y),Ne(e.scroller,"paste",function(ie){if(Ci(e,ie)||st(y,ie))return;if(!R.dispatchEvent){y.state.pasteIncoming=+new Date,_.focus();return}var ue=new Event("paste");ue.clipboardData=ie.clipboardData,R.dispatchEvent(ue)}),Ne(e.lineSpace,"selectstart",function(ie){Ci(e,ie)||me(ie)}),Ne(R,"compositionstart",function(){var ie=y.getCursor("from");_.composing&&_.composing.range.clear(),_.composing={start:ie,range:y.markText(ie,y.getCursor("to"),{className:"CodeMirror-composing"})}}),Ne(R,"compositionend",function(){_.composing&&(_.poll(),_.composing.range.clear(),_.composing=null)})},dn.prototype.createField=function(e){this.wrapper=Au(),this.textarea=this.wrapper.firstChild},dn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},dn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,_=e.doc,y=pl(e);if(e.options.moveInputWithCursor){var R=Ei(e,_.sel.primary().head,"div"),Y=t.wrapper.getBoundingClientRect(),ie=t.lineDiv.getBoundingClientRect();y.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,R.top+ie.top-Y.top)),y.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,R.left+ie.left-Y.left))}return y},dn.prototype.showSelection=function(e){var t=this.cm,_=t.display;l(_.cursorDiv,e.cursors),l(_.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},dn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var _=t.getSelection();this.textarea.value=_,t.state.focused&&Z(this.textarea),I&&v>=9&&(this.hasSelection=_)}else e||(this.prevInput=this.textarea.value="",I&&v>=9&&(this.hasSelection=null))},dn.prototype.getField=function(){return this.textarea},dn.prototype.supportsTouch=function(){return!1},dn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!A||F()!=this.textarea))try{this.textarea.focus()}catch(e){}},dn.prototype.blur=function(){this.textarea.blur()},dn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dn.prototype.receivedFocus=function(){this.slowPoll()},dn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},dn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function _(){var y=t.poll();!y&&!e?(e=!0,t.polling.set(60,_)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,_)},dn.prototype.poll=function(){var e=this,t=this.cm,_=this.textarea,y=this.prevInput;if(this.contextMenuPending||!t.state.focused||nt(_)&&!y&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var R=_.value;if(R==y&&!t.somethingSelected())return!1;if(I&&v>=9&&this.hasSelection===R||a&&/[\uf700-\uf7ff]/.test(R))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var Y=R.charCodeAt(0);if(Y==8203&&!y&&(y="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,ue=Math.min(y.length,R.length);ie1e3||R.indexOf(` `)>-1?_.value=e.prevInput="":e.prevInput=R,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},dn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dn.prototype.onKeyPress=function(){I&&v>=9&&(this.hasSelection=null),this.fastPoll()},dn.prototype.onContextMenu=function(e){var t=this,_=t.cm,y=_.display,R=t.textarea;t.contextMenuPending&&t.contextMenuPending();var Y=Yi(_,e),ie=y.scroller.scrollTop;if(!Y||u)return;var ue=_.options.resetSelectionOnContextMenu;ue&&_.doc.sel.contains(Y)==-1&&Pn(_,$n)(_.doc,qi(Y),ge);var de=R.style.cssText,ve=t.wrapper.style.cssText,Ve=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",R.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Ve.top-5)+"px; left: "+(e.clientX-Ve.left-5)+`px; z-index: 1000; background: `+(I?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Je;T&&(Je=window.scrollY),y.input.focus(),T&&window.scrollTo(null,Je),y.input.reset(),_.somethingSelected()||(R.value=t.prevInput=" "),t.contextMenuPending=At,y.selForContextMenu=_.doc.sel,clearTimeout(y.detectingSelectAll);function gt(){if(R.selectionStart!=null){var Nt=_.somethingSelected(),jt="\u200B"+(Nt?R.value:"");R.value="\u21DA",R.value=jt,t.prevInput=Nt?"":"\u200B",R.selectionStart=1,R.selectionEnd=jt.length,y.selForContextMenu=_.doc.sel}}function At(){if(t.contextMenuPending!=At)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,R.style.cssText=de,I&&v<9&&y.scrollbars.setScrollTop(y.scroller.scrollTop=ie),R.selectionStart!=null){(!I||I&&v<9)&>();var Nt=0,jt=function(){y.selForContextMenu==_.doc.sel&&R.selectionStart==0&&R.selectionEnd>0&&t.prevInput=="\u200B"?Pn(_,Nl)(_):Nt++<10?y.detectingSelectAll=setTimeout(jt,500):(y.selForContextMenu=null,y.input.reset())};y.detectingSelectAll=setTimeout(jt,200)}}if(I&&v>=9&>(),L){Oe(e);var Ft=function(){dt(window,"mouseup",Ft),setTimeout(At,20)};Ne(window,"mouseup",Ft)}else setTimeout(At,50)},dn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},dn.prototype.setUneditable=function(){},dn.prototype.needsContentAttribute=!1;function xo(e,t){if(t=t?M(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var _=F();t.autofocus=_==e||e.getAttribute("autofocus")!=null&&_==document.body}function y(){e.value=ue.getValue()}var R;if(e.form&&(Ne(e.form,"submit",y),!t.leaveSubmitMethodAlone)){var Y=e.form;R=Y.submit;try{var ie=Y.submit=function(){y(),Y.submit=R,Y.submit(),Y.submit=ie}}catch(de){}}t.finishInit=function(de){de.save=y,de.getTextArea=function(){return e},de.toTextArea=function(){de.toTextArea=isNaN,y(),e.parentNode.removeChild(de.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",y),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=R))}},e.style.display="none";var ue=_n(function(de){return e.parentNode.insertBefore(de,e.nextSibling)},t);return ue}function Wi(e){e.off=dt,e.on=Ne,e.wheelEventPixels=Bl,e.Doc=ni,e.splitLines=ut,e.countColumn=J,e.findColumn=He,e.isWordChar=ne,e.Pass=_e,e.signal=Ye,e.Line=gn,e.changeEnd=ea,e.scrollbarModel=El,e.Pos=fe,e.cmpPos=be,e.modes=pt,e.mimeModes=it,e.resolveMode=Xe,e.getMode=mt,e.modeExtensions=Pt,e.extendMode=Rt,e.copyState=Qt,e.startState=Fr,e.innerMode=Ir,e.commands=vo,e.keyMap=Qi,e.keyName=Ws,e.isModifierKey=Xl,e.lookupKey=ba,e.normalizeKeyMap=Vu,e.StringStream=wr,e.SharedTextMarker=Qa,e.TextMarker=Li,e.LineWidget=fo,e.e_preventDefault=me,e.e_stopPropagation=ye,e.e_stop=Oe,e.addClass=P,e.contains=m,e.rmClass=h,e.keyNames=ia}eA(_n),cu(_n);var fu="iter insert remove copy getEditor constructor".split(" ");for(var To in ni.prototype)ni.prototype.hasOwnProperty(To)&&re(fu,To)<0&&(_n.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(ni.prototype[To]));return Me(ni),_n.inputStyles={textarea:dn,contenteditable:sn},_n.defineMode=function(e){!_n.defaults.mode&&e!="null"&&(_n.defaults.mode=e),xt.apply(this,arguments)},_n.defineMIME=_t,_n.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),_n.defineMIME("text/plain","null"),_n.defineExtension=function(e,t){_n.prototype[e]=t},_n.defineDocExtension=function(e,t){ni.prototype[e]=t},_n.fromTextArea=xo,Wi(_n),_n.version="5.58.2",_n})},WaYH:function(qe,pe,G){"use strict";var q=G("rePB"),Q=G("Ff2n"),O=G("VTBJ"),j=G("1OyB"),D=G("vuIU"),B=G("JX7q"),I=G("Ji7U"),v=G("LK+K"),T=G("q1tI"),E=G("TSYQ"),n=G.n(E),u=G("sboe"),c=G("OZM5"),o=function(L){var b=L.prefixCls,h=L.level,r=L.isStart,l=L.isEnd;if(!h)return null;for(var f="".concat(b,"-indent-unit"),C=[],g=0;g1&&arguments[1]!==void 0?arguments[1]:!1,Re=ge.getAttribute("id")||ge.getAttribute("data-reactid")||ge.getAttribute("name");if(we&&F[Re])return F[Re];var He=window.getComputedStyle(ge),Se=He.getPropertyValue("box-sizing")||He.getPropertyValue("-moz-box-sizing")||He.getPropertyValue("-webkit-box-sizing"),Te=parseFloat(He.getPropertyValue("padding-bottom"))+parseFloat(He.getPropertyValue("padding-top")),$e=parseFloat(He.getPropertyValue("border-bottom-width"))+parseFloat(He.getPropertyValue("border-top-width")),bt=m.map(function(ze){return"".concat(ze,":").concat(He.getPropertyValue(ze))}).join(";"),Ie={sizingStyle:bt,paddingSize:Te,borderSize:$e,boxSizing:Se};return we&&Re&&(F[Re]=Ie),Ie}function Z(ge){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,He=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),ge.getAttribute("wrap")?P.setAttribute("wrap",ge.getAttribute("wrap")):P.removeAttribute("wrap");var Se=z(ge,we),Te=Se.paddingSize,$e=Se.borderSize,bt=Se.boxSizing,Ie=Se.sizingStyle;P.setAttribute("style","".concat(Ie,";").concat(g)),P.value=ge.value||ge.placeholder||"";var ze=Number.MIN_SAFE_INTEGER,at=Number.MAX_SAFE_INTEGER,Ae=P.scrollHeight,ne;if(bt==="border-box"?Ae+=$e:bt==="content-box"&&(Ae-=Te),Re!==null||He!==null){P.value=" ";var ae=P.scrollHeight-Te;Re!==null&&(ze=ae*Re,bt==="border-box"&&(ze=ze+Te+$e),Ae=Math.max(ze,Ae)),He!==null&&(at=ae*He,bt==="border-box"&&(at=at+Te+$e),ne=Ae>at?"":"hidden",Ae=Math.min(at,Ae))}return{height:Ae,minHeight:ze,maxHeight:at,overflowY:ne,resize:"none"}}var V=G("Gytx"),M=G.n(V),J;(function(ge){ge[ge.NONE=0]="NONE",ge[ge.RESIZING=1]="RESIZING",ge[ge.RESIZED=2]="RESIZED"})(J||(J={}));var X=function(ge){Object(j.a)(Re,ge);var we=Object(D.a)(Re);function Re(He){var Se;return Object(Q.a)(this,Re),Se=we.call(this,He),Se.nextFrameActionId=void 0,Se.resizeFrameId=void 0,Se.textArea=void 0,Se.saveTextArea=function(Te){Se.textArea=Te},Se.handleResize=function(Te){var $e=Se.state.resizeStatus,bt=Se.props,Ie=bt.autoSize,ze=bt.onResize;if($e!==J.NONE)return;typeof ze=="function"&&ze(Te),Ie&&Se.resizeOnNextFrame()},Se.resizeOnNextFrame=function(){cancelAnimationFrame(Se.nextFrameActionId),Se.nextFrameActionId=requestAnimationFrame(Se.resizeTextarea)},Se.resizeTextarea=function(){var Te=Se.props.autoSize;if(!Te||!Se.textArea)return;var $e=Te.minRows,bt=Te.maxRows,Ie=Z(Se.textArea,!1,$e,bt);Se.setState({textareaStyles:Ie,resizeStatus:J.RESIZING},function(){cancelAnimationFrame(Se.resizeFrameId),Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:J.RESIZED},function(){Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:J.NONE}),Se.fixFirefoxAutoScroll()})})})})},Se.renderTextArea=function(){var Te=Se.props,$e=Te.prefixCls,bt=$e===void 0?"rc-textarea":$e,Ie=Te.autoSize,ze=Te.onResize,at=Te.className,Ae=Te.disabled,ne=Se.state,ae=ne.textareaStyles,ce=ne.resizeStatus,xe=Object(l.a)(Se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Fe=C()(bt,at,Object(v.a)({},"".concat(bt,"-disabled"),Ae));"value"in xe&&(xe.value=xe.value||"");var ke=Object(I.a)(Object(I.a)(Object(I.a)({},Se.props.style),ae),ce===J.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return B.createElement(r,{onResize:Se.handleResize,disabled:!(Ie||ze)},B.createElement("textarea",Object(q.a)({},xe,{className:Fe,style:ke,ref:Se.saveTextArea})))},Se.state={textareaStyles:{},resizeStatus:J.NONE},Se}return Object(O.a)(Re,[{key:"componentDidUpdate",value:function(Se){(Se.value!==this.props.value||!M()(Se.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var Se=this.textArea.selectionStart,Te=this.textArea.selectionEnd;this.textArea.setSelectionRange(Se,Te)}}catch($e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(B.Component),re=X,se=function(ge){Object(j.a)(Re,ge);var we=Object(D.a)(Re);function Re(He){var Se;Object(Q.a)(this,Re),Se=we.call(this,He),Se.resizableTextArea=void 0,Se.focus=function(){Se.resizableTextArea.textArea.focus()},Se.saveTextArea=function($e){Se.resizableTextArea=$e},Se.handleChange=function($e){var bt=Se.props.onChange;Se.setValue($e.target.value,function(){Se.resizableTextArea.resizeTextarea()}),bt&&bt($e)},Se.handleKeyDown=function($e){var bt=Se.props,Ie=bt.onPressEnter,ze=bt.onKeyDown;$e.keyCode===13&&Ie&&Ie($e),ze&&ze($e)};var Te=typeof He.value=="undefined"||He.value===null?He.defaultValue:He.value;return Se.state={value:Te},Se}return Object(O.a)(Re,[{key:"setValue",value:function(Se,Te){"value"in this.props||this.setState({value:Se},Te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return B.createElement(re,Object(q.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Se){return"value"in Se?{value:Se.value}:null}}]),Re}(B.Component),_e=pe.default=se},YH21:function(qe,pe,G){var q=G("H6uX");pe.Dispatcher=q;var Q=G("ItGF"),O=G("Ze12"),j=O.isCanvasEl,D=O.transformCoordWithViewport,B=typeof window!="undefined"&&!!window.addEventListener,I=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,v=[];function T(A,a,p,w){return p=p||{},w||!Q.canvasSupported?E(A,a,p):Q.browser.firefox&&a.layerX!=null&&a.layerX!==a.offsetX?(p.zrX=a.layerX,p.zrY=a.layerY):a.offsetX!=null?(p.zrX=a.offsetX,p.zrY=a.offsetY):E(A,a,p),p}function E(A,a,p){if(Q.domSupported&&A.getBoundingClientRect){var w=a.clientX,S=a.clientY;if(j(A)){var x=A.getBoundingClientRect();p.zrX=w-x.left,p.zrY=S-x.top;return}else if(D(v,A,w,S)){p.zrX=v[0],p.zrY=v[1];return}}p.zrX=p.zrY=0}function n(A){return A||window.event}function u(A,a,p){if(a=n(a),a.zrX!=null)return a;var w=a.type,S=w&&w.indexOf("touch")>=0;if(!S)T(A,a,a,p),a.zrDelta=a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3;else{var x=w!=="touchend"?a.targetTouches[0]:a.changedTouches[0];x&&T(A,x,a,p)}var L=a.button;return a.which==null&&L!==void 0&&I.test(a.type)&&(a.which=L&1?1:L&2?3:L&4?2:0),a}function c(A,a,p,w){B?A.addEventListener(a,p,w):A.attachEvent("on"+a,p)}function o(A,a,p,w){B?A.removeEventListener(a,p,w):A.detachEvent("on"+a,p)}var i=B?function(A){A.preventDefault(),A.stopPropagation(),A.cancelBubble=!0}:function(A){A.returnValue=!1,A.cancelBubble=!0};function d(A){return A.which===2||A.which===3}function s(A){return A.which>1}pe.clientToLocal=T,pe.getNativeEvent=n,pe.normalizeEvent=u,pe.addEventListener=c,pe.removeEventListener=o,pe.stop=i,pe.isMiddleOrRightButtonOnMouseUpDown=d,pe.notLeftMouse=s},YgsL:function(qe,pe,G){var q=G("QBsz"),Q=q.distance;function O(D,B,I,v,T,E,n){var u=(I-D)*.5,c=(v-B)*.5;return(2*(B-I)+u+c)*n+(-3*(B-I)-2*u-c)*E+u*T+B}function j(D,B){for(var I=D.length,v=[],T=0,E=1;EI-2?I-1:c+1],A=D[c>I-3?I-1:c+2]);var a=o*o,p=o*a;v.push([O(i[0],d[0],s[0],A[0],o,a,p),O(i[1],d[1],s[1],A[1],o,a,p)])}return v}qe.exports=j},ZW9T:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return Z});var q=G("k1fw"),Q=G("miYZ"),O=G("tsqr"),j=G("rAM+"),D=G("tJVT"),B=G("PpiC"),I=G("q1tI"),v=G.n(I),T=G("bdgK"),E=G("oBTY"),n=G("9og8"),u=G("WmNS"),c=G.n(u),o={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},i={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},d={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"for",content:["for( ; ; ){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)},{label:"#include ",content:["#include "].join(` `)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},A=G("5VLF"),a=G.n(A),p={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},w=function(M,J){return J.map(function(X){return{label:X,kind:M.languages.CompletionItemKind.Keyword,insertText:X}})},S=function(M){return Object.keys(p.tables).map(function(J){return{label:J,kind:M.languages.CompletionItemKind.Variable,insertText:J}})},x=function(M,J){var X=p.tables[M];return X?X.map(function(re){return{label:re,kind:J.languages.CompletionItemKind.Field,insertText:re}}):[]};function L(V,M,J,X,re){var se=M.getWordUntilPosition(J),_e={startLineNumber:J.lineNumber,endLineNumber:J.lineNumber,startColumn:se.startColumn,endColumn:se.endColumn},ge=X.map(function(we){return{label:we,kind:V.languages.CompletionItemKind.Keyword,insertText:we,insertTextRules:V.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return re.map(function(we){ge.push(Object(q.a)(Object(q.a)({},we),{},{range:_e}))}),ge}var b=function(V){p.languages.map(function(re){return V.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(_e,ge,we){return Object(n.a)(c.a.mark(function Re(){var He;return c.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return He=a()(_e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Te.abrupt("return",[{range:_e.getFullModelRange(),text:He}]);case 2:case"end":return Te.stop()}},Re)}))()}}),re});var M=d.quickKey.map(function(re){return{label:re.label,kind:V.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:V.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),J=s.quickKey.map(function(re){return{label:re.label,kind:V.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:V.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),X=i.quickKey.map(function(re){return{label:re.label,kind:V.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:V.languages.CompletionItemInsertTextRule.InsertAsSnippet}});V.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(E.a)(d.keywords),Object(E.a)(d.quickKey.map(function(re){return re.label}))),provideCompletionItems:function(se,_e){var ge=se.getValueInRange({startLineNumber:_e.lineNumber,startColumn:1,endLineNumber:_e.lineNumber,endColumn:_e.column}),we=ge.match(/cu/gim);console.log("match:",we,_e,ge,se);var Re=[],He=_e.lineNumber,Se=_e.column,Te=se.getValueInRange({startLineNumber:He,startColumn:0,endLineNumber:He,endColumn:Se}),$e=Te.trim().split(/\s+/),bt=$e[$e.length-1];if(bt.endsWith(".")){var Ie=bt.slice(0,bt.length-1);Object.keys(p.tables).includes(Ie)&&(Re=Object(E.a)(x(Ie,V)))}else bt==="."?Re=[]:Re=[].concat(Object(E.a)(S(V)),Object(E.a)(w(V,d.keywords)),Object(E.a)(M));return{suggestions:Re}}}),V.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(E.a)(o.keywords)),provideCompletionItems:function(se,_e){var ge=se.getValueInRange({startLineNumber:_e.lineNumber,startColumn:1,endLineNumber:_e.lineNumber,endColumn:_e.column}),we=ge.match(/cu/gim);console.log("match:",we,_e,ge,se);var Re=[],He=_e.lineNumber,Se=_e.column,Te=se.getValueInRange({startLineNumber:He,startColumn:0,endLineNumber:He,endColumn:Se}),$e=Te.trim().split(/\s+/),bt=$e[$e.length-1];if(bt.endsWith(".")){var Ie=bt.slice(0,bt.length-1);Object.keys(p.tables).includes(Ie)&&(Re=Object(E.a)(x(Ie,V)))}else bt==="."?Re=[]:Re=[].concat(Object(E.a)(S(V)),Object(E.a)(w(V,o.keywords)));return{suggestions:Re}}}),V.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(E.a)(i.keywords)),provideCompletionItems:function(se,_e){var ge=[],we=_e.lineNumber,Re=_e.column,He=se.getValueInRange({startLineNumber:we,startColumn:0,endLineNumber:we,endColumn:Re}),Se=He.trim().split(/\s+/),Te=Se[Se.length-1];if(Te.endsWith(".")){var $e=Te.slice(0,Te.length-1);Object.keys(p.tables).includes($e)&&(ge=Object(E.a)(x($e,V)))}else Te==="."?ge=[]:ge=[].concat(Object(E.a)(S(V)),Object(E.a)(w(V,i.keywords)),Object(E.a)(X));return{suggestions:ge}}}),V.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(E.a)(s.keywords)),provideCompletionItems:function(se,_e){var ge=[],we=_e.lineNumber,Re=_e.column,He=se.getValueInRange({startLineNumber:we,startColumn:0,endLineNumber:we,endColumn:Re}),Se=He.trim().split(/\s+/),Te=Se[Se.length-1];if(Te.endsWith(".")){var $e=Te.slice(0,Te.length-1);Object.keys(p.tables).includes($e)&&(ge=Object(E.a)(x($e,V)))}else Te==="."?ge=[]:ge=[].concat(Object(E.a)(S(V)),Object(E.a)(w(V,s.keywords)),Object(E.a)(J));return{suggestions:ge}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",r=G("LvDl"),l=G("+ua5");function f(V){return/^\d+$/.test(V)?"".concat(V,"px"):V}function C(){}var g=!1,m={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function F(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=V;if(Array.isArray(V)){for(var J=0;J0||Qt.target.offsetWidth>0)&&Ye.current.instance.layout()}}catch(Ir){Pt.e(Ir)}finally{Pt.f()}}),Xe.observe(dt.current)),Xe}function De(){O.b.warn(decodeURIComponent(h))}var Ze=function(){var mt=Ye.current.instance;if(se!=null&&mt&&ye){var Pt=mt.getModel();Pt&&se!==Pt.getValue()&&(g=!0,Pt.setValue(se),mt.layout(),g=!1)}};Object(I.useEffect)(function(){st.current&&clearTimeout(st.current),st.current=setTimeout(function(){Ze()},500)},[se,ye,Ye.current]),Object(I.useEffect)(function(){if(Mt&&Ye.current&&Ye.current.instance){var Xe=Ye.current.instance;Xe.changeViewZones(function(Pt){var Rt=document.createElement("div");Rt.style.padding="10px 20px",Rt.style.width="calc(100% - 20px)",Rt.className="my-error-line-wrp",Rt.innerHTML=Ne,Pt.addZone({afterLineNumber:Mt||11,heightInLines:3,domNode:Rt})});var mt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Xe.addOverlayWidget(mt),Xe.revealPositionInCenter({lineNumber:20,column:1})}},[Mt,Ye.current,ye]);function ht(){var Xe=Ye.current.instance;if(Xe){var mt=Xe.getSelection(),Pt=Ye.current.pastePos||{},Rt=new P.Range(Pt.startLineNumber||mt.endLineNumber,Pt.startColumn||mt.endColumn,Pt.endLineNumber||mt.endLineNumber,Pt.endColumn||mt.endColumn);setTimeout(function(){Xe.executeEdits("",[{range:Rt,text:""}])},300)}}function Tt(Xe){(window.navigator.platform.match("Mac")?Xe.metaKey:Xe.ctrlKey)&&Xe.keyCode==83&&(Xe.preventDefault(),at())}var kt=function(){if(ne&&Ye.current.instance){var mt=Ye.current.instance.getContentHeight();xt(mt0||ke.target.offsetWidth>0)&&ne.layout()}}catch(ct){xe.e(ct)}finally{xe.f()}}),ae.observe(He.current)),ae}Object(I.useEffect)(function(){He.current&&G.e(27).then(G.t.bind(null,"M/lh",7)).then(function(ne){P=ne;var ae=P.editor.createDiffEditor(He.current,Object(q.a)(Object(q.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Re),{},{wordWrap:!0}));bt(ae);var ce=Ie(ae);return function(){ae.dispose();var xe=ae.getModel();xe&&xe.dispose(),ce.unobserve(He.current)}})},[]),Object(I.useEffect)(function(){$e&&$e.setModel({original:P.editor.createModel(se,ge),modified:P.editor.createModel(_e,ge)})},[se,_e,ge,$e]);var ze=f(J),at=f(re),Ae={width:ze,height:at};return v.a.createElement("div",{className:"my-diff-editor",ref:He,style:Ae})}},Ze12:function(qe,pe,G){var q=G("ItGF"),Q=G("hOwI"),O=Q.buildTransformer,j="___zrEVENTSAVED",D=[];function B(n,u,c,o,i){return I(D,u,o,i,!0)&&I(n,c,D[0],D[1])}function I(n,u,c,o,i){if(u.getBoundingClientRect&&q.domSupported&&!E(u)){var d=u[j]||(u[j]={}),s=v(u,d),A=T(s,d,i);if(A)return A(n,c,o),!0}return!1}function v(n,u){var c=u.markers;if(c)return c;c=u.markers=[];for(var o=["left","right"],i=["top","bottom"],d=0;d<4;d++){var s=document.createElement("div"),A=s.style,a=d%2,p=(d>>1)%2;A.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",o[a]+":0",i[p]+":0",o[1-a]+":auto",i[1-p]+":auto",""].join("!important;"),n.appendChild(s),c.push(s)}return c}function T(n,u,c){for(var o=c?"invTrans":"trans",i=u[o],d=u.srcCoords,s=!0,A=[],a=[],p=0;p<4;p++){var w=n[p].getBoundingClientRect(),S=2*p,x=w.left,L=w.top;A.push(x,L),s=s&&d&&x===d[S]&&L===d[S+1],a.push(n[p].offsetLeft,n[p].offsetTop)}return s&&i?i:(u.srcCoords=A,u[o]=c?O(a,A):O(A,a))}function E(n){return n.nodeName.toUpperCase()==="CANVAS"}pe.transformLocalCoord=B,pe.transformCoordWithViewport=I,pe.isCanvasEl=E},ZpRC:function(qe,pe,G){"use strict";function q(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function Q(n,u){return(!u||n!=="hidden")&&n!=="visible"&&n!=="clip"}function O(n,u){if(n.clientHeightu||d>n&&s=u&&A>=c?d-n-o:s>u&&Ac?s-u+i:0}var D=function(n,u){var c=window,o=u.scrollMode,i=u.block,d=u.inline,s=u.boundary,A=u.skipOverflowHiddenElements,a=typeof s=="function"?s:function(ae){return ae!==s};if(!q(n))throw new TypeError("Invalid target");for(var p=document.scrollingElement||document.documentElement,w=[],S=n;q(S)&&a(S);){if((S=S.parentElement)===p){w.push(S);break}S!=null&&S===document.body&&O(S)&&!O(document.documentElement)||S!=null&&O(S,A)&&w.push(S)}for(var x=c.visualViewport?c.visualViewport.width:innerWidth,L=c.visualViewport?c.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,r=n.getBoundingClientRect(),l=r.height,f=r.width,C=r.top,g=r.right,m=r.bottom,F=r.left,P=i==="start"||i==="nearest"?C:i==="end"?m:C+l/2,z=d==="center"?F+f/2:d==="end"?g:F,Z=[],V=0;V=0&&F>=0&&m<=L&&g<=x&&C>=se&&m<=ge&&F>=we&&g<=_e)return Z;var Re=getComputedStyle(M),He=parseInt(Re.borderLeftWidth,10),Se=parseInt(Re.borderTopWidth,10),Te=parseInt(Re.borderRightWidth,10),$e=parseInt(Re.borderBottomWidth,10),bt=0,Ie=0,ze="offsetWidth"in M?M.offsetWidth-M.clientWidth-He-Te:0,at="offsetHeight"in M?M.offsetHeight-M.clientHeight-Se-$e:0;if(p===M)bt=i==="start"?P:i==="end"?P-L:i==="nearest"?j(h,h+L,L,Se,$e,h+P,h+P+l,l):P-L/2,Ie=d==="start"?z:d==="center"?z-x/2:d==="end"?z-x:j(b,b+x,x,He,Te,b+z,b+z+f,f),bt=Math.max(0,bt+h),Ie=Math.max(0,Ie+b);else{bt=i==="start"?P-se-Se:i==="end"?P-ge+$e+at:i==="nearest"?j(se,ge,X,Se,$e+at,P,P+l,l):P-(se+X/2)+at/2,Ie=d==="start"?z-we-He:d==="center"?z-(we+re/2)+ze/2:d==="end"?z-_e+Te+ze:j(we,_e,re,He,Te+ze,z,z+f,f);var Ae=M.scrollLeft,ne=M.scrollTop;P+=ne-(bt=Math.max(0,Math.min(ne+bt,M.scrollHeight-X+at))),z+=Ae-(Ie=Math.max(0,Math.min(Ae+Ie,M.scrollWidth-re+ze)))}Z.push({el:M,top:bt,left:Ie})}return Z};function B(n){return n===Object(n)&&Object.keys(n).length!==0}function I(n,u){u===void 0&&(u="auto");var c="scrollBehavior"in document.body.style;n.forEach(function(o){var i=o.el,d=o.top,s=o.left;i.scroll&&c?i.scroll({top:d,left:s,behavior:u}):(i.scrollTop=d,i.scrollLeft=s)})}function v(n){return n===!1?{block:"end",inline:"nearest"}:B(n)?n:{block:"start",inline:"nearest"}}function T(n,u){var c=!n.ownerDocument.documentElement.contains(n);if(B(u)&&typeof u.behavior=="function")return u.behavior(c?[]:D(n,u));if(c)return;var o=v(u);return I(D(n,o),o.behavior)}var E=pe.a=T},aKvl:function(qe,pe,G){var q=G("Sj9i"),Q=q.quadraticProjectPoint;function O(j,D,B,I,v,T,E,n,u){if(E===0)return!1;var c=E;if(u>D+c&&u>I+c&&u>T+c||uj+c&&n>B+c&&n>v+c||n>>1|(s&21845)<<1;A=(A&52428)>>>2|(A&13107)<<2,A=(A&61680)>>>4|(A&3855)<<4,d[s]=((A&65280)>>>8|(A&255)<<8)>>>1}for(var a=function(fe,be,Ue){for(var rt=fe.length,et=0,Dt=new j(be);et>>N]=$}else for(U=new j(rt),et=0;et>>15-fe[et];return U},p=new O(288),s=0;s<144;++s)p[s]=8;for(var s=144;s<256;++s)p[s]=9;for(var s=256;s<280;++s)p[s]=7;for(var s=280;s<288;++s)p[s]=8;for(var w=new O(32),s=0;s<32;++s)w[s]=5;var S=a(p,9,0),x=a(p,9,1),L=a(w,5,0),b=a(w,5,1),h=function(fe){for(var be=fe[0],Ue=1;Uebe&&(be=fe[Ue]);return be},r=function(fe,be,Ue){var rt=be/8>>0;return(fe[rt]|fe[rt+1]<<8)>>>(be&7)&Ue},l=function(fe,be){var Ue=be/8>>0;return(fe[Ue]|fe[Ue+1]<<8|fe[Ue+2]<<16)>>>(be&7)},f=function(fe){return(fe/8>>0)+(fe&7&&1)},C=function(fe,be,Ue){(be==null||be<0)&&(be=0),(Ue==null||Ue>fe.length)&&(Ue=fe.length);var rt=new(fe instanceof j?j:fe instanceof D?D:O)(Ue-be);return rt.set(fe.subarray(be,Ue)),rt},g=function(fe,be,Ue){var rt=fe.length,et=!be||Ue,Dt=!Ue||Ue.i;Ue||(Ue={}),be||(be=new O(rt*3));var ee=function(mr){var xr=be.length;if(mr>xr){var Er=new O(Math.max(xr*2,mr));Er.set(be),be=Er}},U=Ue.f||0,N=Ue.p||0,$=Ue.b||0,le=Ue.l,te=Ue.d,Ke=Ue.m,Ct=Ue.n,Ut=rt*8;do{if(!le){Ue.f=U=r(fe,N,1);var Ht=r(fe,N+1,3);if(N+=3,Ht)if(Ht==1)le=x,te=b,Ke=9,Ct=5;else if(Ht==2){var qt=r(fe,N,31)+257,Ar=r(fe,N+10,15)+4,Br=qt+r(fe,N+5,31)+1;N+=14;for(var yr=new O(Br),Lr=new O(19),cr=0;crUt)break;for(var An=a(Lr,Dr,1),cr=0;cr>>4;if(wt<16)yr[cr++]=wt;else{var Jr=0,bn=0;for(wt==16?(bn=3+r(fe,N,3),N+=2,Jr=yr[cr-1]):wt==17?(bn=3+r(fe,N,7),N+=3):wt==18&&(bn=11+r(fe,N,127),N+=7);bn--;)yr[cr++]=Jr}}var $r=yr.subarray(0,qt),en=yr.subarray(qt);Ke=h($r),Ct=h(en),le=a($r,Ke,1),te=a(en,Ct,1)}else throw"invalid block type";else{var wt=f(N)+4,Yt=fe[wt-4]|fe[wt-3]<<8,Xt=wt+Yt;if(Xt>rt){if(Dt)throw"unexpected EOF";break}et&&ee($+Yt),be.set(fe.subarray(wt,Xt),$),Ue.b=$+=Yt,Ue.p=N=Xt*8;continue}if(N>Ut)throw"unexpected EOF"}et&&ee($+131072);for(var an=(1<>>4;if(N+=Jr&15,N>Ut)throw"unexpected EOF";if(!Jr)throw"invalid length/literal";if(br<256)be[$++]=br;else if(br==256){le=null;break}else{var dr=br-254;if(br>264){var cr=br-257,tr=B[cr];dr=r(fe,N,(1<>>4;if(!nr)throw"invalid distance";N+=nr&15;var en=o[$t];if($t>3){var tr=I[$t];en+=l(fe,N)&(1<Ut)throw"unexpected EOF";et&&ee($+131072);for(var vr=$+dr;$>0;fe[rt]|=Ue,fe[rt+1]|=Ue>>>8},F=function(fe,be,Ue){Ue<<=be&7;var rt=be/8>>0;fe[rt]|=Ue,fe[rt+1]|=Ue>>>8,fe[rt+2]|=Ue>>>16},P=function(fe,be){for(var Ue=[],rt=0;rtKe&&(Ke=Dt[rt].s);var Ct=new j(Ke+1),Ut=z(Ue[le-1],Ct,0);if(Ut>be){var rt=0,Ht=0,wt=Ut-be,Yt=1<be)Ht+=Yt-(1<>>=wt;Ht>0;){var qt=Dt[rt].s;Ct[qt]=0&&Ht;--rt){var Ar=Dt[rt].s;Ct[Ar]==be&&(--Ct[Ar],++Ht)}Ut=be}return[new O(Ct),Ut]},z=function(fe,be,Ue){return fe.s==-1?Math.max(z(fe.l,be,Ue+1),z(fe.r,be,Ue+1)):be[fe.s]=Ue},Z=function(fe){for(var be=fe.length;be&&!fe[--be];);for(var Ue=new j(++be),rt=0,et=fe[0],Dt=1,ee=function(N){Ue[rt++]=N},U=1;U<=be;++U)if(fe[U]==et&&U!=be)++Dt;else{if(!et&&Dt>2){for(;Dt>138;Dt-=138)ee(32754);Dt>2&&(ee(Dt>10?Dt-11<<5|28690:Dt-3<<5|12305),Dt=0)}else if(Dt>3){for(ee(et),--Dt;Dt>6;Dt-=6)ee(8304);Dt>2&&(ee(Dt-3<<5|8208),Dt=0)}for(;Dt--;)ee(et);Dt=1,et=fe[U]}return[Ue.subarray(0,rt),be]},V=function(fe,be){for(var Ue=0,rt=0;rt>>8,fe[et+2]=fe[et]^255,fe[et+3]=fe[et+1]^255;for(var Dt=0;Dt4&&!Pr[v[zr-1]];--zr);var Jr=$+5<<3,bn=V(et,p)+V(Dt,w)+ee,$r=V(et,Ke)+V(Dt,Ht)+ee+14+3*zr+V(Lr,Pr)+(2*Lr[16]+3*Lr[17]+7*Lr[18]);if(Jr<=bn&&Jr<=$r)return M(be,le,fe.subarray(N,N+$));var en,an,cn,mn;if(m(be,le,1+($r15&&(m(be,le,nr[cr]>>>5&127),le+=nr[cr]>>>12)}}else en=S,an=p,cn=L,mn=w;for(var cr=0;cr255){var $t=rt[cr]>>>18&31;F(be,le,en[$t+257]),le+=an[$t+257],$t>7&&(m(be,le,rt[cr]>>>23&31),le+=B[$t]);var vr=rt[cr]&31;F(be,le,cn[vr]),le+=mn[vr],vr>3&&(F(be,le,rt[cr]>>>5&8191),le+=I[vr])}else F(be,le,en[rt[cr]]),le+=an[rt[cr]];return F(be,le,en[256]),le+an[256]},X=new D([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),re=new O(0),se=function(fe,be,Ue,rt,et,Dt){var ee=fe.length,U=new O(rt+ee+5*(1+Math.floor(ee/7e3))+et),N=U.subarray(rt,U.length-et),$=0;if(!be||ee<8)for(var le=0;le<=ee;le+=65535){var te=le+65535;te>>13,Ut=Ke&8191,Ht=(1<7e3||Pr>24576)&&en>423){$=J(fe,N,0,Br,yr,Lr,Dr,Pr,zr,le-zr,$),Pr=cr=Dr=0,zr=le;for(var an=0;an<286;++an)yr[an]=0;for(var an=0;an<30;++an)Lr[an]=0}var cn=2,mn=0,br=Ut,dr=bn-$r&32767;if(en>2&&Jr==Ar(le-dr))for(var tr=Math.min(Ct,en)-1,nr=Math.min(32767,le),$t=Math.min(258,en);dr<=nr&&--br&&bn!=$r;){if(fe[le+cn]==fe[le+cn-dr]){for(var vr=0;vr<$t&&fe[le+vr]==fe[le+vr-dr];++vr);if(vr>cn){if(cn=vr,mn=dr,vr>tr)break;for(var mr=Math.min(dr,vr-2),xr=0,an=0;anxr&&(xr=Gr,$r=Er)}}}bn=$r,$r=wt[bn],dr+=bn-$r+32768&32767}if(mn){Br[Pr++]=268435456|u[cn]<<18|i[mn];var En=u[cn]&31,Qn=i[mn]&31;Dr+=B[En]+I[Qn],++yr[257+En],++Lr[Qn],An=le+cn,++cr}else Br[Pr++]=fe[le],++yr[fe[le]]}}$=J(fe,N,Dt,Br,yr,Lr,Dr,Pr,zr,le-zr,$),Dt||($=M(N,$,re))}return C(U,0,rt+f($)+et)},_e=function(){for(var fe=new D(256),be=0;be<256;++be){for(var Ue=be,rt=9;--rt;)Ue=(Ue&1&&3988292384)^Ue>>>1;fe[be]=Ue}return fe}(),ge=function(){var fe=4294967295;return{p:function(be){for(var Ue=fe,rt=0;rt>>8;fe=Ue},d:function(){return fe^4294967295}}},we=function(){var fe=1,be=0;return{p:function(Ue){for(var rt=fe,et=be,Dt=Ue.length,ee=0;ee!=Dt;){for(var U=Math.min(ee+5552,Dt);ee>>8<<16|(be&255)<<8|be>>>8)+((fe&255)<<23)*2}}},Re=function(fe,be,Ue,rt,et){return se(fe,be.level==null?6:be.level,be.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(fe.length)))*1.5):12+be.mem,Ue,rt,!et)},He=function(fe,be){var Ue={};for(var rt in fe)Ue[rt]=fe[rt];for(var rt in be)Ue[rt]=be[rt];return Ue},Se=function(fe,be,Ue){for(var rt=fe(),et=fe.toString(),Dt=et.slice(et.indexOf("[")+1,et.lastIndexOf("]")).replace(/ /g,"").split(","),ee=0;ee>>=8},Ot=function(fe,be){var Ue=be.filename;if(fe[0]=31,fe[1]=139,fe[2]=8,fe[8]=be.level<2?4:be.level==9?2:0,fe[9]=3,be.mtime!=0&&Et(fe,4,Math.floor(new Date(be.mtime||Date.now())/1e3)),Ue){fe[3]=8;for(var rt=0;rt<=Ue.length;++rt)fe[rt+10]=Ue.charCodeAt(rt)}},Mt=function(fe){if(fe[0]!=31||fe[1]!=139||fe[2]!=8)throw"invalid gzip data";var be=fe[3],Ue=10;be&4&&(Ue+=fe[10]|(fe[11]<<8)+2);for(var rt=(be>>3&1)+(be>>4&1);rt>0;rt-=!fe[Ue++]);return Ue+(be&2)},Qe=function(fe){var be=fe.length;return(fe[be-4]|fe[be-3]<<8|fe[be-2]<<16)+2*(fe[be-1]<<23)},Ne=function(fe){return 10+(fe.filename&&fe.filename.length+1||0)},lt=function(fe,be){var Ue=be.level,rt=Ue==0?0:Ue<6?1:Ue==9?3:2;fe[0]=120,fe[1]=rt<<6|(rt?32-2*rt:1)},dt=function(fe){if((fe[0]&15)!=8||fe[0]>>>4>7||(fe[0]<<8|fe[1])%31)throw"invalid zlib data";if(fe[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ye(fe,be){return!be&&typeof fe=="function"&&(be=fe,fe={}),this.ondata=be,fe}var st=function(){function fe(be,Ue){!Ue&&typeof be=="function"&&(Ue=be,be={}),this.ondata=Ue,this.o=be||{}}return fe.prototype.p=function(be,Ue){this.ondata(Re(be,this.o,0,0,!Ue),Ue)},fe.prototype.push=function(be,Ue){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Ue,this.p(be,Ue||!1)},fe}(),je=function(){function fe(be,Ue){ct([ze,function(){return[ke,st]}],this,Ye.call(this,be,Ue),function(rt){var et=new st(rt.data);onmessage=ke(et)},6)}return fe}();function Le(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[ze],function(rt){return ce(Me(rt.data[0],rt.data[1]))},0,Ue)}function Me(fe,be){return be===void 0&&(be={}),Re(fe,be,0,0)}var me=function(){function fe(be){this.s={},this.p=new O(0),this.ondata=be}return fe.prototype.e=function(be){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Ue=this.p.length,rt=new O(Ue+be.length);rt.set(this.p),rt.set(be,Ue),this.p=rt},fe.prototype.c=function(be){this.d=this.s.i=be||!1;var Ue=this.s.b,rt=g(this.p,this.o,this.s);this.ondata(C(rt,Ue,this.s.b),this.d),this.o=C(rt,this.s.b-32768),this.s.b=this.o.length,this.p=C(this.p,this.s.p/8>>0),this.s.p&=7},fe.prototype.push=function(be,Ue){this.e(be),this.c(Ue)},fe}(),ye=function(){function fe(be){this.ondata=be,ct([Ie,function(){return[ke,me]}],this,0,function(){var Ue=new me;onmessage=ke(Ue)},7)}return fe}();function Ee(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[Ie],function(rt){return ce(Oe(rt.data[0],xe(rt.data[1])))},1,Ue)}function Oe(fe,be){return g(fe,be)}var De=function(){function fe(be,Ue){this.c=ge(),this.l=0,this.v=1,st.call(this,be,Ue)}return fe.prototype.push=function(be,Ue){st.prototype.push.call(this,be,Ue)},fe.prototype.p=function(be,Ue){this.c.p(be),this.l+=be.length;var rt=Re(be,this.o,this.v&&Ne(this.o),Ue&&8,!Ue);this.v&&(Ot(rt,this.o),this.v=0),Ue&&(Et(rt,rt.length-8,this.c.d()),Et(rt,rt.length-4,this.l)),this.ondata(rt,Ue)},fe}(),Ze=function(){function fe(be,Ue){ct([ze,at,function(){return[ke,st,De]}],this,Ye.call(this,be,Ue),function(rt){var et=new De(rt.data);onmessage=ke(et)},8)}return fe}();function ht(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[ze,at,function(){return[Tt]}],function(rt){return ce(Tt(rt.data[0],rt.data[1]))},2,Ue)}function Tt(fe,be){be===void 0&&(be={});var Ue=ge(),rt=fe.length;Ue.p(fe);var et=Re(fe,be,Ne(be),8),Dt=et.length;return Ot(et,be),Et(et,Dt-8,Ue.d()),Et(et,Dt-4,rt),et}var kt=function(){function fe(be){this.v=1,me.call(this,be)}return fe.prototype.push=function(be,Ue){if(me.prototype.e.call(this,be),this.v){var rt=Mt(this.p);if(rt>=this.p.length&&!Ue)return;this.p=this.p.subarray(rt),this.v=0}if(Ue){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}me.prototype.c.call(this,Ue)},fe}(),It=function(){function fe(be){this.ondata=be,ct([Ie,Ae,function(){return[ke,me,kt]}],this,0,function(){var Ue=new kt;onmessage=ke(Ue)},9)}return fe}();function St(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[Ie,Ae,function(){return[ut]}],function(rt){return ce(ut(rt.data[0]))},3,Ue)}function ut(fe,be){return g(fe.subarray(Mt(fe),-8),be||new O(Qe(fe)))}var nt=function(){function fe(be,Ue){this.c=we(),this.v=1,st.call(this,be,Ue)}return fe.prototype.push=function(be,Ue){st.prototype.push.call(this,be,Ue)},fe.prototype.p=function(be,Ue){this.c.p(be);var rt=Re(be,this.o,this.v&&2,Ue&&4,!Ue);this.v&&(lt(rt,this.o),this.v=0),Ue&&Et(rt,rt.length-4,this.c.d()),this.ondata(rt,Ue)},fe}(),tt=function(){function fe(be,Ue){ct([ze,ne,function(){return[ke,st,nt]}],this,Ye.call(this,be,Ue),function(rt){var et=new nt(rt.data);onmessage=ke(et)},10)}return fe}();function Ce(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[ze,ne,function(){return[Pe]}],function(rt){return ce(Pe(rt.data[0],rt.data[1]))},4,Ue)}function Pe(fe,be){be===void 0&&(be={});var Ue=we();Ue.p(fe);var rt=Re(fe,be,2,4);return lt(rt,be),Et(rt,rt.length-4,Ue.d()),rt}var pt=function(){function fe(be){this.v=1,me.call(this,be)}return fe.prototype.push=function(be,Ue){if(me.prototype.e.call(this,be),this.v){if(this.p.length<2&&!Ue)return;this.p=this.p.subarray(2),this.v=0}if(Ue){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}me.prototype.c.call(this,Ue)},fe}(),it=function(){function fe(be){this.ondata=be,ct([Ie,ae,function(){return[ke,me,pt]}],this,0,function(){var Ue=new pt;onmessage=ke(Ue)},11)}return fe}();function xt(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return Fe(fe,be,[Ie,ae,function(){return[_t]}],function(rt){return ce(_t(rt.data[0],xe(rt.data[1])))},5,Ue)}function _t(fe,be){return g((dt(fe),fe.subarray(2,-4)),be)}var Xe=function(){function fe(be){this.G=kt,this.I=me,this.Z=pt,this.ondata=be}return fe.prototype.push=function(be,Ue){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(be,Ue);else{if(this.p&&this.p.length){var rt=new O(this.p.length+be.length);rt.set(this.p),rt.set(be,this.p.length)}else this.p=be;if(this.p.length>2){var et=this,Dt=function(){et.ondata.apply(et,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Dt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Dt):new this.Z(Dt),this.s.push(this.p,Ue),this.p=null}}},fe}(),mt=function(){function fe(be){this.G=It,this.I=ye,this.Z=it,this.ondata=be}return fe.prototype.push=function(be,Ue){Xe.prototype.push.call(this,be,Ue)},fe}();function Pt(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";return fe[0]==31&&fe[1]==139&&fe[2]==8?St(fe,be,Ue):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?Ee(fe,be,Ue):xt(fe,be,Ue)}function Rt(fe,be){return fe[0]==31&&fe[1]==139&&fe[2]==8?ut(fe,be):(fe[0]&15)!=8||fe[0]>>4>7||(fe[0]<<8|fe[1])%31?Oe(fe,be):_t(fe,be)}var Qt=function(fe,be,Ue,rt){for(var et in fe){var Dt=fe[et],ee=be+et;Dt instanceof O?Ue[ee]=[Dt,rt]:Array.isArray(Dt)?Ue[ee]=[Dt[0],He(rt,Dt[1])]:Qt(Dt,ee+"/",Ue,rt)}};function Ir(fe,be){var Ue=fe.length;if(!be&&typeof TextEncoder!="undefined")return new TextEncoder().encode(fe);for(var rt=new O(fe.length+(fe.length>>>1)),et=0,Dt=function($){rt[et++]=$},ee=0;eert.length){var U=new O(et+8+(Ue-ee<<1));U.set(rt),rt=U}var N=fe.charCodeAt(ee);N<128||be?Dt(N):N<2048?(Dt(192|N>>>6),Dt(128|N&63)):N>55295&&N<57344?(N=65536+(N&1023<<10)|fe.charCodeAt(++ee)&1023,Dt(240|N>>>18),Dt(128|N>>>12&63),Dt(128|N>>>6&63),Dt(128|N&63)):(Dt(224|N>>>12),Dt(128|N>>>6&63),Dt(128|N&63))}return C(rt,0,et)}function Fr(fe,be){var Ue="";if(!be&&typeof TextDecoder!="undefined")return new TextDecoder().decode(fe);for(var rt=0;rt>10,56320|et&1023))}return Ue}var wr=function(fe,be){return be+30+ft(fe,be+26)+ft(fe,be+28)},Kt=function(fe,be,Ue){var rt=ft(fe,be+28),et=Fr(fe.subarray(be+46,be+46+rt),!(ft(fe,be+8)&2048)),Dt=be+46+rt,ee=Ue?Ur(fe,Dt):[yt(fe,be+20),yt(fe,be+24),yt(fe,be+42)],U=ee[0],N=ee[1],$=ee[2];return[ft(fe,be+10),U,N,et,Dt+ft(fe,be+30)+ft(fe,be+32),$]},Ur=function(fe,be){for(;ft(fe,be)!=1;be+=4+ft(fe,be+2));return[yt(fe,be+12),yt(fe,be+4),yt(fe,be+20)]},Kr=function(fe,be,Ue,rt,et,Dt,ee,U,N,$){var le=Dt.length,te=rt.length;Et(fe,be,N!=null?33639248:67324752),be+=4,N!=null&&(fe[be]=20,be+=2),fe[be]=20,be+=2,fe[be++]=$==8&&(U.level==1?6:U.level<6?4:U.level==9?2:0),fe[be++]=ee&&8,fe[be]=$,be+=2;var Ke=new Date(U.mtime||Date.now()),Ct=Ke.getFullYear()-1980;if(Ct<0||Ct>119)throw"date not in range 1980-2099";Et(fe,be,(Ct<<24)*2|Ke.getMonth()+1<<21|Ke.getDate()<<16|Ke.getHours()<<11|Ke.getMinutes()<<5|Ke.getSeconds()>>>1),be+=4,Et(fe,be,Ue),Et(fe,be+4,te),Et(fe,be+8,et),Et(fe,be+12,le),be+=16,N!=null&&(Et(fe,be+=10,N),be+=4),fe.set(Dt,be),be+=le,N==null&&fe.set(rt,be)},Rr=function(fe,be,Ue,rt,et){Et(fe,be,101010256),Et(fe,be+8,Ue),Et(fe,be+10,Ue),Et(fe,be+12,rt),Et(fe,be+16,et)};function pr(fe,be,Ue){if(Ue||(Ue=be,be={}),typeof Ue!="function")throw"no callback";var rt={};Qt(fe,"",rt,be);var et=Object.keys(rt),Dt=et.length,ee=0,U=0,N=Dt,$=new Array(Dt),le=[],te=function(){for(var Ht=0;Ht65535&&Dr("filename too long",null),!cr)Dr(null,Xt);else if(Br<16e4)try{Dr(null,Me(Xt,qt))}catch(Pr){Dr(Pr,null)}else le.push(Le(Xt,qt,Dr))},Ut=0;Ut65535)throw"filename too long";var Ct=le?Me(N,$):N,Ut=Ct.length,Ht=ge();Ht.p(N),rt.push({t:le,d:Ct,m:N.length,c:Ht.d(),u:ee.length!=Ke,n:te,o:et,p:$}),et+=30+Ke+Ut,Dt+=76+2*Ke+Ut}for(var wt=new O(Dt+22),Yt=et,Xt=Dt-et,qt=0;qt65558){be("invalid zip file",null);return}var ee=ft(fe,Dt+8);ee||be(null,{});var U=ee,N=yt(fe,Dt+16),$=N==4294967295;if($){if(Dt=yt(fe,Dt-12),yt(fe,Dt)!=101075792)throw"invalid zip file";U=ee=yt(fe,Dt+32),N=yt(fe,Dt+48)}for(var le=function(Ke){var Ct=Kt(fe,N,$),Ut=Ct[0],Ht=Ct[1],wt=Ct[2],Yt=Ct[3],Xt=Ct[4],qt=Ct[5],Ar=wr(fe,qt);N=Xt;var Br=function(Lr,cr){Lr?(rt(),be(Lr,null)):(et[Yt]=cr,--ee||be(null,et))};if(!Ut)Br(null,C(fe,Ar,Ar+Ht));else if(Ut==8){var yr=fe.subarray(Ar,Ar+Ht);if(Ht<32e4)try{Br(null,Oe(yr,new O(wt)))}catch(Lr){Br(Lr,null)}else Ue.push(Ee(yr,{size:wt},Br))}else Br("unknown compression type "+Ut,null)},te=0;te65558)throw"invalid zip file";var rt=ft(fe,Ue+8);if(!rt)return{};var et=yt(fe,Ue+16),Dt=et==4294967295;if(Dt){if(Ue=yt(fe,Ue-12),yt(fe,Ue)!=101075792)throw"invalid zip file";rt=yt(fe,Ue+32),et=yt(fe,Ue+48)}for(var ee=0;ee1?re-1:0),_e=1;_e1?V-1:0),J=1;J=0)return parseInt(Z.slice(Z.indexOf("e-")+2),10);var V=0;return Z.indexOf(".")>=0&&(V=Z.length-Z.indexOf(".")-1),V},m.getInputDisplayValue=function(z){var Z=z||m.state,V=Z.focused,M=Z.inputValue,J=Z.value,X;V?X=M:X=m.toPrecisionAsStep(J),X==null&&(X="");var re=m.formatWrapper(X);return x(m.props.decimalSeparator)&&(re=re.toString().replace(".",m.props.decimalSeparator)),re},m.recordCursorPosition=function(){try{m.cursorStart=m.input.selectionStart,m.cursorEnd=m.input.selectionEnd,m.currentValue=m.input.value,m.cursorBefore=m.input.value.substring(0,m.cursorStart),m.cursorAfter=m.input.value.substring(m.cursorEnd)}catch(z){}},m.restoreByAfter=function(z){if(z===void 0)return!1;var Z=m.input.value,V=Z.lastIndexOf(z);if(V===-1)return!1;var M=m.cursorBefore.length;return m.lastKeyCode===u.a.DELETE&&m.cursorBefore.charAt(M-1)===z[0]?(m.fixCaret(M,M),!0):V+z.length===Z.length?(m.fixCaret(V,V),!0):!1},m.partRestoreByAfter=function(z){return z===void 0?!1:Array.prototype.some.call(z,function(Z,V){var M=z.substring(V);return m.restoreByAfter(M)})},m.isNotCompleteNumber=function(z){return isNaN(z)||z===""||z===null||z&&z.toString().indexOf(".")===z.toString().length-1},m.stop=function(){m.autoStepTimer&&clearTimeout(m.autoStepTimer)},m.down=function(z,Z,V){m.pressingUpOrDown=!0,m.step("down",z,Z,V)},m.up=function(z,Z,V){m.pressingUpOrDown=!0,m.step("up",z,Z,V)},m.saveInput=function(z){m.input=z};var F=g.value;F===void 0&&(F=g.defaultValue),m.state={focused:g.autoFocus};var P=m.getValidValue(m.toNumber(F));return m.state=o(o({},m.state),{},{inputValue:m.toPrecisionAsStep(P),value:P}),m}return Object(j.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(m){var F=this.props,P=F.value,z=F.onChange,Z=F.max,V=F.min,M=this.state.focused;if(m){if(!L(m.value,P)||!L(m.max,Z)||!L(m.min,V)){var J=M?P:this.getValidValue(P),X;this.pressingUpOrDown?X=J:this.inputting?X=this.rawInput:X=this.toPrecisionAsStep(J),this.setState({value:J,inputValue:X})}var re="value"in this.props?P:this.state.value;"max"in this.props&&m.max!==Z&&typeof re=="number"&&re>Z&&z&&z(Z),"min"in this.props&&m.min!==V&&typeof re=="number"&&re1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,z=parseFloat(m);return isNaN(z)?m:(zP&&(z=P),z)}},{key:"setValue",value:function(m,F){var P=this.props.precision,z=this.isNotCompleteNumber(parseFloat(m))?null:parseFloat(m),Z=this.state.value,V=Z===void 0?null:Z,M=this.state.inputValue,J=M===void 0?null:M,X=typeof z=="number"?z.toFixed(P):"".concat(z),re=z!==V||X!=="".concat(J);return"value"in this.props?(J=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:J},F)):this.setState({value:z,inputValue:this.toPrecisionAsStep(m)},F),re&&this.props.onChange(z),z}},{key:"getMaxPrecision",value:function(m){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,z=P.precision,Z=P.step;if(x(z))return z;var V=this.getPrecision(F),M=this.getPrecision(Z),J=this.getPrecision(m);return m?Math.max(J,V+M):V+M}},{key:"getPrecisionFactor",value:function(m){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(m,F);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(m){return this.props.formatter?this.props.formatter(m):m}},{key:"toPrecisionAsStep",value:function(m){if(this.isNotCompleteNumber(m)||m==="")return m;var F=Math.abs(this.getMaxPrecision(m));return isNaN(F)?m.toString():Number(m).toFixed(F)}},{key:"toNumber",value:function(m){var F=this.props.precision,P=this.state.focused,z=m&&m.length>16&&P;return this.isNotCompleteNumber(m)||z?m:x(F)?Math.round(m*Math.pow(10,F))/Math.pow(10,F):Number(m)}},{key:"upStep",value:function(m,F){var P=this.props.step,z=this.getPrecisionFactor(m,F),Z=Math.abs(this.getMaxPrecision(m,F)),V=((z*m+z*P*F)/z).toFixed(Z);return this.toNumber(V)}},{key:"downStep",value:function(m,F){var P=this.props.step,z=this.getPrecisionFactor(m,F),Z=Math.abs(this.getMaxPrecision(m,F)),V=((z*m-z*P*F)/z).toFixed(Z);return this.toNumber(V)}},{key:"step",value:function(m,F){var P=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Z=arguments.length>3?arguments[3]:void 0;this.stop(),F&&(F.persist(),F.preventDefault());var V=this.props;if(V.disabled)return;var M=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(M))return;var J=this["".concat(m,"Step")](M,z),X=J>V.max||JV.max?J=V.max:J=se),st=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)<=_e),je=Ye||z||Z,Le=st||z||Z,Me=n()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(Q.a)({},"".concat(P,"-handler-up-disabled"),je)),me=n()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(Q.a)({},"".concat(P,"-handler-down-disabled"),Le)),ye=V?{onTouchStart:je?s:this.up,onTouchEnd:this.stop}:{onMouseDown:je?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=V?{onTouchStart:Le?s:this.down,onTouchEnd:this.stop}:{onMouseDown:Le?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return T.a.createElement("div",{className:Qe,style:ge,title:we,onMouseEnter:Re,onMouseLeave:He,onMouseOver:Se,onMouseOut:Te,onFocus:function(){return null},onBlur:function(){return null}},T.a.createElement("div",{className:"".concat(P,"-handler-wrap")},T.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":je,className:Me}),J||T.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:A})),T.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":Le,className:me}),X||T.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:A}))),T.a.createElement("div",{className:"".concat(P,"-input-wrap")},T.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":_e,"aria-valuemax":se,"aria-valuenow":Ot,required:$e,type:ze,placeholder:at,onPaste:ct,onClick:bt,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:Ie,autoComplete:M,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:lt?this.onKeyDown:s,onKeyUp:lt?this.onKeyUp:s,autoFocus:Fe,maxLength:xe,readOnly:Z,disabled:z,max:se,min:_e,step:ce,name:ke,title:we,id:Ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(dt),pattern:ae,inputMode:ne,onInput:ft},Ne))))}}]),C}(T.a.Component);b.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:a,required:!1,autoComplete:"off"};var h=b,r=pe.a=h},dqUG:function(qe,pe,G){var q=G("Gev7"),Q=G("bYtY"),O=G("6GrX"),j=G("pzxd"),D=G("gut8"),B=D.ContextCachedBy,I=function(T){q.call(this,T)};I.prototype={constructor:I,type:"text",brush:function(T,E){var n=this.style;this.__dirty&&j.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var u=n.text;if(u!=null&&(u+=""),!j.needDrawText(u,n)){T.__attrCachedBy=B.NONE;return}this.setTransform(T),j.renderText(this,T,u,n,null,E),this.restoreTransform(T)},getBoundingRect:function(){var T=this.style;if(this.__dirty&&j.normalizeTextStyle(T,!0),!this._rect){var E=T.text;E!=null?E+="":E="";var n=O.getBoundingRect(T.text+"",T.font,T.textAlign,T.textVerticalAlign,T.textPadding,T.textLineHeight,T.rich);if(n.x+=T.x||0,n.y+=T.y||0,j.getStroke(T.textStroke,T.textStrokeWidth)){var u=T.textStrokeWidth;n.x-=u/2,n.y-=u/2,n.width+=u,n.height+=u}this._rect=n}return this._rect}},Q.inherits(I,q);var v=I;qe.exports=v},fW2E:function(qe,pe){var G={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function q(Q,O,j){return G.hasOwnProperty(O)?j*=Q.dpr:j}qe.exports=q},fyJ8:function(qe,pe,G){"use strict";var q=G("rePB"),Q=G("VTBJ"),O=G("Ff2n"),j=G("U8pU"),D=G("q1tI"),B=G.n(D),I=G("TSYQ"),v=G.n(I),T=G("c+Xe"),E=G("sR1s");function n(d){return d&&Object(j.a)(d)==="object"&&!Array.isArray(d)&&!D.isValidElement(d)}function u(d){return typeof d=="string"?!0:Object(T.c)(d)}function c(d,s){var A,a=d.prefixCls,p=d.className,w=d.record,S=d.index,x=d.dataIndex,L=d.render,b=d.children,h=d.component,r=h===void 0?"td":h,l=d.colSpan,f=d.rowSpan,C=d.fixLeft,g=d.fixRight,m=d.firstFixLeft,F=d.lastFixLeft,P=d.firstFixRight,z=d.lastFixRight,Z=d.appendNode,V=d.additionalProps,M=V===void 0?{}:V,J=d.ellipsis,X=d.align,re=d.rowType,se=d.isSticky,_e="".concat(a,"-cell"),ge,we;if(b)we=b;else{var Re=Object(E.b)(w,x);if(we=Re,L){var He=L(Re,w,S);n(He)?(we=He.children,ge=He.props):we=He}}Object(j.a)(we)==="object"&&!Array.isArray(we)&&!D.isValidElement(we)&&(we=null),J&&(F||P)&&(we=D.createElement("span",{className:"".concat(_e,"-content")},we));var Se=ge||{},Te=Se.colSpan,$e=Se.rowSpan,bt=Se.style,Ie=Se.className,ze=Object(O.a)(Se,["colSpan","rowSpan","style","className"]),at=Te!==void 0?Te:l,Ae=$e!==void 0?$e:f;if(at===0||Ae===0)return null;var ne={},ae=typeof C=="number",ce=typeof g=="number";ae&&(ne.position="sticky",ne.left=C),ce&&(ne.position="sticky",ne.right=g);var xe={};X&&(xe.textAlign=X);var Fe,ke=J===!0?{showTitle:!0}:J;ke&&(ke.showTitle||re==="header")&&(typeof we=="string"||typeof we=="number"?Fe=we.toString():D.isValidElement(we)&&typeof we.props.children=="string"&&(Fe=we.props.children));var ct=Object(Q.a)(Object(Q.a)(Object(Q.a)({title:Fe},ze),M),{},{colSpan:at&&at!==1?at:null,rowSpan:Ae&&Ae!==1?Ae:null,className:v()(_e,p,(A={},Object(q.a)(A,"".concat(_e,"-fix-left"),ae),Object(q.a)(A,"".concat(_e,"-fix-left-first"),m),Object(q.a)(A,"".concat(_e,"-fix-left-last"),F),Object(q.a)(A,"".concat(_e,"-fix-right"),ce),Object(q.a)(A,"".concat(_e,"-fix-right-first"),P),Object(q.a)(A,"".concat(_e,"-fix-right-last"),z),Object(q.a)(A,"".concat(_e,"-ellipsis"),J),Object(q.a)(A,"".concat(_e,"-with-append"),Z),Object(q.a)(A,"".concat(_e,"-fix-sticky"),(ae||ce)&&se),A),M.className,Ie),style:Object(Q.a)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},M.style),xe),ne),bt),ref:u(r)?s:null});return D.createElement(r,Object.assign({},ct),Z,we)}var o=D.forwardRef(c);o.displayName="Cell";var i=D.memo(o,function(d,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,d.record):!1});pe.a=i},gut8:function(qe,pe){var G={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},q=9;pe.ContextCachedBy=G,pe.WILL_BE_RESTORED=q},h7HQ:function(qe,pe,G){var q=G("y+Vt"),Q=G("T6xi"),O=q.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(j,D){Q.buildPath(j,D,!0)}});qe.exports=O},hOwI:function(qe,pe){var G=Math.log(2);function q(O,j,D,B,I,v){var T=B+"-"+I,E=O.length;if(v.hasOwnProperty(T))return v[T];if(j===1){var n=Math.round(Math.log((1<Q&&B>j||BD?I:0}qe.exports=G},iXp4:function(qe,pe,G){var q=G("ItGF"),Q=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function O(j){return q.browser.ie&&q.browser.version>=11?function(){var D=this.__clipPaths,B=this.style,I;if(D)for(var v=0;v */pe.read=function(G,q,Q,O,j){var D,B,I=j*8-O-1,v=(1<>1,E=-7,n=Q?j-1:0,u=Q?-1:1,c=G[q+n];for(n+=u,D=c&(1<<-E)-1,c>>=-E,E+=I;E>0;D=D*256+G[q+n],n+=u,E-=8);for(B=D&(1<<-E)-1,D>>=-E,E+=O;E>0;B=B*256+G[q+n],n+=u,E-=8);if(D===0)D=1-T;else{if(D===v)return B?NaN:(c?-1:1)*Infinity;B=B+Math.pow(2,O),D=D-T}return(c?-1:1)*B*Math.pow(2,D-O)},pe.write=function(G,q,Q,O,j,D){var B,I,v,T=D*8-j-1,E=(1<>1,u=j===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=O?0:D-1,o=O?1:-1,i=q<0||q===0&&1/q<0?1:0;for(q=Math.abs(q),isNaN(q)||q===Infinity?(I=isNaN(q)?1:0,B=E):(B=Math.floor(Math.log(q)/Math.LN2),q*(v=Math.pow(2,-B))<1&&(B--,v*=2),B+n>=1?q+=u/v:q+=u*Math.pow(2,1-n),q*v>=2&&(B++,v/=2),B+n>=E?(I=0,B=E):B+n>=1?(I=(q*v-1)*Math.pow(2,j),B=B+n):(I=q*Math.pow(2,n-1)*Math.pow(2,j),B=0));j>=8;G[Q+c]=I&255,c+=o,I/=256,j-=8);for(B=B<0;G[Q+c]=B&255,c+=o,B/=256,T-=8);G[Q+c-o]|=i*128}},lZu9:function(qe,pe,G){(function(q){q(G("VrN/"),G("1eCo"),G("8EBN"))})(function(q){"use strict";q.defineMode("markdown",function(Q,O){var j=q.getMode(Q,"text/html"),D=j.name=="null";function B(V){if(q.findModeByName){var M=q.findModeByName(V);M&&(V=M.mime||M.mimes[0])}var J=q.getMode(Q,V);return J.name=="null"?null:J}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var I={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var v in I)I.hasOwnProperty(v)&&O.tokenTypeOverrides[v]&&(I[v]=O.tokenTypeOverrides[v]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,u=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,c=/^ {0,3}(?:\={1,}|-{2,})\s*$/,o=/^[^#!\[\]*_\\<>` "'(~:]+/,i=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,s=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,A=" ";function a(V,M,J){return M.f=M.inline=J,J(V,M)}function p(V,M,J){return M.f=M.block=J,J(V,M)}function w(V){return!V||!/\S/.test(V.string)}function S(V){if(V.linkTitle=!1,V.linkHref=!1,V.linkText=!1,V.em=!1,V.strong=!1,V.strikethrough=!1,V.quote=0,V.indentedCode=!1,V.f==L){var M=D;if(!M){var J=q.innerMode(j,V.htmlState);M=J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText}M&&(V.f=l,V.block=x,V.htmlState=null)}return V.trailingSpace=0,V.trailingSpaceNewLine=!1,V.prevLine=V.thisLine,V.thisLine={stream:null},null}function x(V,M){var J=V.column()===M.indentation,X=w(M.prevLine.stream),re=M.indentedCode,se=M.prevLine.hr,_e=M.list!==!1,ge=(M.listStack[M.listStack.length-1]||0)+3;M.indentedCode=!1;var we=M.indentation;if(M.indentationDiff===null&&(M.indentationDiff=M.indentation,_e)){for(M.list=null;we=4&&(re||M.prevLine.fencedCodeEnd||M.prevLine.header||X))return V.skipToEnd(),M.indentedCode=!0,I.code;if(V.eatSpace())return null;if(J&&M.indentation<=ge&&(Se=V.match(u))&&Se[1].length<=6)return M.quote=0,M.header=Se[1].length,M.thisLine.header=!0,O.highlightFormatting&&(M.formatting="header"),M.f=M.inline,h(M);if(M.indentation<=ge&&V.eat(">"))return M.quote=J?1:M.quote+1,O.highlightFormatting&&(M.formatting="quote"),V.eatSpace(),h(M);if(!He&&!M.setext&&J&&M.indentation<=ge&&(Se=V.match(E))){var Te=Se[1]?"ol":"ul";return M.indentation=we+V.current().length,M.list=!0,M.quote=0,M.listStack.push(M.indentation),M.em=!1,M.strong=!1,M.code=!1,M.strikethrough=!1,O.taskLists&&V.match(n,!1)&&(M.taskList=!0),M.f=M.inline,O.highlightFormatting&&(M.formatting=["list","list-"+Te]),h(M)}else{if(J&&M.indentation<=ge&&(Se=V.match(i,!0)))return M.quote=0,M.fencedEndRE=new RegExp(Se[1]+"+ *$"),M.localMode=O.fencedCodeBlockHighlighting&&B(Se[2]||O.fencedCodeBlockDefaultMode),M.localMode&&(M.localState=q.startState(M.localMode)),M.f=M.block=b,O.highlightFormatting&&(M.formatting="code-block"),M.code=-1,h(M);if(M.setext||(!Re||!_e)&&!M.quote&&M.list===!1&&!M.code&&!He&&!d.test(V.string)&&(Se=V.lookAhead(1))&&(Se=Se.match(c)))return M.setext?(M.header=M.setext,M.setext=0,V.skipToEnd(),O.highlightFormatting&&(M.formatting="header")):(M.header=Se[0].charAt(0)=="="?1:2,M.setext=M.header),M.thisLine.header=!0,M.f=M.inline,h(M);if(He)return V.skipToEnd(),M.hr=!0,M.thisLine.hr=!0,I.hr;if(V.peek()==="[")return a(V,M,F)}return a(V,M,M.inline)}function L(V,M){var J=j.token(V,M.htmlState);if(!D){var X=q.innerMode(j,M.htmlState);(X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText||M.md_inside&&V.current().indexOf(">")>-1)&&(M.f=l,M.block=x,M.htmlState=null)}return J}function b(V,M){var J=M.listStack[M.listStack.length-1]||0,X=M.indentation=V.quote?M.push(I.formatting+"-"+V.formatting[J]+"-"+V.quote):M.push("error"))}if(V.taskOpen)return M.push("meta"),M.length?M.join(" "):null;if(V.taskClosed)return M.push("property"),M.length?M.join(" "):null;if(V.linkHref?M.push(I.linkHref,"url"):(V.strong&&M.push(I.strong),V.em&&M.push(I.em),V.strikethrough&&M.push(I.strikethrough),V.emoji&&M.push(I.emoji),V.linkText&&M.push(I.linkText),V.code&&M.push(I.code),V.image&&M.push(I.image),V.imageAltText&&M.push(I.imageAltText,"link"),V.imageMarker&&M.push(I.imageMarker)),V.header&&M.push(I.header,I.header+"-"+V.header),V.quote&&(M.push(I.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=V.quote?M.push(I.quote+"-"+V.quote):M.push(I.quote+"-"+O.maxBlockquoteDepth)),V.list!==!1){var X=(V.listStack.length-1)%3;X?X===1?M.push(I.list2):M.push(I.list3):M.push(I.list1)}return V.trailingSpaceNewLine?M.push("trailing-space-new-line"):V.trailingSpace&&M.push("trailing-space-"+(V.trailingSpace%2?"a":"b")),M.length?M.join(" "):null}function r(V,M){return V.match(o,!0)?h(M):void 0}function l(V,M){var J=M.text(V,M);if(typeof J!="undefined")return J;if(M.list)return M.list=null,h(M);if(M.taskList){var X=V.match(n,!0)[1]===" ";return X?M.taskOpen=!0:M.taskClosed=!0,O.highlightFormatting&&(M.formatting="task"),M.taskList=!1,h(M)}if(M.taskOpen=!1,M.taskClosed=!1,M.header&&V.match(/^#+$/,!0))return O.highlightFormatting&&(M.formatting="header"),h(M);var re=V.next();if(M.linkTitle){M.linkTitle=!1;var se=re;re==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var _e="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(V.match(new RegExp(_e),!0))return I.linkHref}if(re==="`"){var ge=M.formatting;O.highlightFormatting&&(M.formatting="code"),V.eatWhile("`");var we=V.current().length;if(M.code==0&&(!M.quote||we==1))return M.code=we,h(M);if(we==M.code){var Re=h(M);return M.code=0,Re}else return M.formatting=ge,h(M)}else if(M.code)return h(M);if(re==="\\"&&(V.next(),O.highlightFormatting)){var He=h(M),Se=I.formatting+"-escape";return He?He+" "+Se:Se}if(re==="!"&&V.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return M.imageMarker=!0,M.image=!0,O.highlightFormatting&&(M.formatting="image"),h(M);if(re==="["&&M.imageMarker&&V.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return M.imageMarker=!1,M.imageAltText=!0,O.highlightFormatting&&(M.formatting="image"),h(M);if(re==="]"&&M.imageAltText){O.highlightFormatting&&(M.formatting="image");var He=h(M);return M.imageAltText=!1,M.image=!1,M.inline=M.f=C,He}if(re==="["&&!M.image)return M.linkText&&V.match(/^.*?\]/)||(M.linkText=!0,O.highlightFormatting&&(M.formatting="link")),h(M);if(re==="]"&&M.linkText){O.highlightFormatting&&(M.formatting="link");var He=h(M);return M.linkText=!1,M.inline=M.f=V.match(/\(.*?\)| ?\[.*?\]/,!1)?C:l,He}if(re==="<"&&V.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=f,O.highlightFormatting&&(M.formatting="link");var He=h(M);return He?He+=" ":He="",He+I.linkInline}if(re==="<"&&V.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=f,O.highlightFormatting&&(M.formatting="link");var He=h(M);return He?He+=" ":He="",He+I.linkEmail}if(O.xml&&re==="<"&&V.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Te=V.string.indexOf(">",V.pos);if(Te!=-1){var $e=V.string.substring(V.start,Te);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($e)&&(M.md_inside=!0)}return V.backUp(1),M.htmlState=q.startState(j),p(V,M,L)}if(O.xml&&re==="<"&&V.match(/^\/\w*?>/))return M.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var bt=1,Ie=V.pos==1?" ":V.string.charAt(V.pos-2);bt<3&&V.eat(re);)bt++;var ze=V.peek()||" ",at=!/\s/.test(ze)&&(!s.test(ze)||/\s/.test(Ie)||s.test(Ie)),Ae=!/\s/.test(Ie)&&(!s.test(Ie)||/\s/.test(ze)||s.test(ze)),ne=null,ae=null;if(bt%2&&(!M.em&&at&&(re==="*"||!Ae||s.test(Ie))?ne=!0:M.em==re&&Ae&&(re==="*"||!at||s.test(ze))&&(ne=!1)),bt>1&&(!M.strong&&at&&(re==="*"||!Ae||s.test(Ie))?ae=!0:M.strong==re&&Ae&&(re==="*"||!at||s.test(ze))&&(ae=!1)),ae!=null||ne!=null){O.highlightFormatting&&(M.formatting=ne==null?"strong":ae==null?"em":"strong em"),ne===!0&&(M.em=re),ae===!0&&(M.strong=re);var Re=h(M);return ne===!1&&(M.em=!1),ae===!1&&(M.strong=!1),Re}}else if(re===" "&&(V.eat("*")||V.eat("_"))){if(V.peek()===" ")return h(M);V.backUp(1)}if(O.strikethrough){if(re==="~"&&V.eatWhile(re)){if(M.strikethrough){O.highlightFormatting&&(M.formatting="strikethrough");var Re=h(M);return M.strikethrough=!1,Re}else if(V.match(/^[^\s]/,!1))return M.strikethrough=!0,O.highlightFormatting&&(M.formatting="strikethrough"),h(M)}else if(re===" "&&V.match(/^~~/,!0)){if(V.peek()===" ")return h(M);V.backUp(2)}}if(O.emoji&&re===":"&&V.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){M.emoji=!0,O.highlightFormatting&&(M.formatting="emoji");var ce=h(M);return M.emoji=!1,ce}return re===" "&&(V.match(/^ +$/,!1)?M.trailingSpace++:M.trailingSpace&&(M.trailingSpaceNewLine=!0)),h(M)}function f(V,M){var J=V.next();if(J===">"){M.f=M.inline=l,O.highlightFormatting&&(M.formatting="link");var X=h(M);return X?X+=" ":X="",X+I.linkInline}return V.match(/^[^>]+/,!0),I.linkInline}function C(V,M){if(V.eatSpace())return null;var J=V.next();return J==="("||J==="["?(M.f=M.inline=m(J==="("?")":"]"),O.highlightFormatting&&(M.formatting="link-string"),M.linkHref=!0,h(M)):"error"}var g={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function m(V){return function(M,J){var X=M.next();if(X===V){J.f=J.inline=l,O.highlightFormatting&&(J.formatting="link-string");var re=h(J);return J.linkHref=!1,re}return M.match(g[V]),J.linkHref=!0,h(J)}}function F(V,M){return V.match(/^([^\]\\]|\\.)*\]:/,!1)?(M.f=P,V.next(),O.highlightFormatting&&(M.formatting="link"),M.linkText=!0,h(M)):a(V,M,l)}function P(V,M){if(V.match(/^\]:/,!0)){M.f=M.inline=z,O.highlightFormatting&&(M.formatting="link");var J=h(M);return M.linkText=!1,J}return V.match(/^([^\]\\]|\\.)+/,!0),I.linkText}function z(V,M){return V.eatSpace()?null:(V.match(/^[^\s]+/,!0),V.peek()===void 0?M.linkTitle=!0:V.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),M.f=M.inline=l,I.linkHref+" url")}var Z={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:l,text:r,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(V){return{f:V.f,prevLine:V.prevLine,thisLine:V.thisLine,block:V.block,htmlState:V.htmlState&&q.copyState(j,V.htmlState),indentation:V.indentation,localMode:V.localMode,localState:V.localMode?q.copyState(V.localMode,V.localState):null,inline:V.inline,text:V.text,formatting:!1,linkText:V.linkText,linkTitle:V.linkTitle,linkHref:V.linkHref,code:V.code,em:V.em,strong:V.strong,strikethrough:V.strikethrough,emoji:V.emoji,header:V.header,setext:V.setext,hr:V.hr,taskList:V.taskList,list:V.list,listStack:V.listStack.slice(0),quote:V.quote,indentedCode:V.indentedCode,trailingSpace:V.trailingSpace,trailingSpaceNewLine:V.trailingSpaceNewLine,md_inside:V.md_inside,fencedEndRE:V.fencedEndRE}},token:function(V,M){if(M.formatting=!1,V!=M.thisLine.stream){if(M.header=0,M.hr=!1,V.match(/^\s*$/,!0))return S(M),null;if(M.prevLine=M.thisLine,M.thisLine={stream:V},M.taskList=!1,M.trailingSpace=0,M.trailingSpaceNewLine=!1,!M.localState&&(M.f=M.block,M.f!=L)){var J=V.match(/^\s*/,!0)[0].replace(/\t/g,A).length;if(M.indentation=J,M.indentationDiff=null,J>0)return null}}return M.f(V,M)},innerMode:function(V){return V.block==L?{state:V.htmlState,mode:j}:V.localState?{state:V.localState,mode:V.localMode}:{state:V,mode:Z}},indent:function(V,M,J){return V.block==L&&j.indent?j.indent(V.htmlState,M,J):V.localState&&V.localMode.indent?V.localMode.indent(V.localState,M,J):q.Pass},blankLine:S,getType:h,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Z},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},loD1:function(qe,pe){function G(q,Q,O,j,D,B,I){if(D===0)return!1;var v=D,T=0,E=q;if(I>Q+v&&I>j+v||Iq+v&&B>O+v||B=E.x&&v<=E.x+E.width&&T>=E.y&&T<=E.y+E.height},clone:function(){return new B(this.x,this.y,this.width,this.height)},copy:function(v){this.x=v.x,this.y=v.y,this.width=v.width,this.height=v.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},B.create=function(v){return new B(v.x,v.y,v.width,v.height)};var I=B;qe.exports=I},mLcG:function(qe,pe){var G=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(q){setTimeout(q,16)};qe.exports=G},n1HI:function(qe,pe,G){var q=G("hX1E"),Q=q.normalizeRadian,O=Math.PI*2;function j(D,B,I,v,T,E,n,u,c){if(n===0)return!1;var o=n;u-=D,c-=B;var i=Math.sqrt(u*u+c*c);if(i-o>I||i+oT&&(T+=O);var s=Math.atan2(c,u);return s<0&&(s+=O),s>=v&&s<=T||s+O>=v&&s+O<=T}pe.containStroke=j},n6Mw:function(qe,pe,G){var q=G("SrGk"),Q=G("bYtY"),O=G("Fofx");function j(B,I){q.call(this,B,I,"clipPath","__clippath_in_use__")}Q.inherits(j,q),j.prototype.update=function(B){var I=this.getSvgElement(B);I&&this.updateDom(I,B.__clipPaths,!1);var v=this.getTextSvgElement(B);v&&this.updateDom(v,B.__clipPaths,!0),this.markUsed(B)},j.prototype.updateDom=function(B,I,v){if(I&&I.length>0){var T=this.getDefs(!0),E=I[0],n,u,c=v?"_textDom":"_dom";E[c]?(u=E[c].getAttribute("id"),n=E[c],T.contains(n)||T.appendChild(n)):(u="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",u),T.appendChild(n),E[c]=n);var o=this.getSvgProxy(E);if(E.transform&&E.parent.invTransform&&!v){var i=Array.prototype.slice.call(E.transform);O.mul(E.transform,E.parent.invTransform,E.transform),o.brush(E),E.transform=i}else o.brush(E);var d=this.getSvgElement(E);n.innerHTML="",n.appendChild(d.cloneNode()),B.setAttribute("clip-path","url(#"+u+")"),I.length>1&&this.updateDom(n,I.slice(1),v)}else B&&B.setAttribute("clip-path","none")},j.prototype.markUsed=function(B){var I=this;B.__clipPaths&&Q.each(B.__clipPaths,function(v){v._dom&&q.prototype.markUsed.call(I,v._dom),v._textDom&&q.prototype.markUsed.call(I,v._textDom)})};var D=j;qe.exports=D},n6Qo:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return v});var q=G("q1tI"),Q=G("biw7"),O=G("fyJ8");function j(T){var E=T.className,n=T.index,u=T.children,c=T.colSpan,o=T.rowSpan,i=q.useContext(Q.a),d=i.prefixCls,s=i.fixedInfoList,A=s[n];return q.createElement(O.a,Object.assign({className:E,index:n,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:c,rowSpan:o}}}},A))}function D(T){return q.createElement("tr",Object.assign({},T))}function B(T){var E=T.children,n=q.useContext(Q.a),u=n.prefixCls;return q.createElement("tfoot",{className:"".concat(u,"-summary")},E)}var I=pe.b=B,v={Cell:j,Row:D}},nCxF:function(qe,pe,G){var q=G("QBsz"),Q=q.min,O=q.max,j=q.scale,D=q.distance,B=q.add,I=q.clone,v=q.sub;function T(E,n,u,c){var o=[],i=[],d=[],s=[],A,a,p,w;if(c){p=[Infinity,Infinity],w=[-Infinity,-Infinity];for(var S=0,x=E.length;S=s.max?void 0:(s.ch=0,s.text=s.cm.getLine(++s.line),!0)}function E(s){return s.line<=s.min?void 0:(s.text=s.cm.getLine(--s.line),s.ch=s.text.length,!0)}function n(s){for(;;){var A=s.text.indexOf(">",s.ch);if(A==-1){if(T(s))continue;return}if(!v(s,A+1)){s.ch=A+1;continue}var a=s.text.lastIndexOf("/",A),p=a>-1&&!/\S/.test(s.text.slice(a+1,A));return s.ch=A+1,p?"selfClose":"regular"}}function u(s){for(;;){var A=s.ch?s.text.lastIndexOf("<",s.ch-1):-1;if(A==-1){if(E(s))continue;return}if(!v(s,A+1)){s.ch=A;continue}B.lastIndex=A,s.ch=A;var a=B.exec(s.text);if(a&&a.index==A)return a}}function c(s){for(;;){B.lastIndex=s.ch;var A=B.exec(s.text);if(!A){if(T(s))continue;return}if(!v(s,A.index+1)){s.ch=A.index+1;continue}return s.ch=A.index+A[0].length,A}}function o(s){for(;;){var A=s.ch?s.text.lastIndexOf(">",s.ch-1):-1;if(A==-1){if(E(s))continue;return}if(!v(s,A+1)){s.ch=A;continue}var a=s.text.lastIndexOf("/",A),p=a>-1&&!/\S/.test(s.text.slice(a+1,A));return s.ch=A+1,p?"selfClose":"regular"}}function i(s,A){for(var a=[];;){var p=c(s),w,S=s.line,x=s.ch-(p?p[0].length:0);if(!p||!(w=n(s)))return;if(w=="selfClose")continue;if(p[1]){for(var L=a.length-1;L>=0;--L)if(a[L]==p[2]){a.length=L;break}if(L<0&&(!A||A==p[2]))return{tag:p[2],from:Q(S,x),to:Q(s.line,s.ch)}}else a.push(p[2])}}function d(s,A){for(var a=[];;){var p=o(s);if(!p)return;if(p=="selfClose"){u(s);continue}var w=s.line,S=s.ch,x=u(s);if(!x)return;if(x[1])a.push(x[2]);else{for(var L=a.length-1;L>=0;--L)if(a[L]==x[2]){a.length=L;break}if(L<0&&(!A||A==x[2]))return{tag:x[2],from:Q(s.line,s.ch),to:Q(w,S)}}}}q.registerHelper("fold","xml",function(s,A){for(var a=new I(s,A.line,0);;){var p=c(a);if(!p||a.line!=A.line)return;var w=n(a);if(!w)return;if(!p[1]&&w!="selfClose"){var S=Q(a.line,a.ch),x=i(a,p[2]);return x&&O(x.from,S)>0?{from:S,to:x.from}:null}}}),q.findMatchingTag=function(s,A,a){var p=new I(s,A.line,A.ch,a);if(p.text.indexOf(">")==-1&&p.text.indexOf("<")==-1)return;var w=n(p),S=w&&Q(p.line,p.ch),x=w&&u(p);if(!w||!x||O(p,A)>0)return;var L={from:Q(p.line,p.ch),to:S,tag:x[2]};return w=="selfClose"?{open:L,close:null,at:"open"}:x[1]?{open:d(p,x[2]),close:L,at:"close"}:(p=new I(s,S.line,S.ch,a),{open:L,close:i(p,x[2]),at:"open"})},q.findEnclosingTag=function(s,A,a,p){for(var w=new I(s,A.line,A.ch,a);;){var S=d(w,p);if(!S)break;var x=new I(s,A.line,A.ch,a),L=i(x,S.tag);if(L)return{open:S,close:L}}},q.scanForClosingTag=function(s,A,a,p){var w=new I(s,A.line,A.ch,p?{from:0,to:p}:null);return i(w,a)}})},p5ED:function(qe,pe,G){"use strict";var q=G("+L6B"),Q=G("2/Rp"),O=G("5Dmo"),j=G("3S7+"),D=G("k1fw"),B=G("tJVT"),I=G("q1tI"),v=G.n(I),T=G("vHTk"),E=G.n(T),n=G("yEEn"),u=G("ZW9T"),c=G("1vsH");pe.a=function(o){var i=o.name,d=o.data,s=o.theme,A=o.type,a=o.filename,p=o.monacoEditor,w=o.className,S=o.style,x=o.close,L=o.onClose,b=o.hasMask,h=Object(I.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),r=Object(B.a)(h,2),l=r[0],f=r[1],C=Object(I.useState)(""),g=Object(B.a)(C,2),m=g[0],F=g[1],P,z=1024*1024,Z=10*z,V=Object(I.useRef)();A==="office"&&(P=Object(c.T)(d).filesize,P>Z&&(A="other")),a&&(p.filename=a),Object(I.useEffect)(function(){var X,re,se=(X=document.cookie)===null||X===void 0||((re=X.replace(/\s/g,""))===null||re===void 0)?void 0:re.split(";");se==null||se.map(function(_e){var ge=_e.split("=");ge[0]==="_educoder_session"&&F(ge[1])})},[]);var M=function(){if(d.startsWith("http")||d.startsWith("/")){J();return}Object(c.z)(a||"educoder",d,a)},J=function(){Object(c.x)(a||i,d)};return console.log("data:",d,"fileanme:",a," name:",i),v.a.createElement("div",{style:Object(D.a)({},S||{}),className:"".concat(b&&E.a.bgBlack," ").concat(A?E.a.wrp:"hide")},x&&v.a.createElement("div",{className:E.a.close,ref:V},v.a.createElement(j.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return V.current}},v.a.createElement("span",{onClick:J},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(j.a,{title:"\u5173\u95ED",getPopupContainer:function(){return V.current}},v.a.createElement("span",{className:"",onClick:L},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(E.a[w]," ").concat(w," ").concat(E.a.monaco," ").concat(A==="txt"?"show":"hide")},A==="txt"&&v.a.createElement(u.b,p)),A==="audio"&&v.a.createElement("audio",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?d:"data:audio/mp3;base64,").concat(d),autoPlay:!0}),A==="video"&&v.a.createElement(v.a.Fragment,null,d!=null&&d.startsWith("/")?v.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),A==="html"&&v.a.createElement("iframe",{src:d+"&disposition=inline"}),A==="pdf"&&v.a.createElement("embed",{className:E.a.embed,src:d}),A==="image"&&v.a.createElement(v.a.Fragment,null,v.a.createElement("img",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(d)})),A==="other"&&v.a.createElement("div",null,v.a.createElement(Q.a,{type:"primary",size:"large",onClick:M},v.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(A==="download"||A==="office")&&v.a.createElement(Q.a,{type:"primary",size:"large",onClick:M},v.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(qe,pe,G){},psGv:function(qe,pe,G){var q,Q;(function(){var O;(function(){"use strict";var I=[,,function(n){function u(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}u.prototype.clone_empty=function(){var i=new u(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},u.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},u.prototype.has_match=function(i){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(i))return!0;return!1},u.prototype.set_indent=function(i,d){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.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)},u.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},u.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(i){this.__items.push(i);var d=i.lastIndexOf(` `);d!==-1?this.__character_count=i.length-d:this.__character_count+=i.length},u.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function c(i,d){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),d=d||"",i.indent_level>0&&(d=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}c.prototype.get_indent_size=function(i,d){var s=this.__base_string_length;return d=d||0,i<0&&(s=0),s+=i*this.__indent_size,s+=d,s},c.prototype.get_indent_string=function(i,d){var s=this.__base_string;return d=d||0,i<0&&(i=0,s=""),d+=i*this.__indent_size,this.__ensure_cache(d),s+=this.__cache[d],s},c.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},c.prototype.__add_column=function(){var i=this.__cache.length,d=0,s="";this.__indent_size&&i>=this.__indent_size&&(d=Math.floor(i/this.__indent_size),i-=d*this.__indent_size,s=new Array(d+1).join(this.__indent_string)),i&&(s+=new Array(i+1).join(" ")),this.__cache.push(s)};function o(i,d){this.__indent_cache=new c(i,d),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(i,d){return this.__indent_cache.get_indent_string(i,d)},o.prototype.get_indent_size=function(i,d){return this.__indent_cache.get_indent_size(i,d)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(i){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===` `&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(` `);return i!==` `&&(s=s.replace(/[\n]/g,i)),s},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(i,d){return i=i||0,d=d||0,this.next_line.set_indent(i,d),this.__lines.length>1?(this.current_line.set_indent(i,d),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(i){for(var d=0;d1&&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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(i,d){for(var s=this.__lines.length-2;s>=0;){var A=this.__lines[s];if(A.is_empty())break;if(A.item(0).indexOf(i)!==0&&A.item(-1)!==d){this.__lines.splice(s+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},n.exports.Output=o},function(n){function u(c,o,i,d){this.type=c,this.text=o,this.comments_before=null,this.newlines=i||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=u},,,function(n){function u(i,d){this.raw_options=c(i,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}u.prototype._get_array=function(i,d){var s=this.raw_options[i],A=d||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(A=s.concat()):typeof s=="string"&&(A=s.split(/[^a-zA-Z0-9_\/\-]+/)),A},u.prototype._get_boolean=function(i,d){var s=this.raw_options[i],A=s===void 0?!!d:!!s;return A},u.prototype._get_characters=function(i,d){var s=this.raw_options[i],A=d||"";return typeof s=="string"&&(A=s.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),A},u.prototype._get_number=function(i,d){var s=this.raw_options[i];d=parseInt(d,10),isNaN(d)&&(d=0);var A=parseInt(s,10);return isNaN(A)&&(A=d),A},u.prototype._get_selection=function(i,d,s){var A=this._get_selection_list(i,d,s);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values: `+d+` You passed in: '`+this.raw_options[i]+"'");return A[0]},u.prototype._get_selection_list=function(i,d,s){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[d[0]],!this._is_valid_selection(s,d))throw new Error("Invalid Default Value!");var A=this._get_array(i,s);if(!this._is_valid_selection(A,d))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values: `+d+` You passed in: '`+this.raw_options[i]+"'");return A},u.prototype._is_valid_selection=function(i,d){return i.length&&d.length&&!i.some(function(s){return d.indexOf(s)===-1})};function c(i,d){var s={};i=o(i);var A;for(A in i)A!==d&&(s[A]=i[A]);if(d&&i[d])for(A in i[d])s[A]=i[d][A];return s}function o(i){var d={},s;for(s in i){var A=s.replace(/-/g,"_");d[A]=i[s]}return d}n.exports.Options=u,n.exports.normalizeOpts=o,n.exports.mergeOpts=c},,function(n){var u=RegExp.prototype.hasOwnProperty("sticky");function c(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}c.prototype.restart=function(){this.__position=0},c.prototype.back=function(){this.__position>0&&(this.__position-=1)},c.prototype.hasNext=function(){return this.__position=0&&o=0&&i=o.length&&this.__input.substring(i-o.length,i).toLowerCase()===o},n.exports.InputScanner=c},function(n,u,c){var o=c(8).InputScanner,i=c(3).Token,d=c(10).TokenStream,s=c(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(p,w){this._input=new o(p),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var p,w=new i(A.START,""),S=null,x=[],L=new d;w.type!==A.EOF;){for(p=this._get_next_token(w,S);this._is_comment(p);)L.add(p),p=this._get_next_token(w,S);L.isEmpty()||(p.comments_before=L,L=new d),p.parent=S,this._is_opening(p)?(x.push(S),S=p):S&&this._is_closing(p,S)&&(p.opened=S,S.closed=p,S=x.pop(),p.parent=S),p.previous=w,w.next=p,this.__tokens.add(p),w=p}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(p,w){this._readWhitespace();var S=this._input.read(/.+/g);return S?this._create_token(A.RAW,S):this._create_token(A.EOF,"")},a.prototype._is_comment=function(p){return!1},a.prototype._is_opening=function(p){return!1},a.prototype._is_closing=function(p,w){return!1},a.prototype._create_token=function(p,w){var S=new i(p,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return S},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=a,n.exports.TOKEN=A},function(n){function u(c){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=c}u.prototype.restart=function(){this.__position=0},u.prototype.isEmpty=function(){return this.__tokens_length===0},u.prototype.hasNext=function(){return this.__position=0&&c/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new o,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(s){var A=this._create();return A._disabled[s]=!0,A._update(),A},d.prototype.read_options=function(s){var A=this._create();for(var a in i)A._disabled[a]=s.templating.indexOf(a)===-1;return A._update(),A},d.prototype.exclude=function(s){var A=this._create();return A._excluded[s]=!0,A._update(),A},d.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var A=this._read_template();A;)this._match_pattern?A+=this._input.read(this._match_pattern):A+=this._input.readUntil(this.__template_pattern),s+=A,A=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},d.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},d.prototype._read_template=function(){var s="",A=this._input.peek();if(A==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(s=s||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},n.exports.TemplatablePattern=d},,,,function(n,u,c){var o=c(19).Beautifier,i=c(20).Options;function d(s,A,a,p){var w=new o(s,A,a,p);return w.beautify()}n.exports=d,n.exports.defaultOptions=function(){return new i}},function(n,u,c){var o=c(20).Options,i=c(2).Output,d=c(21).Tokenizer,s=c(21).TOKEN,A=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,p=function(C,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=C.max_preserve_newlines,this.preserve_newlines=C.preserve_newlines,this._output=new i(C,g)};p.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},p.prototype.set_space_before_token=function(C,g){this._output.space_before_token=C,this._output.non_breaking_space=g},p.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},p.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},p.prototype.print_preserved_newlines=function(C){var g=0;C.type!==s.TEXT&&C.previous.type!==s.TEXT&&(g=C.newlines?1:0),this.preserve_newlines&&(g=C.newlines0);return g!==0},p.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},p.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},p.prototype.print_newline=function(C){this._output.add_new_line(C)},p.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},p.prototype.indent=function(){this.indent_level++},p.prototype.get_full_indent=function(C){return C=this.indent_level+(C||0),C<1?"":this._output.get_indent_string(C)};var w=function(C){for(var g=null,m=C.next;m.type!==s.EOF&&C.closed!==m;){if(m.type===s.ATTRIBUTE&&m.text==="type"){m.next&&m.next.type===s.EQUALS&&m.next.next&&m.next.next.type===s.VALUE&&(g=m.next.next.text);break}m=m.next}return g},S=function(C,g){var m=null,F=null;return g.closed?(C==="script"?m="text/javascript":C==="style"&&(m="text/css"),m=w(g)||m,m.search("text/css")>-1?F="css":m.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?F="javascript":m.search(/(text|application|dojo)\/(x-)?(html)/)>-1?F="html":m.search(/test\/null/)>-1&&(F="null"),F):null};function x(C,g){return g.indexOf(C)!==-1}function L(C,g,m){this.parent=C||null,this.tag=g?g.tag_name:"",this.indent_level=m||0,this.parser_token=g||null}function b(C){this._printer=C,this._current_frame=null}b.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},b.prototype.record_tag=function(C){var g=new L(this._current_frame,C,this._printer.indent_level);this._current_frame=g},b.prototype._try_pop_frame=function(C){var g=null;return C&&(g=C.parser_token,this._printer.indent_level=C.indent_level,this._current_frame=C.parent),g},b.prototype._get_frame=function(C,g){for(var m=this._current_frame;m&&!(C.indexOf(m.tag)!==-1);){if(g&&g.indexOf(m.tag)!==-1){m=null;break}m=m.parent}return m},b.prototype.try_pop=function(C,g){var m=this._get_frame([C],g);return this._try_pop_frame(m)},b.prototype.indent_to_tag=function(C){var g=this._get_frame(C);g&&(this._printer.indent_level=g.indent_level)};function h(C,g,m,F){this._source_text=C||"",g=g||{},this._js_beautify=m,this._css_beautify=F,this._tag_stack=null;var P=new o(g,"html");this._options=P,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=` `,C&&A.test(C)&&(g=C.match(A)[0])),C=C.replace(a,` `);var m=C.match(/^[\t ]*/)[0],F={text:"",type:""},P=new r,z=new p(this._options,m),Z=new d(C,this._options).tokenize();this._tag_stack=new b(z);for(var V=null,M=Z.next();M.type!==s.EOF;)M.type===s.TAG_OPEN||M.type===s.COMMENT?(V=this._handle_tag_open(z,M,P,F),P=V):M.type===s.ATTRIBUTE||M.type===s.EQUALS||M.type===s.VALUE||M.type===s.TEXT&&!P.tag_complete?V=this._handle_inside_tag(z,M,P,Z):M.type===s.TAG_CLOSE?V=this._handle_tag_close(z,M,P):M.type===s.TEXT?V=this._handle_text(z,M,P):z.add_raw_token(M),F=V,M=Z.next();var J=z._output.get_code(g);return J},h.prototype._handle_tag_close=function(C,g,m){var F={text:g.text,type:g.type};return C.alignment_size=0,m.tag_complete=!0,C.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),m.is_unformatted?C.add_raw_token(g):(m.tag_start_char==="<"&&(C.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&m.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(g)),m.indent_content&&!(m.is_unformatted||m.is_content_unformatted)&&(C.indent(),m.indent_content=!1),!m.is_inline_element&&!(m.is_unformatted||m.is_content_unformatted)&&C.set_wrap_point(),F},h.prototype._handle_inside_tag=function(C,g,m,F){var P=m.has_wrapped_attrs,z={text:g.text,type:g.type};if(C.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),m.is_unformatted)C.add_raw_token(g);else if(m.tag_start_char==="{"&&g.type===s.TEXT)C.print_preserved_newlines(g)?(g.newlines=0,C.add_raw_token(g)):C.print_token(g);else{if(g.type===s.ATTRIBUTE?(C.set_space_before_token(!0),m.attr_count+=1):(g.type===s.EQUALS||g.type===s.VALUE&&g.previous.type===s.EQUALS)&&C.set_space_before_token(!1),g.type===s.ATTRIBUTE&&m.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(C.traverse_whitespace(g),P=P||g.newlines!==0),this._is_wrap_attributes_force)){var Z=m.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&m.attr_count===1){var V=!0,M=0,J;do{if(J=F.peek(M),J.type===s.ATTRIBUTE){V=!1;break}M+=1}while(M<4&&J.type!==s.EOF&&J.type!==s.TAG_CLOSE);Z=!V}Z&&(C.print_newline(!1),P=!0)}C.print_token(g),P=P||C.previous_token_wrapped(),m.has_wrapped_attrs=P}return z},h.prototype._handle_text=function(C,g,m){var F={text:g.text,type:"TK_CONTENT"};return m.custom_beautifier_name?this._print_custom_beatifier_text(C,g,m):m.is_unformatted||m.is_content_unformatted?C.add_raw_token(g):(C.traverse_whitespace(g),C.print_token(g)),F},h.prototype._print_custom_beatifier_text=function(C,g,m){var F=this;if(g.text!==""){var P=g.text,z,Z=1,V="",M="";m.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?z=this._js_beautify:m.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?z=this._css_beautify:m.custom_beautifier_name==="html"&&(z=function(ge,we){var Re=new h(ge,we,F._js_beautify,F._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?Z=0:this._options.indent_scripts==="separate"&&(Z=-C.indent_level);var J=C.get_full_indent(Z);if(P=P.replace(/\n[ \t]*$/,""),m.custom_beautifier_name!=="html"&&P[0]==="<"&&P.match(/^(|]]>)$/.exec(P);if(!X){C.add_raw_token(g);return}V=J+X[1]+` `,P=X[4],X[5]&&(M=J+X[5]),P=P.replace(/\n[ \t]*$/,""),(X[2]||X[3].indexOf(` `)!==-1)&&(X=X[3].match(/[ \t]+$/),X&&(g.whitespace_before=X[0]))}if(P)if(z){var re=function(){this.eol=` `};re.prototype=this._options.raw_options;var se=new re;P=z(J+P,se)}else{var _e=g.whitespace_before;_e&&(P=P.replace(new RegExp(` (`+_e+")?","g"),` `)),P=J+P.replace(/\n/g,` `+J)}V&&(P?P=V+P+` `+M:P=V+M),C.print_newline(!1),P&&(g.text=P,g.whitespace_before="",g.newlines=0,C.add_raw_token(g),C.print_newline(!0))}},h.prototype._handle_tag_open=function(C,g,m,F){var P=this._get_tag_open_token(g);return(m.is_unformatted||m.is_content_unformatted)&&!m.is_empty_element&&g.type===s.TAG_OPEN&&g.text.indexOf("]*)/),this.tag_check=m?m[1]:""):(m=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=m?m[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var F=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(F=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(F)))}};h.prototype._get_tag_open_token=function(C){var g=new r(this._tag_stack.get_parser_token(),C);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||x(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&x(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&x(g.tag_check,this._options.content_unformatted),g.is_inline_element=x(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},h.prototype._set_tag_position=function(C,g,m,F,P){if(m.is_empty_element||(m.is_end_tag?m.start_tag_token=this._tag_stack.try_pop(m.tag_name):(this._do_optional_end_element(m)&&(m.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(m),(m.tag_name==="script"||m.tag_name==="style")&&!(m.is_unformatted||m.is_content_unformatted)&&(m.custom_beautifier_name=S(m.tag_check,g)))),x(m.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),m.is_empty_element){if(m.tag_start_char==="{"&&m.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),m.indent_content=!0;var z=C.current_line_has_match(/{{#if/);z||C.print_newline(!1)}m.tag_name==="!--"&&P.type===s.TAG_CLOSE&&F.is_end_tag&&m.text.indexOf(` `)===-1||(m.is_inline_element||m.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,m))}else if(m.is_end_tag){var Z=!1;Z=m.start_tag_token&&m.start_tag_token.multiline_content,Z=Z||!m.is_inline_element&&!(F.is_inline_element||F.is_unformatted)&&!(P.type===s.TAG_CLOSE&&m.start_tag_token===F)&&P.type!=="TK_CONTENT",(m.is_content_unformatted||m.is_unformatted)&&(Z=!1),Z&&C.print_newline(!1)}else m.indent_content=!m.custom_beautifier_name,m.tag_start_char==="<"&&(m.tag_name==="html"?m.indent_content=this._options.indent_inner_html:m.tag_name==="head"?m.indent_content=this._options.indent_head_inner_html:m.tag_name==="body"&&(m.indent_content=this._options.indent_body_inner_html)),!(m.is_inline_element||m.is_unformatted)&&(P.type!=="TK_CONTENT"||m.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,m)},h.prototype._calcluate_parent_multiline=function(C,g){g.parent&&C._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var l=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],f=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(C){var g=null;if(C.is_empty_element||!C.is_start_tag||!C.parent)return;if(C.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(C.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(C.tag_name==="dd"||C.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(C.parent.tag_name==="p"&&l.indexOf(C.tag_name)!==-1){var m=C.parent.parent;(!m||f.indexOf(m.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else C.tag_name==="rp"||C.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):C.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):C.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):C.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):C.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):C.tag_name==="tbody"||C.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):C.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(C.tag_name==="th"||C.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return C.parent=this._tag_stack.get_parser_token(),g},n.exports.Beautifier=h},function(n,u,c){var o=c(6).Options;function i(d){o.call(this,d,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}i.prototype=new o,n.exports.Options=i},function(n,u,c){var o=c(9).Tokenizer,i=c(9).TOKEN,d=c(13).Directives,s=c(14).TemplatablePattern,A=c(12).Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},p=new d(/<\!--/,/-->/),w=function(S,x){o.call(this,S,x),this._current_tag_name="";var L=new s(this._input).read_options(this._options),b=new A(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.until(/[\n\r\t >\/]/),handlebars_comment:b.starting_with(/{{!--/).until_after(/--}}/),handlebars:b.starting_with(/{{/).until_after(/}}/),handlebars_open:b.until(/[\n\r\t }]/),handlebars_raw_close:b.until(/}}/),comment:b.starting_with(//),cdata:b.starting_with(//),conditional_comment:b.starting_with(//),processing:b.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var h=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=b.matching(h).until_after(h)}};w.prototype=new o,w.prototype._is_comment=function(S){return!1},w.prototype._is_opening=function(S){return S.type===a.TAG_OPEN},w.prototype._is_closing=function(S,x){return S.type===a.TAG_CLOSE&&x&&((S.text===">"||S.text==="/>")&&x.text[0]==="<"||S.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},w.prototype._reset=function(){this._current_tag_name=""},w.prototype._get_next_token=function(S,x){var L=null;this._readWhitespace();var b=this._input.peek();return b===null?this._create_token(a.EOF,""):(L=L||this._read_open_handlebars(b,x),L=L||this._read_attribute(b,S,x),L=L||this._read_close(b,x),L=L||this._read_raw_content(b,S,x),L=L||this._read_content_word(b),L=L||this._read_comment_or_cdata(b),L=L||this._read_processing(b),L=L||this._read_open(b,x),L=L||this._create_token(a.UNKNOWN,this._input.next()),L)},w.prototype._read_comment_or_cdata=function(S){var x=null,L=null,b=null;if(S==="<"){var h=this._input.peek(1);h==="!"&&(L=this.__patterns.comment.read(),L?(b=p.get_directives(L),b&&b.ignore==="start"&&(L+=p.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(x=this._create_token(a.COMMENT,L),x.directives=b)}return x},w.prototype._read_processing=function(S){var x=null,L=null,b=null;if(S==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(x=this._create_token(a.COMMENT,L),x.directives=b)}return x},w.prototype._read_open=function(S,x){var L=null,b=null;return x||S==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),b=this._create_token(a.TAG_OPEN,L)),b},w.prototype._read_open_handlebars=function(S,x){var L=null,b=null;return x||this._options.indent_handlebars&&S==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),b=this._create_token(a.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),b=this._create_token(a.TAG_OPEN,L))),b},w.prototype._read_close=function(S,x){var L=null,b=null;return x&&(x.text[0]==="<"&&(S===">"||S==="/"&&this._input.peek(1)===">")?(L=this._input.next(),S==="/"&&(L+=this._input.next()),b=this._create_token(a.TAG_CLOSE,L)):x.text[0]==="{"&&S==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),b=this._create_token(a.TAG_CLOSE,"}}"))),b},w.prototype._read_attribute=function(S,x,L){var b=null,h="";if(L&&L.text[0]==="<")if(S==="=")b=this._create_token(a.EQUALS,this._input.next());else if(S==='"'||S==="'"){var r=this._input.next();S==='"'?r+=this.__patterns.double_quote.read():r+=this.__patterns.single_quote.read(),b=this._create_token(a.VALUE,r)}else h=this.__patterns.attribute.read(),h&&(x.type===a.EQUALS?b=this._create_token(a.VALUE,h):b=this._create_token(a.ATTRIBUTE,h));return b},w.prototype._is_content_unformatted=function(S){return this._options.void_elements.indexOf(S)===-1&&(this._options.content_unformatted.indexOf(S)!==-1||this._options.unformatted.indexOf(S)!==-1)},w.prototype._read_raw_content=function(S,x,L){var b="";if(L&&L.text[0]==="{")b=this.__patterns.handlebars_raw_close.read();else if(x.type===a.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var h=x.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var r=this._read_comment_or_cdata(S);if(r)return r.type=a.TEXT,r;b=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(h)&&(b=this._input.readUntil(new RegExp("","ig")))}return b?this._create_token(a.TEXT,b):null},w.prototype._read_content_word=function(S){var x="";if(this._options.unformatted_content_delimiter&&(S===this._options.unformatted_content_delimiter[0]&&(x=this.__patterns.unformatted_content_delimiter.read())),x||(x=this.__patterns.word.read()),x)return this._create_token(a.TEXT,x)},n.exports.Tokenizer=w,n.exports.TOKEN=a}],v={};function T(n){var u=v[n];if(u!==void 0)return u.exports;var c=v[n]={exports:{}};return I[n](c,c.exports,T),c.exports}var E=T(18);O=E})();var j=O;if(!0)!(q=[G,G("6UM0"),G("TXwP")],Q=function(I){var v=G("6UM0"),T=G("TXwP");return{html_beautify:function(E,n){return j(E,n,v.js_beautify,T.css_beautify)}}}.apply(pe,q),Q!==void 0&&(qe.exports=Q));else var D,B})()},pzxd:function(qe,pe,G){var q=G("bYtY"),Q=q.retrieve2,O=q.retrieve3,j=q.each,D=q.normalizeCssArray,B=q.isString,I=q.isObject,v=G("6GrX"),T=G("VpOo"),E=G("Xnb7"),n=G("fW2E"),u=G("gut8"),c=u.ContextCachedBy,o=u.WILL_BE_RESTORED,i=v.DEFAULT_FONT,d={left:1,right:1,center:1},s={top:1,bottom:1,middle:1},A=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],a={},p={};function w(J){return S(J),j(J.rich,S),J}function S(J){if(J){J.font=v.makeFont(J);var X=J.textAlign;X==="middle"&&(X="center"),J.textAlign=X==null||d[X]?X:"left";var re=J.textVerticalAlign||J.textBaseline;re==="center"&&(re="middle"),J.textVerticalAlign=re==null||s[re]?re:"top";var se=J.textPadding;se&&(J.textPadding=D(J.textPadding))}}function x(J,X,re,se,_e,ge){se.rich?b(J,X,re,se,_e,ge):L(J,X,re,se,_e,ge)}function L(J,X,re,se,_e,ge){"use strict";var we=f(se),Re,He=!1,Se=X.__attrCachedBy===c.PLAIN_TEXT;ge!==o?(ge&&(Re=ge.style,He=!we&&Se&&Re),X.__attrCachedBy=we?c.NONE:c.PLAIN_TEXT):Se&&(X.__attrCachedBy=c.NONE);var Te=se.font||i;(!He||Te!==(Re.font||i))&&(X.font=Te);var $e=J.__computedFont;J.__styleFont!==Te&&(J.__styleFont=Te,$e=J.__computedFont=X.font);var bt=se.textPadding,Ie=se.textLineHeight,ze=J.__textCotentBlock;(!ze||J.__dirtyText)&&(ze=J.__textCotentBlock=v.parsePlainText(re,$e,bt,Ie,se.truncate));var at=ze.outerHeight,Ae=ze.lines,ne=ze.lineHeight,ae=m(p,J,se,_e),ce=ae.baseX,xe=ae.baseY,Fe=ae.textAlign||"left",ke=ae.textVerticalAlign;r(X,se,_e,ce,xe);var ct=v.adjustTextY(xe,at,ke),ft=ce,yt=ct;if(we||bt){var Et=v.getWidth(re,$e),Ot=Et;bt&&(Ot+=bt[1]+bt[3]);var Mt=v.adjustTextX(ce,Ot,Fe);we&&C(J,X,se,Mt,ct,Ot,at),bt&&(ft=V(ce,Fe,bt),yt+=bt[0])}X.textAlign=Fe,X.textBaseline="middle",X.globalAlpha=se.opacity||1;for(var Qe=0;Qe=0&&(Qe=Fe[Mt],Qe.textAlign==="right");)l(J,X,Qe,se,ct,ne,Ot,"right"),ft-=Qe.width,Ot-=Qe.width,Mt--;for(Et+=(ge-(Et-Ae)-(ae-Ot)-ft)/2;yt<=Mt;)Qe=Fe[yt],l(J,X,Qe,se,ct,ne,Et+Qe.width/2,"center"),Et+=Qe.width,yt++;ne+=ct}}function r(J,X,re,se,_e){if(re&&X.textRotation){var ge=X.textOrigin;ge==="center"?(se=re.width/2+re.x,_e=re.height/2+re.y):ge&&(se=ge[0]+re.x,_e=ge[1]+re.y),J.translate(se,_e),J.rotate(-X.textRotation),J.translate(-se,-_e)}}function l(J,X,re,se,_e,ge,we,Re){var He=se.rich[re.styleName]||{};He.text=re.text;var Se=re.textVerticalAlign,Te=ge+_e/2;Se==="top"?Te=ge+re.height/2:Se==="bottom"&&(Te=ge+_e-re.height/2),!re.isLineHolder&&f(He)&&C(J,X,He,Re==="right"?we-re.width:Re==="center"?we-re.width/2:we,Te-re.height/2,re.width,re.height);var $e=re.textPadding;$e&&(we=V(we,Re,$e),Te-=re.height/2-$e[2]-re.textHeight/2),F(X,"shadowBlur",O(He.textShadowBlur,se.textShadowBlur,0)),F(X,"shadowColor",He.textShadowColor||se.textShadowColor||"transparent"),F(X,"shadowOffsetX",O(He.textShadowOffsetX,se.textShadowOffsetX,0)),F(X,"shadowOffsetY",O(He.textShadowOffsetY,se.textShadowOffsetY,0)),F(X,"textAlign",Re),F(X,"textBaseline","middle"),F(X,"font",re.font||i);var bt=P(He.textStroke||se.textStroke,ze),Ie=z(He.textFill||se.textFill),ze=Q(He.textStrokeWidth,se.textStrokeWidth);bt&&(F(X,"lineWidth",ze),F(X,"strokeStyle",bt),X.strokeText(re.text,we,Te)),Ie&&(F(X,"fillStyle",Ie),X.fillText(re.text,we,Te))}function f(J){return!!(J.textBackgroundColor||J.textBorderWidth&&J.textBorderColor)}function C(J,X,re,se,_e,ge,we){var Re=re.textBackgroundColor,He=re.textBorderWidth,Se=re.textBorderColor,Te=B(Re);if(F(X,"shadowBlur",re.textBoxShadowBlur||0),F(X,"shadowColor",re.textBoxShadowColor||"transparent"),F(X,"shadowOffsetX",re.textBoxShadowOffsetX||0),F(X,"shadowOffsetY",re.textBoxShadowOffsetY||0),Te||He&&Se){X.beginPath();var $e=re.textBorderRadius;$e?T.buildPath(X,{x:se,y:_e,width:ge,height:we,r:$e}):X.rect(se,_e,ge,we),X.closePath()}if(Te)if(F(X,"fillStyle",Re),re.fillOpacity!=null){var bt=X.globalAlpha;X.globalAlpha=re.fillOpacity*re.opacity,X.fill(),X.globalAlpha=bt}else X.fill();else if(I(Re)){var Ie=Re.image;Ie=E.createOrUpdateImage(Ie,null,J,g,Re),Ie&&E.isImageReady(Ie)&&X.drawImage(Ie,se,_e,ge,we)}if(He&&Se)if(F(X,"lineWidth",He),F(X,"strokeStyle",Se),re.strokeOpacity!=null){var bt=X.globalAlpha;X.globalAlpha=re.strokeOpacity*re.opacity,X.stroke(),X.globalAlpha=bt}else X.stroke()}function g(J,X){X.image=J}function m(J,X,re,se){var _e=re.x||0,ge=re.y||0,we=re.textAlign,Re=re.textVerticalAlign;if(se){var He=re.textPosition;if(He instanceof Array)_e=se.x+Z(He[0],se.width),ge=se.y+Z(He[1],se.height);else{var Se=X&&X.calculateTextPosition?X.calculateTextPosition(a,re,se):v.calculateTextPosition(a,re,se);_e=Se.x,ge=Se.y,we=we||Se.textAlign,Re=Re||Se.textVerticalAlign}var Te=re.textOffset;Te&&(_e+=Te[0],ge+=Te[1])}return J=J||{},J.baseX=_e,J.baseY=ge,J.textAlign=we,J.textVerticalAlign=Re,J}function F(J,X,re){return J[X]=n(J,X,re),J[X]}function P(J,X){return J==null||X<=0||J==="transparent"||J==="none"?null:J.image||J.colorStops?"#000":J}function z(J){return J==null||J==="none"?null:J.image||J.colorStops?"#000":J}function Z(J,X){return typeof J=="string"?J.lastIndexOf("%")>=0?parseFloat(J)/100*X:parseFloat(J):J}function V(J,X,re){return X==="right"?J-re[1]:X==="center"?J+re[3]/2-re[1]/2:J+re[3]}function M(J,X){return J!=null&&(J||X.textBackgroundColor||X.textBorderWidth&&X.textBorderColor||X.textPadding)}pe.normalizeTextStyle=w,pe.renderText=x,pe.getBoxPosition=m,pe.getStroke=P,pe.getFill=z,pe.parsePercent=Z,pe.needDrawText=M},qH13:function(qe,pe,G){var q=G("ItGF"),Q=G("QBsz"),O=Q.applyTransform,j=G("mFDi"),D=G("Qe9p"),B=G("6GrX"),I=G("pzxd"),v=G("ni6a"),T=G("Gev7"),E=G("Dagg"),n=G("dqUG"),u=G("y+Vt"),c=G("IMiH"),o=G("QuXc"),i=G("06Qe"),d=c.CMD,s=Math.round,A=Math.sqrt,a=Math.abs,p=Math.cos,w=Math.sin,S=Math.max;if(!q.canvasSupported){var x=",",L="progid:DXImageTransform.Microsoft",b=21600,h=b/2,r=1e5,l=1e3,f=function(ce){ce.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ce.coordsize=b+","+b,ce.coordorigin="0,0"},C=function(ce){return String(ce).replace(/&/g,"&").replace(/"/g,""")},g=function(ce,xe,Fe){return"rgb("+[ce,xe,Fe].join(",")+")"},m=function(ce,xe){xe&&ce&&xe.parentNode!==ce&&ce.appendChild(xe)},F=function(ce,xe){xe&&ce&&xe.parentNode===ce&&ce.removeChild(xe)},P=function(ce,xe,Fe){return(parseFloat(ce)||0)*r+(parseFloat(xe)||0)*l+Fe},z=I.parsePercent,Z=function(ce,xe,Fe){var ke=D.parse(xe);Fe=+Fe,isNaN(Fe)&&(Fe=1),ke&&(ce.color=g(ke[0],ke[1],ke[2]),ce.opacity=Fe*ke[3])},V=function(ce){var xe=D.parse(ce);return[g(xe[0],xe[1],xe[2]),xe[3]]},M=function(ce,xe,Fe){var ke=xe.fill;if(ke!=null)if(ke instanceof o){var ct,ft=0,yt=[0,0],Et=0,Ot=1,Mt=Fe.getBoundingRect(),Qe=Mt.width,Ne=Mt.height;if(ke.type==="linear"){ct="gradient";var lt=Fe.transform,dt=[ke.x*Qe,ke.y*Ne],Ye=[ke.x2*Qe,ke.y2*Ne];lt&&(O(dt,dt,lt),O(Ye,Ye,lt));var st=Ye[0]-dt[0],je=Ye[1]-dt[1];ft=Math.atan2(st,je)*180/Math.PI,ft<0&&(ft+=360),ft<1e-6&&(ft=0)}else{ct="gradientradial";var dt=[ke.x*Qe,ke.y*Ne],lt=Fe.transform,Le=Fe.scale,Me=Qe,me=Ne;yt=[(dt[0]-Mt.x)/Me,(dt[1]-Mt.y)/me],lt&&O(dt,dt,lt),Me/=Le[0]*b,me/=Le[1]*b;var ye=S(Me,me);Et=2*0/ye,Ot=2*ke.r/ye-Et}var Ee=ke.colorStops.slice();Ee.sort(function(tt,Ce){return tt.offset-Ce.offset});for(var Oe=Ee.length,De=[],Ze=[],ht=0;ht=2){var It=De[0][0],St=De[1][0],ut=De[0][1]*xe.opacity,nt=De[1][1]*xe.opacity;ce.type=ct,ce.method="none",ce.focus="100%",ce.angle=ft,ce.color=It,ce.color2=St,ce.colors=Ze.join(","),ce.opacity=nt,ce.opacity2=ut}ct==="radial"&&(ce.focusposition=yt.join(","))}else Z(ce,ke,xe.opacity)},J=function(ce,xe){xe.lineDash&&(ce.dashstyle=xe.lineDash.join(" ")),xe.stroke!=null&&!(xe.stroke instanceof o)&&Z(ce,xe.stroke,xe.opacity)},X=function(ce,xe,Fe,ke){var ct=xe==="fill",ft=ce.getElementsByTagName(xe)[0];Fe[xe]!=null&&Fe[xe]!=="none"&&(ct||!ct&&Fe.lineWidth)?(ce[ct?"filled":"stroked"]="true",Fe[xe]instanceof o&&F(ce,ft),ft||(ft=i.createNode(xe)),ct?M(ft,Fe,ke):J(ft,Fe),m(ce,ft)):(ce[ct?"filled":"stroked"]="false",F(ce,ft))},re=[[],[],[]],se=function(ce,xe){var Fe=d.M,ke=d.C,ct=d.L,ft=d.A,yt=d.Q,Et=[],Ot,Mt,Qe,Ne,lt,dt,Ye=ce.data,st=ce.len();for(Ne=0;Ne.01?Ce&&(Pe+=270/b):Math.abs(pt-It)<1e-4?Ce&&Pekt?Le-=270/b:Le+=270/b:Ce&&ptIt?je+=270/b:je-=270/b),Et.push(it,s(((kt-St)*Ze+Oe)*b-h),x,s(((It-ut)*ht+De)*b-h),x,s(((kt+St)*Ze+Oe)*b-h),x,s(((It+ut)*ht+De)*b-h),x,s((Pe*Ze+Oe)*b-h),x,s((pt*ht+De)*b-h),x,s((je*Ze+Oe)*b-h),x,s((Le*ht+De)*b-h)),lt=je,dt=Le;break;case d.R:var xt=re[0],_t=re[1];xt[0]=Ye[Ne++],xt[1]=Ye[Ne++],_t[0]=xt[0]+Ye[Ne++],_t[1]=xt[1]+Ye[Ne++],xe&&(O(xt,xt,xe),O(_t,_t,xe)),xt[0]=s(xt[0]*b-h),_t[0]=s(_t[0]*b-h),xt[1]=s(xt[1]*b-h),_t[1]=s(_t[1]*b-h),Et.push(" m ",xt[0],x,xt[1]," l ",_t[0],x,xt[1]," l ",_t[0],x,_t[1]," l ",xt[0],x,_t[1]);break;case d.Z:Et.push(" x ")}if(Ot>0){Et.push(Mt);for(var Xe=0;XeHe&&(Re=0,we={});var Fe=Se.style,ke;try{Fe.font=ce,ke=Fe.fontFamily.split(",")[0]}catch(ct){}xe={style:Fe.fontStyle||ge,variant:Fe.fontVariant||ge,weight:Fe.fontWeight||ge,size:parseFloat(Fe.fontSize||12)|0,family:ke||"Microsoft YaHei"},we[ce]=xe,Re++}return xe},$e;B.$override("measureText",function(ce,xe){var Fe=i.doc;$e||($e=Fe.createElement("div"),$e.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",i.doc.body.appendChild($e));try{$e.style.font=xe}catch(ke){}return $e.innerHTML="",$e.appendChild(Fe.createTextNode(ce)),{width:$e.offsetWidth}});for(var bt=new j,Ie=function(ce,xe,Fe,ke){var ct=this.style;this.__dirty&&I.normalizeTextStyle(ct,!0);var ft=ct.text;if(ft!=null&&(ft+=""),!ft)return;if(ct.rich){var yt=B.parseRichText(ft,ct);ft=[];for(var Et=0;Et=0&&(this.delFromStorage(v),this._roots.splice(u,1),v instanceof O&&v.delChildrenFromStorage(this))},addToStorage:function(v){return v&&(v.__storage=this,v.dirty(!1)),this},delFromStorage:function(v){return v&&(v.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:D};var I=B;qe.exports=I},rA99:function(qe,pe,G){var q=G("y+Vt"),Q=G("QBsz"),O=G("Sj9i"),j=O.quadraticSubdivide,D=O.cubicSubdivide,B=O.quadraticAt,I=O.cubicAt,v=O.quadraticDerivativeAt,T=O.cubicDerivativeAt,E=[];function n(c,o,i){var d=c.cpx2,s=c.cpy2;return d===null||s===null?[(i?T:I)(c.x1,c.cpx1,c.cpx2,c.x2,o),(i?T:I)(c.y1,c.cpy1,c.cpy2,c.y2,o)]:[(i?v:B)(c.x1,c.cpx1,c.x2,o),(i?v:B)(c.y1,c.cpy1,c.y2,o)]}var u=q.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(c,o){var i=o.x1,d=o.y1,s=o.x2,A=o.y2,a=o.cpx1,p=o.cpy1,w=o.cpx2,S=o.cpy2,x=o.percent;if(x===0)return;c.moveTo(i,d),w==null||S==null?(x<1&&(j(i,a,s,x,E),a=E[1],s=E[2],j(d,p,A,x,E),p=E[1],A=E[2]),c.quadraticCurveTo(a,p,s,A)):(x<1&&(D(i,a,w,s,x,E),a=E[1],w=E[2],s=E[3],D(d,p,S,A,x,E),p=E[1],S=E[2],A=E[3]),c.bezierCurveTo(a,p,w,S,s,A))},pointAt:function(c){return n(this.shape,c,!1)},tangentAt:function(c){var o=n(this.shape,c,!0);return Q.normalize(o,o)}});qe.exports=u},"rAM+":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return Q});var q=G("Qw5x");function Q(O,j){var D;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(D=Object(q.a)(O))||j&&O&&typeof O.length=="number"){D&&(O=D);var B=0,I=function(){};return{s:I,n:function(){return B>=O.length?{done:!0}:{done:!1,value:O[B++]}},e:function(u){throw u},f:I}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var v=!0,T=!1,E;return{s:function(){D=O[Symbol.iterator]()},n:function(){var u=D.next();return v=u.done,u},e:function(u){T=!0,E=u},f:function(){try{!v&&D.return!=null&&D.return()}finally{if(T)throw E}}}}},rUJ1:function(qe,pe){const G=/[&<>"']/,q=/[&<>"']/g,Q=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,j={"&":"&","<":"<",">":">",'"':""","'":"'"},D=b=>j[b];function B(b,h){if(h){if(G.test(b))return b.replace(q,D)}else if(Q.test(b))return b.replace(O,D);return b}const I=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(b){return b.replace(I,(h,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const T=/(^|[^\[])\^/g;function E(b,h){b=b.source||b,h=h||"";const r={replace:(l,f)=>(f=f.source||f,f=f.replace(T,"$1"),b=b.replace(l,f),r),getRegex:()=>new RegExp(b,h)};return r}const n=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function c(b,h,r){if(b){let l;try{l=decodeURIComponent(v(r)).replace(n,"").toLowerCase()}catch(f){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}h&&!u.test(r)&&(r=A(h,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(l){return null}return r}const o={},i=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(b,h){o[" "+b]||(i.test(b)?o[" "+b]=b+"/":o[" "+b]=S(b,"/",!0)),b=o[" "+b];const r=b.indexOf(":")===-1;return h.substring(0,2)==="//"?r?h:b.replace(d,"$1")+h:h.charAt(0)==="/"?r?h:b.replace(s,"$1")+h:b+h}const a={exec:function(){}};function p(b){let h=1,r,l;for(;h{let F=!1,P=g;for(;--P>=0&&m[P]==="\\";)F=!F;return F?"|":" |"}),l=r.split(/ \|/);let f=0;if(l.length>h)l.splice(h);else for(;l.length-1)){var o=j.parse(c)[3],i=j.toHex(c);u.setAttribute("stop-color","#"+i),u.setAttribute("stop-opacity",o)}else u.setAttribute("stop-color",T[E].color);v.appendChild(u)}I._dom=v},D.prototype.markUsed=function(I){if(I.style){var v=I.style.fill;v&&v._dom&&q.prototype.markUsed.call(this,v._dom),v=I.style.stroke,v&&v._dom&&q.prototype.markUsed.call(this,v._dom)}};var B=D;qe.exports=B},sboe:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return O});var q=G("q1tI"),Q=G.n(q),O=q.createContext(null)},t23M:function(qe,pe,G){"use strict";var q=G("VTBJ"),Q=G("1OyB"),O=G("vuIU"),j=G("Ji7U"),D=G("LK+K"),B=G("q1tI"),I=G.n(B),v=G("m+aA"),T=G("Zm9Q"),E=G("Kwbf"),n=G("c+Xe"),u=G("bdgK"),c="rc-observer-key",o=function(i){Object(j.a)(s,i);var d=Object(D.a)(s);function s(){var A;return Object(Q.a)(this,s),A=d.apply(this,arguments),A.resizeObserver=null,A.childNode=null,A.currentElement=null,A.state={width:0,height:0,offsetHeight:0,offsetWidth:0},A.onResize=function(a){var p=A.props.onResize,w=a[0].target,S=w.getBoundingClientRect(),x=S.width,L=S.height,b=w.offsetWidth,h=w.offsetHeight,r=Math.floor(x),l=Math.floor(L);if(A.state.width!==r||A.state.height!==l||A.state.offsetWidth!==b||A.state.offsetHeight!==h){var f={width:r,height:l,offsetWidth:b,offsetHeight:h};A.setState(f),p&&Promise.resolve().then(function(){p(Object(q.a)(Object(q.a)({},f),{},{offsetWidth:b,offsetHeight:h}))})}},A.setChildNode=function(a){A.childNode=a},A}return Object(O.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var a=this.props.disabled;if(a){this.destroyObserver();return}var p=Object(v.a)(this.childNode||this),w=p!==this.currentElement;w&&(this.destroyObserver(),this.currentElement=p),!this.resizeObserver&&p&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(p))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,p=Object(T.a)(a);if(p.length>1)Object(E.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(p.length===0)return Object(E.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=p[0];if(B.isValidElement(w)&&Object(n.c)(w)){var S=w.ref;p[0]=B.cloneElement(w,{ref:Object(n.a)(S,this.setChildNode)})}return p.length===1?p[0]:p.map(function(x,L){return!B.isValidElement(x)||"key"in x&&x.key!==null?x:B.cloneElement(x,{key:"".concat(c,"-").concat(L)})})}}]),s}(B.Component);o.displayName="ResizeObserver",pe.a=o},u3os:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.ver=pe.clear=pe.bind=void 0;var q=G("P4Qj"),Q=function(B,I){var v=(0,q.getSensor)(B);return v.bind(I),function(){v.unbind(I)}};pe.bind=Q;var O=function(B){var I=(0,q.getSensor)(B);(0,q.removeSensor)(I)};pe.clear=O;var j="1.0.1";pe.ver=j},ulZh:function(qe,pe,G){typeof window!="undefined"&&function(Q,O){qe.exports=O()}(this,function(){return function(q){var Q={};function O(j){if(Q[j])return Q[j].exports;var D=Q[j]={i:j,l:!1,exports:{}};return q[j].call(D.exports,D,D.exports,O),D.l=!0,D.exports}return O.m=q,O.c=Q,O.d=function(j,D,B){O.o(j,D)||Object.defineProperty(j,D,{enumerable:!0,get:B})},O.r=function(j){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(j,"__esModule",{value:!0})},O.t=function(j,D){if(D&1&&(j=O(j)),D&8)return j;if(D&4&&typeof j=="object"&&j&&j.__esModule)return j;var B=Object.create(null);if(O.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:j}),D&2&&typeof j!="string")for(var I in j)O.d(B,I,function(v){return j[v]}.bind(null,I));return B},O.n=function(j){var D=j&&j.__esModule?function(){return j.default}:function(){return j};return O.d(D,"a",D),D},O.o=function(j,D){return Object.prototype.hasOwnProperty.call(j,D)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(q,Q,O){"use strict";var j=Object.prototype.hasOwnProperty,D="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(D=!1));function I(n,u,c){this.fn=n,this.context=u,this.once=c||!1}function v(n,u,c,o,i){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new I(c,o||n,i),s=D?D+u:u;return n._events[s]?n._events[s].fn?n._events[s]=[n._events[s],d]:n._events[s].push(d):(n._events[s]=d,n._eventsCount++),n}function T(n,u){--n._eventsCount===0?n._events=new B:delete n._events[u]}function E(){this._events=new B,this._eventsCount=0}E.prototype.eventNames=function(){var u=[],c,o;if(this._eventsCount===0)return u;for(o in c=this._events)j.call(c,o)&&u.push(D?o.slice(1):o);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},E.prototype.listeners=function(u){var c=D?D+u:u,o=this._events[c];if(!o)return[];if(o.fn)return[o.fn];for(var i=0,d=o.length,s=new Array(d);i0},!1)}function n(u,c){for(var o={main:[c]},i={main:[]},d={main:{}};E(o);)for(var s=Object.keys(o),A=0;A=2*L/h||m<=P)return;var z=Number.POSITIVE_INFINITY,Z;for(Z=s.level-1;Z>l;Z--){var V=r[Z].maxBitrate;if(z=L*V/(8*.8*g),z=m)return;var M=this.bwEstimator.getEstimate();E.logger.warn("Fragment "+s.sn+(A?" part "+A.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Z+` Current BW estimate: `+(Object(j.isFiniteNumber)(M)?(M/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+m.toFixed(3)+` s Estimated load time for the next fragment: `+z.toFixed(3)+` s Time to underbuffer: `+P.toFixed(3)+" s"),a.nextLoadLevel=Z,this.bwEstimator.sample(b,x.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),a.trigger(B.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:A,stats:x})},i.onFragLoaded=function(s,A){var a=A.frag,p=A.part;if(a.type===T.PlaylistLevelType.MAIN&&Object(j.isFiniteNumber)(a.sn)){var w=p?p.stats:a.stats,S=p?p.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[a.level],L=(x.loaded?x.loaded.bytes:0)+w.loaded,b=(x.loaded?x.loaded.duration:0)+S;x.loaded={bytes:L,duration:b},x.realBitrate=Math.round(8*L/b)}if(a.bitrateTest){var h={stats:w,frag:a,part:p,id:a.type};this.onFragBuffered(B.Events.FRAG_BUFFERED,h),a.bitrateTest=!1}}},i.onFragBuffered=function(s,A){var a=A.frag,p=A.part,w=p?p.stats:a.stats;if(w.aborted)return;if(a.type!==T.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var S=w.parsing.end-w.loading.start;this.bwEstimator.sample(S,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=S/1e3:this.bitrateTestDelay=0},i.onError=function(s,A){switch(A.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var s=this.fragCurrent,A=this.partCurrent,a=this.hls,p=a.maxAutoLevel,w=a.config,S=a.minAutoLevel,x=a.media,L=A?A.duration:s?s.duration:0,b=x?x.currentTime:0,h=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,l=(I.BufferHelper.bufferInfo(x,b,w.maxBufferHole).end-b)/h,f=this.findBestLevel(r,S,p,l,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(f>=0)return f;E.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=L?Math.min(L,w.maxStarvationDelay):w.maxStarvationDelay,g=w.abrBandWidthFactor,m=w.abrBandWidthUpFactor;if(!l){var F=this.bitrateTestDelay;if(F){var P=L?Math.min(L,w.maxLoadingDelay):w.maxLoadingDelay;C=P-F,E.logger.trace("bitrate test took "+Math.round(1e3*F)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),g=m=1}}return f=this.findBestLevel(r,S,p,l+C,g,m),Math.max(f,0)},i.findBestLevel=function(s,A,a,p,w,S){for(var x,L=this.fragCurrent,b=this.partCurrent,h=this.lastLoadedFragLevel,r=this.hls.levels,l=r[h],f=!!(l!=null&&(x=l.details)!==null&&x!==void 0&&x.live),C=l==null?void 0:l.codecSet,g=b?b.duration:L?L.duration:0,m=a;m>=A;m--){var F=r[m];if(!F||C&&F.codecSet!==C)continue;var P=F.details,z=(b?P==null?void 0:P.partTarget:P==null?void 0:P.averagetargetduration)||g,Z=void 0;m<=h?Z=w*s:Z=S*s;var V=r[m].maxBitrate,M=V*z/Z;if(E.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(Z)+"/"+V+"/"+z+"/"+p+"/"+M),Z>V&&(!M||f&&!this.bitrateTestDelay||M0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+f.toFixed(3)),this.state=D.State.IDLE):(this.loadedmetadata=!1,this.state=D.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},h.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_TRACK:{var l,f=this.levels,C=this.trackId,g=f==null||((l=f[C])===null||l===void 0)?void 0:l.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=D.State.WAITING_INIT_PTS}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var m,F=performance.now(),P=this.retryDate;(!P||F>=P||(m=this.media)!==null&&m!==void 0&&m.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=D.State.IDLE);break}case D.State.WAITING_INIT_PTS:{var z=this.waitingData;if(z){var Z=z.frag,V=z.part,M=z.cache,J=z.complete;if(this.initPTS[Z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.FRAG_LOADING;var X=M.flush(),re={frag:Z,part:V,payload:X,networkDetails:null};this._handleFragmentLoadProgress(re),J&&L.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)A.logger.log("Waiting fragment cc ("+Z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),_e=I.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),ge=Object(i.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,Z);ge<0&&(A.logger.log("Waiting fragment cc ("+Z.cc+") @ "+Z.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=D.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.IDLE)},h.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var f=this.mediaBuffer?this.mediaBuffer:l,C=f.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},h.doTickIdle=function(){var l,f,C=this.hls,g=this.levels,m=this.media,F=this.trackId,P=C.config;if(!g||!g[F])return;if(!m&&(this.startFragRequested||!P.startFragPrefetch))return;var z=g[F],Z=z.details;if(!Z||Z.live&&this.levelLastLoaded!==F||this.waitForCdnTuneIn(Z)){this.state=D.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,E.PlaylistLevelType.AUDIO));var V=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,E.PlaylistLevelType.AUDIO);if(V===null)return;var M=V.len,J=this.getMaxBufferLength(),X=this.audioSwitch;if(M>=J&&!X)return;if(!X&&this._streamEnded(V,Z)){C.trigger(B.Events.BUFFER_EOS,{type:"audio"}),this.state=D.State.ENDED;return}var re=Z.fragments,se=re[0].start,_e=V.end;if(X){var ge=this.getLoadPosition();_e=ge,Z.PTSKnown&&gese||V.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),m.currentTime=se+.05))}var we=this.getNextFragment(_e,Z);if(!we){this.bufferFlushed=!0;return}((l=we.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((f=we.decryptdata)!==null&&f!==void 0&&f.key)?this.loadKey(we,Z):this.loadFragment(we,Z,_e)},h.getMaxBufferLength=function(){var l=L.prototype.getMaxBufferLength.call(this),f=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,E.PlaylistLevelType.MAIN);return f===null?l:Math.max(l,f.len)},h.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(l,f){var C=f.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(g){return new T.Level(g)})},h.onAudioTrackSwitching=function(l,f){var C=!!f.url;this.trackId=f.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(S):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=D.State.IDLE):this.state=D.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(l,f){this.mainDetails=f.details},h.onAudioTrackLoaded=function(l,f){var C,g=this.levels,m=f.details,F=f.id;if(!g){this.warn("Audio tracks were reset while loading level "+F);return}this.log("Track "+F+" loaded ["+m.startSN+","+m.endSN+"],duration:"+m.totalduration);var P=g[F],z=0;if(m.live||(C=P.details)!==null&&C!==void 0&&C.live){var Z=this.mainDetails;if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed||!Z)return;!P.details&&m.hasProgramDateTime&&Z.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(m,Z),z=m.fragments[0].start):z=this.alignPlaylists(m,P.details)}P.details=m,this.levelLastLoaded=F,!this.startFragRequested&&(this.mainDetails||!m.live)&&this.setStartPosition(P.details,z),this.state===D.State.WAITING_TRACK&&!this.waitForCdnTuneIn(m)&&(this.state=D.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(l){var f,C=l.frag,g=l.part,m=l.payload,F=this.config,P=this.trackId,z=this.levels;if(!z){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var Z=z[P];console.assert(Z,"Audio track is defined on fragment load progress");var V=Z.details;console.assert(V,"Audio track details are defined on fragment load progress");var M=F.defaultAudioCodec||Z.audioCodec||"mp4a.40.2",J=this.transmuxer;J||(J=this.transmuxer=new c.default(this.hls,E.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var X=this.initPTS[C.cc],re=(f=C.initSegment)===null||f===void 0?void 0:f.data;if(X!==void 0){var se=!1,_e=g?g.index:-1,ge=_e!==-1,we=new o.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,m.byteLength,_e,ge);J.push(m,re,M,"",C,g,V.totalduration,se,we,X)}else{A.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+V.startSN+" ,"+V.endSN+"],track "+P);var Re=this.waitingData=this.waitingData||{frag:C,part:g,cache:new u.default,complete:!1},He=Re.cache;He.push(new Uint8Array(m)),this.waitingVideoCC=this.videoTrackCC,this.state=D.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,l)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(l,f){var C=f.tracks.audio;C&&(this.mediaBuffer=C.buffer),f.tracks.video&&(this.videoBuffer=f.tracks.video.buffer)},h.onFragBuffered=function(l,f){var C=f.frag,g=f.part;if(C.type!==E.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(g?" p: "+g.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,g)},h.onError=function(l,f){switch(f.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.AUDIO,f);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==D.State.ERROR&&this.state!==D.State.STOPPED&&(this.state=f.fatal?D.State.ERROR:D.State.IDLE,this.warn(f.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(f.parent==="audio"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var C=!0,g=this.getFwdBufferInfo(this.mediaBuffer,E.PlaylistLevelType.AUDIO);g&&g.len>.5&&(C=!this.reduceMaxBufferLength(g.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(l,f){var C=f.type;C===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(l){var f,C="audio",g=this.hls,m=l.remuxResult,F=l.chunkMeta,P=this.getCurrentContext(F);if(!P){this.warn("The loading context changed while buffering fragment "+F.sn+" of level "+F.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(F.level);return}var z=P.frag,Z=P.part,V=m.audio,M=m.text,J=m.id3,X=m.initSegment;if(this.fragContextChanged(z))return;if(this.state=D.State.PARSING,this.audioSwitch&&V&&this.completeAudioSwitch(),X!=null&&X.tracks&&(this._bufferInitSegment(X.tracks,z,F),g.trigger(B.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:C,tracks:X.tracks})),V){var re=V.startPTS,se=V.endPTS,_e=V.startDTS,ge=V.endDTS;Z&&(Z.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:se,startDTS:_e,endDTS:ge}),z.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,re,se,_e,ge),this.bufferFragmentData(V,z,Z,F)}if(J!=null&&(f=J.samples)!==null&&f!==void 0&&f.length){var we=a({frag:z,id:C},J);g.trigger(B.Events.FRAG_PARSING_METADATA,we)}if(M){var Re=a({frag:z,id:C},M);g.trigger(B.Events.FRAG_PARSING_USERDATA,Re)}},h._bufferInitSegment=function(l,f,C){if(this.state!==D.State.PARSING)return;l.video&&delete l.video;var g=l.audio;if(!g)return;g.levelCodec=g.codec,g.id="audio",this.log("Init audio buffer, container:"+g.container+", codecs[parsed]=["+g.codec+"]"),this.hls.trigger(B.Events.BUFFER_CODECS,l);var m=g.initSegment;if(m!=null&&m.byteLength){var F={type:"audio",frag:f,part:null,chunkMeta:C,parent:f.type,data:m};this.hls.trigger(B.Events.BUFFER_APPENDING,F)}this.tick()},h.loadFragment=function(l,f,C){var g=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||g===v.FragmentState.NOT_LOADED||g===v.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):f.live&&!Object(j.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=D.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,l,f,C)))},h.completeAudioSwitch=function(){var l=this.hls,f=this.media,C=this.trackId;f&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:C})},b}(D.default);Q.default=x},"./src/controller/audio-track-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/events.ts"),D=O("./src/errors.ts"),B=O("./src/controller/base-playlist-controller.ts"),I=O("./src/types/loader.ts");function v(c,o){for(var i=0;i=A.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=A[this.trackId];this.log("Now switching to audio-track index "+s);var p=A[s],w=p.id,S=p.groupId,x=S===void 0?"":S,L=p.name,b=p.type,h=p.url;if(this.trackId=s,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(j.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:x,name:L,type:b,url:h}),p.details&&!p.details.live)return;var r=this.switchParams(p.url,a==null?void 0:a.details);this.loadPlaylist(r)},i.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var A=this.trackName,a=this.findTrackId(A)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(s){for(var A=this.tracksInGroup,a=0;ao.partTarget&&(p+=1)}if(Object(j.isFiniteNumber)(a))return new D.HlsUrlParameters(a,Object(j.isFiniteNumber)(p)?p:void 0,D.HlsSkip.No)}}},n.loadPlaylist=function(c){},n.shouldLoadTrack=function(c){return this.canLoad&&c&&!!c.url&&(!c.details||c.details.live)},n.playlistLoaded=function(c,o,i){var d=this,s=o.details,A=o.stats,a=A.loading.end?Math.max(0,self.performance.now()-A.loading.end):0;if(s.advancedDateTime=Date.now()-a,s.live||i!=null&&i.live){if(s.reloaded(i),i&&this.log("live playlist "+c+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),i&&s.fragments.length>0&&Object(B.mergeDetails)(i,s),!this.canLoad||!s.live)return;var p,w=void 0,S=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var x=this.hls.config.lowLatencyMode,L=s.lastPartSn,b=s.endSN,h=s.lastPartIndex,r=h!==-1,l=L===b,f=x?0:h;r?(w=l?b+1:L,S=l?f:h+1):w=b+1;var C=s.age,g=C+s.ageHeader,m=Math.min(g-s.partTarget,s.targetduration*1.5);if(m>0){if(i&&m>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+m+" with playlist age: "+s.age),m=0;else{var F=Math.floor(m/s.targetduration);if(w+=F,S!==void 0){var P=Math.round(m%s.targetduration/s.partTarget);S+=P}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+m+" skip sn "+F+" to part "+S)}s.tuneInGoal=m}if(p=this.getDeliveryDirectives(s,o.deliveryDirectives,w,S),x||!l){this.loadPlaylist(p);return}}else p=this.getDeliveryDirectives(s,o.deliveryDirectives,w,S);var z=Object(B.computeReloadInterval)(s,A);w!==void 0&&s.canBlockReload&&(z-=s.partTarget||1),this.log("reload live playlist "+c+" in "+Math.round(z)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(p)},z)}else this.clearTimer()},n.getDeliveryDirectives=function(c,o,i,d){var s=Object(D.getSkipValue)(c,i);return o!=null&&o.skip&&c.deltaUpdateFailed&&(i=o.msn,d=o.part,s=D.HlsSkip.No),new D.HlsUrlParameters(i,d,s)},n.retryLoadingOrFail=function(c){var o=this,i=this.hls.config,d=this.retryCount-1&&(s=c.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+c.details+'"'),this.loadPlaylist();else{var A=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},A),this.warn("retry playlist loading #"+this.retryCount+" in "+A+' ms after "'+c.details+'"')}}else this.warn('cannot recover from error "'+c.details+'"'),this.clearTimer(),c.fatal=!0;return d},E}()},"./src/controller/base-stream-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"State",function(){return b}),O.d(Q,"default",function(){return h});var j=O("./src/polyfills/number.ts"),D=O("./src/task-loop.ts"),B=O("./src/controller/fragment-tracker.ts"),I=O("./src/utils/buffer-helper.ts"),v=O("./src/utils/logger.ts"),T=O("./src/events.ts"),E=O("./src/errors.ts"),n=O("./src/types/transmuxer.ts"),u=O("./src/utils/mp4-tools.ts"),c=O("./src/utils/discontinuities.ts"),o=O("./src/controller/fragment-finders.ts"),i=O("./src/controller/level-helper.ts"),d=O("./src/loader/fragment-loader.ts"),s=O("./src/crypt/decrypter.ts"),A=O("./src/utils/time-ranges.ts"),a=O("./src/types/loader.ts");function p(r,l){for(var f=0;fX;(Z0&&Z&&Z.key&&Z.iv&&Z.method==="AES-128"){var V=self.performance.now();return m.decrypter.webCryptoDecrypt(new Uint8Array(z),Z.key.buffer,Z.iv.buffer).then(function(M){var J=self.performance.now();return P.trigger(T.Events.FRAG_DECRYPTED,{frag:g,payload:M,stats:{tstart:V,tdecrypt:J}}),F.payload=M,F})}return F}).then(function(F){var P=m.fragCurrent,z=m.hls,Z=m.levels;if(!Z)throw new Error("init load aborted, missing levels");var V=Z[g.level].details;console.assert(V,"Level details are defined when init segment is loaded");var M=g.stats;m.state=b.IDLE,m.fragLoadError=0,g.data=new Uint8Array(F.payload),M.parsing.start=M.buffering.start=self.performance.now(),M.parsing.end=M.buffering.end=self.performance.now(),F.frag===P&&z.trigger(T.Events.FRAG_BUFFERED,{stats:M,frag:P,part:null,id:g.type}),m.tick()}).catch(function(F){m.warn(F),m.resetFragmentLoading(g)})},f.fragContextChanged=function(g){var m=this.fragCurrent;return!g||!m||g.level!==m.level||g.sn!==m.sn||g.urlId!==m.urlId},f.fragBufferedComplete=function(g,m){var F=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(m?" part: "+m.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+A.default.toString(I.BufferHelper.getBuffered(F))),this.state=b.IDLE,this.tick()},f._handleFragmentLoadComplete=function(g){var m=this.transmuxer;if(!m)return;var F=g.frag,P=g.part,z=g.partsLoaded,Z=!z||z.length===0||z.some(function(M){return!M}),V=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount+1,0,P?P.index:-1,!Z);m.flush(V)},f._handleFragmentLoadProgress=function(g){},f._doFragLoad=function(g,m,F,P){var z=this;if(F===void 0&&(F=null),!this.levels)throw new Error("frag load aborted, missing levels");if(F=Math.max(g.start,F||0),this.config.lowLatencyMode&&m){var Z=m.partList;if(Z&&P){F>g.end&&m.fragmentHint&&(g=m.fragmentHint);var V=this.getNextPart(Z,g,F);if(V>-1){var M=Z[V];return this.log("Loading part sn: "+g.sn+" p: "+M.index+" cc: "+g.cc+" of playlist ["+m.startSN+"-"+m.endSN+"] parts [0-"+V+"-"+(Z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(F.toFixed(3))),this.nextLoadPosition=M.start+M.duration,this.state=b.FRAG_LOADING,this.hls.trigger(T.Events.FRAG_LOADING,{frag:g,part:Z[V],targetBufferTime:F}),this.doFragPartsLoad(g,Z,V,P).catch(function(J){return z.handleFragLoadError(J)})}else if(!g.url||this.loadedEndOfParts(Z,F))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(m?"of ["+m.startSN+"-"+m.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(F.toFixed(3))),Object(j.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=b.FRAG_LOADING,this.hls.trigger(T.Events.FRAG_LOADING,{frag:g,targetBufferTime:F}),this.fragmentLoader.load(g,P).catch(function(J){return z.handleFragLoadError(J)})},f.doFragPartsLoad=function(g,m,F,P){var z=this;return new Promise(function(Z,V){var M=[],J=function X(re){var se=m[re];z.fragmentLoader.loadPart(g,se,P).then(function(_e){M[se.index]=_e;var ge=_e.part;z.hls.trigger(T.Events.FRAG_LOADED,_e);var we=m[re+1];if(we&&we.fragment===g)X(re+1);else return Z({frag:g,part:ge,partsLoaded:M})}).catch(V)};J(F)})},f.handleFragLoadError=function(g){var m=g.data;return m&&m.details===E.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(m.frag,m.part):this.hls.trigger(T.Events.ERROR,m),null},f._handleTransmuxerFlush=function(g){var m=this.getCurrentContext(g);if(!m||this.state!==b.PARSING){this.fragCurrent||(this.state=b.IDLE);return}var F=m.frag,P=m.part,z=m.level,Z=self.performance.now();F.stats.parsing.end=Z,P&&(P.stats.parsing.end=Z),this.updateLevelTiming(F,P,z,g.partial)},f.getCurrentContext=function(g){var m=this.levels,F=g.level,P=g.sn,z=g.part;if(!m||!m[F])return this.warn("Levels object was unset while buffering fragment "+P+" of level "+F+". The current chunk will not be buffered."),null;var Z=m[F],V=z>-1?Object(i.getPartWith)(Z,P,z):null,M=V?V.fragment:Object(i.getFragmentWithSN)(Z,P,this.fragCurrent);return M?{frag:M,part:V,level:Z}:null},f.bufferFragmentData=function(g,m,F,P){if(!g||this.state!==b.PARSING)return;var z=g.data1,Z=g.data2,V=z;if(z&&Z&&(V=Object(u.appendUint8Array)(z,Z)),!V||!V.length)return;var M={type:g.type,frag:m,part:F,chunkMeta:P,parent:m.type,data:V};this.hls.trigger(T.Events.BUFFER_APPENDING,M),g.dropped&&g.independent&&!F&&this.flushBufferGap(m)},f.flushBufferGap=function(g){var m=this.media;if(!m)return;if(!I.BufferHelper.isBuffered(m,m.currentTime)){this.flushMainBuffer(0,g.start);return}var F=m.currentTime,P=I.BufferHelper.bufferInfo(m,F,0),z=g.duration,Z=Math.min(this.config.maxFragLookUpTolerance*2,z*.25),V=Math.max(Math.min(g.start-Z,P.end-Z),F+Z);g.start-V>Z&&this.flushMainBuffer(V,g.start)},f.getFwdBufferInfo=function(g,m){var F=this.config,P=this.getLoadPosition();if(!Object(j.isFiniteNumber)(P))return null;var z=I.BufferHelper.bufferInfo(g,P,F.maxBufferHole);if(z.len===0&&z.nextStart!==void 0){var Z=this.fragmentTracker.getBufferedFrag(P,m);if(Z&&z.nextStart=F?(m.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+m.maxMaxBufferLength+"s"),!0):!1},f.getNextFragment=function(g,m){var F,P,z=m.fragments,Z=z.length;if(!Z)return null;var V=this.config,M=z[0].start,J;if(m.live){var X=V.initialLiveManifestSize;if(Z-1&&FF.start&&F.loaded},f.getInitialLiveFragment=function(g,m){var F=this.fragPrevious,P=null;if(F){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+F.programDateTime),P=Object(o.findFragmentByPDT)(m,F.endProgramDateTime,this.config.maxFragLookUpTolerance)),!P){var z=F.sn+1;if(z>=g.startSN&&z<=g.endSN){var Z=m[z-g.startSN];F.cc===Z.cc&&(P=Z,this.log("Live playlist, switching playlist, load frag with next SN: "+P.sn))}P||(P=Object(o.findFragWithCC)(m,F.cc),P&&this.log("Live playlist, switching playlist, load frag with same CC: "+P.sn))}}else{var V=this.hls.liveSyncPosition;V!==null&&(P=this.getFragmentAtPosition(V,this.bitrateTest?g.fragmentEnd:g.edge,g))}return P},f.getFragmentAtPosition=function(g,m,F){var P=this.config,z=this.fragPrevious,Z=F.fragments,V=F.endSN,M=F.fragmentHint,J=P.maxFragLookUpTolerance,X=!!(P.lowLatencyMode&&F.partList&&M);X&&M&&!this.bitrateTest&&(Z=Z.concat(M),V=M.sn);var re;if(gm-J?0:J;re=Object(o.findFragmentByPTS)(z,Z,g,se)}else re=Z[Z.length-1];if(re){var _e=re.sn-F.startSN,ge=z&&re.level===z.level,we=Z[_e+1],Re=this.fragmentTracker.getState(re);if(Re===B.FragmentState.BACKTRACKED){re=null;for(var He=_e;Z[He]&&this.fragmentTracker.getState(Z[He])===B.FragmentState.BACKTRACKED;)z?re=Z[He--]:re=Z[--He];re||(re=we)}else z&&re.sn===z.sn&&!X&&(ge&&(re.sn=Z-m.maxFragLookUpTolerance&&z<=V;if(P!==null&&F.duration>P&&(z"+g.startSN+" prev-sn: "+(z?z.sn:"na")+" fragments: "+V),re}return M},f.waitForCdnTuneIn=function(g){var m=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*m)},f.setStartPosition=function(g,m){var F=this.startPosition;if(F"+g))}}]),l}(D.default)},"./src/controller/buffer-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return o});var j=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),B=O("./src/utils/logger.ts"),I=O("./src/errors.ts"),v=O("./src/utils/buffer-helper.ts"),T=O("./src/utils/mediasource-helper.ts"),E=O("./src/loader/fragment.ts"),n=O("./src/controller/buffer-operation-queue.ts"),u=Object(T.getMediaSource)(),c=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function i(s){var A=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var a=A.hls,p=A.media,w=A.mediaSource;B.logger.log("[buffer-controller]: Media source opened"),p&&(A.updateMediaElementDuration(),a.trigger(D.Events.MEDIA_ATTACHED,{media:p})),w&&w.removeEventListener("sourceopen",A._onMediaSourceOpen),A.checkPendingTracks()},this._onMediaSourceClose=function(){B.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var d=i.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var A=this.hls;A.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.on(D.Events.BUFFER_RESET,this.onBufferReset,this),A.on(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),A.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),A.on(D.Events.BUFFER_EOS,this.onBufferEos,this),A.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),A.on(D.Events.FRAG_PARSED,this.onFragParsed,this),A.on(D.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var A=this.hls;A.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.off(D.Events.BUFFER_RESET,this.onBufferReset,this),A.off(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),A.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),A.off(D.Events.BUFFER_EOS,this.onBufferEos,this),A.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),A.off(D.Events.FRAG_PARSED,this.onFragParsed,this),A.off(D.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(A,a){var p=2;(a.audio&&!a.video||!a.altAudio)&&(p=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=p,this.details=null,B.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(A,a){var p=this.media=a.media;if(p&&u){var w=this.mediaSource=new u;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),p.src=self.URL.createObjectURL(w),this._objectUrl=p.src}},d.onMediaDetaching=function(){var A=this.media,a=this.mediaSource,p=this._objectUrl;if(a){if(B.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(w){B.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),A&&(p&&self.URL.revokeObjectURL(p),A.src===p?(A.removeAttribute("src"),A.load()):B.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(D.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var A=this;this.getSourceBufferTypes().forEach(function(a){var p=A.sourceBuffer[a];try{p&&(A.removeBufferListeners(a),A.mediaSource&&A.mediaSource.removeSourceBuffer(p),A.sourceBuffer[a]=void 0)}catch(w){B.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",w)}}),this._initSourceBuffer()},d.onBufferCodecs=function(A,a){var p=this,w=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(S){if(w){var x=p.tracks[S];if(x&&typeof x.buffer.changeType=="function"){var L=a[S],b=L.codec,h=L.levelCodec,r=L.container,l=(x.levelCodec||x.codec).replace(c,"$1"),f=(h||b).replace(c,"$1");if(l!==f){var C=r+";codecs="+(h||b);p.appendChangeType(S,C)}}}else p.pendingTracks[S]=a[S]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(A,a){var p=this,w=this.operationQueue,S={execute:function(){var L=p.sourceBuffer[A];L&&(B.logger.log("[buffer-controller]: changing "+A+" sourceBuffer type to "+a),L.changeType(a)),w.shiftAndExecuteNext(A)},onStart:function(){},onComplete:function(){},onError:function(L){B.logger.warn("[buffer-controller]: Failed to change "+A+" SourceBuffer type",L)}};w.append(S,A)},d.onBufferAppending=function(A,a){var p=this,w=this.hls,S=this.operationQueue,x=this.tracks,L=a.data,b=a.type,h=a.frag,r=a.part,l=a.chunkMeta,f=l.buffering[b],C=self.performance.now();f.start=C;var g=h.stats.buffering,m=r?r.stats.buffering:null;g.start===0&&(g.start=C),m&&m.start===0&&(m.start=C);var F=x.audio,P=b==="audio"&&l.id===1&&(F==null?void 0:F.container)==="audio/mpeg",z={execute:function(){if(f.executeStart=self.performance.now(),P){var V=p.sourceBuffer[b];if(V){var M=h.start-V.timestampOffset;Math.abs(M)>=.1&&(B.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+M+") sn: "+h.sn+")"),V.timestampOffset=h.start)}}p.appendExecutor(L,b)},onStart:function(){},onComplete:function(){var V=self.performance.now();f.executeEnd=f.end=V,g.first===0&&(g.first=V),m&&m.first===0&&(m.first=V);var M=p.sourceBuffer,J={};for(var X in M)J[X]=v.BufferHelper.getBuffered(M[X]);p.appendError=0,p.hls.trigger(D.Events.BUFFER_APPENDED,{type:b,frag:h,part:r,chunkMeta:l,parent:h.type,timeRanges:J})},onError:function(V){B.logger.error("[buffer-controller]: Error encountered while trying to append to the "+b+" SourceBuffer",V);var M={type:I.ErrorTypes.MEDIA_ERROR,parent:h.type,details:I.ErrorDetails.BUFFER_APPEND_ERROR,err:V,fatal:!1};V.code===DOMException.QUOTA_EXCEEDED_ERR?M.details=I.ErrorDetails.BUFFER_FULL_ERROR:(p.appendError++,M.details=I.ErrorDetails.BUFFER_APPEND_ERROR,p.appendError>w.config.appendErrorMaxRetry&&(B.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),M.fatal=!0)),w.trigger(D.Events.ERROR,M)}};S.append(z,b)},d.onBufferFlushing=function(A,a){var p=this,w=this.operationQueue,S=function(L){return{execute:p.removeExecutor.bind(p,L,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){p.hls.trigger(D.Events.BUFFER_FLUSHED,{type:L})},onError:function(h){B.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",h)}}};a.type?w.append(S(a.type),a.type):this.getSourceBufferTypes().forEach(function(x){w.append(S(x),x)})},d.onFragParsed=function(A,a){var p=this,w=a.frag,S=a.part,x=[],L=S?S.elementaryStreams:w.elementaryStreams;L[E.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(L[E.ElementaryStreamTypes.AUDIO]&&x.push("audio"),L[E.ElementaryStreamTypes.VIDEO]&&x.push("video"));var b=function(){var r=self.performance.now();w.stats.buffering.end=r,S&&(S.stats.buffering.end=r);var l=S?S.stats:w.stats;p.hls.trigger(D.Events.FRAG_BUFFERED,{frag:w,part:S,stats:l,id:w.type})};x.length===0&&B.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(b,x)},d.onFragChanged=function(A,a){this.flushBackBuffer()},d.onBufferEos=function(A,a){var p=this,w=this.getSourceBufferTypes().reduce(function(S,x){var L=p.sourceBuffer[x];return(!a.type||a.type===x)&&(L&&!L.ended&&(L.ended=!0,B.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),S&&!!(!L||L.ended)},!0);w&&this.blockBuffers(function(){var S=p.mediaSource;if(!S||S.readyState!=="open")return;S.endOfStream()})},d.onLevelUpdated=function(A,a){var p=a.details;if(!p.fragments.length)return;this.details=p,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var A=this.hls,a=this.details,p=this.media,w=this.sourceBuffer;if(!p||a===null)return;var S=this.getSourceBufferTypes();if(!S.length)return;var x=a.live&&A.config.liveBackBufferLength!==null?A.config.liveBackBufferLength:A.config.backBufferLength;if(!Object(j.isFiniteNumber)(x)||x<0)return;var L=p.currentTime,b=a.levelTargetDuration,h=Math.max(x,b),r=Math.floor(L/b)*b-h;S.forEach(function(l){var f=w[l];if(f){var C=v.BufferHelper.getBuffered(f);C.length>0&&r>C.start(0)&&(A.trigger(D.Events.BACK_BUFFER_REACHED,{bufferEnd:r}),a.live&&A.trigger(D.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r}),A.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:l}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var A=this.details,a=this.hls,p=this.media,w=this.mediaSource,S=A.fragments[0].start+A.totalduration,x=p.duration,L=Object(j.isFiniteNumber)(w.duration)?w.duration:0;A.live&&a.config.liveDurationInfinity?(B.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(A)):(S>L&&S>x||!Object(j.isFiniteNumber)(x))&&(B.logger.log("[buffer-controller]: Updating Media Source duration to "+S.toFixed(3)),w.duration=S)},d.updateSeekableRange=function(A){var a=this.mediaSource,p=A.fragments,w=p.length;if(w&&A.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var S=Math.max(0,p[0].start),x=Math.max(S,S+A.totalduration);a.setLiveSeekableRange(S,x)}},d.checkPendingTracks=function(){var A=this.bufferCodecEventsExpected,a=this.operationQueue,p=this.pendingTracks,w=Object.keys(p).length;if(w&&!A||w===2){this.createSourceBuffers(p),this.pendingTracks={};var S=this.getSourceBufferTypes();if(S.length===0){this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}S.forEach(function(x){a.executeNext(x)})}},d.createSourceBuffers=function(A){var a=this.sourceBuffer,p=this.mediaSource;if(!p)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var S in A)if(!a[S]){var x=A[S];if(!x)throw Error("source buffer exists for track "+S+", however track does not");var L=x.levelCodec||x.codec,b=x.container+";codecs="+L;B.logger.log("[buffer-controller]: creating sourceBuffer("+b+")");try{var h=a[S]=p.addSourceBuffer(b),r=S;this.addBufferListener(r,"updatestart",this._onSBUpdateStart),this.addBufferListener(r,"updateend",this._onSBUpdateEnd),this.addBufferListener(r,"error",this._onSBUpdateError),this.tracks[S]={buffer:h,codec:L,container:x.container,levelCodec:x.levelCodec,id:x.id},w++}catch(l){B.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:b})}}w&&this.hls.trigger(D.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(A){var a=this.operationQueue,p=a.current(A);p.onStart()},d._onSBUpdateEnd=function(A){var a=this.operationQueue,p=a.current(A);p.onComplete(),a.shiftAndExecuteNext(A)},d._onSBUpdateError=function(A,a){B.logger.error("[buffer-controller]: "+A+" SourceBuffer error",a),this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var p=this.operationQueue.current(A);p&&p.onError(a)},d.removeExecutor=function(A,a,p){var w=this.media,S=this.mediaSource,x=this.operationQueue,L=this.sourceBuffer,b=L[A];if(!w||!S||!b){B.logger.warn("[buffer-controller]: Attempting to remove from the "+A+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(A);return}var h=Object(j.isFiniteNumber)(w.duration)?w.duration:Infinity,r=Object(j.isFiniteNumber)(S.duration)?S.duration:Infinity,l=Math.max(0,a),f=Math.min(p,h,r);f>l?(B.logger.log("[buffer-controller]: Removing ["+l+","+f+"] from the "+A+" SourceBuffer"),console.assert(!b.updating,A+" sourceBuffer must not be updating"),b.remove(l,f)):x.shiftAndExecuteNext(A)},d.appendExecutor=function(A,a){var p=this.operationQueue,w=this.sourceBuffer,S=w[a];if(!S){B.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(a);return}S.ended=!1,console.assert(!S.updating,a+" sourceBuffer must not be updating"),S.appendBuffer(A)},d.blockBuffers=function(A,a){var p=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){B.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(A);return}var w=this.operationQueue,S=a.map(function(x){return w.appendBlocker(x)});Promise.all(S).then(function(){A(),a.forEach(function(x){var L=p.sourceBuffer[x];(!L||!L.updating)&&w.shiftAndExecuteNext(x)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(A,a,p){var w=this.sourceBuffer[A];if(!w)return;var S=p.bind(this,A);this.listeners[A].push({event:a,listener:S}),w.addEventListener(a,S)},d.removeBufferListeners=function(A){var a=this.sourceBuffer[A];if(!a)return;this.listeners[A].forEach(function(p){a.removeEventListener(p.event,p.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return D});var j=O("./src/utils/logger.ts"),D=function(){function B(v){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=v}var I=B.prototype;return I.append=function(T,E){var n=this.queues[E];n.push(T),n.length===1&&this.buffers[E]&&this.executeNext(E)},I.insertAbort=function(T,E){var n=this.queues[E];n.unshift(T),this.executeNext(E)},I.appendBlocker=function(T){var E,n=new Promise(function(c){E=c}),u={execute:E,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,T),n},I.executeNext=function(T){var E=this.buffers,n=this.queues,u=E[T],c=n[T];if(c.length){var o=c[0];try{o.execute()}catch(i){j.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(i),(!u||!u.updating)&&(c.shift(),this.executeNext(T))}}},I.shiftAndExecuteNext=function(T){this.queues[T].shift(),this.executeNext(T)},I.current=function(T){return this.queues[T][0]},B}()},"./src/controller/cap-level-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/events.ts");function D(v,T){for(var E=0;E0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(n.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},T.getMaxLevel=function(n){var u=this,c=this.hls.levels;if(!c.length)return-1;var o=c.filter(function(i,d){return v.isLevelAllowed(d,u.restrictedLevels)&&d<=n});return this.clientRect=null,v.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},T.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},T.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},T.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,u={width:0,height:0};if(n){var c=n.getBoundingClientRect();u.width=c.width,u.height=c.height,!u.width&&!u.height&&(u.width=c.right-c.left||n.width||0,u.height=c.bottom-c.top||n.height||0)}return this.clientRect=u,u},v.isLevelAllowed=function(n,u){return u===void 0&&(u=[]),u.indexOf(n)===-1},v.getMaxLevelByMediaSize=function(n,u,c){if(!n||!n.length)return-1;for(var o=function(a,p){return p?a.width!==p.width||a.height!==p.height:!0},i=n.length-1,d=0;d=u||s.height>=c)&&o(s,n[d+1])){i=d;break}}return i},B(v,[{key:"mediaWidth",get:function(){return this.getDimensions().width*v.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*v.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(u){}return n}}]),v}();Q.default=I},"./src/controller/cmcd-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return o});var j=O("./src/events.ts"),D=O("./src/types/cmcd.ts"),B=O("./src/utils/buffer-helper.ts"),I=O("./src/utils/logger.ts");function v(i,d){for(var s=0;s=i.length?{done:!0}:{done:!1,value:i[A++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(i,d){if(!i)return;if(typeof i=="string")return u(i,d);var s=Object.prototype.toString.call(i).slice(8,-1);if(s==="Object"&&i.constructor&&(s=i.constructor.name),s==="Map"||s==="Set")return Array.from(i);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return u(i,d)}function u(i,d){(d==null||d>i.length)&&(d=i.length);for(var s=0,A=new Array(d);sa&&(a=x.bitrate)}return a>0?a:NaN},d.getBufferLength=function(A){var a=this.hls.media,p=A===D.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!p||!a)return NaN;var w=B.BufferHelper.bufferInfo(p,a.currentTime,this.config.maxBufferHole);return w.len*1e3},d.createPlaylistLoader=function(){var A=this.config.pLoader,a=this.applyPlaylistData,p=A||this.config.loader;return function(){function w(x){this.loader=void 0,this.loader=new p(x)}var S=w.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(L,b,h){a(L),this.loader.load(L,b,h)},T(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},d.createFragmentLoader=function(){var A=this.config.fLoader,a=this.applyFragmentData,p=A||this.config.loader;return function(){function w(x){this.loader=void 0,this.loader=new p(x)}var S=w.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(L,b,h){a(L),this.loader.load(L,b,h)},T(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},i.uuid=function(){var A=URL.createObjectURL(new Blob),a=A.toString();return URL.revokeObjectURL(A),a.substr(a.lastIndexOf("/")+1)},i.serialize=function(A){for(var a=[],p=function(P){return!Number.isNaN(P)&&P!=null&&P!==""&&P!==!1},w=function(P){return Math.round(P)},S=function(P){return w(P/100)*100},x=function(P){return encodeURIComponent(P)},L={br:w,d:w,bl:S,dl:S,mtp:S,nor:x,rtp:S,tb:w},b=Object.keys(A||{}).sort(),h=E(b),r;!(r=h()).done;){var l=r.value,f=A[l];if(!p(f))continue;if(l==="v"&&f===1)continue;if(l=="pr"&&f===1)continue;var C=L[l];C&&(f=C(f));var g=typeof f,m=void 0;l==="ot"||l==="sf"||l==="st"?m=l+"="+f:g==="boolean"?m=l:g==="number"?m=l+"="+f:m=l+"="+JSON.stringify(f),a.push(m)}return a.join(",")},i.toHeaders=function(A){for(var a=Object.keys(A),p={},w=["Object","Request","Session","Status"],S=[{},{},{},{}],x={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},L=0,b=a;LE){this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var x=E-this._requestLicenseFailureCount+1;B.logger.warn("Retrying license request, "+x+" attempts left"),this._requestLicense(a,p)}break}},i._generateLicenseRequestChallenge=function(s,A){switch(s.mediaKeySystemDomain){case I.KeySystems.WIDEVINE:return A}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},i._requestLicense=function(s,A){B.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){B.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var p=this.getLicenseServerUrl(a.mediaKeySystemDomain),w=this._createLicenseXhr(p,s,A);B.logger.log("Sending license request to URL: "+p);var S=this._generateLicenseRequestChallenge(a,s);w.send(S)}catch(x){B.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(s,A){if(!this._emeEnabled)return;var a=A.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var s=this._media,A=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(A.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(s,A){if(!this._emeEnabled)return;var a=A.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),p=A.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(I.KeySystems.WIDEVINE,a,p)},T(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();Q.default=c},"./src/controller/fps-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/events.ts"),D=O("./src/utils/logger.ts"),B=function(){function I(T){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=T,this.registerListeners()}var v=I.prototype;return v.setStreamController=function(E){this.streamController=E},v.registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},v.unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching)},v.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},v.onMediaAttaching=function(E,n){var u=this.hls.config;if(u.capLevelOnFPSDrop){var c=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=c,c&&typeof c.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),u.fpsDroppedMonitoringPeriod)}},v.checkFPS=function(E,n,u){var c=performance.now();if(n){if(this.lastTime){var o=c-this.lastTime,i=u-this.lastDroppedFrames,d=n-this.lastDecodedFrames,s=1e3*i/o,A=this.hls;if(A.trigger(j.Events.FPS_DROP,{currentDropped:i,currentDecoded:d,totalDroppedFrames:u}),s>0&&i>A.config.fpsDroppedMonitoringThreshold*d){var a=A.currentLevel;D.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(A.autoLevelCapping===-1||A.autoLevelCapping>=a)&&(a=a-1,A.trigger(j.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:A.currentLevel}),A.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=c,this.lastDroppedFrames=u,this.lastDecodedFrames=n}},v.checkFPSInterval=function(){var E=this.media;if(E)if(this.isVideoPlaybackQualityAvailable){var n=E.getVideoPlaybackQuality();this.checkFPS(E,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(E,E.webkitDecodedFrameCount,E.webkitDroppedFrameCount)},I}();Q.default=B},"./src/controller/fragment-finders.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"findFragmentByPDT",function(){return B}),O.d(Q,"findFragmentByPTS",function(){return I}),O.d(Q,"fragmentWithinToleranceTest",function(){return v}),O.d(Q,"pdtWithinToleranceTest",function(){return T}),O.d(Q,"findFragWithCC",function(){return E});var j=O("./src/polyfills/number.ts"),D=O("./src/utils/binary-search.ts");function B(n,u,c){if(u===null||!Array.isArray(n)||!n.length||!Object(j.isFiniteNumber)(u))return null;var o=n[0].programDateTime;if(u<(o||0))return null;var i=n[n.length-1].endProgramDateTime;if(u>=(i||0))return null;c=c||0;for(var d=0;dn&&c.start?-1:0}function T(n,u,c){var o=Math.min(u,c.duration+(c.deltaPTS?c.deltaPTS:0))*1e3,i=c.endProgramDateTime||0;return i-o>n}function E(n,u){return D.default.search(n,function(c){return c.ccu?-1:0})}},"./src/controller/fragment-tracker.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"FragmentState",function(){return B}),O.d(Q,"FragmentTracker",function(){return I});var j=O("./src/events.ts"),D=O("./src/types/loader.ts"),B;(function(E){E.NOT_LOADED="NOT_LOADED",E.BACKTRACKED="BACKTRACKED",E.APPENDING="APPENDING",E.PARTIAL="PARTIAL",E.OK="OK"})(B||(B={}));var I=function(){function E(u){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=u,this._registerListeners()}var n=E.prototype;return n._registerListeners=function(){var c=this.hls;c.on(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),c.on(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(j.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var c=this.hls;c.off(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),c.off(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(j.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(c,o){if(o===D.PlaylistLevelType.MAIN){var i=this.activeFragment,d=this.activeParts;if(!i)return null;if(d)for(var s=d.length;s--;){var A=d[s],a=A?A.end:i.appendedPTS;if(A.start<=c&&a!==void 0&&c<=a)return s>9&&(this.activeParts=d.slice(s-9)),A}else if(i.start<=c&&i.appendedPTS!==void 0&&c<=i.appendedPTS)return i}return this.getBufferedFrag(c,o)},n.getBufferedFrag=function(c,o){for(var i=this.fragments,d=Object.keys(i),s=d.length;s--;){var A=i[d[s]];if((A==null?void 0:A.body.type)===o&&A.buffered){var a=A.body;if(a.start<=c&&c<=a.end)return a}}return null},n.detectEvictedFragments=function(c,o,i){var d=this;Object.keys(this.fragments).forEach(function(s){var A=d.fragments[s];if(!A)return;if(!A.buffered){A.body.type===i&&d.removeFragment(A.body);return}var a=A.range[c];if(!a)return;a.time.some(function(p){var w=!d.isTimeBuffered(p.startPTS,p.endPTS,o);return w&&d.removeFragment(A.body),w})})},n.detectPartialFragments=function(c){var o=this,i=this.timeRanges,d=c.frag,s=c.part;if(!i||d.sn==="initSegment")return;var A=T(d),a=this.fragments[A];if(!a)return;Object.keys(i).forEach(function(p){var w=d.elementaryStreams[p];if(!w)return;var S=i[p],x=s!==null||w.partial===!0;a.range[p]=o.getBufferedTimes(d,s,x,S)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},n.fragBuffered=function(c){var o=T(c),i=this.fragments[o];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},n.getBufferedTimes=function(c,o,i,d){for(var s={time:[],partial:i},A=o?o.start:c.start,a=o?o.end:c.end,p=c.minEndPTS||a,w=c.maxStartPTS||A,S=0;S=x&&p<=L){s.time.push({startPTS:Math.max(A,d.start(S)),endPTS:Math.min(a,d.end(S))});break}else if(Ax)s.partial=!0,s.time.push({startPTS:Math.max(A,d.start(S)),endPTS:Math.min(a,d.end(S))});else if(a<=x)break}return s},n.getPartialFragment=function(c){var o=null,i,d,s,A=0,a=this.bufferPadding,p=this.fragments;return Object.keys(p).forEach(function(w){var S=p[w];if(!S)return;v(S)&&(d=S.body.start-a,s=S.body.end+a,c>=d&&c<=s&&(i=Math.min(c-d,s-c),A<=i&&(o=S.body,A=i)))}),o},n.getState=function(c){var o=T(c),i=this.fragments[o];return i?i.buffered?v(i)?B.PARTIAL:B.OK:i.backtrack?B.BACKTRACKED:B.APPENDING:B.NOT_LOADED},n.backtrack=function(c,o){var i=T(c),d=this.fragments[i];if(!d||d.backtrack)return null;var s=d.backtrack=o||d.loaded;return d.loaded=null,s},n.getBacktrackData=function(c){var o=T(c),i=this.fragments[o];if(i){var d,s=i.backtrack;if(s!=null&&(d=s.payload)!==null&&d!==void 0&&d.byteLength)return s;this.removeFragment(c)}return null},n.isTimeBuffered=function(c,o,i){for(var d,s,A=0;A=d&&o<=s)return!0;if(o<=d)return!1}return!1},n.onFragLoaded=function(c,o){var i=o.frag,d=o.part;if(i.sn==="initSegment"||i.bitrateTest||d)return;var s=T(i);this.fragments[s]={body:i,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(c,o){var i=this,d=o.frag,s=o.part,A=o.timeRanges;if(d.type===D.PlaylistLevelType.MAIN)if(this.activeFragment=d,s){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(s)}else this.activeParts=null;this.timeRanges=A,Object.keys(A).forEach(function(p){var w=A[p];if(i.detectEvictedFragments(p,w),!s)for(var S=0;Sc&&d.removeFragment(a)}})},n.removeFragment=function(c){var o=T(c);c.stats.loaded=0,c.clearElementaryStreamInfo(),delete this.fragments[o]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},E}();function v(E){var n,u;return E.buffered&&(((n=E.range.video)===null||n===void 0?void 0:n.partial)||((u=E.range.audio)===null||u===void 0?void 0:u.partial))}function T(E){return E.type+"_"+E.level+"_"+E.urlId+"_"+E.sn}},"./src/controller/gap-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"STALL_MINIMUM_DURATION_MS",function(){return v}),O.d(Q,"MAX_START_GAP_JUMP",function(){return T}),O.d(Q,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return E}),O.d(Q,"SKIP_BUFFER_RANGE_START",function(){return n}),O.d(Q,"default",function(){return u});var j=O("./src/utils/buffer-helper.ts"),D=O("./src/errors.ts"),B=O("./src/events.ts"),I=O("./src/utils/logger.ts"),v=250,T=2,E=.1,n=.05,u=function(){function c(i,d,s,A){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=i,this.media=d,this.fragmentTracker=s,this.hls=A}var o=c.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(d){var s=this.config,A=this.media,a=this.stalled,p=A.currentTime,w=A.seeking,S=this.seeking&&!w,x=!this.seeking&&w;if(this.seeking=w,p!==d){if(this.moved=!0,a!==null){if(this.stallReported){var L=self.performance.now()-a;I.logger.warn("playback not stuck anymore @"+p+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||S)&&(this.stalled=null),A.paused||A.ended||A.playbackRate===0||!j.BufferHelper.getBuffered(A).length)return;var b=j.BufferHelper.bufferInfo(A,p,0),h=b.len>0,r=b.nextStart||0;if(!h&&!r)return;if(w){var l=b.len>T,f=!r||r-p>T&&!this.fragmentTracker.getPartialFragment(p);if(l||f)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,g=Math.max(r,b.start||0)-p,m=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,F=m==null||((C=m.details)===null||C===void 0)?void 0:C.live,P=F?m.details.targetduration*2:T;if(g>0&&g<=P){this._trySkipBufferHole(null);return}}var z=self.performance.now();if(a===null){this.stalled=z;return}var Z=z-a;!w&&Z>=v&&this._reportStall(b.len);var V=j.BufferHelper.bufferInfo(A,p,s.maxBufferHole);this._tryFixBufferStall(V,Z)},o._tryFixBufferStall=function(d,s){var A=this.config,a=this.fragmentTracker,p=this.media,w=p.currentTime,S=a.getPartialFragment(w);if(S){var x=this._trySkipBufferHole(S);if(x)return}d.len>A.maxBufferHole&&s>A.highBufferWatchdogPeriod*1e3&&(I.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(d){var s=this.hls,A=this.media,a=this.stallReported;a||(this.stallReported=!0,I.logger.warn("Playback stalling at @"+A.currentTime+" due to low buffer (buffer="+d+")"),s.trigger(B.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},o._trySkipBufferHole=function(d){for(var s=this.config,A=this.hls,a=this.media,p=a.currentTime,w=0,S=j.BufferHelper.getBuffered(a),x=0;x=w&&p.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,A)),L=Math.round(2/(1+Math.exp(-.75*p-this.edgeStalled))*20)/20;c.playbackRate=Math.min(x,Math.max(1,L))}else c.playbackRate!==1&&c.playbackRate!==0&&(c.playbackRate=1)},n.estimateLiveEdge=function(){var c=this.levelDetails;return c===null?null:c.edge+c.age},n.computeLatency=function(){var c=this.estimateLiveEdge();return c===null?null:c-this.currentTime},v(E,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var c=this.config,o=this.levelDetails;return c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:o?c.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var c=this.levelDetails;if(c===null)return null;var o=c.holdBack,i=c.partHoldBack,d=c.targetduration,s=this.config,A=s.liveSyncDuration,a=s.liveSyncDurationCount,p=s.lowLatencyMode,w=this.hls.userConfig,S=p&&i||o;(w.liveSyncDuration||w.liveSyncDurationCount||S===0)&&(S=A!==void 0?A:a*d);var x=d,L=1;return S+Math.min(this.stallCount*L,x)}},{key:"liveSyncPosition",get:function(){var c=this.estimateLiveEdge(),o=this.targetLatency,i=this.levelDetails;if(c===null||o===null||i===null)return null;var d=i.edge,s=c-o-this.edgeStalled,A=d-i.totalduration,a=d-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(A,s),a)}},{key:"drift",get:function(){var c=this.levelDetails;return c===null?1:c.drift}},{key:"edgeStalled",get:function(){var c=this.levelDetails;if(c===null)return 0;var o=(this.config.lowLatencyMode&&c.partTarget||c.targetduration)*3;return Math.max(c.age-o,0)}},{key:"forwardBufferLength",get:function(){var c=this.media,o=this.levelDetails;if(!c||!o)return 0;var i=c.buffered.length;return i?c.buffered.end(i-1):o.edge-this.currentTime}}]),E}()},"./src/controller/level-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return s});var j=O("./src/types/level.ts"),D=O("./src/events.ts"),B=O("./src/errors.ts"),I=O("./src/utils/codecs.ts"),v=O("./src/controller/level-helper.ts"),T=O("./src/controller/base-playlist-controller.ts"),E=O("./src/types/loader.ts");function n(){return n=Object.assign||function(A){for(var a=1;a0){r=L[0].bitrate,L.sort(function(Z,V){return Z.bitrate-V.bitrate}),this._levels=L;for(var F=0;Fthis.hls.config.fragLoadingMaxRetry&&(l=x.frag.level)):l=x.frag.level}break;case B.ErrorDetails.LEVEL_LOAD_ERROR:case B.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(r=!1),l=L.level),h=!0;break;case B.ErrorDetails.REMUX_ALLOC_ERROR:l=x.level,h=!0;break}l!==void 0&&this.recoverLevel(x,l,h,r)},p.recoverLevel=function(S,x,L,b){var h=S.details,r=this._levels[x];if(r.loadError++,L){var l=this.retryLoadingOrFail(S);if(l)S.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(b){var f=r.url.length;if(f>1&&r.loadError1){var b=(x.urlId+1)%L;this.warn("Switching to redundant URL-id "+b),this._levels.forEach(function(h){h.urlId=b}),this.level=S}},p.onFragLoaded=function(S,x){var L=x.frag;if(L!==void 0&&L.type===E.PlaylistLevelType.MAIN){var b=this._levels[L.level];b!==void 0&&(b.fragmentError=0,b.loadError=0)}},p.onLevelLoaded=function(S,x){var L,b=x.level,h=x.details,r=this._levels[b];if(!r){var l;this.warn("Invalid level index "+b),(l=x.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(h.deltaUpdateFailed=!0);return}b===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0,this.retryCount=0),this.playlistLoaded(b,x,r.details)):(L=x.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(h.deltaUpdateFailed=!0)},p.onAudioTrackSwitched=function(S,x){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var b=-1,h=this.hls.audioTracks[x.id].groupId,r=0;r0){var b=L.urlId,h=L.url[b];if(S)try{h=S.addDirectives(h)}catch(r){this.warn("Could not construct new URL with HLS Delivery Directives: "+r)}this.log("Attempt loading level index "+x+(S?" at sn "+S.msn+" part "+S.part:"")+" with URL-id "+b+" "+h),this.clearTimer(),this.hls.trigger(D.Events.LEVEL_LOADING,{url:h,level:x,id:b,deliveryDirectives:S||null})}},p.removeLevel=function(S,x){var L=function(r,l){return l!==x},b=this._levels.filter(function(h,r){return r!==S?!0:h.url.length>1&&x!==void 0?(h.url=h.url.filter(L),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(L)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(L)),h.urlId=0,!0):!1}).map(function(h,r){var l=h.details;return l!=null&&l.fragments&&l.fragments.forEach(function(f){f.level=r}),h});this._levels=b,this.hls.trigger(D.Events.LEVELS_UPDATED,{levels:b})},c(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(S){var x,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===S&&(x=L[S])!==null&&x!==void 0&&x.details)return;if(S<0||S>=L.length){var b=S<0;if(this.hls.trigger(D.Events.ERROR,{type:B.ErrorTypes.OTHER_ERROR,details:B.ErrorDetails.LEVEL_SWITCH_ERROR,level:S,fatal:b,reason:"invalid level idx"}),b)return;S=Math.min(S,L.length-1)}this.clearTimer();var h=this.currentLevelIndex,r=L[h],l=L[S];this.log("switching to level "+S+" from "+h),this.currentLevelIndex=S;var f=n({},l,{level:S,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete f._urlId,this.hls.trigger(D.Events.LEVEL_SWITCHING,f);var C=l.details;if(!C||C.live){var g=this.switchParams(l.uri,r==null?void 0:r.details);this.loadPlaylist(g)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(S){this.manualLevelIndex=S,this._startLevel===void 0&&(this._startLevel=S),S!==-1&&(this.level=S)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(S){this._firstLevel=S}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var S=this.hls.config.startLevel;return S!==void 0?S:this._firstLevel}else return this._startLevel},set:function(S){this._startLevel=S}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(S){this.level=S,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=S)}}]),a}(T.default)},"./src/controller/level-helper.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"addGroupId",function(){return B}),O.d(Q,"assignTrackIdsByGroup",function(){return I}),O.d(Q,"updatePTS",function(){return v}),O.d(Q,"updateFragPTSDTS",function(){return E}),O.d(Q,"mergeDetails",function(){return n}),O.d(Q,"mapPartIntersection",function(){return u}),O.d(Q,"mapFragmentIntersection",function(){return c}),O.d(Q,"adjustSliding",function(){return o}),O.d(Q,"addSliding",function(){return i}),O.d(Q,"computeReloadInterval",function(){return d}),O.d(Q,"getFragmentWithSN",function(){return s}),O.d(Q,"getPartWith",function(){return A});var j=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts");function B(a,p,w){switch(p){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(w);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(w);break}}function I(a){var p={};a.forEach(function(w){var S=w.groupId||"";w.id=p[S]=p[S]||0,p[S]++})}function v(a,p,w){var S=a[p],x=a[w];T(S,x)}function T(a,p){var w=p.startPTS;if(Object(j.isFiniteNumber)(w)){var S=0,x;p.sn>a.sn?(S=w-a.start,x=a):(S=a.start-w,x=p),x.duration!==S&&(x.duration=S)}else if(p.sn>a.sn){var L=a.cc===p.cc;L&&a.minEndPTS?p.start=a.start+(a.minEndPTS-a.start):p.start=a.start+a.duration}else p.start=Math.max(a.start-p.duration,0)}function E(a,p,w,S,x,L){var b=S-w;b<=0&&(D.logger.warn("Fragment should have a positive duration",p),S=w+p.duration,L=x+p.duration);var h=w,r=S,l=p.startPTS,f=p.endPTS;if(Object(j.isFiniteNumber)(l)){var C=Math.abs(l-w);Object(j.isFiniteNumber)(p.deltaPTS)?p.deltaPTS=Math.max(C,p.deltaPTS):p.deltaPTS=C,h=Math.max(w,l),w=Math.min(w,l),x=Math.min(x,p.startDTS),r=Math.min(S,f),S=Math.max(S,f),L=Math.max(L,p.endDTS)}p.duration=S-w;var g=w-p.start;p.appendedPTS=S,p.start=p.startPTS=w,p.maxStartPTS=h,p.startDTS=x,p.endPTS=S,p.minEndPTS=r,p.endDTS=L;var m=p.sn;if(!a||ma.endSN)return 0;var F,P=m-a.startSN,z=a.fragments;for(z[P]=p,F=P;F>0;F--)T(z[F],z[F-1]);for(F=P;F=0;x--){var L=S[x].initSegment;if(L){w=L;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var b=0,h;if(c(a,p,function(F,P){F.relurl&&(b=F.cc-P.cc),Object(j.isFiniteNumber)(F.startPTS)&&Object(j.isFiniteNumber)(F.endPTS)&&(P.start=P.startPTS=F.startPTS,P.startDTS=F.startDTS,P.appendedPTS=F.appendedPTS,P.maxStartPTS=F.maxStartPTS,P.endPTS=F.endPTS,P.endDTS=F.endDTS,P.minEndPTS=F.minEndPTS,P.duration=F.endPTS-F.startPTS,P.duration&&(h=P),p.PTSKnown=p.alignedSliding=!0),P.elementaryStreams=F.elementaryStreams,P.loader=F.loader,P.stats=F.stats,P.urlId=F.urlId,F.initSegment&&(P.initSegment=F.initSegment,w=F.initSegment)}),w){var r=p.fragmentHint?p.fragments.concat(p.fragmentHint):p.fragments;r.forEach(function(F){var P;(!F.initSegment||F.initSegment.relurl===((P=w)===null||P===void 0?void 0:P.relurl))&&(F.initSegment=w)})}if(p.skippedSegments&&(p.deltaUpdateFailed=p.fragments.some(function(F){return!F}),p.deltaUpdateFailed)){D.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=p.skippedSegments;l--;)p.fragments.shift();p.startSN=p.fragments[0].sn,p.startCC=p.fragments[0].cc}var f=p.fragments;if(b){D.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C=S.length)return;i(p,S[w].start)}function i(a,p){if(p){for(var w=a.fragments,S=a.skippedSegments;S0&&x0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),r=l),this.state=D.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=D.State.STOPPED},b.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},b.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_LEVEL:{var r,l=this.levels,f=this.level,C=l==null||((r=l[f])===null||r===void 0)?void 0:r.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=D.State.IDLE;break}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var g,m=self.performance.now(),F=this.retryDate;(!F||m>=F||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=D.State.IDLE)}break;default:break}this.onTickEnd()},b.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},b.doTickIdle=function(){var r,l,f=this.hls,C=this.levelLastLoaded,g=this.levels,m=this.media,F=f.config,P=f.nextLoadLevel;if(C===null||!m&&(this.startFragRequested||!F.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[P])return;var z=g[P];this.level=f.nextLoadLevel=P;var Z=z.details;if(!Z||this.state===D.State.WAITING_LEVEL||Z.live&&this.levelLastLoaded!==P){this.state=D.State.WAITING_LEVEL;return}var V=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:m,E.PlaylistLevelType.MAIN);if(V===null)return;var M=V.len,J=this.getMaxBufferLength(z.maxBitrate);if(M>=J)return;if(this._streamEnded(V,Z)){var X={};this.altAudio&&(X.type="video"),this.hls.trigger(I.Events.BUFFER_EOS,X),this.state=D.State.ENDED;return}var re=V.end,se=this.getNextFragment(re,Z);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var _e=se.sn-Z.startSN;_e>1&&(se=Z.fragments[_e-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===T.FragmentState.OK&&this.nextLoadPosition>re){var ge=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(m,ge,E.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,Z)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((r=se.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((l=se.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(se,Z):this.loadFragment(se,Z,re)},b.loadFragment=function(r,l,f){var C,g=this.fragmentTracker.getState(r);if(this.fragCurrent=r,g===T.FragmentState.BACKTRACKED){var m=this.fragmentTracker.getBacktrackData(r);if(m){this._handleFragmentLoadProgress(m),this._handleFragmentLoadComplete(m);return}else g=T.FragmentState.NOT_LOADED}g===T.FragmentState.NOT_LOADED||g===T.FragmentState.PARTIAL?r.sn==="initSegment"?this._loadInitSegment(r):this.bitrateTest?(r.bitrateTest=!0,this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r)):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,r,l,f)):g===T.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},b.getAppendedFrag=function(r){var l=this.fragmentTracker.getAppendedFrag(r,E.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},b.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,E.PlaylistLevelType.MAIN)},b.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},b.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},b.nextLevelSwitch=function(){var r=this.levels,l=this.media;if(l!=null&&l.readyState){var f,C=this.getAppendedFrag(l.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!l.paused&&r){var g=this.hls.nextLoadLevel,m=r[g],F=this.fragLastKbps;F&&this.fragCurrent?f=this.fragCurrent.duration*m.maxBitrate/(1e3*F)+1:f=0}else f=0;var P=this.getBufferedFrag(l.currentTime+f);if(P){var z=this.followingBufferedFrag(P);if(z){this.abortCurrentFrag();var Z=z.maxStartPTS?z.maxStartPTS:z.start,V=z.duration,M=Math.max(P.end,Z+Math.min(Math.max(V-this.config.maxFragLookUpTolerance,V*.5),V*.75));this.flushMainBuffer(M,Number.POSITIVE_INFINITY)}}}},b.abortCurrentFrag=function(){var r=this.fragCurrent;this.fragCurrent=null,r!=null&&r.loader&&r.loader.abort(),this.state===D.State.KEY_LOADING&&(this.state=D.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},b.flushMainBuffer=function(r,l){x.prototype.flushMainBuffer.call(this,r,l,this.altAudio?"video":null)},b.onMediaAttached=function(r,l){x.prototype.onMediaAttached.call(this,r,l);var f=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),f.addEventListener("playing",this.onvplaying),f.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,f,this.fragmentTracker,this.hls)},b.onMediaDetaching=function(){var r=this.media;r&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),x.prototype.onMediaDetaching.call(this)},b.onMediaPlaying=function(){this.tick()},b.onMediaSeeked=function(){var r=this.media,l=r?r.currentTime:null;Object(j.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},b.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(I.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},b.onManifestParsed=function(r,l){var f=!1,C=!1,g;l.levels.forEach(function(m){g=m.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(f=!0),g.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=f&&C&&!Object(B.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},b.onLevelLoading=function(r,l){var f=this.levels;if(!f||this.state!==D.State.IDLE)return;var C=f[l.level];(!C.details||C.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(C.details))&&(this.state=D.State.WAITING_LEVEL)},b.onLevelLoaded=function(r,l){var f,C=this.levels,g=l.level,m=l.details,F=m.totalduration;if(!C){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+m.startSN+","+m.endSN+"], cc ["+m.startCC+", "+m.endCC+"] duration:"+F);var P=this.fragCurrent;P&&(this.state===D.State.FRAG_LOADING||this.state===D.State.FRAG_LOADING_WAITING_RETRY)&&(P.level!==l.level&&P.loader&&(this.state=D.State.IDLE,P.loader.abort()));var z=C[g],Z=0;if(m.live||(f=z.details)!==null&&f!==void 0&&f.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;Z=this.alignPlaylists(m,z.details)}if(z.details=m,this.levelLastLoaded=g,this.hls.trigger(I.Events.LEVEL_UPDATED,{details:m,level:g}),this.state===D.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=D.State.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,Z),this.tick()},b._handleFragmentLoadProgress=function(r){var l,f=r.frag,C=r.part,g=r.payload,m=this.levels;if(!m){this.warn("Levels were reset while fragment load was in progress. Fragment "+f.sn+" of level "+f.level+" will not be buffered");return}var F=m[f.level],P=F.details;if(!P){this.warn("Dropping fragment "+f.sn+" of level "+f.level+" after level details were reset");return}var z=F.videoCodec,Z=P.PTSKnown||!P.live,V=(l=f.initSegment)===null||l===void 0?void 0:l.data,M=this._getAudioCodec(F),J=this.transmuxer=this.transmuxer||new u.default(this.hls,E.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),X=C?C.index:-1,re=X!==-1,se=new c.ChunkMetadata(f.level,f.sn,f.stats.chunkCount,g.byteLength,X,re),_e=this.initPTS[f.cc];J.push(g,V,M,z,f,C,P.totalduration,Z,se,_e)},b.onAudioTrackSwitching=function(r,l){var f=this.altAudio,C=!!l.url,g=l.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var m=this.fragCurrent;m!=null&&m.loader&&(this.log("Switching to main audio track, cancel main fragment load"),m.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var F=this.hls;f&&F.trigger(I.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),F.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:g})}},b.onAudioTrackSwitched=function(r,l){var f=l.id,C=!!this.hls.audioTracks[f].url;if(C){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=C,this.tick()},b.onBufferCreated=function(r,l){var f=l.tracks,C,g,m=!1;for(var F in f){var P=f[F];if(P.id==="main"){if(g=F,C=P,F==="video"){var z=f[F];z&&(this.videoBuffer=z.buffer)}}else m=!0}m&&C?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},b.onFragBuffered=function(r,l){var f=l.frag,C=l.part;if(f&&f.type!==E.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(f)){this.warn("Fragment "+f.sn+(C?" p: "+C.index:"")+" of level "+f.level+" finished buffering, but was aborted. state: "+this.state),this.state===D.State.PARSED&&(this.state=D.State.IDLE);return}var g=C?C.stats:f.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),f.sn!=="initSegment"&&(this.fragPrevious=f),this.fragBufferedComplete(f,C)},b.onError=function(r,l){switch(l.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.MAIN,l);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==D.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=D.State.ERROR):!l.levelRetry&&this.state===D.State.WAITING_LEVEL&&(this.state=D.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var f=!0,C=this.getFwdBufferInfo(this.media,E.PlaylistLevelType.MAIN);C&&C.len>.5&&(f=!this.reduceMaxBufferLength(C.len)),f&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},b.checkBuffer=function(){var r=this.media,l=this.gapController;if(!r||!l||!r.readyState)return;var f=v.BufferHelper.getBuffered(r);!this.loadedmetadata&&f.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=r.currentTime},b.onFragLoadEmergencyAborted=function(){this.state=D.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},b.onBufferFlushed=function(r,l){var f=l.type;if(f!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(f===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,f,E.PlaylistLevelType.MAIN)}},b.onLevelsUpdated=function(r,l){this.levels=l.levels},b.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},b.seekToStartPos=function(){var r=this.media,l=r.currentTime,f=this.startPosition;if(f>=0&&l0&&(m1&&r.seeking===!1){var f=r.currentTime;if(v.BufferHelper.isBuffered(r,f)?l=this.getAppendedFrag(f):v.BufferHelper.isBuffered(r,f+.1)&&(l=this.getAppendedFrag(f+.1)),l){var C=this.fragPlaying,g=l.level;(!C||l.sn!==C.sn||C.level!==g||l.urlId!==C.urlId)&&(this.hls.trigger(I.Events.FRAG_CHANGED,{frag:l}),(!C||C.level!==g)&&this.hls.trigger(I.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=l)}}},A(L,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentLevel",get:function(){var r=this.media;if(r){var l=this.getAppendedFrag(r.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var r=this.media;if(r){var l=this.getAppendedFrag(r.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(D.default)},"./src/controller/subtitle-stream-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"SubtitleStreamController",function(){return a});var j=O("./src/events.ts"),D=O("./src/utils/logger.ts"),B=O("./src/utils/buffer-helper.ts"),I=O("./src/controller/fragment-finders.ts"),v=O("./src/utils/discontinuities.ts"),T=O("./src/controller/level-helper.ts"),E=O("./src/controller/fragment-tracker.ts"),n=O("./src/controller/base-stream-controller.ts"),u=O("./src/types/loader.ts"),c=O("./src/types/level.ts");function o(p,w){for(var S=0;S=l[g].start&&C<=l[g].end){f=l[g];break}var m=h.start+h.duration;f?f.end=m:(f={start:C,end:m},l.push(f)),this.fragmentTracker.fragBuffered(h)},S.onBufferFlushing=function(L,b){var h=b.startOffset,r=b.endOffset;if(h===0&&r!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,f=this.levels;if(!f.length||!f[l]||!f[l].details)return;var C=f[l].details,g=C.targetduration,m=r-g;if(m<=0)return;b.endOffsetSubtitles=Math.max(0,m),this.tracksBuffered.forEach(function(F){for(var P=0;P=C.length||l!==f||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||(h=g.details)!==null&&h!==void 0&&h.live){var m=this.mainDetails;if(r.deltaUpdateFailed||!m)return;var F=m.fragments[0];if(!g.details)r.hasProgramDateTime&&m.hasProgramDateTime?Object(v.alignMediaPlaylistByPDT)(r,m):F&&Object(T.addSliding)(r,F.start);else{var P=this.alignPlaylists(r,g.details);P===0&&F&&Object(T.addSliding)(r,F.start)}}if(g.details=r,this.levelLastLoaded=l,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var z=Object(I.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0);z||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},S._handleFragmentLoadComplete=function(L){var b=L.frag,h=L.payload,r=b.decryptdata,l=this.hls;if(this.fragContextChanged(b))return;if(h&&h.byteLength>0&&r&&r.key&&r.iv&&r.method==="AES-128"){var f=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),r.key.buffer,r.iv.buffer).then(function(C){var g=performance.now();l.trigger(j.Events.FRAG_DECRYPTED,{frag:b,payload:C,stats:{tstart:f,tdecrypt:g}})})}},S.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var L,b=this.currentTrackId,h=this.levels;if(!h.length||!h[b]||!h[b].details)return;var r=h[b].details,l=r.targetduration,f=this.config,C=this.media,g=B.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-l,f.maxBufferHole),m=g.end,F=g.len,P=this.getMaxBufferLength()+l;if(F>P)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var z=r.fragments,Z=z.length,V=r.edge,M,J=this.fragPrevious;if(m-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(A){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,A)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var A=c(this.media.textTracks);A.forEach(function(a){Object(D.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(A,a){this.tracks=a.subtitleTracks},d.onSubtitleTrackLoaded=function(A,a){var p=a.id,w=a.details,S=this.trackId,x=this.tracksInGroup[S];if(!x){this.warn("Invalid subtitle track id "+p);return}var L=x.details;x.details=a.details,this.log("subtitle track "+p+" loaded ["+w.startSN+"-"+w.endSN+"]"),p===this.trackId&&(this.retryCount=0,this.playlistLoaded(p,a,L))},d.onLevelLoading=function(A,a){this.switchLevel(a.level)},d.onLevelSwitching=function(A,a){this.switchLevel(a.level)},d.switchLevel=function(A){var a=this.hls.levels[A];if(!(a!=null&&a.textGroupIds))return;var p=a.textGroupIds[a.urlId];if(this.groupId!==p){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,S=this.tracks.filter(function(b){return!p||b.groupId===p});this.tracksInGroup=S;var x=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=p;var L={subtitleTracks:S};this.log("Updating subtitle tracks, "+S.length+' track(s) found in "'+p+'" group-id'),this.hls.trigger(j.Events.SUBTITLE_TRACKS_UPDATED,L),x!==-1&&this.setSubtitleTrack(x,w)}},d.findTrackId=function(A){for(var a=this.tracksInGroup,p=0;p=w.length)return;this.clearTimer();var S=w[A];if(this.log("Switching to subtitle track "+A),this.trackId=A,S){var x=S.id,L=S.groupId,b=L===void 0?"":L,h=S.name,r=S.type,l=S.url;this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:b,name:h,type:r,url:l});var f=this.switchParams(S.url,a==null?void 0:a.details);this.loadPlaylist(f)}else this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:A})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var A=-1,a=c(this.media.textTracks),p=0;p=0&&(r[0]=Math.min(r[0],w),r[1]=Math.max(r[1],S),b=!0,l/(S-w)>.5))return}if(b||L.push([w,S]),this.config.renderTextTracksNatively){var f=this.captionsTracks[p];this.Cues.newCue(f,w,S,x)}else{var C=this.Cues.newCue(null,w,S,x);this.hls.trigger(D.Events.CUES_PARSED,{type:"captions",cues:C,track:p})}},A.onInitPtsFound=function(p,w){var S=this,x=w.frag,L=w.id,b=w.initPTS,h=w.timescale,r=this.unparsedVttFrags;L==="main"&&(this.initPTS[x.cc]=b,this.timescale[x.cc]=h),r.length&&(this.unparsedVttFrags=[],r.forEach(function(l){S.onFragLoaded(D.Events.FRAG_LOADED,l)}))},A.getExistingTrack=function(p){var w=this.media;if(w)for(var S=0;S>>8^h&255^99,E[x]=h,n[h]=x;var r=S[x],l=S[r],f=S[l],C=S[h]*257^h*16843008;c[x]=C<<24|C>>>8,o[x]=C<<16|C>>>16,i[x]=C<<8|C>>>24,d[x]=C,C=f*16843009^l*65537^r*257^x*16843008,A[h]=C<<24|C>>>8,a[h]=C<<16|C>>>16,p[h]=C<<8|C>>>24,w[h]=C,x?(x=r^S[S[S[f^r]]],L^=S[S[L]]):x=L=1}},v.expandKey=function(E){for(var n=this.uint8ArrayToUint32Array_(E),u=!0,c=0;c>>6)+1;var C=(p[w+2]&60)>>>2;if(C>f.length-1){a.trigger(B.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return b=(p[w+2]&1)<<2,b|=(p[w+3]&192)>>>6,j.logger.log("manifest codec:"+S+", ADTS type:"+x+", samplingIndex:"+C),/firefox/i.test(r)?C>=6?(x=5,h=new Array(4),L=C-3):(x=2,h=new Array(2),L=C):r.indexOf("android")!==-1?(x=2,h=new Array(2),L=C):(x=5,h=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&C>=6?L=C-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(C>=6&&b===1||/vivaldi/i.test(r))||!S&&b===1)&&(x=2,h=new Array(2)),L=C)),h[0]=x<<3,h[0]|=(C&14)>>1,h[1]|=(C&1)<<7,h[1]|=b<<3,x===5&&(h[1]|=(L&14)>>1,h[2]=(L&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:f[C],channelCount:b,codec:"mp4a.40."+x,manifestCodec:l}}function v(a,p){return a[p]===255&&(a[p+1]&246)===240}function T(a,p){return a[p+1]&1?7:9}function E(a,p){return(a[p+3]&3)<<11|a[p+4]<<3|(a[p+5]&224)>>>5}function n(a,p){return p+5=a.length)return!1;var S=E(a,p);if(S<=w)return!1;var x=p+S;return x===a.length||u(a,x)}return!1}function i(a,p,w,S,x){if(!a.samplerate){var L=I(p,w,S,x);if(!L)return;a.config=L.config,a.samplerate=L.samplerate,a.channelCount=L.channelCount,a.codec=L.codec,a.manifestCodec=L.manifestCodec,j.logger.log("parsed codec:"+a.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function d(a){return 1024*9e4/a}function s(a,p,w,S,x){var L=T(a,p),b=E(a,p);if(b-=L,b>0){var h=w+S*x;return{headerLength:L,frameLength:b,stamp:h}}}function A(a,p,w,S,x){var L=d(a.samplerate),b=s(p,w,S,x,L);if(b){var h=b.frameLength,r=b.headerLength,l=b.stamp,f=r+h,C=Math.max(0,w+f-p.length),g;C?(g=new Uint8Array(f-r),g.set(p.subarray(w+r,p.length),0)):g=p.subarray(w+r,w+f);var m={unit:g,pts:l};return C||a.samples.push(m),{sample:m,length:f,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"initPTSFn",function(){return E});var j=O("./src/polyfills/number.ts"),D=O("./src/demux/id3.ts"),B=O("./src/demux/dummy-demuxed-track.ts"),I=O("./src/utils/mp4-tools.ts"),v=O("./src/utils/typed-array.ts"),T=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=n.prototype;return u.resetInitSegment=function(o,i,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(o,i){return!1},u.appendFrame=function(o,i,d){},u.demux=function(o,i){this.cachedData&&(o=Object(I.appendUint8Array)(this.cachedData,o),this.cachedData=null);var d=D.getID3Data(o,0),s=d?d.length:0,A,a,p=this._audioTrack,w=this._id3Track,S=d?D.getTimeStamp(d):void 0,x=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=E(S,i)),d&&d.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),a=this.initPTS;sT?(this.word<<=T,this.bitsAvailable-=T):(T-=this.bitsAvailable,E=T>>3,T-=E>>3,this.bytesAvailable-=E,this.loadWord(),this.word<<=T,this.bitsAvailable-=T)},I.readBits=function(T){var E=Math.min(this.bitsAvailable,T),n=this.word>>>32-E;return T>32&&j.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=E,this.bitsAvailable>0?this.word<<=E:this.bytesAvailable>0&&this.loadWord(),E=T-E,E>0&&this.bitsAvailable?n<>>T)!==0)return this.word<<=T,this.bitsAvailable-=T,T;return this.loadWord(),T+this.skipLZ()},I.skipUEG=function(){this.skipBits(1+this.skipLZ())},I.skipEG=function(){this.skipBits(1+this.skipLZ())},I.readUEG=function(){var T=this.skipLZ();return this.readBits(T+1)-1},I.readEG=function(){var T=this.readUEG();return 1&T?1+T>>>1:-1*(T>>>1)},I.readBoolean=function(){return this.readBits(1)===1},I.readUByte=function(){return this.readBits(8)},I.readUShort=function(){return this.readBits(16)},I.readUInt=function(){return this.readBits(32)},I.skipScalingList=function(T){for(var E=8,n=8,u,c=0;c0?x.subarray(b,b+h):void 0},I=function(x,L){var b=0;return b=(x[L]&127)<<21,b|=(x[L+1]&127)<<14,b|=(x[L+2]&127)<<7,b|=x[L+3]&127,b},v=function(x,L){return j(x,L)&&I(x,L+6)+10<=x.length-L},T=function(x){for(var L=u(x),b=0;b>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:m+=String.fromCharCode(f);break;case 12:case 13:C=x[F++],m+=String.fromCharCode((f&31)<<6|C&63);break;case 14:C=x[F++],g=x[F++],m+=String.fromCharCode((f&15)<<12|(C&63)<<6|(g&63)<<0);break;default:}}return m},a={decodeTextFrame:i},p;function w(){return!p&&typeof self.TextDecoder!="undefined"&&(p=new self.TextDecoder("utf-8")),p}},"./src/demux/mp3demuxer.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/id3.ts"),B=O("./src/utils/logger.ts"),I=O("./src/demux/mpegaudio.ts");function v(n,u){n.prototype=Object.create(u.prototype),n.prototype.constructor=n,T(n,u)}function T(n,u){return T=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},T(n,u)}var E=function(n){v(u,n);function u(){return n.apply(this,arguments)||this}var c=u.prototype;return c.resetInitSegment=function(i,d,s){n.prototype.resetInitSegment.call(this,i,d,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:s,inputTimeScale:9e4,dropped:0}},u.probe=function(i){if(!i)return!1;for(var d=D.getID3Data(i,0)||[],s=d.length,A=i.length;s0},v.demux=function(E){var n=E,u=Object(D.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(j.appendUint8Array)(this.remainderData,E));var c=Object(j.segmentValidRange)(n);this.remainderData=c.remainder,u.samples=c.valid||new Uint8Array}else u.samples=n;return{audioTrack:Object(D.dummyTrack)(),avcTrack:u,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},v.flush=function(){var E=Object(D.dummyTrack)();return E.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(D.dummyTrack)(),avcTrack:E,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},v.demuxSampleAes=function(E,n,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},v.destroy=function(){},I}();B.minProbeByteLength=1024,Q.default=B},"./src/demux/mpegaudio.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"appendFrame",function(){return T}),O.d(Q,"parseHeader",function(){return E}),O.d(Q,"isHeaderPattern",function(){return n}),O.d(Q,"isHeader",function(){return u}),O.d(Q,"canParse",function(){return c}),O.d(Q,"probe",function(){return o});var j=null,D=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],B=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],I=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],v=[0,1,1,4];function T(i,d,s,A,a){if(s+24>d.length)return;var p=E(d,s);if(p&&s+p.frameLength<=d.length){var w=p.samplesPerFrame*9e4/p.sampleRate,S=A+a*w,x={unit:d.subarray(s,s+p.frameLength),pts:S,dts:S};return i.config=[],i.channelCount=p.channelCount,i.samplerate=p.sampleRate,i.samples.push(x),{sample:x,length:p.frameLength,missing:0}}}function E(i,d){var s=i[d+1]>>3&3,A=i[d+1]>>1&3,a=i[d+2]>>4&15,p=i[d+2]>>2&3;if(s!==1&&a!==0&&a!==15&&p!==3){var w=i[d+2]>>1&1,S=i[d+3]>>6,x=s===3?3-A:A===3?3:4,L=D[x*14+a-1]*1e3,b=s===3?0:s===2?1:2,h=B[b*3+p],r=S===3?1:2,l=I[s][A],f=v[A],C=l*8*f,g=Math.floor(l*L/h+w)*f;if(j===null){var m=navigator.userAgent||"",F=m.match(/Chrome\/(\d+)/i);j=F?parseInt(F[1]):0}var P=!!j&&j<=87;return P&&A===2&&L>=224e3&&S===0&&(i[d+3]=i[d+3]|128),{sampleRate:h,channelCount:r,frameLength:g,samplesPerFrame:C}}}function n(i,d){return i[d]===255&&(i[d+1]&224)===224&&(i[d+1]&6)!==0}function u(i,d){return d+1=E.length){u();return}if(E[n].unit.length<32)continue;var c=this.decrypter.isSync();if(this.decryptAacSample(E,n,u,c),!c)return}},v.getAvcEncryptedData=function(E){for(var n=Math.floor((E.length-48)/160)*16+16,u=new Int8Array(n),c=0,o=32;o<=E.length-16;o+=160,c+=16)u.set(E.subarray(o,o+16),c);return u},v.getAvcDecryptedUnit=function(E,n){for(var u=new Uint8Array(n),c=0,o=32;o<=E.length-16;o+=160,c+=16)E.set(u.subarray(c,c+16),o);return E},v.decryptAvcSample=function(E,n,u,c,o,i){var d=Object(D.discardEPB)(o.data),s=this.getAvcEncryptedData(d),A=this;this.decryptBuffer(s.buffer,function(a){o.data=A.getAvcDecryptedUnit(d,a),i||A.decryptAvcSamples(E,n,u+1,c)})},v.decryptAvcSamples=function(E,n,u,c){if(E instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,u=0){if(n>=E.length){c();return}for(var o=E[n].units;!(u>=o.length);u++){var i=o[u];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(E,n,u,c,i,d),!d)return}}},I}();Q.default=B},"./src/demux/transmuxer-interface.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return o});var j=O("./node_modules/webworkify-webpack/index.js"),D=O.n(j),B=O("./src/events.ts"),I=O("./src/demux/transmuxer.ts"),v=O("./src/utils/logger.ts"),T=O("./src/errors.ts"),E=O("./src/utils/mediasource-helper.ts"),n=O("./node_modules/eventemitter3/index.js"),u=O.n(n),c=Object(E.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function i(s,A,a,p){var w=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=A,this.onTransmuxComplete=a,this.onFlush=p;var S=s.config,x=function(l,f){f=f||{},f.frag=w.frag,f.id=w.id,s.trigger(l,f)};this.observer=new n.EventEmitter,this.observer.on(B.Events.FRAG_DECRYPTED,x),this.observer.on(B.Events.ERROR,x);var L={mp4:c.isTypeSupported("video/mp4"),mpeg:c.isTypeSupported("audio/mpeg"),mp3:c.isTypeSupported('audio/mp4; codecs="mp3"')},b=navigator.vendor;if(S.enableWorker&&typeof Worker!="undefined"){v.logger.log("demuxing in webworker");var h;try{h=this.worker=j("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(r){s.trigger(B.Events.ERROR,{type:T.ErrorTypes.OTHER_ERROR,details:T.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(r.message+" ("+r.filename+":"+r.lineno+")")})},h.postMessage({cmd:"init",typeSupported:L,vendor:b,id:A,config:JSON.stringify(S)})}catch(r){v.logger.warn("Error in worker:",r),v.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new I.default(this.observer,L,S,b,A),this.worker=null}}else this.transmuxer=new I.default(this.observer,L,S,b,A)}var d=i.prototype;return d.destroy=function(){var A=this.worker;if(A)A.removeEventListener("message",this.onwmsg),A.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var p=this.observer;p&&p.removeAllListeners(),this.observer=null},d.push=function(A,a,p,w,S,x,L,b,h,r){var l=this;h.transmuxing.start=self.performance.now();var f=this.transmuxer,C=this.worker,g=x?x.start:S.start,m=S.decryptdata,F=this.frag,P=!(F&&S.cc===F.cc),z=!(F&&h.level===F.level),Z=F?h.sn-F.sn:-1,V=this.part?h.part-this.part.index:1,M=!z&&(Z===1||Z===0&&V===1),J=self.performance.now();(z||Z||S.stats.parsing.start===0)&&(S.stats.parsing.start=J),x&&(V||!M)&&(x.stats.parsing.start=J);var X=new I.TransmuxState(P,M,b,z,g);if(!M||P){v.logger.log("[transmuxer-interface, "+S.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+` discontinuity: `+P+` trackSwitch: `+z+` contiguous: `+M+` accurateTimeOffset: `+b+` timeOffset: `+g);var re=new I.TransmuxConfig(p,w,a,L,r);this.configureTransmuxer(re)}if(this.frag=S,this.part=x,C)C.postMessage({cmd:"demux",data:A,decryptdata:m,chunkMeta:h,state:X},A instanceof ArrayBuffer?[A]:[]);else if(f){var se=f.push(A,m,h,X);Object(I.isPromise)(se)?se.then(function(_e){l.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(se)}},d.flush=function(A){var a=this;A.transmuxing.start=self.performance.now();var p=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:A});else if(p){var S=p.flush(A);Object(I.isPromise)(S)?S.then(function(x){a.handleFlushResult(x,A)}):this.handleFlushResult(S,A)}},d.handleFlushResult=function(A,a){var p=this;A.forEach(function(w){p.handleTransmuxComplete(w)}),this.onFlush(a)},d.onWorkerMessage=function(A){var a=A.data,p=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,p.trigger(a.event,a.data);break}}},d.configureTransmuxer=function(A){var a=this.worker,p=this.transmuxer;a?a.postMessage({cmd:"configure",config:A}):p&&p.configure(A)},d.handleTransmuxComplete=function(A){A.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(A)},i}()},"./src/demux/transmuxer-worker.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return T});var j=O("./src/demux/transmuxer.ts"),D=O("./src/events.ts"),B=O("./src/utils/logger.ts"),I=O("./node_modules/eventemitter3/index.js"),v=O.n(I);function T(o){var i=new I.EventEmitter,d=function(A,a){o.postMessage({event:A,data:a})};i.on(D.Events.FRAG_DECRYPTED,d),i.on(D.Events.ERROR,d),o.addEventListener("message",function(s){var A=s.data;switch(A.cmd){case"init":{var a=JSON.parse(A.config);o.transmuxer=new j.default(i,A.typeSupported,a,A.vendor,A.id),Object(B.enableLogs)(a.debug),d("init",null);break}case"configure":{o.transmuxer.configure(A.config);break}case"demux":{var p=o.transmuxer.push(A.data,A.decryptdata,A.chunkMeta,A.state);Object(j.isPromise)(p)?p.then(function(x){E(o,x)}):E(o,p);break}case"flush":{var w=A.chunkMeta,S=o.transmuxer.flush(w);Object(j.isPromise)(S)?S.then(function(x){u(o,x,w)}):u(o,S,w);break}default:break}})}function E(o,i){if(c(i.remuxResult))return;var d=[],s=i.remuxResult,A=s.audio,a=s.video;A&&n(d,A),a&&n(d,a),o.postMessage({event:"transmuxComplete",data:i},d)}function n(o,i){i.data1&&o.push(i.data1.buffer),i.data2&&o.push(i.data2.buffer)}function u(o,i,d){i.forEach(function(s){E(o,s)}),o.postMessage({event:"flush",data:d})}function c(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a}),O.d(Q,"isPromise",function(){return S}),O.d(Q,"TransmuxConfig",function(){return x}),O.d(Q,"TransmuxState",function(){return L});var j=O("./src/events.ts"),D=O("./src/errors.ts"),B=O("./src/crypt/decrypter.ts"),I=O("./src/demux/aacdemuxer.ts"),v=O("./src/demux/mp4demuxer.ts"),T=O("./src/demux/tsdemuxer.ts"),E=O("./src/demux/mp3demuxer.ts"),n=O("./src/remux/mp4-remuxer.ts"),u=O("./src/remux/passthrough-remuxer.ts"),c=O("./src/demux/chunk-cache.ts"),o=O("./src/utils/mp4-tools.ts"),i=O("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(b){i.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var s=[{demux:T.default,remux:n.default},{demux:v.default,remux:u.default},{demux:I.default,remux:n.default},{demux:E.default,remux:n.default}],A=1024;s.forEach(function(b){var h=b.demux;A=Math.max(A,h.minProbeByteLength)});var a=function(){function b(r,l,f,C,g){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new c.default,this.observer=r,this.typeSupported=l,this.config=f,this.vendor=C,this.id=g}var h=b.prototype;return h.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},h.push=function(l,f,C,g){var m=this,F=C.transmuxing;F.executeStart=d();var P=new Uint8Array(l),z=this.cache,Z=this.config,V=this.currentTransmuxState,M=this.transmuxConfig;g&&(this.currentTransmuxState=g);var J=p(P,f);if(J&&J.method==="AES-128"){var X=this.getDecrypter();if(Z.enableSoftwareAES){var re=X.softwareDecrypt(P,J.key.buffer,J.iv.buffer);if(!re)return F.executeEnd=d(),w(C);P=new Uint8Array(re)}else return this.decryptionPromise=X.webCryptoDecrypt(P,J.key.buffer,J.iv.buffer).then(function(ne){var ae=m.push(ne,null,C);return m.decryptionPromise=null,ae}),this.decryptionPromise}var se=g||V,_e=se.contiguous,ge=se.discontinuity,we=se.trackSwitch,Re=se.accurateTimeOffset,He=se.timeOffset,Se=M.audioCodec,Te=M.videoCodec,$e=M.defaultInitPts,bt=M.duration,Ie=M.initSegmentData;if((ge||we)&&this.resetInitSegment(Ie,Se,Te,bt),ge&&this.resetInitialTimestamp($e),_e||this.resetContiguity(),this.needsProbing(P,ge,we)){if(z.dataLength){var ze=z.flush();P=Object(o.appendUint8Array)(ze,P)}this.configureTransmuxer(P,M)}var at=this.transmux(P,J,He,Re,C),Ae=this.currentTransmuxState;return Ae.contiguous=!0,Ae.discontinuity=!1,Ae.trackSwitch=!1,F.executeEnd=d(),at},h.flush=function(l){var f=this,C=l.transmuxing;C.executeStart=d();var g=this.decrypter,m=this.cache,F=this.currentTransmuxState,P=this.decryptionPromise;if(P)return P.then(function(){return f.flush(l)});var z=[],Z=F.timeOffset;if(g){var V=g.flush();V&&z.push(this.push(V,null,l))}var M=m.dataLength;m.reset();var J=this.demuxer,X=this.remuxer;if(!J||!X)return M>=A&&this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=d(),[w(l)];var re=J.flush(Z);return S(re)?re.then(function(se){return f.flushRemux(z,se,l),z}):(this.flushRemux(z,re,l),z)},h.flushRemux=function(l,f,C){var g=f.audioTrack,m=f.avcTrack,F=f.id3Track,P=f.textTrack,z=this.currentTransmuxState,Z=z.accurateTimeOffset,V=z.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var M=this.remuxer.remux(g,m,F,P,V,Z,!0,this.id);l.push({remuxResult:M,chunkMeta:C}),C.transmuxing.executeEnd=d()},h.resetInitialTimestamp=function(l){var f=this.demuxer,C=this.remuxer;if(!f||!C)return;f.resetTimeStamp(l),C.resetTimeStamp(l)},h.resetContiguity=function(){var l=this.demuxer,f=this.remuxer;if(!l||!f)return;l.resetContiguity(),f.resetNextTimestamp()},h.resetInitSegment=function(l,f,C,g){var m=this.demuxer,F=this.remuxer;if(!m||!F)return;m.resetInitSegment(f,C,g),F.resetInitSegment(l,f,C)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(l,f,C,g,m){var F;return f&&f.method==="SAMPLE-AES"?F=this.transmuxSampleAes(l,f,C,g,m):F=this.transmuxUnencrypted(l,C,g,m),F},h.transmuxUnencrypted=function(l,f,C,g){var m=this.demuxer.demux(l,f,!1,!this.config.progressive),F=m.audioTrack,P=m.avcTrack,z=m.id3Track,Z=m.textTrack,V=this.remuxer.remux(F,P,z,Z,f,C,!1,this.id);return{remuxResult:V,chunkMeta:g}},h.transmuxSampleAes=function(l,f,C,g,m){var F=this;return this.demuxer.demuxSampleAes(l,f,C).then(function(P){var z=F.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,C,g,!1,F.id);return{remuxResult:z,chunkMeta:m}})},h.configureTransmuxer=function(l,f){for(var C=this.config,g=this.observer,m=this.typeSupported,F=this.vendor,P=f.audioCodec,z=f.defaultInitPts,Z=f.duration,V=f.initSegmentData,M=f.videoCodec,J,X=0,re=s.length;X0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(r=h),r}var w=function(h){return{remuxResult:{},chunkMeta:h}};function S(b){return"then"in b&&b.then instanceof Function}var x=function(h,r,l,f,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=r,this.initSegmentData=l,this.duration=f,this.defaultInitPts=C},L=function(h,r,l,f,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=h,this.contiguous=r,this.accurateTimeOffset=l,this.trackSwitch=f,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"discardEPB",function(){return w});var j=O("./src/demux/adts.ts"),D=O("./src/demux/mpegaudio.ts"),B=O("./src/demux/exp-golomb.ts"),I=O("./src/demux/id3.ts"),v=O("./src/demux/sample-aes.ts"),T=O("./src/events.ts"),E=O("./src/utils/mp4-tools.ts"),n=O("./src/utils/logger.ts"),u=O("./src/errors.ts"),c={video:1,audio:2,id3:3,text:4},o=function(){function S(L,b,h){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=b,this.typeSupported=h}S.probe=function(b){var h=S.syncOffset(b);return h<0?!1:(h&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},S.syncOffset=function(b){for(var h=Math.min(1e3,b.length-3*188),r=0;r>4,Se=void 0;if(He>1){if(Se=ge+5+b[ge+4],Se===ge+188)continue}else Se=ge+4;switch(Re){case F:we&&(P&&(f=A(P))&&this.parseAVCPES(f,!1),P={data:[],size:0}),P&&(P.data.push(b.subarray(Se,ge+188)),P.size+=ge+188-Se);break;case z:we&&(V&&(f=A(V))&&(g.isAAC?this.parseAACPES(f):this.parseMPEGPES(f)),V={data:[],size:0}),V&&(V.data.push(b.subarray(Se,ge+188)),V.size+=ge+188-Se);break;case Z:we&&(M&&(f=A(M))&&this.parseID3PES(f),M={data:[],size:0}),M&&(M.data.push(b.subarray(Se,ge+188)),M.size+=ge+188-Se);break;case 0:we&&(Se+=b[Se]+1),re=this._pmtId=d(b,Se);break;case re:{we&&(Se+=b[Se]+1);var Te=s(b,Se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,r);F=Te.avc,F>0&&(C.pid=F),z=Te.audio,z>0&&(g.pid=z,g.isAAC=Te.isAAC),Z=Te.id3,Z>0&&(m.pid=Z),J&&!X&&(n.logger.log("reparse from beginning"),J=!1,ge=_e-188),X=this.pmtParsed=!0;break}case 17:case 8191:break;default:J=!0;break}}else this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=P,g.pesData=V,m.pesData=M;var $e={audioTrack:g,avcTrack:C,id3Track:m,textTrack:this._txtTrack};return l&&this.extractRemainingSamples($e),$e},x.flush=function(){var b=this.remainderData;this.remainderData=null;var h;return b?h=this.demux(b,-1,!1,!0):h={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(h),this.sampleAes?this.decrypt(h,this.sampleAes):h},x.extractRemainingSamples=function(b){var h=b.audioTrack,r=b.avcTrack,l=b.id3Track,f=r.pesData,C=h.pesData,g=l.pesData,m;f&&(m=A(f))?(this.parseAVCPES(m,!0),r.pesData=null):r.pesData=f,C&&(m=A(C))?(h.isAAC?this.parseAACPES(m):this.parseMPEGPES(m),h.pesData=null):(C!=null&&C.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=C),g&&(m=A(g))?(this.parseID3PES(m),l.pesData=null):l.pesData=g},x.demuxSampleAes=function(b,h,r){var l=this.demux(b,r,!0,!this.config.progressive),f=this.sampleAes=new v.default(this.observer,this.config,h);return this.decrypt(l,f)},x.decrypt=function(b,h){return new Promise(function(r){var l=b.audioTrack,f=b.avcTrack;l.samples&&l.isAAC?h.decryptAacSamples(l.samples,0,function(){f.samples?h.decryptAvcSamples(f.samples,0,0,function(){r(b)}):r(b)}):f.samples&&h.decryptAvcSamples(f.samples,0,0,function(){r(b)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(b,h){var r=this,l=this._avcTrack,f=this.parseAVCNALu(b.data),C=!1,g=this.avcSample,m,F=!1;b.data=null,g&&f.length&&!l.audFound&&(a(g,l),g=this.avcSample=i(!1,b.pts,b.dts,"")),f.forEach(function(P){switch(P.type){case 1:{m=!0,g||(g=r.avcSample=i(!0,b.pts,b.dts,"")),C&&(g.debug+="NDR "),g.frame=!0;var z=P.data;if(F&&z.length>4){var Z=new B.default(z).readSliceType();(Z===2||Z===4||Z===7||Z===9)&&(g.key=!0)}break}case 5:m=!0,g||(g=r.avcSample=i(!0,b.pts,b.dts,"")),C&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{m=!0,C&&g&&(g.debug+="SEI ");var V=new B.default(w(P.data));V.readUByte();for(var M=0,J=0,X=!1,re=0;!X&&V.bytesAvailable>1;){M=0;do re=V.readUByte(),M+=re;while(re===255);J=0;do re=V.readUByte(),J+=re;while(re===255);if(M===4&&V.bytesAvailable!==0){X=!0;var se=V.readUByte();if(se===181){var _e=V.readUShort();if(_e===49){var ge=V.readUInt();if(ge===1195456820){var we=V.readUByte();if(we===3){for(var Re=V.readUByte(),He=V.readUByte(),Se=31&Re,Te=[Re,He],$e=0;$e16){for(var bt=[],Ie=0;Ie<16;Ie++)bt.push(V.readUByte().toString(16)),(Ie===3||Ie===5||Ie===7||Ie===9)&&bt.push("-");for(var ze=J-16,at=new Uint8Array(ze),Ae=0;Ae=0){var V={data:b.subarray(z,g-l-1),type:Z};C.push(V)}else{var M=this.getLastNalUnit();if(M&&(f&&g<=4-f&&(M.state&&(M.data=M.data.subarray(0,M.data.byteLength-f))),F=g-l-1,F>0)){var J=new Uint8Array(M.data.byteLength+F);J.set(M.data,0),J.set(b.subarray(0,F),M.data.byteLength),M.data=J,M.state=0}}g=0&&l>=0){var X={data:b.subarray(z,h),type:Z,state:l};C.push(X)}if(C.length===0){var re=this.getLastNalUnit();if(re){var se=new Uint8Array(re.data.byteLength+b.byteLength);se.set(re.data,0),se.set(b,re.data.byteLength),re.data=se}}return r.naluState=l,C},x.parseAACPES=function(b){var h=0,r=this._audioTrack,l=this.aacOverFlow,f=b.data;if(l){this.aacOverFlow=null;var C=l.sample.unit.byteLength,g=Math.min(l.missing,C),m=C-g;l.sample.unit.set(f.subarray(0,g),m),r.samples.push(l.sample),h=l.missing}var F,P;for(F=h,P=f.length;F1;){var C=new Uint8Array(f[0].length+f[1].length);C.set(f[0]),C.set(f[1],f[0].length),f[0]=C,f.splice(1,1)}L=f[0];var g=(L[0]<<16)+(L[1]<<8)+L[2];if(g===1){if(b=(L[4]<<8)+L[5],b&&b>S.size-6)return null;var m=L[7];m&192&&(r=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,m&64?(l=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,r-l>60*9e4&&(n.logger.warn(Math.round((r-l)/9e4)+"s delta between PTS and DTS, align them"),r=l)):l=r),h=L[8];var F=h+9;if(S.size<=F)return null;S.size-=F;for(var P=new Uint8Array(S.size),z=0,Z=f.length;zV){F-=V;continue}else L=L.subarray(F),V-=F,F=0;P.set(L,x),x+=V}return b&&(b-=h+3),{data:P,pts:r,dts:l,len:b}}return null}function a(S,x){if(S.units.length&&S.frame){if(S.pts===void 0){var L=x.samples,b=L.length;if(b){var h=L[b-1];S.pts=h.pts,S.dts=h.dts}else{x.dropped++;return}}x.samples.push(S)}S.debug.length&&n.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function p(S,x){var L=S.length;if(L>0){if(x.pts>=S[L-1].pts)S.push(x);else for(var b=L-1;b>=0;b--)if(x.ptsr)return f;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,r=this.autoLevelCapping,l;return r===-1&&h&&h.length?l=h.length-1:l=r,l}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(h){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,h)}},{key:"audioTracks",get:function(){var h=this.audioTrackController;return h?h.audioTracks:[]}},{key:"audioTrack",get:function(){var h=this.audioTrackController;return h?h.audioTrack:-1},set:function(h){var r=this.audioTrackController;r&&(r.audioTrack=h)}},{key:"subtitleTracks",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTrack:-1},set:function(h){var r=this.subtitleTrackController;r&&(r.subtitleTrack=h)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var h=this.subtitleTrackController;return h?h.subtitleDisplay:!1},set:function(h){var r=this.subtitleTrackController;r&&(r.subtitleDisplay=h)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(h){this.config.lowLatencyMode=h}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return A.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:i.hlsDefaultConfig},set:function(h){x.defaultConfig=h}}]),x}();S.defaultConfig=void 0},"./src/is-supported.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"isSupported",function(){return B}),O.d(Q,"changeTypeSupported",function(){return I});var j=O("./src/utils/mediasource-helper.ts");function D(){return self.SourceBuffer||self.WebKitSourceBuffer}function B(){var v=Object(j.getMediaSource)();if(!v)return!1;var T=D(),E=v&&typeof v.isTypeSupported=="function"&&v.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!T||T.prototype&&typeof T.prototype.appendBuffer=="function"&&typeof T.prototype.remove=="function";return!!E&&!!n}function I(){var v,T=D();return typeof(T==null||((v=T.prototype)===null||v===void 0)?void 0:v.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return o}),O.d(Q,"LoadError",function(){return d});var j=O("./src/polyfills/number.ts"),D=O("./src/errors.ts");function B(s,A){s.prototype=Object.create(A.prototype),s.prototype.constructor=s,n(s,A)}function I(s){var A=typeof Map=="function"?new Map:void 0;return I=function(p){if(p===null||!E(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A!="undefined"){if(A.has(p))return A.get(p);A.set(p,w)}function w(){return v(p,arguments,u(this).constructor)}return w.prototype=Object.create(p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),n(w,p)},I(s)}function v(s,A,a){return T()?v=Reflect.construct:v=function(w,S,x){var L=[null];L.push.apply(L,S);var b=Function.bind.apply(w,L),h=new b;return x&&n(h,x.prototype),h},v.apply(null,arguments)}function T(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function E(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function n(s,A){return n=Object.setPrototypeOf||function(p,w){return p.__proto__=w,p},n(s,A)}function u(s){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},u(s)}var c=Math.pow(2,17),o=function(){function s(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var A=s.prototype;return A.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},A.abort=function(){this.loader&&this.loader.abort()},A.load=function(p,w){var S=this,x=p.url;if(!x)return Promise.reject(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:p,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var L=this.config,b=L.fLoader,h=L.loader;return new Promise(function(r,l){S.loader&&S.loader.destroy();var f=S.loader=p.loader=b?new b(L):new h(L),C=i(p),g={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:c};p.stats=f.stats,f.load(C,g,{onSuccess:function(F,P,z,Z){S.resetLoader(p,f),r({frag:p,part:null,payload:F.data,networkDetails:Z})},onError:function(F,P,z){S.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:p,response:F,networkDetails:z}))},onAbort:function(F,P,z){S.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:p,networkDetails:z}))},onTimeout:function(F,P,z){S.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:p,networkDetails:z}))},onProgress:function(F,P,z,Z){w&&w({frag:p,part:null,payload:z,networkDetails:Z})}})})},A.loadPart=function(p,w,S){var x=this;this.abort();var L=this.config,b=L.fLoader,h=L.loader;return new Promise(function(r,l){x.loader&&x.loader.destroy();var f=x.loader=p.loader=b?new b(L):new h(L),C=i(p,w),g={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:c};w.stats=f.stats,f.load(C,g,{onSuccess:function(F,P,z,Z){x.resetLoader(p,f),x.updateStatsFromPart(p,w);var V={frag:p,part:w,payload:F.data,networkDetails:Z};S(V),r(V)},onError:function(F,P,z){x.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:p,part:w,response:F,networkDetails:z}))},onAbort:function(F,P,z){p.stats.aborted=w.stats.aborted,x.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:p,part:w,networkDetails:z}))},onTimeout:function(F,P,z){x.resetLoader(p,f),l(new d({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:p,part:w,networkDetails:z}))}})})},A.updateStatsFromPart=function(p,w){var S=p.stats,x=w.stats,L=x.total;if(S.loaded+=x.loaded,L){var b=Math.round(p.duration/w.duration),h=Math.min(Math.round(S.loaded/L),b),r=b-h,l=r*Math.round(S.loaded/h);S.total=S.loaded+l}else S.total=Math.max(S.loaded,S.total);var f=S.loading,C=x.loading;f.start?f.first+=C.first-C.start:(f.start=C.start,f.first=C.first),f.end=C.end},A.resetLoader=function(p,w){p.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},s}();function i(s,A){A===void 0&&(A=null);var a=A||s,p={frag:s,part:A,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},w=a.byteRangeStartOffset,S=a.byteRangeEndOffset;return Object(j.isFiniteNumber)(w)&&Object(j.isFiniteNumber)(S)&&(p.rangeStart=w,p.rangeEnd=S),p}var d=function(s){B(A,s);function A(a){for(var p,w=arguments.length,S=new Array(w>1?w-1:0),x=1;x>8*(15-L)&255;return x},p.setDecryptDataFromLevelKey=function(S,x){var L=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(L=v.LevelKey.fromURI(S.uri),L.method=S.method,L.iv=this.createInitializationVector(x),L.keyFormat="identity"),L},p.setElementaryStreamInfo=function(S,x,L,b,h,r){r===void 0&&(r=!1);var l=this.elementaryStreams,f=l[S];if(!f){l[S]={startPTS:x,endPTS:L,startDTS:b,endDTS:h,partial:r};return}f.startPTS=Math.min(f.startPTS,x),f.endPTS=Math.max(f.endPTS,L),f.startDTS=Math.min(f.startDTS,b),f.endDTS=Math.max(f.endDTS,h)},p.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[o.AUDIO]=null,S[o.VIDEO]=null,S[o.AUDIOVIDEO]=null},c(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&I.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(j.isFiniteNumber)(this.programDateTime))return null;var S=Object(j.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),a}(i),s=function(A){E(a,A);function a(p,w,S,x,L){var b;b=A.call(this,S)||this,b.fragOffset=0,b.duration=0,b.gap=!1,b.independent=!1,b.relurl=void 0,b.fragment=void 0,b.index=void 0,b.stats=new T.LoadStats,b.duration=p.decimalFloatingPoint("DURATION"),b.gap=p.bool("GAP"),b.independent=p.bool("INDEPENDENT"),b.relurl=p.enumeratedString("URI"),b.fragment=w,b.index=x;var h=p.enumeratedString("BYTERANGE");return h&&b.setByteRange(h,L),L&&(b.fragOffset=L.fragOffset+L.duration),b}return c(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),a}(i)},"./src/loader/key-loader.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return I});var j=O("./src/events.ts"),D=O("./src/errors.ts"),B=O("./src/utils/logger.ts"),I=function(){function v(E){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=E,this._registerListeners()}var T=v.prototype;return T._registerListeners=function(){this.hls.on(j.Events.KEY_LOADING,this.onKeyLoading,this)},T._unregisterListeners=function(){this.hls.off(j.Events.KEY_LOADING,this.onKeyLoading)},T.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var u=this.loaders[n];u&&u.destroy()}this.loaders={}},T.onKeyLoading=function(n,u){var c=u.frag,o=c.type,i=this.loaders[o];if(!c.decryptdata){B.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=c.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(i&&(B.logger.warn("abort previous key loader for type:"+o),i.abort()),!d){B.logger.warn("key uri is falsy");return}var A=s.loader,a=c.loader=this.loaders[o]=new A(s);this.decrypturl=d,this.decryptkey=null;var p={url:d,frag:c,responseType:"arraybuffer"},w={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(p,w,S)}else this.decryptkey&&(c.decryptdata.key=this.decryptkey,this.hls.trigger(j.Events.KEY_LOADED,{frag:c}))},T.loadsuccess=function(n,u,c){var o=c.frag;if(!o.decryptdata){B.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(n.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(j.Events.KEY_LOADED,{frag:o})},T.loaderror=function(n,u){var c=u.frag,o=c.loader;o&&o.abort(),delete this.loaders[c.type],this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:c,response:n})},T.loadtimeout=function(n,u){var c=u.frag,o=c.loader;o&&o.abort(),delete this.loaders[c.type],this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:c})},v}()},"./src/loader/level-details.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"LevelDetails",function(){return v});var j=O("./src/polyfills/number.ts");function D(T,E){for(var n=0;nu.endSN||c>0||c===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},B(T,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(j.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||I}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var c=this.driftEnd-this.driftStart;return c*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),T}()},"./src/loader/level-key.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"LevelKey",function(){return v});var j=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(j);function B(T,E){for(var n=0;n2){var l=r.shift()+".";return l+=parseInt(r.shift()).toString(16),l+=("000"+parseInt(r.shift()).toString(16)).substr(-4),l}return h},L.resolve=function(h,r){return D.buildAbsoluteURL(r,h,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(h,r){var l=[],f={},C=!1;c.lastIndex=0;for(var g;(g=c.exec(h))!=null;)if(g[1]){var m=new E.AttrList(g[1]),F={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:L.resolve(g[2],r)},P=m.decimalResolution("RESOLUTION");P&&(F.width=P.width,F.height=P.height),p((m.CODECS||"").split(/[ ,]+/).filter(function(Z){return Z}),F),F.videoCodec&&F.videoCodec.indexOf("avc1")!==-1&&(F.videoCodec=L.convertAVC1ToAVCOTI(F.videoCodec)),l.push(F)}else if(g[3]){var z=new E.AttrList(g[3]);z["DATA-ID"]&&(C=!0,f[z["DATA-ID"]]=z)}return{levels:l,sessionData:C?f:null}},L.parseMasterPlaylistMedia=function(h,r,l,f){f===void 0&&(f=[]);var C,g=[],m=0;for(o.lastIndex=0;(C=o.exec(h))!==null;){var F=new E.AttrList(C[1]);if(F.TYPE===l){var P={attrs:F,bitrate:0,id:m++,groupId:F["GROUP-ID"],instreamId:F["INSTREAM-ID"],name:F.NAME||F.LANGUAGE||"",type:l,default:F.bool("DEFAULT"),autoselect:F.bool("AUTOSELECT"),forced:F.bool("FORCED"),lang:F.LANGUAGE,url:F.URI?L.resolve(F.URI,r):""};if(f.length){var z=L.findGroup(f,P.groupId)||f[0];w(P,z,"audioCodec"),w(P,z,"textCodec")}g.push(P)}}return g},L.parseLevelPlaylist=function(h,r,l,f,C){var g=new v.LevelDetails(r),m=g.fragments,F=null,P=0,z=0,Z=0,V=0,M=null,J=new I.Fragment(f,r),X,re,se,_e=-1,ge=!1;for(i.lastIndex=0,g.m3u8=h;(X=i.exec(h))!==null;){ge&&(ge=!1,J=new I.Fragment(f,r),J.start=Z,J.sn=P,J.cc=V,J.level=l,F&&(J.initSegment=F,J.rawProgramDateTime=F.rawProgramDateTime));var we=X[1];if(we){J.duration=parseFloat(we);var Re=(" "+X[2]).slice(1);J.title=Re||null,J.tagList.push(Re?["INF",we,Re]:["INF",we])}else if(X[3])Object(j.isFiniteNumber)(J.duration)&&(J.start=Z,se&&(J.levelkey=se),J.sn=P,J.level=l,J.cc=V,J.urlId=C,m.push(J),J.relurl=(" "+X[3]).slice(1),x(J,M),M=J,Z+=J.duration,P++,z=0,ge=!0);else if(X[4]){var He=(" "+X[4]).slice(1);M?J.setByteRange(He,M):J.setByteRange(He)}else if(X[5])J.rawProgramDateTime=(" "+X[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),_e===-1&&(_e=m.length);else{if(X=X[0].match(d),!X){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re-1){n.logger.warn("Keyformat "+ct+" is not supported from the manifest");continue}else if(ct!=="identity")continue;ae&&(se=T.LevelKey.fromURL(r,ce),ce&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ae)>=0&&(se.method=ae,se.keyFormat=ct,ke&&(se.keyID=ke),Fe&&(se.keyFormatVersions=Fe),se.iv=xe));break}case"START":{var yt=new E.AttrList(Te),Et=yt.decimalFloatingPoint("TIME-OFFSET");Object(j.isFiniteNumber)(Et)&&(g.startTimeOffset=Et);break}case"MAP":{var Ot=new E.AttrList(Te);J.relurl=Ot.URI,Ot.BYTERANGE&&J.setByteRange(Ot.BYTERANGE),J.level=l,J.sn="initSegment",se&&(J.levelkey=se),J.initSegment=null,F=J,ge=!0;break}case"SERVER-CONTROL":{var Mt=new E.AttrList(Te);g.canBlockReload=Mt.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=Mt.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&Mt.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=Mt.optionalFloat("PART-HOLD-BACK",0),g.holdBack=Mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Qe=new E.AttrList(Te);g.partTarget=Qe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ne=g.partList;Ne||(Ne=g.partList=[]);var lt=z>0?Ne[Ne.length-1]:void 0,dt=z++,Ye=new I.Part(new E.AttrList(Te),J,r,dt,lt);Ne.push(Ye),J.duration+=Ye.duration;break}case"PRELOAD-HINT":{var st=new E.AttrList(Te);g.preloadHint=st;break}case"RENDITION-REPORT":{var je=new E.AttrList(Te);g.renditionReports=g.renditionReports||[],g.renditionReports.push(je);break}default:n.logger.warn("line parsed but not handled: "+X);break}}}M&&!M.relurl?(m.pop(),Z-=M.duration,g.partList&&(g.fragmentHint=M)):g.partList&&(x(J,M),J.cc=V,g.fragmentHint=J);var Le=m.length,Me=m[0],me=m[Le-1];if(Z+=g.skippedSegments*g.targetduration,Z>0&&Le&&me){g.averagetargetduration=Z/Le;var ye=me.sn;g.endSN=ye!=="initSegment"?ye:0,Me&&(g.startCC=Me.cc,Me.initSegment||g.fragments.every(function(Ee){return Ee.relurl&&A(Ee.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),J=new I.Fragment(f,r),J.relurl=me.relurl,J.level=l,J.sn="initSegment",Me.initSegment=J,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(Z+=g.fragmentHint.duration),g.totalduration=Z,g.endCC=V,_e>0&&S(m,_e),g},L}();function p(L,b){["video","audio","text"].forEach(function(h){var r=L.filter(function(f){return Object(u.isCodecType)(f,h)});if(r.length){var l=r.filter(function(f){return f.lastIndexOf("avc1",0)===0||f.lastIndexOf("mp4a",0)===0});b[h+"Codec"]=l.length>0?l[0]:r[0],L=L.filter(function(f){return r.indexOf(f)===-1})}}),b.unknownCodecs=L}function w(L,b,h){var r=b[h];r&&(L[h]=r)}function S(L,b){for(var h=L[b],r=b;r--;){var l=L[r];if(!l)return;l.programDateTime=h.programDateTime-l.duration*1e3,h=l}}function x(L,b){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):b!=null&&b.programDateTime&&(L.programDateTime=b.endProgramDateTime),Object(j.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),B=O("./src/errors.ts"),I=O("./src/utils/logger.ts"),v=O("./src/utils/mp4-tools.ts"),T=O("./src/loader/m3u8-parser.ts"),E=O("./src/types/loader.ts"),n=O("./src/utils/attr-list.ts");function u(i){var d=i.type;switch(d){case E.PlaylistContextType.AUDIO_TRACK:return E.PlaylistLevelType.AUDIO;case E.PlaylistContextType.SUBTITLE_TRACK:return E.PlaylistLevelType.SUBTITLE;default:return E.PlaylistLevelType.MAIN}}function c(i,d){var s=i.url;return(s===void 0||s.indexOf("data:")===0)&&(s=d.url),s}var o=function(){function i(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var d=i.prototype;return d.registerListeners=function(){var A=this.hls;A.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),A.on(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),A.on(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var A=this.hls;A.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),A.off(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),A.off(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(A){var a=this.hls.config,p=a.pLoader,w=a.loader,S=p||w,x=new S(a);return A.loader=x,this.loaders[A.type]=x,x},d.getInternalLoader=function(A){return this.loaders[A.type]},d.resetInternalLoader=function(A){this.loaders[A]&&delete this.loaders[A]},d.destroyInternalLoaders=function(){for(var A in this.loaders){var a=this.loaders[A];a&&a.destroy(),this.resetInternalLoader(A)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(A,a){var p=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:E.PlaylistContextType.MANIFEST,url:p,deliveryDirectives:null})},d.onLevelLoading=function(A,a){var p=a.id,w=a.level,S=a.url,x=a.deliveryDirectives;this.load({id:p,groupId:null,level:w,responseType:"text",type:E.PlaylistContextType.LEVEL,url:S,deliveryDirectives:x})},d.onAudioTrackLoading=function(A,a){var p=a.id,w=a.groupId,S=a.url,x=a.deliveryDirectives;this.load({id:p,groupId:w,level:null,responseType:"text",type:E.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:x})},d.onSubtitleTrackLoading=function(A,a){var p=a.id,w=a.groupId,S=a.url,x=a.deliveryDirectives;this.load({id:p,groupId:w,level:null,responseType:"text",type:E.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:x})},d.load=function(A){var a,p=this.hls.config,w=this.getInternalLoader(A);if(w){var S=w.context;if(S&&S.url===A.url){I.logger.trace("[playlist-loader]: playlist request ongoing");return}I.logger.log("[playlist-loader]: aborting previous loader for type: "+A.type),w.abort()}var x,L,b,h;switch(A.type){case E.PlaylistContextType.MANIFEST:x=p.manifestLoadingMaxRetry,L=p.manifestLoadingTimeOut,b=p.manifestLoadingRetryDelay,h=p.manifestLoadingMaxRetryTimeout;break;case E.PlaylistContextType.LEVEL:case E.PlaylistContextType.AUDIO_TRACK:case E.PlaylistContextType.SUBTITLE_TRACK:x=0,L=p.levelLoadingTimeOut;break;default:x=p.levelLoadingMaxRetry,L=p.levelLoadingTimeOut,b=p.levelLoadingRetryDelay,h=p.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(A),(a=A.deliveryDirectives)!==null&&a!==void 0&&a.part){var r;if(A.type===E.PlaylistContextType.LEVEL&&A.level!==null?r=this.hls.levels[A.level].details:A.type===E.PlaylistContextType.AUDIO_TRACK&&A.id!==null?r=this.hls.audioTracks[A.id].details:A.type===E.PlaylistContextType.SUBTITLE_TRACK&&A.id!==null&&(r=this.hls.subtitleTracks[A.id].details),r){var l=r.partTarget,f=r.targetduration;l&&f&&(L=Math.min(Math.max(l*3,f*.8)*1e3,L))}}var C={timeout:L,maxRetry:x,retryDelay:b,maxRetryDelay:h,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(A,C,g)},d.loadsuccess=function(A,a,p,w){if(w===void 0&&(w=null),p.isSidxRequest){this.handleSidxRequest(A,p),this.handlePlaylistLoaded(A,a,p,w);return}this.resetInternalLoader(p.type);var S=A.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(A,p,"no EXTM3U delimiter",w);return}a.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(A,a,p,w):this.handleMasterPlaylist(A,a,p,w)},d.loaderror=function(A,a,p){p===void 0&&(p=null),this.handleNetworkError(a,p,!1,A)},d.loadtimeout=function(A,a,p){p===void 0&&(p=null),this.handleNetworkError(a,p,!0)},d.handleMasterPlaylist=function(A,a,p,w){var S=this.hls,x=A.data,L=c(A,p),b=T.default.parseMasterPlaylist(x,L),h=b.levels,r=b.sessionData;if(!h.length){this.handleManifestParsingError(A,p,"no level found in manifest",w);return}var l=h.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),f=h.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),C=T.default.parseMasterPlaylistMedia(x,L,"AUDIO",l),g=T.default.parseMasterPlaylistMedia(x,L,"SUBTITLES",f),m=T.default.parseMasterPlaylistMedia(x,L,"CLOSED-CAPTIONS");if(C.length){var F=C.some(function(P){return!P.url});!F&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(I.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}S.trigger(D.Events.MANIFEST_LOADED,{levels:h,audioTracks:C,subtitles:g,captions:m,url:L,stats:a,networkDetails:w,sessionData:r})},d.handleTrackOrLevelPlaylist=function(A,a,p,w){var S=this.hls,x=p.id,L=p.level,b=p.type,h=c(A,p),r=Object(j.isFiniteNumber)(x)?x:0,l=Object(j.isFiniteNumber)(L)?L:r,f=u(p),C=T.default.parseLevelPlaylist(A.data,h,l,f,r);if(!C.fragments.length){S.trigger(D.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof p.level=="number"?p.level:void 0});return}if(b===E.PlaylistContextType.MANIFEST){var g={attrs:new n.AttrList({}),bitrate:0,details:C,name:"",url:h};S.trigger(D.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:h,stats:a,networkDetails:w,sessionData:null})}if(a.parsing.end=performance.now(),C.needSidxRanges){var m,F=(m=C.fragments[0].initSegment)===null||m===void 0?void 0:m.url;this.load({url:F,isSidxRequest:!0,type:b,level:L,levelDetails:C,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}p.levelDetails=C,this.handlePlaylistLoaded(A,a,p,w)},d.handleSidxRequest=function(A,a){var p=Object(v.parseSegmentIndex)(new Uint8Array(A.data));if(!p)return;var w=p.references,S=a.levelDetails;w.forEach(function(x,L){var b=x.info,h=S.fragments[L];h.byteRange.length===0&&h.setByteRange(String(1+b.end-b.start)+"@"+String(b.start)),h.initSegment&&h.initSegment.setByteRange(String(p.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(A,a,p,w){this.hls.trigger(D.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===E.PlaylistContextType.MANIFEST,url:A.url,reason:p,response:A,context:a,networkDetails:w})},d.handleNetworkError=function(A,a,p,w){p===void 0&&(p=!1),I.logger.warn("[playlist-loader]: A network "+(p?"timeout":"error")+" occurred while loading "+A.type+" level: "+A.level+" id: "+A.id+' group-id: "'+A.groupId+'"');var S=B.ErrorDetails.UNKNOWN,x=!1,L=this.getInternalLoader(A);switch(A.type){case E.PlaylistContextType.MANIFEST:S=p?B.ErrorDetails.MANIFEST_LOAD_TIMEOUT:B.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case E.PlaylistContextType.LEVEL:S=p?B.ErrorDetails.LEVEL_LOAD_TIMEOUT:B.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case E.PlaylistContextType.AUDIO_TRACK:S=p?B.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:B.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case E.PlaylistContextType.SUBTITLE_TRACK:S=p?B.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:B.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}L&&this.resetInternalLoader(A.type);var b={type:B.ErrorTypes.NETWORK_ERROR,details:S,fatal:x,url:A.url,loader:L,context:A,networkDetails:a};w&&(b.response=w),this.hls.trigger(D.Events.ERROR,b)},d.handlePlaylistLoaded=function(A,a,p,w){var S=p.type,x=p.level,L=p.id,b=p.groupId,h=p.loader,r=p.levelDetails,l=p.deliveryDirectives;if(!(r!=null&&r.targetduration)){this.handleManifestParsingError(A,p,"invalid target duration",w);return}if(!h)return;r.live&&(h.getCacheAge&&(r.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0));switch(S){case E.PlaylistContextType.MANIFEST:case E.PlaylistContextType.LEVEL:this.hls.trigger(D.Events.LEVEL_LOADED,{details:r,level:x||0,id:L||0,stats:a,networkDetails:w,deliveryDirectives:l});break;case E.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(D.Events.AUDIO_TRACK_LOADED,{details:r,id:L||0,groupId:b||"",stats:a,networkDetails:w,deliveryDirectives:l});break;case E.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADED,{details:r,id:L||0,groupId:b||"",stats:a,networkDetails:w,deliveryDirectives:l});break}},i}();Q.default=o},"./src/polyfills/number.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"isFiniteNumber",function(){return j}),O.d(Q,"MAX_SAFE_INTEGER",function(){return D});var j=Number.isFinite||function(B){return typeof B=="number"&&isFinite(B)},D=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(q,Q,O){"use strict";O.r(Q);var j=function(){function D(){}return D.getSilentFrame=function(I,v){switch(I){case"mp4a.40.2":if(v===1)return new Uint8Array([0,200,0,128,35,128]);if(v===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(v===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(v===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(v===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(v===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(v===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(v===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(v===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},D}();Q.default=j},"./src/remux/mp4-generator.ts":function(q,Q,O){"use strict";O.r(Q);var j=Math.pow(2,32)-1,D=function(){function B(){}return B.init=function(){B.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var v;for(v in B.types)B.types.hasOwnProperty(v)&&(B.types[v]=[v.charCodeAt(0),v.charCodeAt(1),v.charCodeAt(2),v.charCodeAt(3)]);var T=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]),E=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]);B.HDLR_TYPES={video:T,audio:E};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);B.STTS=B.STSC=B.STCO=u,B.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),B.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),B.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var c=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);B.FTYP=B.box(B.types.ftyp,c,i,c,o),B.DINF=B.box(B.types.dinf,B.box(B.types.dref,n))},B.box=function(v){for(var T=8,E=arguments.length,n=new Array(E>1?E-1:0),u=1;u>24&255,i[1]=T>>16&255,i[2]=T>>8&255,i[3]=T&255,i.set(v,4),c=0,T=8;c>24&255,v>>16&255,v>>8&255,v&255,E>>24,E>>16&255,E>>8&255,E&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},B.mdia=function(v){return B.box(B.types.mdia,B.mdhd(v.timescale,v.duration),B.hdlr(v.type),B.minf(v))},B.mfhd=function(v){return B.box(B.types.mfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255]))},B.minf=function(v){return v.type==="audio"?B.box(B.types.minf,B.box(B.types.smhd,B.SMHD),B.DINF,B.stbl(v)):B.box(B.types.minf,B.box(B.types.vmhd,B.VMHD),B.DINF,B.stbl(v))},B.moof=function(v,T,E){return B.box(B.types.moof,B.mfhd(v),B.traf(E,T))},B.moov=function(v){for(var T=v.length,E=[];T--;)E[T]=B.trak(v[T]);return B.box.apply(null,[B.types.moov,B.mvhd(v[0].timescale,v[0].duration)].concat(E).concat(B.mvex(v)))},B.mvex=function(v){for(var T=v.length,E=[];T--;)E[T]=B.trex(v[T]);return B.box.apply(null,[B.types.mvex].concat(E))},B.mvhd=function(v,T){T*=v;var E=Math.floor(T/(j+1)),n=Math.floor(T%(j+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,v>>24&255,v>>16&255,v>>8&255,v&255,E>>24,E>>16&255,E>>8&255,E&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return B.box(B.types.mvhd,u)},B.sdtp=function(v){var T=v.samples||[],E=new Uint8Array(4+T.length),n,u;for(n=0;n>>8&255),T.push(c&255),T=T.concat(Array.prototype.slice.call(u));for(n=0;n>>8&255),E.push(c&255),E=E.concat(Array.prototype.slice.call(u));var o=B.box(B.types.avcC,new Uint8Array([1,T[3],T[4],T[5],252|3,224|v.sps.length].concat(T).concat([v.pps.length]).concat(E))),i=v.width,d=v.height,s=v.pixelRatio[0],A=v.pixelRatio[1];return B.box(B.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>8&255,i&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,B.box(B.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),B.box(B.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,A>>24,A>>16&255,A>>8&255,A&255])))},B.esds=function(v){var T=v.config.length;return new Uint8Array([0,0,0,0,3,23+T,0,1,0,4,15+T,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([T]).concat(v.config).concat([6,1,2]))},B.mp4a=function(v){var T=v.samplerate;return B.box(B.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,v.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]),B.box(B.types.esds,B.esds(v)))},B.mp3=function(v){var T=v.samplerate;return B.box(B.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,v.channelCount,0,16,0,0,0,0,T>>8&255,T&255,0,0]))},B.stsd=function(v){return v.type==="audio"?!v.isAAC&&v.codec==="mp3"?B.box(B.types.stsd,B.STSD,B.mp3(v)):B.box(B.types.stsd,B.STSD,B.mp4a(v)):B.box(B.types.stsd,B.STSD,B.avc1(v))},B.tkhd=function(v){var T=v.id,E=v.duration*v.timescale,n=v.width,u=v.height,c=Math.floor(E/(j+1)),o=Math.floor(E%(j+1));return B.box(B.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,u>>8&255,u&255,0,0]))},B.traf=function(v,T){var E=B.sdtp(v),n=v.id,u=Math.floor(T/(j+1)),c=Math.floor(T%(j+1));return B.box(B.types.traf,B.box(B.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),B.box(B.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,c>>24,c>>16&255,c>>8&255,c&255])),B.trun(v,E.length+16+20+8+16+8+8),E)},B.trak=function(v){return v.duration=v.duration||4294967295,B.box(B.types.trak,B.tkhd(v),B.mdia(v))},B.trex=function(v){var T=v.id;return B.box(B.types.trex,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},B.trun=function(v,T){var E=v.samples||[],n=E.length,u=12+16*n,c=new Uint8Array(u),o,i,d,s,A,a;for(T+=8+u,c.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,T>>>24&255,T>>>16&255,T>>>8&255,T&255],0),o=0;o>>24&255,d>>>16&255,d>>>8&255,d&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,A.isLeading<<2|A.dependsOn,A.isDependedOn<<6|A.hasRedundancy<<4|A.paddingValue<<1|A.isNonSync,A.degradPrio&240<<8,A.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*o);return B.box(B.types.trun,c)},B.initSegment=function(v){B.types||B.init();var T=B.moov(v),E=new Uint8Array(B.FTYP.byteLength+T.byteLength);return E.set(B.FTYP),E.set(T,B.FTYP.byteLength),E},B}();D.types=void 0,D.HDLR_TYPES=void 0,D.STTS=void 0,D.STSC=void 0,D.STCO=void 0,D.STSZ=void 0,D.VMHD=void 0,D.SMHD=void 0,D.STSD=void 0,D.FTYP=void 0,D.DINF=void 0,Q.default=D},"./src/remux/mp4-remuxer.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a}),O.d(Q,"normalizePts",function(){return p});var j=O("./src/polyfills/number.ts"),D=O("./src/remux/aac-helper.ts"),B=O("./src/remux/mp4-generator.ts"),I=O("./src/events.ts"),v=O("./src/errors.ts"),T=O("./src/utils/logger.ts"),E=O("./src/types/loader.ts"),n=O("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(L){for(var b=1;b0?C:g.pts},r[0].pts);return l&&T.logger.debug("PTS rollover detected"),f},b.remux=function(r,l,f,C,g,m,F,P){var z,Z,V,M,J,X,re=g,se=g,_e=r.pid>-1,ge=l.pid>-1,we=l.samples.length,Re=r.samples.length>0,He=we>1,Se=(!_e||Re)&&(!ge||He)||this.ISGenerated||F;if(Se){this.ISGenerated||(V=this.generateIS(r,l,g));var Te=this.isVideoContiguous,$e=-1;if(He&&($e=w(l.samples),!Te&&this.config.forceKeyFrameOnDiscontinuity))if(X=!0,$e>0){T.logger.warn("[mp4-remuxer]: Dropped "+$e+" out of "+we+" video samples due to a missing keyframe");var bt=this.getVideoStartPts(l.samples);l.samples=l.samples.slice($e),l.dropped+=$e,se+=(l.samples[0].pts-bt)/(l.timescale||9e4)}else $e===-1&&(T.logger.warn("[mp4-remuxer]: No keyframe found out of "+we+" video samples"),X=!1);if(this.ISGenerated){if(Re&&He){var Ie=this.getVideoStartPts(l.samples),ze=p(r.samples[0].pts,Ie)-Ie,at=ze/l.inputTimeScale;re+=Math.max(0,at),se+=Math.max(0,-at)}if(Re){if(r.samplerate||(T.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),V=this.generateIS(r,l,g)),Z=this.remuxAudio(r,re,this.isAudioContiguous,m,ge||He||P===E.PlaylistLevelType.AUDIO?se:void 0),He){var Ae=Z?Z.endPTS-Z.startPTS:0;l.inputTimeScale||(T.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),V=this.generateIS(r,l,g)),z=this.remuxVideo(l,se,Te,Ae)}}else He&&(z=this.remuxVideo(l,se,Te,0));z&&(z.firstKeyFrame=$e,z.independent=$e!==-1)}}return this.ISGenerated&&(f.samples.length&&(J=this.remuxID3(f,g)),C.samples.length&&(M=this.remuxText(C,g))),{audio:Z,video:z,initSegment:V,independent:X,text:M,id3:J}},b.generateIS=function(r,l,f){var C=r.samples,g=l.samples,m=this.typeSupported,F={},P=!Object(j.isFiniteNumber)(this._initPTS),z="audio/mp4",Z,V,M;if(P&&(Z=V=Infinity),r.config&&C.length&&(r.timescale=r.samplerate,r.isAAC||(m.mpeg?(z="audio/mpeg",r.codec=""):m.mp3&&(r.codec="mp3")),F.audio={id:"audio",container:z,codec:r.codec,initSegment:!r.isAAC&&m.mpeg?new Uint8Array(0):B.default.initSegment([r]),metadata:{channelCount:r.channelCount}},P&&(M=r.inputTimeScale,Z=V=C[0].pts-Math.round(M*f))),l.sps&&l.pps&&g.length&&(l.timescale=l.inputTimeScale,F.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:B.default.initSegment([l]),metadata:{width:l.width,height:l.height}},P)){M=l.inputTimeScale;var J=this.getVideoStartPts(g),X=Math.round(M*f);V=Math.min(V,p(g[0].dts,J)-X),Z=Math.min(Z,J-X)}if(Object.keys(F).length)return this.ISGenerated=!0,P&&(this._initPTS=Z,this._initDTS=V),{tracks:F,initPTS:Z,timescale:M}},b.remuxVideo=function(r,l,f,C){var g=r.inputTimeScale,m=r.samples,F=[],P=m.length,z=this._initPTS,Z=this.nextAvcDts,V=8,M,J,X,re=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,_e=0,ge=!1;if(!f||Z===null){var we=l*g,Re=m[0].pts-p(m[0].dts,m[0].pts);Z=we-Re}for(var He=0;HeSe.pts){var Te=9e4*.2;_e=Math.max(Math.min(_e,Se.pts-Se.dts),-1*Te)}Se.dts0?He-1:He].dts&&(ge=!0)}ge&&m.sort(function(St,ut){var nt=St.dts-ut.dts,tt=St.pts-ut.pts;return nt||tt}),J=m[0].dts,X=m[m.length-1].dts;var $e=Math.round((X-J)/(P-1));if(_e<0){if(_e<$e*-2){T.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-$e,!0)+" ms");for(var bt=_e,Ie=0;Ie$e,ne=at<-1;if(Ae||ne){Ae?T.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(at,!0)+" ms ("+at+"dts) hole between fragments detected, filling it"):T.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-at,!0)+" ms ("+at+"dts) overlapping between fragments detected"),J=Z;var ae=m[0].pts-at;m[0].dts=J,m[0].pts=ae,T.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(ae,!0)+"/"+Object(n.toMsFromMpegTsClock)(J,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(at,!0)+" ms")}}A&&(J=Math.max(0,J));for(var ce=0,xe=0,Fe=0;Fe0?Ne-1:Ne].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(ye.maxBufferHole*g),De=(C?re+C*g:this.nextAudioPts)-lt.pts;De>Oe?(M=De-Ee,M<0&&(M=Ee),T.logger.log("[mp4-remuxer]: It is approximately "+De/90+" ms to the next segment; using duration "+M/90+" ms for the last video frame.")):M=Ee}else M=Ee}var Ze=Math.round(lt.pts-lt.dts);F.push(new S(lt.key,M,Ye,Ze))}if(F.length&&d&&d<70){var ht=F[0].flags;ht.dependsOn=2,ht.isNonSync=0}console.assert(M!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Z=X+M,this.isVideoContiguous=!0;var Tt=B.default.moof(r.sequenceNumber++,J,u({},r,{samples:F})),kt="video",It={data1:Tt,data2:Mt,startPTS:re/g,endPTS:(se+M)/g,startDTS:J/g,endDTS:Z/g,type:kt,hasAudio:!1,hasVideo:!0,nb:F.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(Mt.length,"MDAT length must not be zero"),It},b.remuxAudio=function(r,l,f,C,g){var m=r.inputTimeScale,F=r.samplerate?r.samplerate:m,P=m/F,z=r.isAAC?o:i,Z=z*P,V=this._initPTS,M=!r.isAAC&&this.typeSupported.mpeg,J=[],X=r.samples,re=M?0:8,se=this.nextAudioPts||-1,_e=l*m;if(this.isAudioContiguous=f=f||X.length&&se>0&&(C&&Math.abs(_e-se)<9e3||Math.abs(p(X[0].pts-V,_e)-se)<20*Z),X.forEach(function(Me){Me.pts=p(Me.pts-V,_e)}),!f||se<0){if(X=X.filter(function(Me){return Me.pts>=0}),!X.length)return;g===0?se=0:C?se=Math.max(0,_e):se=X[0].pts}if(r.isAAC)for(var ge=g!==void 0,we=this.config.maxAudioFramesDrift,Re=0,He=se;Re=we*Z&&bt0){xe+=re;try{ce=new Uint8Array(xe)}catch(Me){this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:v.ErrorTypes.MUX_ERROR,details:v.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xe,reason:"fail allocating audio mdat "+xe});return}if(!M){var Mt=new DataView(ce.buffer);Mt.setUint32(0,xe),ce.set(B.default.types.mdat,4)}}else return;ce.set(yt,re);var Qe=yt.byteLength;re+=Qe,J.push(new S(!0,z,Qe,0)),ae=Et}var Ne=J.length;if(!Ne)return;var lt=J[J.length-1];this.nextAudioPts=se=ae+P*lt.duration;var dt=M?new Uint8Array(0):B.default.moof(r.sequenceNumber++,ne/P,u({},r,{samples:J}));r.samples=[];var Ye=ne/m,st=se/m,je="audio",Le={data1:dt,data2:ce,startPTS:Ye,endPTS:st,startDTS:Ye,endDTS:st,type:je,hasAudio:!0,hasVideo:!1,nb:Ne};return this.isAudioContiguous=!0,console.assert(ce.length,"MDAT length must not be zero"),Le},b.remuxEmptyAudio=function(r,l,f,C){var g=r.inputTimeScale,m=r.samplerate?r.samplerate:g,F=g/m,P=this.nextAudioPts,z=(P!==null?P:C.startDTS*g)+this._initDTS,Z=C.endDTS*g+this._initDTS,V=F*o,M=Math.ceil((Z-z)/V),J=D.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(T.logger.warn("[mp4-remuxer]: remux empty Audio"),!J){T.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var X=[],re=0;re4294967296;)L+=h;return L}function w(L){for(var b=0;b0?this.lastEndDTS=r:(I.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!L.audio,f=!!L.video,C="";l&&(C+="audio"),f&&(C+="video");var g={data1:S,startPTS:h,startDTS:h,endPTS:r,endDTS:r,type:C,hasAudio:l,hasVideo:f,nb:1,dropped:0};return w.audio=g.type==="audio"?g:void 0,w.video=g.type!=="audio"?g:void 0,w.text=s,w.id3=d,w.initSegment=x,w},n}(),T=function(u,c,o){return Object(D.getStartDTS)(u,c)-o};function E(n,u){var c=n==null?void 0:n.codec;return c&&c.length>4?c:c==="hvc1"?"hvc1.1.c.L120.90":c==="av01"?"av01.0.04M.08":c==="avc1"||u===B.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Q.default=v},"./src/task-loop.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return j});var j=function(){function D(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var B=D.prototype;return B.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},B.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},B.onHandlerDestroyed=function(){},B.hasInterval=function(){return!!this._tickInterval},B.hasNextTick=function(){return!!this._tickTimer},B.setInterval=function(v){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,v),!0)},B.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},B.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},B.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},B.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},B.doTick=function(){},D}()},"./src/types/cmcd.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"CMCDVersion",function(){return j}),O.d(Q,"CMCDObjectType",function(){return D}),O.d(Q,"CMCDStreamingFormat",function(){return B}),O.d(Q,"CMCDStreamType",function(){return I});var j=1,D;(function(v){v.MANIFEST="m",v.AUDIO="a",v.VIDEO="v",v.MUXED="av",v.INIT="i",v.CAPTION="c",v.TIMED_TEXT="tt",v.KEY="k",v.OTHER="o"})(D||(D={}));var B;(function(v){v.DASH="d",v.HLS="h",v.SMOOTH="s",v.OTHER="o"})(B||(B={}));var I;(function(v){v.VOD="v",v.LIVE="l"})(I||(I={}))},"./src/types/level.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"HlsSkip",function(){return B}),O.d(Q,"getSkipValue",function(){return I}),O.d(Q,"HlsUrlParameters",function(){return v}),O.d(Q,"Level",function(){return T});function j(E,n){for(var u=0;uNumber.MAX_SAFE_INTEGER?Infinity:n},v.hexadecimalInteger=function(E){if(this[E]){var n=(this[E]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var u=new Uint8Array(n.length/2),c=0;cNumber.MAX_SAFE_INTEGER?Infinity:n},v.decimalFloatingPoint=function(E){return parseFloat(this[E])},v.optionalFloat=function(E,n){var u=this[E];return u?parseFloat(u):n},v.enumeratedString=function(E){return this[E]},v.bool=function(E){return this[E]==="YES"},v.decimalResolution=function(E){var n=j.exec(this[E]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},I.parseAttrList=function(E){var n,u={},c='"';for(D.lastIndex=0;(n=D.exec(E))!==null;){var o=n[2];o.indexOf(c)===0&&o.lastIndexOf(c)===o.length-1&&(o=o.slice(1,-1)),u[n[1]]=o}return u},I}()},"./src/utils/binary-search.ts":function(q,Q,O){"use strict";O.r(Q);var j={search:function(B,I){for(var v=0,T=B.length-1,E=null,n=null;v<=T;){E=(v+T)/2|0,n=B[E];var u=I(n);if(u>0)v=E+1;else if(u<0)T=E-1;else return n}return null}};Q.default=j},"./src/utils/buffer-helper.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"BufferHelper",function(){return B});var j=O("./src/utils/logger.ts"),D={length:0,start:function(){return 0},end:function(){return 0}},B=function(){function I(){}return I.isBuffered=function(T,E){try{if(T){for(var n=I.getBuffered(T),u=0;u=n.start(u)&&E<=n.end(u))return!0}}catch(c){}return!1},I.bufferInfo=function(T,E,n){try{if(T){var u=I.getBuffered(T),c=[],o;for(o=0;oi&&(u[o-1].end=T[c].end):u.push(T[c])}else u.push(T[c])}else u=T;for(var d=0,s,A=E,a=E,p=0;p=w&&E=f&&j.logger.log(this.time+" ["+f+"] "+C)},h}(),d=function(r){for(var l=[],f=0;fv&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=v)},r.moveCursor=function(f){var C=this.pos+f;if(f>1)for(var g=this.pos+1;g=144&&this.backSpace();var C=B(f);if(this.pos>=v){this.logger.log(o.ERROR,"Cannot insert "+f.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(f){var C;for(C=f;C0&&(f?g="["+C.join(" | ")+"]":g=C.join(` `)),g},r.getTextAndFormat=function(){return this.rows},h}(),w=function(){function h(l,f,C){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=l,this.outputFilter=f,this.mode=null,this.verbose=0,this.displayedMemory=new p(C),this.nonDisplayedMemory=new p(C),this.lastOutputScreen=new p(C),this.currRollUpRow=this.displayedMemory.rows[I-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var r=h.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[I-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(f){this.outputFilter=f},r.setPAC=function(f){this.writeScreen.setPAC(f)},r.setBkgData=function(f){this.writeScreen.setBkgData(f)},r.setMode=function(f){if(f===this.mode)return;this.mode=f,this.logger.log(o.INFO,"MODE="+f),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=f},r.insertChars=function(f){for(var C=0;C=46,C.italics)C.foreground="white";else{var g=Math.floor(f/2)-16,m=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=m[g]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},r.outputDataUpdate=function(f){f===void 0&&(f=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),f&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(f){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,f,this.displayedMemory),this.cueStartTime=f))},h}(),S=function(){function h(l,f,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new i;this.channels=[null,new w(l,f,g),new w(l+1,C,g)],this.cmdHistory=b(),this.logger=g}var r=h.prototype;return r.getHandler=function(f){return this.channels[f].getHandler()},r.setHandler=function(f,C){this.channels[f].setHandler(C)},r.addData=function(f,C){var g,m,F,P=!1;this.logger.time=f;for(var z=0;z ("+d([m,F])+")"),g=this.parseCmd(m,F),g||(g=this.parseMidrow(m,F)),g||(g=this.parsePAC(m,F)),g||(g=this.parseBackgroundAttributes(m,F)),!g&&(P=this.parseChars(m,F),P)){var Z=this.currentChannel;if(Z&&Z>0){var V=this.channels[Z];V.insertChars(P)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!P&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+d([m,F])+" orig: "+d([C[z],C[z+1]]))}},r.parseCmd=function(f,C){var g=this.cmdHistory,m=(f===20||f===28||f===21||f===29)&&C>=32&&C<=47,F=(f===23||f===31)&&C>=33&&C<=35;if(!(m||F))return!1;if(L(f,C,g))return x(null,null,g),this.logger.log(o.DEBUG,"Repeated command ("+d([f,C])+") is dropped"),!0;var P=f===20||f===21||f===23?1:2,z=this.channels[P];return f===20||f===21||f===28||f===29?C===32?z.ccRCL():C===33?z.ccBS():C===34?z.ccAOF():C===35?z.ccAON():C===36?z.ccDER():C===37?z.ccRU(2):C===38?z.ccRU(3):C===39?z.ccRU(4):C===40?z.ccFON():C===41?z.ccRDC():C===42?z.ccTR():C===43?z.ccRTD():C===44?z.ccEDM():C===45?z.ccCR():C===46?z.ccENM():C===47&&z.ccEOC():z.ccTO(C-32),x(f,C,g),this.currentChannel=P,!0},r.parseMidrow=function(f,C){var g=0;if((f===17||f===25)&&C>=32&&C<=47){if(f===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var m=this.channels[g];return m?(m.ccMIDROW(C),this.logger.log(o.DEBUG,"MIDROW ("+d([f,C])+")"),!0):!1}return!1},r.parsePAC=function(f,C){var g,m=this.cmdHistory,F=(f>=17&&f<=23||f>=25&&f<=31)&&C>=64&&C<=127,P=(f===16||f===24)&&C>=64&&C<=95;if(!(F||P))return!1;if(L(f,C,m))return x(null,null,m),!0;var z=f<=23?1:2;C>=64&&C<=95?g=z===1?T[f]:n[f]:g=z===1?E[f]:u[f];var Z=this.channels[z];return Z?(Z.setPAC(this.interpretPAC(g,C)),x(f,C,m),this.currentChannel=z,!0):!1},r.interpretPAC=function(f,C){var g,m={color:null,italics:!1,indent:null,underline:!1,row:f};return C>95?g=C-96:g=C-64,m.underline=(g&1)===1,g<=13?m.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(m.italics=!0,m.color="white"):m.indent=Math.floor((g-16)/2)*4,m},r.parseChars=function(f,C){var g,m=null,F=null;if(f>=25?(g=2,F=f-8):(g=1,F=f),F>=17&&F<=19){var P;F===17?P=C+80:F===18?P=C+112:P=C+144,this.logger.log(o.INFO,"Special char '"+B(P)+"' in channel "+g),m=[P]}else f>=32&&f<=127&&(m=C===0?[f]:[f,C]);if(m){var z=d(m);this.logger.log(o.DEBUG,"Char codes = "+z.join(",")),x(f,C,this.cmdHistory)}return m},r.parseBackgroundAttributes=function(f,C){var g=(f===16||f===24)&&C>=32&&C<=47,m=(f===23||f===31)&&C>=45&&C<=47;if(!(g||m))return!1;var F,P={};f===16||f===24?(F=Math.floor((C-32)/2),P.background=c[F],C%2===1&&(P.background=P.background+"_semi")):C===45?P.background="transparent":(P.foreground="black",C===47&&(P.underline=!0));var z=f<=23?1:2,Z=this.channels[z];return Z.setBkgData(P),x(f,C,this.cmdHistory),!0},r.reset=function(){for(var f=0;f=16?A--:A++;var x=Object(j.fixLineBreaks)(a.trim()),L=Object(D.generateCueId)(n,u,x);(!E||!E.cues||!E.cues.getCueById(L))&&(d=new p(n,u,x),d.id=L,d.line=w+1,d.align="left",d.position=10+Math.min(80,Math.floor(A*8/32)*10),o.push(d))}return E&&o.length&&(o.sort(function(b,h){return b.line==="auto"||h.line==="auto"?0:b.line>8&&h.line>8?h.line-b.line:b.line-h.line}),o.forEach(function(b){return Object(B.addCueToTrack)(E,b)})),o}};Q.default=v},"./src/utils/discontinuities.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"findFirstFragWithCC",function(){return I}),O.d(Q,"shouldAlignOnDiscontinuities",function(){return v}),O.d(Q,"findDiscontinuousReferenceFrag",function(){return T}),O.d(Q,"adjustSlidingStart",function(){return n}),O.d(Q,"alignStream",function(){return u}),O.d(Q,"alignPDT",function(){return o}),O.d(Q,"alignFragmentByPDTDelta",function(){return i}),O.d(Q,"alignMediaPlaylistByPDT",function(){return d});var j=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts"),B=O("./src/controller/level-helper.ts");function I(s,A){for(var a=null,p=0,w=s.length;pa.startCC||s&&s.cc=this.minWeight_},I.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},I.destroy=function(){},B}();Q.default=D},"./src/utils/ewma.ts":function(q,Q,O){"use strict";O.r(Q);var j=function(){function D(I,v,T){v===void 0&&(v=0),T===void 0&&(T=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=I,this.alpha_=I?Math.exp(Math.log(.5)/I):0,this.estimate_=v,this.totalWeight_=T}var B=D.prototype;return B.sample=function(v,T){var E=Math.pow(this.alpha_,v);this.estimate_=T*(1-E)+E*this.estimate_,this.totalWeight_+=v},B.getTotalWeight=function(){return this.totalWeight_},B.getEstimate=function(){if(this.alpha_){var v=1-Math.pow(this.alpha_,this.totalWeight_);if(v)return this.estimate_/v}return this.estimate_},D}();Q.default=j},"./src/utils/fetch-loader.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"fetchSupported",function(){return i});var j=O("./src/polyfills/number.ts"),D=O("./src/loader/load-stats.ts"),B=O("./src/demux/chunk-cache.ts");function I(p,w){p.prototype=Object.create(w.prototype),p.prototype.constructor=p,u(p,w)}function v(p){var w=typeof Map=="function"?new Map:void 0;return v=function(x){if(x===null||!n(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(x))return w.get(x);w.set(x,L)}function L(){return T(x,arguments,c(this).constructor)}return L.prototype=Object.create(x.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),u(L,x)},v(p)}function T(p,w,S){return E()?T=Reflect.construct:T=function(L,b,h){var r=[null];r.push.apply(r,b);var l=Function.bind.apply(L,r),f=new l;return h&&u(f,h.prototype),f},T.apply(null,arguments)}function E(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(p){return!1}}function n(p){return Function.toString.call(p).indexOf("[native code]")!==-1}function u(p,w){return u=Object.setPrototypeOf||function(x,L){return x.__proto__=L,x},u(p,w)}function c(p){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},c(p)}function o(){return o=Object.assign||function(p){for(var w=1;w=h&&r(L,b,l.flush(),x)):r(L,b,F,x),g()}).catch(function(){return Promise.reject()})};return C()},p}();function s(p,w){var S={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(o({},p.headers))};return p.rangeEnd&&S.headers.set("Range","bytes="+p.rangeStart+"-"+String(p.rangeEnd-1)),S}function A(p,w){return new self.Request(p.url,w)}var a=function(p){I(w,p);function w(S,x,L){var b;return b=p.call(this,S)||this,b.code=void 0,b.details=void 0,b.code=x,b.details=L,b}return w}(v(Error));Q.default=d},"./src/utils/imsc1-ttml-parser.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"IMSC1_CODEC",function(){return n}),O.d(Q,"parseIMSC1",function(){return i});var j=O("./src/utils/mp4-tools.ts"),D=O("./src/utils/vttparser.ts"),B=O("./src/utils/vttcue.ts"),I=O("./src/demux/id3.ts"),v=O("./src/utils/timescale-conversion.ts"),T=O("./src/utils/webvtt-parser.ts");function E(){return E=Object.assign||function(h){for(var r=1;r"):j}function v(n){for(var u=arguments.length,c=new Array(u>1?u-1:0),o=1;o>24,w[S+1]=x>>16&255,w[S+2]=x>>8&255,w[S+3]=x&255}function u(w,S){var x=[];if(!S.length)return x;var L,b,h;"data"in w?(L=w.data,b=w.start,h=w.end):(L=w,b=0,h=L.byteLength);for(var r=b;r1?r+l:h;if(f===S[0])if(S.length===1)x.push({data:L,start:r+8,end:C});else{var g=u({data:L,start:r+8,end:C},S.slice(1));g.length&&I.apply(x,g)}r=C}return x}function c(w){var S=u(w,["moov"]),x=S[0],L=x?x.end:null,b=u(w,["sidx"]);if(!b||!b[0])return null;var h=[],r=b[0],l=r.data[0],f=l===0?8:16,C=E(r,f);f+=4;var g=0,m=0;l===0?f+=8:f+=16,f+=2;var F=r.end+m,P=T(r,f);f+=2;for(var z=0;z>>31;if(J===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var X=E(r,Z);Z+=4,h.push({referenceSize:M,subsegmentDuration:X,info:{duration:X/C,start:F,end:F+M-1}}),F+=M,Z+=4,f=Z}return{earliestPresentationTime:g,timescale:C,version:l,referencesCount:P,references:h,moovEndOffset:L}}function o(w){for(var S=[],x=u(w,["moov","trak"]),L=0;Lv)&&(this.startTime=v),this.endTime=T,this.screen=E,this.timelineController.createCaptionsTrack(this.trackName)},B.reset=function(){this.cueRanges=[]},D}()},"./src/utils/texttrack-utils.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"sendAddTrackEvent",function(){return D}),O.d(Q,"addCueToTrack",function(){return B}),O.d(Q,"clearCurrentCues",function(){return I}),O.d(Q,"removeCuesInRange",function(){return v}),O.d(Q,"getCuesInRange",function(){return E});var j=O("./src/utils/logger.ts");function D(n,u){var c;try{c=new Event("addtrack")}catch(o){c=document.createEvent("Event"),c.initEvent("addtrack",!1,!1)}c.track=n,u.dispatchEvent(c)}function B(n,u){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(u.id))try{if(n.addCue(u),!n.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(i){j.logger.debug("[texttrack-utils]: "+i);var o=new self.TextTrackCue(u.startTime,u.endTime,u.text);o.id=u.id,n.addCue(o)}c==="disabled"&&(n.mode=c)}function I(n){var u=n.mode;if(u==="disabled"&&(n.mode="hidden"),n.cues)for(var c=n.cues.length;c--;)n.removeCue(n.cues[c]);u==="disabled"&&(n.mode=u)}function v(n,u,c){var o=n.mode;if(o==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var i=E(n.cues,u,c),d=0;dn[c].endTime)return-1;for(var o=0,i=c;o<=i;){var d=Math.floor((i+o)/2);if(un[d].startTime&&o-1)for(var d=i,s=n.length;d=u&&A.endTime<=c)o.push(A);else if(A.startTime>c)return o}return o}},"./src/utils/time-ranges.ts":function(q,Q,O){"use strict";O.r(Q);var j={toString:function(B){for(var I="",v=B.length,T=0;T1?u-1:0),o=1;o100)throw new Error("Position must be between 0 and 100.");h=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",T({},i,{get:function(){return r},set:function(g){var m=v(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");r=m,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",T({},i,{get:function(){return l},set:function(g){if(g<0||g>100)throw new Error("Size must be between 0 and 100.");l=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",T({},i,{get:function(){return f},set:function(g){var m=v(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");f=m,this.hasBeenReset=!0}})),o.displayState=void 0}return E.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},E}()},"./src/utils/vttparser.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"parseTimeStamp",function(){return B}),O.d(Q,"fixLineBreaks",function(){return u}),O.d(Q,"VTTParser",function(){return c});var j=O("./src/utils/vttcue.ts"),D=function(){function o(){}var i=o.prototype;return i.decode=function(s,A){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},o}();function B(o){function i(s,A,a,p){return(s|0)*3600+(A|0)*60+(a|0)+parseFloat(p||0)}var d=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?i(d[2],d[3],0,d[4]):i(d[1],d[2],d[3],d[4]):null}var I=function(){function o(){this.values=Object.create(null)}var i=o.prototype;return i.set=function(s,A){!this.get(s)&&A!==""&&(this.values[s]=A)},i.get=function(s,A,a){return a?this.has(s)?this.values[s]:A[a]:this.has(s)?this.values[s]:A},i.has=function(s){return s in this.values},i.alt=function(s,A,a){for(var p=0;p=0&&a<=100)return this.set(s,a),!0}return!1},o}();function v(o,i,d,s){var A=s?o.split(s):[o];for(var a in A){if(typeof A[a]!="string")continue;var p=A[a].split(d);if(p.length!==2)continue;var w=p[0],S=p[1];i(w,S)}}var T=new j.default(0,0,""),E=T.align==="middle"?"middle":"center";function n(o,i,d){var s=o;function A(){var w=B(o);if(w===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),w}function a(w,S){var x=new I;v(w,function(h,r){var l;switch(h){case"region":for(var f=d.length-1;f>=0;f--)if(d[f].id===r){x.set(h,d[f].region);break}break;case"vertical":x.alt(h,r,["rl","lr"]);break;case"line":l=r.split(","),x.integer(h,l[0]),x.percent(h,l[0])&&x.set("snapToLines",!1),x.alt(h,l[0],["auto"]),l.length===2&&x.alt("lineAlign",l[1],["start",E,"end"]);break;case"position":l=r.split(","),x.percent(h,l[0]),l.length===2&&x.alt("positionAlign",l[1],["start",E,"end","line-left","line-right","auto"]);break;case"size":x.percent(h,r);break;case"align":x.alt(h,r,["start",E,"end","left","right"]);break}},/:/,/\s/),S.region=x.get("region",null),S.vertical=x.get("vertical","");var L=x.get("line","auto");L==="auto"&&T.line===-1&&(L=-1),S.line=L,S.lineAlign=x.get("lineAlign","start"),S.snapToLines=x.get("snapToLines",!0),S.size=x.get("size",100),S.align=x.get("align",E);var b=x.get("position","auto");b==="auto"&&T.position===50&&(b=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=b}function p(){o=o.replace(/^\s+/,"")}if(p(),i.startTime=A(),p(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);o=o.substr(3),p(),i.endTime=A(),p(),a(o,i)}function u(o){return o.replace(//gi,` `)}var c=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new D,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=o.prototype;return i.parse=function(s){var A=this;s&&(A.buffer+=A.decoder.decode(s,{stream:!0}));function a(){var b=A.buffer,h=0;for(b=u(b);h")===-1){A.cue.id=w;continue}case"CUE":if(!A.cue){A.state="BADCUE";continue}try{n(w,A.cue,A.regionList)}catch(b){A.cue=null,A.state="BADCUE";continue}A.state="CUETEXT";continue;case"CUETEXT":{var L=w.indexOf("-->")!==-1;if(!w||L&&(x=!0)){A.oncue&&A.cue&&A.oncue(A.cue),A.cue=null,A.state="ID";continue}if(A.cue===null)continue;A.cue.text&&(A.cue.text+=` `),A.cue.text+=w}continue;case"BADCUE":w||(A.state="ID")}}}catch(b){A.state==="CUETEXT"&&A.cue&&A.oncue&&A.oncue(A.cue),A.cue=null,A.state=A.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=` `,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(A){s.onparsingerror&&s.onparsingerror(A)}return s.onflush&&s.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"generateCueId",function(){return c}),O.d(Q,"parseWebVTT",function(){return i});var j=O("./src/polyfills/number.ts"),D=O("./src/utils/vttparser.ts"),B=O("./src/demux/id3.ts"),I=O("./src/utils/timescale-conversion.ts"),v=O("./src/remux/mp4-remuxer.ts"),T=/\r\n|\n\r|\n|\r/g,E=function(s,A,a){return a===void 0&&(a=0),s.substr(a,A.length)===A},n=function(s){var A=parseInt(s.substr(-3)),a=parseInt(s.substr(-6,2)),p=parseInt(s.substr(-9,2)),w=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(j.isFiniteNumber)(A)||!Object(j.isFiniteNumber)(a)||!Object(j.isFiniteNumber)(p)||!Object(j.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return A+=1e3*a,A+=60*1e3*p,A+=60*60*1e3*w,A},u=function(s){for(var A=5381,a=s.length;a;)A=A*33^s.charCodeAt(--a);return(A>>>0).toString()};function c(d,s,A){return u(d.toString())+u(s.toString())+u(A)}var o=function(s,A,a){var p=s[A],w=s[p.prevCC];if(!w||!w.new&&p.new){s.ccOffset=s.presentationOffset=p.start,p.new=!1;return}for(;(S=w)!==null&&S!==void 0&&S.new;){var S;s.ccOffset+=p.start-w.start,p.new=!1,p=w,w=s[p.prevCC]}s.presentationOffset=a};function i(d,s,A,a,p,w,S,x){var L=new D.VTTParser,b=Object(B.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(T,` `).split(` `),h=[],r=Object(I.toMpegTsClockFromTimescale)(s,A),l="00:00.000",f=0,C=0,g,m=!0,F=!1;L.oncue=function(P){var z=a[p],Z=a.ccOffset,V=(f-r)/9e4;if(z!=null&&z.new&&(C!==void 0?Z=a.ccOffset=z.start:o(a,p,V)),V&&(Z=V-a.presentationOffset),F){var M=P.endTime-P.startTime,J=Object(v.normalizePts)((P.startTime+Z-C)*9e4,w*9e4)/9e4;P.startTime=J,P.endTime=J+M}var X=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(X)),P.id||(P.id=c(P.startTime,P.endTime,X)),P.endTime>0&&h.push(P)},L.onparsingerror=function(P){g=P},L.onflush=function(){if(g){x(g);return}S(h)},b.forEach(function(P){if(m)if(E(P,"X-TIMESTAMP-MAP=")){m=!1,F=!0,P.substr(16).split(",").forEach(function(z){E(z,"LOCAL:")?l=z.substr(6):E(z,"MPEGTS:")&&(f=parseInt(z.substr(7)))});try{C=n(l)/1e3}catch(z){F=!1,g=z}return}else P===""&&(m=!1);L.parse(P+` `)}),L.flush()}},"./src/utils/xhr-loader.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/utils/logger.ts"),D=O("./src/loader/load-stats.ts"),B=/^age:\s*[\d.]+\s*$/m,I=function(){function v(E){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=E?E.xhrSetup:null,this.stats=new D.LoadStats,this.retryDelay=0}var T=v.prototype;return T.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},T.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},T.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},T.load=function(n,u,c){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=u,this.callbacks=c,this.retryDelay=u.retryDelay,this.loadInternal()},T.loadInternal=function(){var n=this.config,u=this.context;if(!n)return;var c=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var i=this.xhrSetup;try{if(i)try{i(c,u.url)}catch(A){c.open("GET",u.url,!0),i(c,u.url)}c.readyState||c.open("GET",u.url,!0);var d=this.context.headers;if(d)for(var s in d)c.setRequestHeader(s,d[s])}catch(A){this.callbacks.onError({code:c.status,text:A.message},u,c);return}u.rangeEnd&&c.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),c.onreadystatechange=this.readystatechange.bind(this),c.onprogress=this.loadprogress.bind(this),c.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),c.send()},T.readystatechange=function(){var n=this.context,u=this.loader,c=this.stats;if(!n||!u)return;var o=u.readyState,i=this.config;if(c.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),c.loading.first===0&&(c.loading.first=Math.max(self.performance.now(),c.loading.start)),o===4){u.onreadystatechange=null,u.onprogress=null;var d=u.status;if(d>=200&&d<300){c.loading.end=Math.max(self.performance.now(),c.loading.first);var s,A;if(n.responseType==="arraybuffer"?(s=u.response,A=s.byteLength):(s=u.responseText,A=s.length),c.loaded=c.total=A,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(c,n,s,u),!this.callbacks)return;var p={url:u.responseURL,data:s};this.callbacks.onSuccess(p,c,n,u)}else c.retry>=i.maxRetry||d>=400&&d<499?(j.logger.error(d+" while loading "+n.url),this.callbacks.onError({code:d,text:u.statusText},n,u)):(j.logger.warn(d+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),c.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},T.loadtimeout=function(){j.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},T.loadprogress=function(n){var u=this.stats;u.loaded=n.loaded,n.lengthComputable&&(u.total=n.total)},T.getCacheAge=function(){var n=null;if(this.loader&&B.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");n=u?parseFloat(u):null}return n},v}();Q.default=I}}).default})},vHTk:function(qe,pe,G){qe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(qe,pe,G){var q=G("SrGk"),Q=G("bYtY");function O(B,I){q.call(this,B,I,["filter"],"__filter_in_use__","_shadowDom")}Q.inherits(O,q),O.prototype.addWithoutUpdate=function(B,I){if(I&&j(I.style)){var v;if(I._shadowDom){v=I._shadowDom;var T=this.getDefs(!0);T.contains(I._shadowDom)||this.addDom(v)}else v=this.add(I);this.markUsed(I);var E=v.getAttribute("id");B.style.filter="url(#"+E+")"}},O.prototype.add=function(B){var I=this.createElement("filter");return B._shadowDomId=B._shadowDomId||this.nextId++,I.setAttribute("id","zr"+this._zrId+"-shadow-"+B._shadowDomId),this.updateDom(B,I),this.addDom(I),I},O.prototype.update=function(B,I){var v=I.style;if(j(v)){var T=this;q.prototype.update.call(this,I,function(){T.updateDom(I,I._shadowDom)})}else this.remove(B,I)},O.prototype.remove=function(B,I){I._shadowDomId!=null&&(this.removeDom(B),B.style.filter="")},O.prototype.updateDom=function(B,I){var v=I.getElementsByTagName("feDropShadow");v.length===0?v=this.createElement("feDropShadow"):v=v[0];var T=B.style,E=B.scale&&B.scale[0]||1,n=B.scale&&B.scale[1]||1,u,c,o,i;if(T.shadowBlur||T.shadowOffsetX||T.shadowOffsetY)u=T.shadowOffsetX||0,c=T.shadowOffsetY||0,o=T.shadowBlur,i=T.shadowColor;else if(T.textShadowBlur)u=T.textShadowOffsetX||0,c=T.textShadowOffsetY||0,o=T.textShadowBlur,i=T.textShadowColor;else{this.removeDom(I,T);return}v.setAttribute("dx",u/E),v.setAttribute("dy",c/n),v.setAttribute("flood-color",i);var d=o/2/E,s=o/2/n,A=d+" "+s;v.setAttribute("stdDeviation",A),I.setAttribute("x","-100%"),I.setAttribute("y","-100%"),I.setAttribute("width",Math.ceil(o/2*200)+"%"),I.setAttribute("height",Math.ceil(o/2*200)+"%"),I.appendChild(v),B._shadowDom=I},O.prototype.markUsed=function(B){B._shadowDom&&q.prototype.markUsed.call(this,B._shadowDom)};function j(B){return B&&(B.shadowBlur||B.shadowOffsetX||B.shadowOffsetY||B.textShadowBlur||B.textShadowOffsetX||B.textShadowOffsetY)}var D=O;qe.exports=D},vWvF:function(qe,pe,G){var q=G("Bq2U"),Q=G("SUKs"),O=G("bYtY"),j=O.isString,D=O.isFunction,B=O.isObject,I=O.isArrayLike,v=O.indexOf,T=function(){this.animators=[]};T.prototype={constructor:T,animate:function(o,i){var d,s=!1,A=this,a=this.__zr;if(o){var p=o.split("."),w=A;s=p[0]==="shape";for(var S=0,x=p.length;S0&&o.animate(i,!1).when(A==null?500:A,w).delay(a||0)}function u(o,i,d,s){if(!i)o.attr(d,s);else{var A={};A[i]={},A[i][d]=s,o.attr(A)}}var c=T;qe.exports=c},wCXF:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return yt});var q=G("rePB"),Q=G("VTBJ"),O=G("KQm4"),j=G("U8pU"),D=G("ODXe"),B=G("q1tI"),I=G("TSYQ"),v=G.n(I),T=G("Gytx"),E=G.n(T),n=G("Kwbf"),u=G("t23M"),c=G("qx4F"),o=G("6eGT"),i=G("IBYe"),d=G("Ff2n"),s=G("c+Xe"),A=G("fyJ8"),a=G("biw7");function p(Qe,Ne,lt,dt,Ye){var st=lt[Qe]||{},je=lt[Ne]||{},Le,Me;st.fixed==="left"?Le=dt.left[Qe]:je.fixed==="right"&&(Me=dt.right[Ne]);var me=!1,ye=!1,Ee=!1,Oe=!1,De=lt[Ne+1],Ze=lt[Qe-1];if(Ye==="rtl"){if(Le!==void 0){var ht=Ze&&Ze.fixed==="left";Oe=!ht}else if(Me!==void 0){var Tt=De&&De.fixed==="right";Ee=!Tt}}else if(Le!==void 0){var kt=De&&De.fixed==="left";me=!kt}else if(Me!==void 0){var It=Ze&&Ze.fixed==="right";ye=!It}return{fixLeft:Le,fixRight:Me,lastFixLeft:me,firstFixRight:ye,lastFixRight:Ee,firstFixLeft:Oe,isSticky:dt.isSticky}}var w=G("sR1s");function S(Qe){var Ne=Qe.cells,lt=Qe.stickyOffsets,dt=Qe.flattenColumns,Ye=Qe.rowComponent,st=Qe.cellComponent,je=Qe.onHeaderRow,Le=Qe.index,Me=B.useContext(a.a),me=Me.prefixCls,ye=Me.direction,Ee;je&&(Ee=je(Ne.map(function(De){return De.column}),Le));var Oe=Object(w.a)(Ne.map(function(De){return De.column}));return B.createElement(Ye,Object.assign({},Ee),Ne.map(function(De,Ze){var ht=De.column,Tt=p(De.colStart,De.colEnd,dt,lt,ye),kt;return ht&&ht.onHeaderCell&&(kt=De.column.onHeaderCell(ht)),B.createElement(A.a,Object.assign({},De,{ellipsis:ht.ellipsis,align:ht.align,component:st,prefixCls:me,key:Oe[Ze]},Tt,{additionalProps:kt,rowType:"header"}))}))}S.displayName="HeaderRow";var x=S;function L(Qe){var Ne=[];function lt(je,Le){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ne[Me]=Ne[Me]||[];var me=Le,ye=je.filter(Boolean).map(function(Ee){var Oe={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:me},De=1,Ze=Ee.children;return Ze&&Ze.length>0&&(De=lt(Ze,me,Me+1).reduce(function(ht,Tt){return ht+Tt},0),Oe.hasSubColumns=!0),"colSpan"in Ee&&(De=Ee.colSpan),"rowSpan"in Ee&&(Oe.rowSpan=Ee.rowSpan),Oe.colSpan=De,Oe.colEnd=Oe.colStart+De-1,Ne[Me].push(Oe),me+=De,De});return ye}lt(Qe,0);for(var dt=Ne.length,Ye=function(Le){Ne[Le].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=dt-Le)})},st=0;st=0;Le-=1){var Me=Ne[Le],me=lt&<[Le],ye=me&&me[r.a];(Me||ye||je)&&(Ye.unshift(B.createElement("col",Object.assign({key:Le,style:{width:Me,minWidth:Me}},ye))),je=!0)}return B.createElement("colgroup",null,Ye)}var f=l;function C(Qe,Ne){return Object(B.useMemo)(function(){for(var lt=[],dt=0;dt1?$-1:0),te=1;te<$;te++)le[te-1]=arguments[te];(N=Or).onClick.apply(N,[U].concat(le))}},un;typeof xt=="string"?un=xt:typeof xt=="function"&&(un=xt(dt,Ye,Ee));var fe=Object(w.a)(Ce),be=B.createElement(Oe,Object.assign({},Or,{"data-row-key":st,className:v()(Ne,"".concat(Tt,"-row"),"".concat(Tt,"-row-level-").concat(Ee),un,Or&&Or.className),style:Object(Q.a)(Object(Q.a)({},lt),Or?Or.style:null),onClick:pn}),Ce.map(function(ee,U){var N=ee.render,$=ee.dataIndex,le=ee.className,te=fe[U],Ke=kt[U],Ct;U===(Rt||0)&&Kr&&(Ct=B.createElement(B.Fragment,null,B.createElement("span",{style:{paddingLeft:"".concat(Xe*Ee,"px")},className:"".concat(Tt,"-row-indent indent-level-").concat(Ee)}),mt({prefixCls:Tt,expanded:Kt,expandable:Rr,record:dt,onExpand:it})));var Ut;return ee.onCell&&(Ut=ee.onCell(dt,Ye)),B.createElement(A.a,Object.assign({className:le,ellipsis:ee.ellipsis,align:ee.align,component:De,prefixCls:Tt,key:te,record:dt,index:Ye,dataIndex:$,render:N,shouldCellUpdate:ee.shouldCellUpdate},Ke,{appendNode:Ct,additionalProps:Ut}))})),Ue;if(Ur&&(Fr||Kt)){var rt=Pt(dt,Ye,Ee+1,Kt),et=_t&&_t(dt,Ye,Ee);Ue=B.createElement(Z,{expanded:Kt,className:v()("".concat(Tt,"-expanded-row"),"".concat(Tt,"-expanded-row-level-").concat(Ee+1),et),prefixCls:Tt,fixHeader:St,fixColumn:ut,horizonScroll:nt,component:Oe,componentWidth:tt,cellComponent:De,colSpan:Ce.length},rt)}var Dt;return Rr&&Kt&&(Dt=(dt[Ze]||[]).map(function(ee,U){var N=je(ee,U);return B.createElement(V,Object.assign({},Qe,{key:N,rowKey:N,record:ee,recordKey:N,index:U,indent:Ee+1}))})),B.createElement(B.Fragment,null,be,Ue,Dt)}V.displayName="BodyRow";var M=V,J=B.createContext(null),X=J;function re(Qe){var Ne=Qe.columnKey,lt=Qe.onColumnResize,dt=B.useRef();return B.useEffect(function(){dt.current&<(Ne,dt.current.offsetWidth)},[]),B.createElement(u.a,{onResize:function(st){var je=st.offsetWidth;lt(Ne,je)}},B.createElement("td",{ref:dt,style:{padding:0,border:0,height:0}},B.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function se(Qe){var Ne=Qe.data,lt=Qe.getRowKey,dt=Qe.measureColumnWidth,Ye=Qe.expandedKeys,st=Qe.onRow,je=Qe.rowExpandable,Le=Qe.emptyNode,Me=Qe.childrenColumnName,me=B.useContext(X),ye=me.onColumnResize,Ee=B.useContext(a.a),Oe=Ee.prefixCls,De=Ee.getComponent,Ze=B.useContext(P),ht=Ze.fixHeader,Tt=Ze.horizonScroll,kt=Ze.flattenColumns,It=Ze.componentWidth;return B.useMemo(function(){var St=De(["body","wrapper"],"tbody"),ut=De(["body","row"],"tr"),nt=De(["body","cell"],"td"),tt;Ne.length?tt=Ne.map(function(Pe,pt){var it=lt(Pe,pt);return B.createElement(M,{key:it,rowKey:it,record:Pe,recordKey:it,index:pt,rowComponent:ut,cellComponent:nt,expandedKeys:Ye,onRow:st,getRowKey:lt,rowExpandable:je,childrenColumnName:Me})}):tt=B.createElement(Z,{expanded:!0,className:"".concat(Oe,"-placeholder"),prefixCls:Oe,fixHeader:ht,fixColumn:Tt,horizonScroll:Tt,component:ut,componentWidth:It,cellComponent:nt,colSpan:kt.length},Le);var Ce=Object(w.a)(kt);return B.createElement(St,{className:"".concat(Oe,"-tbody")},dt&&B.createElement("tr",{"aria-hidden":"true",className:"".concat(Oe,"-measure-row"),style:{height:0}},Ce.map(function(Pe){return B.createElement(re,{key:Pe,columnKey:Pe,onColumnResize:ye})})),tt)},[Ne,Oe,st,dt,Ye,lt,De,It,Le,kt])}var _e=B.memo(se);_e.displayName="Body";var ge=_e,we=G("wRmb"),Re=G("xEkU"),He=G.n(Re);function Se(Qe){var Ne=Object(B.useRef)(Qe),lt=Object(B.useState)({}),dt=Object(D.a)(lt,2),Ye=dt[1],st=Object(B.useRef)(null),je=Object(B.useRef)([]);function Le(Me){st.current===null&&(je.current=[],st.current=He()(function(){je.current.forEach(function(me){Ne.current=me(Ne.current)}),st.current=null,Ye({})})),je.current.push(Me)}return Object(B.useEffect)(function(){return function(){He.a.cancel(st.current)}},[]),[Ne.current,Le]}function Te(Qe){var Ne=Object(B.useRef)(Qe),lt=Object(B.useRef)(null);function dt(){window.clearTimeout(lt.current)}function Ye(je){Ne.current=je,dt(),lt.current=window.setTimeout(function(){Ne.current=null,lt.current=null},100)}function st(){return Ne.current}return Object(B.useEffect)(function(){return dt},[]),[Ye,st]}function $e(Qe,Ne,lt){var dt=Object(B.useMemo)(function(){for(var Ye=[],st=[],je=0,Le=0,Me=0;Me=Ee&&(Qt=Ee-Oe),je({scrollLeft:Qt/Ee*(ye+2)}),It.current.x=Xe.pageX},it=function(){var Xe=Object(ce.b)(st.current).top,mt=Xe+st.current.offsetHeight,Pt=document.documentElement.scrollTop+window.innerHeight;mt-Object(c.a)()<=Pt||Xe>=Pt-Le?kt(function(Rt){return Object(Q.a)(Object(Q.a)({},Rt),{},{isHiddenScrollBar:!0})}):kt(function(Rt){return Object(Q.a)(Object(Q.a)({},Rt),{},{isHiddenScrollBar:!1})})},xt=function(Xe){kt(function(mt){return Object(Q.a)(Object(Q.a)({},mt),{},{scrollLeft:Xe/ye*Ee||0})})};return B.useImperativeHandle(lt,function(){return{setScrollLeft:xt}}),B.useEffect(function(){var _t=Object(ae.a)(document.body,"mouseup",Ce,!1),Xe=Object(ae.a)(document.body,"mousemove",pt,!1);return it(),function(){_t.remove(),Xe.remove()}},[Oe,nt]),B.useEffect(function(){var _t=Object(ae.a)(window,"scroll",it,!1),Xe=Object(ae.a)(window,"resize",it,!1);return function(){_t.remove(),Xe.remove()}},[]),B.useEffect(function(){Tt.isHiddenScrollBar||kt(function(_t){var Xe,mt;return Object(Q.a)(Object(Q.a)({},_t),{},{scrollLeft:st.current.scrollLeft/((Xe=st.current)===null||Xe===void 0?void 0:Xe.scrollWidth)*((mt=st.current)===null||mt===void 0?void 0:mt.clientWidth)})})},[Tt.isHiddenScrollBar]),ye<=Ee||!Oe||Tt.isHiddenScrollBar?null:B.createElement("div",{style:{height:Object(c.a)(),width:Ee,bottom:Le},className:"".concat(me,"-sticky-scroll")},B.createElement("div",{onMouseDown:Pe,ref:De,className:v()("".concat(me,"-sticky-scroll-bar"),Object(q.a)({},"".concat(me,"-sticky-scroll-bar-active"),nt)),style:{width:"".concat(Oe,"px"),transform:"translate3d(".concat(Tt.scrollLeft,"px, 0, 0)")}}))},Fe=B.forwardRef(xe);function ke(Qe,Ne){return B.useMemo(function(){var lt=!!Qe;return{isSticky:lt,stickyClassName:lt?"".concat(Ne,"-sticky-header"):"",offsetHeader:Object(j.a)(Qe)==="object"&&Qe.offsetHeader||0,offsetScroll:Object(j.a)(Qe)==="object"&&Qe.offsetScroll||0}},[Qe,Ne])}var ct=[],ft={},yt="rc-table-internal-hook",Et=B.memo(function(Qe){var Ne=Qe.children;return Ne},function(Qe,Ne){return E()(Qe.props,Ne.props)?Qe.pingLeft!==Ne.pingLeft||Qe.pingRight!==Ne.pingRight:!1});function Ot(Qe){var Ne,lt=Qe.prefixCls,dt=Qe.className,Ye=Qe.rowClassName,st=Qe.style,je=Qe.data,Le=Qe.rowKey,Me=Qe.scroll,me=Qe.tableLayout,ye=Qe.direction,Ee=Qe.title,Oe=Qe.footer,De=Qe.summary,Ze=Qe.id,ht=Qe.showHeader,Tt=Qe.components,kt=Qe.emptyText,It=Qe.onRow,St=Qe.onHeaderRow,ut=Qe.internalHooks,nt=Qe.transformColumns,tt=Qe.internalRefs,Ce=Qe.sticky,Pe=je||ct,pt=!!Pe.length,it=B.useState(0),xt=Object(D.a)(it,2),_t=xt[0],Xe=xt[1];B.useEffect(function(){Xe(Object(c.a)())});var mt=B.useMemo(function(){return Object(w.c)(Tt,{})},[Tt]),Pt=B.useCallback(function(Zr,Hr){return Object(w.b)(mt,Zr)||Hr},[mt]),Rt=B.useMemo(function(){return typeof Le=="function"?Le:function(Zr){var Hr=Zr&&Zr[Le];return Hr}},[Le]),Qt=Object(r.c)(Qe),Ir=Qt.expandIcon,Fr=Qt.expandedRowKeys,wr=Qt.defaultExpandedRowKeys,Kt=Qt.defaultExpandAllRows,Ur=Qt.expandedRowRender,Kr=Qt.onExpand,Rr=Qt.onExpandedRowsChange,pr=Qt.expandRowByClick,Or=Qt.rowExpandable,pn=Qt.expandIconColumnIndex,un=Qt.expandedRowClassName,fe=Qt.childrenColumnName,be=Qt.indentSize,Ue=Ir||Ae,rt=fe||"children",et=B.useMemo(function(){return Ur?"row":Qe.expandable&&ut===yt&&Qe.expandable.__PARENT_RENDER_ICON__||Pe.some(function(Zr){return Zr&&Object(j.a)(Zr)==="object"&&Zr[rt]})?"nest":!1},[!!Ur,Pe]),Dt=B.useState(function(){return wr||(Kt?ne(Pe,Rt,rt):[])}),ee=Object(D.a)(Dt,2),U=ee[0],N=ee[1],$=B.useMemo(function(){return new Set(Fr||U||[])},[Fr,U]),le=B.useCallback(function(Zr){var Hr=Rt(Zr,Pe.indexOf(Zr)),Yr,Ai=$.has(Hr);Ai?($.delete(Hr),Yr=Object(O.a)($)):Yr=[].concat(Object(O.a)($),[Hr]),N(Yr),Kr&&Kr(!Ai,Zr),Rr&&Rr(Yr)},[Rt,$,Pe,Kr,Rr]),te=B.useState(0),Ke=Object(D.a)(te,2),Ct=Ke[0],Ut=Ke[1],Ht=Object(we.b)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},Qe),Qt),{},{expandable:!!Ur,expandedKeys:$,getRowKey:Rt,onTriggerExpand:le,expandIcon:Ue,expandIconColumnIndex:pn,direction:ye}),ut===yt?nt:null),wt=Object(D.a)(Ht,2),Yt=wt[0],Xt=wt[1],qt=B.useMemo(function(){return{columns:Yt,flattenColumns:Xt}},[Yt,Xt]),Ar=B.useRef(),Br=B.useRef(),yr=B.useRef(),Lr=B.useState(!1),cr=Object(D.a)(Lr,2),Dr=cr[0],Pr=cr[1],An=B.useState(!1),zr=Object(D.a)(An,2),Jr=zr[0],bn=zr[1],$r=Se(new Map),en=Object(D.a)($r,2),an=en[0],cn=en[1],mn=Object(w.a)(Xt),br=mn.map(function(Zr){return an.get(Zr)}),dr=B.useMemo(function(){return br},[br.join("_")]),tr=bt(dr,Xt.length,ye),nr=Me&&Object(w.d)(Me.y),$t=Me&&Object(w.d)(Me.x),vr=$t&&Xt.some(function(Zr){var Hr=Zr.fixed;return Hr}),mr=B.useRef(),xr=ke(Ce,lt),Er=xr.isSticky,On=xr.offsetHeader,Gr=xr.offsetScroll,En=xr.stickyClassName,Qn,wn,qr;nr&&(wn={overflowY:"scroll",maxHeight:Me.y}),$t&&(Qn={overflowX:"auto"},nr||(wn={overflowY:"hidden"}),qr={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var Ln=B.useCallback(function(Zr,Hr){cn(function(Yr){var Ai=new Map(Yr);return Ai.set(Zr,Hr),Ai})},[]),In=Te(null),Jn=Object(D.a)(In,2),Fn=Jn[0],si=Jn[1];function Un(Zr,Hr){if(!Hr)return;typeof Hr=="function"?Hr(Zr):Hr.scrollLeft!==Zr&&(Hr.scrollLeft=Zr)}var gn=function(Hr){var Yr=Hr.currentTarget,Ai=Hr.scrollLeft,Gi=typeof Ai=="number"?Ai:Yr.scrollLeft,Vi=Yr||ft;if(!si()||si()===Vi){var Ja;Fn(Vi),Un(Gi,Br.current),Un(Gi,yr.current),Un(Gi,(Ja=mr.current)===null||Ja===void 0?void 0:Ja.setScrollLeft)}if(Yr){var Ro=Yr.scrollWidth,hs=Yr.clientWidth;Pr(Gi>0),bn(Gi * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License */(function(q,Q){qe.exports=Q()})(this,function(){"use strict";/*! ***************************************************************************** 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 q=function(H,k){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,K){W.__proto__=K}||function(W,K){for(var oe in K)Object.prototype.hasOwnProperty.call(K,oe)&&(W[oe]=K[oe])},q(H,k)};function Q(H,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");q(H,k);function W(){this.constructor=H}H.prototype=k===null?Object.create(k):(W.prototype=k.prototype,new W)}var O=function(){return O=Object.assign||function(k){for(var W,K=1,oe=arguments.length;K0&&he[he.length-1])&&(ot[0]===6||ot[0]===2)){W=0;continue}if(ot[0]===3&&(!he||ot[1]>he[0]&&ot[1]=55296&&oe<=56319&&W>10)+55296,Be%1024+56320)),(oe+1===W||K.length>16384)&&(he+=String.fromCharCode.apply(String,K),K.length=0)}return he},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o>4,vt[oe++]=(Be&15)<<4|Ge>>2,vt[oe++]=(Ge&3)<<6|We&63;return ot},a=function(H){for(var k=H.length,W=[],K=0;K>w,h=1<>w,f=b+l,C=f,g=2048>>6,m=C+g,F=65536>>S,P=1<=0){if(k<55296||k>56319&&k<=65535)return W=this.index[k>>w],W=(W<>w)],W=(W<>S),W=this.index[W],W+=k>>w&z,W=this.index[W],W=(W<ge?(oe.push(!0),Ge-=ge):oe.push(!1),["normal","auto","loose"].indexOf(k)!==-1&&[8208,8211,12316,12448].indexOf(he)!==-1)return K.push(Be),W.push(xe);if(Ge===Se||Ge===at){if(Be===0)return K.push(Be),W.push(st);var We=W[Be-1];return _t.indexOf(We)===-1?(K.push(K[Be-1]),W.push(We)):(K.push(Be),W.push(st))}if(K.push(Be),Ge===je)return W.push(k==="strict"?yt:Oe);if(Ge===kt)return W.push(st);if(Ge===Ye)return W.push(st);if(Ge===It)return he>=131072&&he<=196605||he>=196608&&he<=262141?W.push(Oe):W.push(st);W.push(Ge)}),[K,W,oe]},Rt=function(H,k,W,K){var oe=K[W];if(Array.isArray(H)?H.indexOf(oe)!==-1:H===oe)for(var he=W;he<=K.length;){he++;var Be=K[he];if(Be===k)return!0;if(Be!==ze)break}if(oe===ze)for(var he=W;he>0;){he--;var Ge=K[he];if(Array.isArray(H)?H.indexOf(Ge)!==-1:H===Ge)for(var We=W;We<=K.length;){We++;var Be=K[We];if(Be===k)return!0;if(Be!==ze)break}if(Ge!==ze)break}return!1},Qt=function(H,k){for(var W=H;W>=0;){var K=k[W];if(K===ze)W--;else return K}return 0},Ir=function(H,k,W,K,oe){if(W[K]===0)return nt;var he=K-1;if(Array.isArray(oe)&&oe[he]===!0)return nt;var Be=he-1,Ge=he+1,We=k[he],ot=Be>=0?k[Be]:0,vt=k[Ge];if(We===Re&&vt===He)return nt;if(pt.indexOf(We)!==-1)return ut;if(pt.indexOf(vt)!==-1)return nt;if(it.indexOf(vt)!==-1)return nt;if(Qt(he,k)===bt)return tt;if(Ce.get(H[he])===at)return nt;if((We===Le||We===Me)&&Ce.get(H[Ge])===at)return nt;if(We===$e||vt===$e)return nt;if(We===Ie)return nt;if([ze,ne,ce].indexOf(We)===-1&&vt===Ie)return nt;if([Fe,ke,ct,Mt,dt].indexOf(vt)!==-1)return nt;if(Qt(he,k)===Et)return nt;if(Rt(Ot,Et,he,k))return nt;if(Rt([Fe,ke],yt,he,k))return nt;if(Rt(Ae,Ae,he,k))return nt;if(We===ze)return tt;if(We===Ot||vt===Ot)return nt;if(vt===xe||We===xe)return tt;if([ne,ce,yt].indexOf(vt)!==-1||We===ae)return nt;if(ot===Ee&&mt.indexOf(We)!==-1)return nt;if(We===dt&&vt===Ee)return nt;if(vt===ft)return nt;if(Pe.indexOf(vt)!==-1&&We===Qe||Pe.indexOf(We)!==-1&&vt===Qe)return nt;if(We===lt&&[Oe,Le,Me].indexOf(vt)!==-1||[Oe,Le,Me].indexOf(We)!==-1&&vt===Ne)return nt;if(Pe.indexOf(We)!==-1&&xt.indexOf(vt)!==-1||xt.indexOf(We)!==-1&&Pe.indexOf(vt)!==-1)return nt;if([lt,Ne].indexOf(We)!==-1&&(vt===Qe||[Et,ce].indexOf(vt)!==-1&&k[Ge+1]===Qe)||[Et,ce].indexOf(We)!==-1&&vt===Qe||We===Qe&&[Qe,dt,Mt].indexOf(vt)!==-1)return nt;if([Qe,dt,Mt,Fe,ke].indexOf(vt)!==-1)for(var Bt=he;Bt>=0;){var Lt=k[Bt];if(Lt===Qe)return nt;if([dt,Mt].indexOf(Lt)!==-1)Bt--;else break}if([lt,Ne].indexOf(vt)!==-1)for(var Bt=[Fe,ke].indexOf(We)!==-1?Be:he;Bt>=0;){var Lt=k[Bt];if(Lt===Qe)return nt;if([dt,Mt].indexOf(Lt)!==-1)Bt--;else break}if(De===We&&[De,Ze,me,ye].indexOf(vt)!==-1||[Ze,me].indexOf(We)!==-1&&[Ze,ht].indexOf(vt)!==-1||[ht,ye].indexOf(We)!==-1&&vt===ht)return nt;if(Xe.indexOf(We)!==-1&&[ft,Ne].indexOf(vt)!==-1||Xe.indexOf(vt)!==-1&&We===lt)return nt;if(Pe.indexOf(We)!==-1&&Pe.indexOf(vt)!==-1)return nt;if(We===Mt&&Pe.indexOf(vt)!==-1)return nt;if(Pe.concat(Qe).indexOf(We)!==-1&&vt===Et&&St.indexOf(H[Ge])===-1||Pe.concat(Qe).indexOf(vt)!==-1&&We===ke)return nt;if(We===Tt&&vt===Tt){for(var sr=W[he],Wt=1;sr>0&&(sr--,k[sr]===Tt);)Wt++;if(Wt%2!==0)return nt}return We===Le&&vt===Me?nt:tt},Fr=function(H,k){k||(k={lineBreak:"normal",wordBreak:"normal"});var W=Pt(H,k.lineBreak),K=W[0],oe=W[1],he=W[2];(k.wordBreak==="break-all"||k.wordBreak==="break-word")&&(oe=oe.map(function(Ge){return[Qe,st,kt].indexOf(Ge)!==-1?Oe:Ge}));var Be=k.wordBreak==="keep-all"?he.map(function(Ge,We){return Ge&&H[We]>=19968&&H[We]<=40959}):void 0;return[K,oe,Be]},wr=function(){function H(k,W,K,oe){this.codePoints=k,this.required=W===ut,this.start=K,this.end=oe}return H.prototype.slice=function(){return n.apply(void 0,this.codePoints.slice(this.start,this.end))},H}(),Kt=function(H,k){var W=E(H),K=Fr(W,k),oe=K[0],he=K[1],Be=K[2],Ge=W.length,We=0,ot=0;return{next:function(){if(ot>=Ge)return{done:!0,value:null};for(var vt=nt;ot=nr&&H<=57},Ln=function(H){return H>=55296&&H<=57343},In=function(H){return qr(H)||H>=On&&H<=En||H>=$t&&H<=mr},Jn=function(H){return H>=$t&&H<=Er},Fn=function(H){return H>=On&&H<=wn},si=function(H){return Jn(H)||Fn(H)},Un=function(H){return H>=cr},gn=function(H){return H===Or||H===fe||H===be},kn=function(H){return si(H)||Un(H)||H===le},er=function(H){return kn(H)||qr(H)||H===te},hr=function(H){return H>=en&&H<=an||H===cn||H>=mn&&H<=br||H===dr},Jt=function(H,k){return H!==un?!1:k!==Or},gr=function(H,k,W){return H===te?kn(k)||Jt(k,W):kn(H)?!0:!!(H===un&&Jt(H,k))},Tr=function(H,k,W){return H===An||H===te?qr(k)?!0:k===$r&&qr(W):H===$r?qr(k):qr(H)},Xr=function(H){var k=0,W=1;(H[k]===An||H[k]===te)&&(H[k]===te&&(W=-1),k++);for(var K=[];qr(H[k]);)K.push(H[k++]);var oe=K.length?parseInt(n.apply(void 0,K),10):0;H[k]===$r&&k++;for(var he=[];qr(H[k]);)he.push(H[k++]);var Be=he.length,Ge=Be?parseInt(n.apply(void 0,he),10):0;(H[k]===Gr||H[k]===vr)&&k++;var We=1;(H[k]===An||H[k]===te)&&(H[k]===te&&(We=-1),k++);for(var ot=[];qr(H[k]);)ot.push(H[k++]);var vt=ot.length?parseInt(n.apply(void 0,ot),10):0;return W*(oe+Ge*Math.pow(10,-Be))*Math.pow(10,We*vt)},Cr={type:2},on={type:3},Dn={type:4},Mr={type:13},li={type:8},Nr={type:21},jn={type:9},Kn={type:10},ui={type:11},ds={type:12},Zr={type:14},Hr={type:23},Yr={type:1},Ai={type:25},Gi={type:24},Vi={type:26},Ja={type:27},Ro={type:28},hs={type:29},fs={type:31},Lo={type:32},nl=function(){function H(){this._value=[]}return H.prototype.write=function(k){this._value=this._value.concat(E(k))},H.prototype.read=function(){for(var k=[],W=this.consumeToken();W!==Lo;)k.push(W),W=this.consumeToken();return k},H.prototype.consumeToken=function(){var k=this.consumeCodePoint();switch(k){case Ue:return this.consumeStringToken(Ue);case et:var W=this.peekCodePoint(0),K=this.peekCodePoint(1),oe=this.peekCodePoint(2);if(er(W)||Jt(K,oe)){var he=gr(W,K,oe)?Kr:Ur,Be=this.consumeName();return{type:5,value:Be,flags:he}}break;case Dt:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),Mr;break;case U:return this.consumeStringToken(U);case N:return Cr;case $:return on;case Pr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),Zr;break;case An:if(Tr(k,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(k),this.consumeNumericToken();break;case zr:return Dn;case te:var Ge=k,We=this.peekCodePoint(0),ot=this.peekCodePoint(1);if(Tr(Ge,We,ot))return this.reconsumeCodePoint(k),this.consumeNumericToken();if(gr(Ge,We,ot))return this.reconsumeCodePoint(k),this.consumeIdentLikeToken();if(We===te&&ot===Ut)return this.consumeCodePoint(),this.consumeCodePoint(),Gi;break;case $r:if(Tr(k,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(k),this.consumeNumericToken();break;case pn:if(this.peekCodePoint(0)===Pr)for(this.consumeCodePoint();;){var vt=this.consumeCodePoint();if(vt===Pr&&(vt=this.consumeCodePoint(),vt===pn))return this.consumeToken();if(vt===tr)return this.consumeToken()}break;case Jr:return Vi;case bn:return Ja;case Ct:if(this.peekCodePoint(0)===Ke&&this.peekCodePoint(1)===te&&this.peekCodePoint(2)===te)return this.consumeCodePoint(),this.consumeCodePoint(),Ai;break;case Ht:var Bt=this.peekCodePoint(0),Lt=this.peekCodePoint(1),sr=this.peekCodePoint(2);if(gr(Bt,Lt,sr)){var Be=this.consumeName();return{type:7,value:Be}}break;case wt:return Ro;case un:if(Jt(k,this.peekCodePoint(0)))return this.reconsumeCodePoint(k),this.consumeIdentLikeToken();break;case Yt:return hs;case Xt:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),li;break;case qt:return ui;case Br:return ds;case xr:case Qn:var Wt=this.peekCodePoint(0),rr=this.peekCodePoint(1);return Wt===An&&(In(rr)||rr===Ar)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(k),this.consumeIdentLikeToken();case yr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),jn;if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),Nr;break;case Lr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),Kn;break;case tr:return Lo}return gn(k)?(this.consumeWhiteSpace(),fs):qr(k)?(this.reconsumeCodePoint(k),this.consumeNumericToken()):kn(k)?(this.reconsumeCodePoint(k),this.consumeIdentLikeToken()):{type:6,value:n(k)}},H.prototype.consumeCodePoint=function(){var k=this._value.shift();return typeof k=="undefined"?-1:k},H.prototype.reconsumeCodePoint=function(k){this._value.unshift(k)},H.prototype.peekCodePoint=function(k){return k>=this._value.length?-1:this._value[k]},H.prototype.consumeUnicodeRangeToken=function(){for(var k=[],W=this.consumeCodePoint();In(W)&&k.length<6;)k.push(W),W=this.consumeCodePoint();for(var K=!1;W===Ar&&k.length<6;)k.push(W),W=this.consumeCodePoint(),K=!0;if(K){var oe=parseInt(n.apply(void 0,k.map(function(We){return We===Ar?nr:We})),16),he=parseInt(n.apply(void 0,k.map(function(We){return We===Ar?En:We})),16);return{type:30,start:oe,end:he}}var Be=parseInt(n.apply(void 0,k),16);if(this.peekCodePoint(0)===te&&In(this.peekCodePoint(1))){this.consumeCodePoint(),W=this.consumeCodePoint();for(var Ge=[];In(W)&&Ge.length<6;)Ge.push(W),W=this.consumeCodePoint();var he=parseInt(n.apply(void 0,Ge),16);return{type:30,start:Be,end:he}}else return{type:30,start:Be,end:Be}},H.prototype.consumeIdentLikeToken=function(){var k=this.consumeName();return k.toLowerCase()==="url"&&this.peekCodePoint(0)===N?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===N?(this.consumeCodePoint(),{type:19,value:k}):{type:20,value:k}},H.prototype.consumeUrlToken=function(){var k=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===tr)return{type:22,value:""};var W=this.peekCodePoint(0);if(W===U||W===Ue){var K=this.consumeStringToken(this.consumeCodePoint());return K.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===tr||this.peekCodePoint(0)===$)?(this.consumeCodePoint(),{type:22,value:K.value}):(this.consumeBadUrlRemnants(),Hr)}for(;;){var oe=this.consumeCodePoint();if(oe===tr||oe===$)return{type:22,value:n.apply(void 0,k)};if(gn(oe))return this.consumeWhiteSpace(),this.peekCodePoint(0)===tr||this.peekCodePoint(0)===$?(this.consumeCodePoint(),{type:22,value:n.apply(void 0,k)}):(this.consumeBadUrlRemnants(),Hr);if(oe===Ue||oe===U||oe===N||hr(oe))return this.consumeBadUrlRemnants(),Hr;if(oe===un)if(Jt(oe,this.peekCodePoint(0)))k.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Hr;else k.push(oe)}},H.prototype.consumeWhiteSpace=function(){for(;gn(this.peekCodePoint(0));)this.consumeCodePoint()},H.prototype.consumeBadUrlRemnants=function(){for(;;){var k=this.consumeCodePoint();if(k===$||k===tr)return;Jt(k,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},H.prototype.consumeStringSlice=function(k){for(var W=5e4,K="";k>0;){var oe=Math.min(W,k);K+=n.apply(void 0,this._value.splice(0,oe)),k-=oe}return this._value.shift(),K},H.prototype.consumeStringToken=function(k){var W="",K=0;do{var oe=this._value[K];if(oe===tr||oe===void 0||oe===k)return W+=this.consumeStringSlice(K),{type:0,value:W};if(oe===Or)return this._value.splice(0,K),Yr;if(oe===un){var he=this._value[K+1];he!==tr&&he!==void 0&&(he===Or?(W+=this.consumeStringSlice(K),K=-1,this._value.shift()):Jt(oe,he)&&(W+=this.consumeStringSlice(K),W+=n(this.consumeEscapedCodePoint()),K=-1))}K++}while(!0)},H.prototype.consumeNumber=function(){var k=[],W=Rr,K=this.peekCodePoint(0);for((K===An||K===te)&&k.push(this.consumeCodePoint());qr(this.peekCodePoint(0));)k.push(this.consumeCodePoint());K=this.peekCodePoint(0);var oe=this.peekCodePoint(1);if(K===$r&&qr(oe))for(k.push(this.consumeCodePoint(),this.consumeCodePoint()),W=pr;qr(this.peekCodePoint(0));)k.push(this.consumeCodePoint());K=this.peekCodePoint(0),oe=this.peekCodePoint(1);var he=this.peekCodePoint(2);if((K===Gr||K===vr)&&((oe===An||oe===te)&&qr(he)||qr(oe)))for(k.push(this.consumeCodePoint(),this.consumeCodePoint()),W=pr;qr(this.peekCodePoint(0));)k.push(this.consumeCodePoint());return[Xr(k),W]},H.prototype.consumeNumericToken=function(){var k=this.consumeNumber(),W=k[0],K=k[1],oe=this.peekCodePoint(0),he=this.peekCodePoint(1),Be=this.peekCodePoint(2);if(gr(oe,he,Be)){var Ge=this.consumeName();return{type:15,number:W,flags:K,unit:Ge}}return oe===ee?(this.consumeCodePoint(),{type:16,number:W,flags:K}):{type:17,number:W,flags:K}},H.prototype.consumeEscapedCodePoint=function(){var k=this.consumeCodePoint();if(In(k)){for(var W=n(k);In(this.peekCodePoint(0))&&W.length<6;)W+=n(this.consumeCodePoint());gn(this.peekCodePoint(0))&&this.consumeCodePoint();var K=parseInt(W,16);return K===0||Ln(K)||K>1114111?Dr:K}return k===tr?Dr:k},H.prototype.consumeName=function(){for(var k="";;){var W=this.consumeCodePoint();if(er(W))k+=n(W);else if(Jt(W,this.peekCodePoint(0)))k+=n(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(W),k}},H}(),il=function(){function H(k){this._tokens=k}return H.create=function(k){var W=new nl;return W.write(k),new H(W.read())},H.parseValue=function(k){return H.create(k).parseComponentValue()},H.parseValues=function(k){return H.create(k).parseComponentValues()},H.prototype.parseComponentValue=function(){for(var k=this.consumeToken();k.type===31;)k=this.consumeToken();if(k.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(k);var W=this.consumeComponentValue();do k=this.consumeToken();while(k.type===31);if(k.type===32)return W;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},H.prototype.parseComponentValues=function(){for(var k=[];;){var W=this.consumeComponentValue();if(W.type===32)return k;k.push(W),k.push()}},H.prototype.consumeComponentValue=function(){var k=this.consumeToken();switch(k.type){case 11:case 28:case 2:return this.consumeSimpleBlock(k.type);case 19:return this.consumeFunction(k)}return k},H.prototype.consumeSimpleBlock=function(k){for(var W={type:k,values:[]},K=this.consumeToken();;){if(K.type===32||Ii(K,k))return W;this.reconsumeToken(K),W.values.push(this.consumeComponentValue()),K=this.consumeToken()}},H.prototype.consumeFunction=function(k){for(var W={name:k.value,values:[],type:18};;){var K=this.consumeToken();if(K.type===32||K.type===3)return W;this.reconsumeToken(K),W.values.push(this.consumeComponentValue())}},H.prototype.consumeToken=function(){var k=this._tokens.shift();return typeof k=="undefined"?Lo:k},H.prototype.reconsumeToken=function(k){this._tokens.unshift(k)},H}(),Ba=function(H){return H.type===15},ua=function(H){return H.type===17},vn=function(H){return H.type===20},Za=function(H){return H.type===0},Ci=function(H,k){return vn(H)&&H.value===k},$a=function(H){return H.type!==31},Xi=function(H){return H.type!==31&&H.type!==4},xi=function(H){var k=[],W=[];return H.forEach(function(K){if(K.type===4){if(W.length===0)throw new Error("Error parsing function args, zero tokens for arg");k.push(W),W=[];return}K.type!==31&&W.push(K)}),W.length&&k.push(W),k},Ii=function(H,k){return k===11&&H.type===12||k===28&&H.type===29?!0:k===2&&H.type===3},ci=function(H){return H.type===17||H.type===15},Rn=function(H){return H.type===16||ci(H)},al=function(H){return H.length>1?[H[0],H[1]]:[H[0]]},Xn={type:17,number:0,flags:Rr},ps={type:16,number:50,flags:Rr},Ui={type:16,number:100,flags:Rr},Aa=function(H,k,W){var K=H[0],oe=H[1];return[nn(K,k),nn(typeof oe!="undefined"?oe:K,W)]},nn=function(H,k){if(H.type===16)return H.number/100*k;if(Ba(H))switch(H.unit){case"rem":case"em":return 16*H.number;case"px":default:return H.number}return H.number},Ti="deg",ms="grad",gs="rad",ol="turn",Do={name:"angle",parse:function(H,k){if(k.type===15)switch(k.unit){case Ti:return Math.PI*k.number/180;case ms:return Math.PI/200*k.number;case gs:return k.number;case ol:return Math.PI*2*k.number}throw new Error("Unsupported angle type")}},sl=function(H){return H.type===15&&(H.unit===Ti||H.unit===ms||H.unit===gs||H.unit===ol)},vs=function(H){var k=H.filter(vn).map(function(W){return W.value}).join(" ");switch(k){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Xn,Xn];case"to top":case"bottom":return fi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Xn,Ui];case"to right":case"left":return fi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ui,Ui];case"to bottom":case"top":return fi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ui,Xn];case"to left":case"right":return fi(270)}return 0},fi=function(H){return Math.PI*H/180},bi={name:"color",parse:function(H,k){if(k.type===18){var W=ll[k.name];if(typeof W=="undefined")throw new Error('Attempting to parse an unsupported color function "'+k.name+'"');return W(H,k.values)}if(k.type===5){if(k.value.length===3){var K=k.value.substring(0,1),oe=k.value.substring(1,2),he=k.value.substring(2,3);return Ri(parseInt(K+K,16),parseInt(oe+oe,16),parseInt(he+he,16),1)}if(k.value.length===4){var K=k.value.substring(0,1),oe=k.value.substring(1,2),he=k.value.substring(2,3),Be=k.value.substring(3,4);return Ri(parseInt(K+K,16),parseInt(oe+oe,16),parseInt(he+he,16),parseInt(Be+Be,16)/255)}if(k.value.length===6){var K=k.value.substring(0,2),oe=k.value.substring(2,4),he=k.value.substring(4,6);return Ri(parseInt(K,16),parseInt(oe,16),parseInt(he,16),1)}if(k.value.length===8){var K=k.value.substring(0,2),oe=k.value.substring(2,4),he=k.value.substring(4,6),Be=k.value.substring(6,8);return Ri(parseInt(K,16),parseInt(oe,16),parseInt(he,16),parseInt(Be,16)/255)}}if(k.type===20){var Ge=Si[k.value.toUpperCase()];if(typeof Ge!="undefined")return Ge}return Si.TRANSPARENT}},ki=function(H){return(255&H)===0},Wn=function(H){var k=255&H,W=255&H>>8,K=255&H>>16,oe=255&H>>24;return k<255?"rgba("+oe+","+K+","+W+","+k/255+")":"rgb("+oe+","+K+","+W+")"},Ri=function(H,k,W,K){return(H<<24|k<<16|W<<8|Math.round(K*255)<<0)>>>0},qa=function(H,k){if(H.type===17)return H.number;if(H.type===16){var W=k===3?1:255;return k===3?H.number/100*W:Math.round(H.number/100*W)}return 0},ys=function(H,k){var W=k.filter(Xi);if(W.length===3){var K=W.map(qa),oe=K[0],he=K[1],Be=K[2];return Ri(oe,he,Be,1)}if(W.length===4){var Ge=W.map(qa),oe=Ge[0],he=Ge[1],Be=Ge[2],We=Ge[3];return Ri(oe,he,Be,We)}return 0};function eo(H,k,W){return W<0&&(W+=1),W>=1&&(W-=1),W<1/6?(k-H)*W*6+H:W<1/2?k:W<2/3?(k-H)*6*(2/3-W)+H:H}var Ei=function(H,k){var W=k.filter(Xi),K=W[0],oe=W[1],he=W[2],Be=W[3],Ge=(K.type===17?fi(K.number):Do.parse(H,K))/(Math.PI*2),We=Rn(oe)?oe.number/100:0,ot=Rn(he)?he.number/100:0,vt=typeof Be!="undefined"&&Rn(Be)?nn(Be,1):1;if(We===0)return Ri(ot*255,ot*255,ot*255,1);var Bt=ot<=.5?ot*(We+1):ot+We-ot*We,Lt=ot*2-Bt,sr=eo(Lt,Bt,Ge+1/3),Wt=eo(Lt,Bt,Ge),rr=eo(Lt,Bt,Ge-1/3);return Ri(sr*255,Wt*255,rr*255,vt)},ll={hsl:Ei,hsla:Ei,rgb:ys,rgba:ys},ca=function(H,k){return bi.parse(H,il.create(k).parseComponentValue())},Si={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ul={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(H,k){return k.map(function(W){if(vn(W))switch(W.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Al={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oa=function(H,k){var W=bi.parse(H,k[0]),K=k[1];return K&&Rn(K)?{color:W,stop:K}:{color:W,stop:null}},cl=function(H,k){var W=H[0],K=H[H.length-1];W.stop===null&&(W.stop=Xn),K.stop===null&&(K.stop=Ui);for(var oe=[],he=0,Be=0;Behe?oe.push(We):oe.push(he),he=We}else oe.push(null)}for(var ot=null,Be=0;BeBe.optimumDistance)?{optimumCorner:Ge,optimumDistance:vt}:Be},{optimumDistance:oe?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Ia=function(H,k,W,K,oe){var he=0,Be=0;switch(H.size){case 0:H.shape===0?he=Be=Math.min(Math.abs(k),Math.abs(k-K),Math.abs(W),Math.abs(W-oe)):H.shape===1&&(he=Math.min(Math.abs(k),Math.abs(k-K)),Be=Math.min(Math.abs(W),Math.abs(W-oe)));break;case 2:if(H.shape===0)he=Be=Math.min(Zn(k,W),Zn(k,W-oe),Zn(k-K,W),Zn(k-K,W-oe));else if(H.shape===1){var Ge=Math.min(Math.abs(W),Math.abs(W-oe))/Math.min(Math.abs(k),Math.abs(k-K)),We=da(K,oe,k,W,!0),ot=We[0],vt=We[1];he=Zn(ot-k,(vt-W)/Ge),Be=Ge*he}break;case 1:H.shape===0?he=Be=Math.max(Math.abs(k),Math.abs(k-K),Math.abs(W),Math.abs(W-oe)):H.shape===1&&(he=Math.max(Math.abs(k),Math.abs(k-K)),Be=Math.max(Math.abs(W),Math.abs(W-oe)));break;case 3:if(H.shape===0)he=Be=Math.max(Zn(k,W),Zn(k,W-oe),Zn(k-K,W),Zn(k-K,W-oe));else if(H.shape===1){var Ge=Math.max(Math.abs(W),Math.abs(W-oe))/Math.max(Math.abs(k),Math.abs(k-K)),Bt=da(K,oe,k,W,!1),ot=Bt[0],vt=Bt[1];he=Zn(ot-k,(vt-W)/Ge),Be=Ge*he}break}return Array.isArray(H.size)&&(he=nn(H.size[0],K),Be=H.size.length===2?nn(H.size[1],oe):he),[he,Be]},bs=function(H,k){var W=fi(180),K=[];return xi(k).forEach(function(oe,he){if(he===0){var Be=oe[0];if(Be.type===20&&Be.value==="to"){W=vs(oe);return}else if(sl(Be)){W=Do.parse(H,Be);return}}var Ge=Oa(H,oe);K.push(Ge)}),{angle:W,stops:K,type:1}},Ra=function(H,k){var W=fi(180),K=[];return xi(k).forEach(function(oe,he){if(he===0){var Be=oe[0];if(Be.type===20&&["top","left","right","bottom"].indexOf(Be.value)!==-1){W=vs(oe);return}else if(sl(Be)){W=(Do.parse(H,Be)+fi(270))%fi(360);return}}var Ge=Oa(H,oe);K.push(Ge)}),{angle:W,stops:K,type:1}},dl=function(H,k){var W=fi(180),K=[],oe=1,he=0,Be=3,Ge=[];return xi(k).forEach(function(We,ot){var vt=We[0];if(ot===0){if(vn(vt)&&vt.value==="linear"){oe=1;return}else if(vn(vt)&&vt.value==="radial"){oe=2;return}}if(vt.type===18){if(vt.name==="from"){var Bt=bi.parse(H,vt.values[0]);K.push({stop:Xn,color:Bt})}else if(vt.name==="to"){var Bt=bi.parse(H,vt.values[0]);K.push({stop:Ui,color:Bt})}else if(vt.name==="color-stop"){var Lt=vt.values.filter(Xi);if(Lt.length===2){var Bt=bi.parse(H,Lt[1]),sr=Lt[0];ua(sr)&&K.push({stop:{type:16,number:sr.number*100,flags:sr.flags},color:Bt})}}}}),oe===1?{angle:(W+fi(180))%fi(360),stops:K,type:oe}:{size:Be,shape:he,stops:K,position:Ge,type:oe}},Mo="closest-side",Yi="farthest-side",Ji="closest-corner",ti="farthest-corner",Pi="circle",Ni="ellipse",to="cover",hl="contain",fl=function(H,k){var W=0,K=3,oe=[],he=[];return xi(k).forEach(function(Be,Ge){var We=!0;if(Ge===0){var ot=!1;We=Be.reduce(function(Bt,Lt){if(ot)if(vn(Lt))switch(Lt.value){case"center":return he.push(ps),Bt;case"top":case"left":return he.push(Xn),Bt;case"right":case"bottom":return he.push(Ui),Bt}else(Rn(Lt)||ci(Lt))&&he.push(Lt);else if(vn(Lt))switch(Lt.value){case Pi:return W=0,!1;case Ni:return W=1,!1;case"at":return ot=!0,!1;case Mo:return K=0,!1;case to:case Yi:return K=1,!1;case hl:case Ji:return K=2,!1;case ti:return K=3,!1}else if(ci(Lt)||Rn(Lt))return Array.isArray(K)||(K=[]),K.push(Lt),!1;return Bt},We)}if(We){var vt=Oa(H,Be);oe.push(vt)}}),{size:K,shape:W,stops:oe,position:he,type:2}},Zi=function(H,k){var W=0,K=3,oe=[],he=[];return xi(k).forEach(function(Be,Ge){var We=!0;if(Ge===0?We=Be.reduce(function(vt,Bt){if(vn(Bt))switch(Bt.value){case"center":return he.push(ps),!1;case"top":case"left":return he.push(Xn),!1;case"right":case"bottom":return he.push(Ui),!1}else if(Rn(Bt)||ci(Bt))return he.push(Bt),!1;return vt},We):Ge===1&&(We=Be.reduce(function(vt,Bt){if(vn(Bt))switch(Bt.value){case Pi:return W=0,!1;case Ni:return W=1,!1;case hl:case Mo:return K=0,!1;case Yi:return K=1,!1;case Ji:return K=2,!1;case to:case ti:return K=3,!1}else if(ci(Bt)||Rn(Bt))return Array.isArray(K)||(K=[]),K.push(Bt),!1;return vt},We)),We){var ot=Oa(H,Be);oe.push(ot)}}),{size:K,shape:W,stops:oe,position:he,type:2}},pl=function(H){return H.type===1},ml=function(H){return H.type===2},La={name:"image",parse:function(H,k){if(k.type===22){var W={url:k.value,type:0};return H.cache.addImage(k.value),W}if(k.type===18){var K=Fo[k.name];if(typeof K=="undefined")throw new Error('Attempting to parse an unsupported image function "'+k.name+'"');return K(H,k.values)}throw new Error("Unsupported image type "+k.type)}};function bu(H){return!(H.type===20&&H.value==="none")&&(H.type!==18||!!Fo[H.name])}var Fo={"linear-gradient":bs,"-moz-linear-gradient":Ra,"-ms-linear-gradient":Ra,"-o-linear-gradient":Ra,"-webkit-linear-gradient":Ra,"radial-gradient":fl,"-moz-radial-gradient":Zi,"-ms-radial-gradient":Zi,"-o-radial-gradient":Zi,"-webkit-radial-gradient":Zi,"-webkit-gradient":dl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(H,k){if(k.length===0)return[];var W=k[0];return W.type===20&&W.value==="none"?[]:k.filter(function(K){return Xi(K)&&bu(K)}).map(function(K){return La.parse(H,K)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(H,k){return k.map(function(W){if(vn(W))switch(W.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Es={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(H,k){return xi(k).map(function(W){return W.filter(Rn)}).map(al)}},Da={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(H,k){return xi(k).map(function(W){return W.filter(vn).map(function(K){return K.value}).join(" ")}).map(Uo)}},Uo=function(H){switch(H){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},ha;(function(H){H.AUTO="auto",H.CONTAIN="contain",H.COVER="cover"})(ha||(ha={}));var ko={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(H,k){return xi(k).map(function(W){return W.filter(Eu)})}},Eu=function(H){return vn(H)||Rn(H)},Po=function(H){return{name:"border-"+H+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},_u=Po("top"),_s=Po("right"),ws=Po("bottom"),Ma=Po("left"),$i=function(H){return{name:"border-radius-"+H,initialValue:"0 0",prefix:!1,type:1,parse:function(k,W){return al(W.filter(Rn))}}},wu=$i("top-left"),No=$i("top-right"),yl=$i("bottom-right"),ro=$i("bottom-left"),no=function(H){return{name:"border-"+H+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(k,W){switch(W){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},fa=no("top"),io=no("right"),pa=no("bottom"),ao=no("left"),Hi=function(H){return{name:"border-"+H+"-width",initialValue:"0",type:0,prefix:!1,parse:function(k,W){return Ba(W)?W.number:0}}},bl=Hi("top"),El=Hi("right"),_l=Hi("bottom"),Cu=Hi("left"),ma={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ga={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(H,k){switch(k){case"rtl":return 1;case"ltr":default:return 0}}},xu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(H,k){return k.filter(vn).reduce(function(W,K){return W|Tu(K.value)},0)}},Tu=function(H){switch(H){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Su={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(H,k){switch(k){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Bu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(H,k){return k.type===20&&k.value==="normal"?0:k.type===17||k.type===15?k.number:0}},Ho;(function(H){H.NORMAL="normal",H.STRICT="strict"})(Ho||(Ho={}));var Ou={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(H,k){switch(k){case"strict":return Ho.STRICT;case"normal":default:return Ho.NORMAL}}},di={name:"line-height",initialValue:"normal",prefix:!1,type:4},Pn=function(H,k){return vn(H)&&H.value==="normal"?1.2*k:H.type===17?k*H.number:Rn(H)?nn(H,k):k},ri={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(H,k){return k.type===20&&k.value==="none"?null:La.parse(H,k)}},zn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(H,k){switch(k){case"inside":return 0;case"outside":default:return 1}}},va={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(H,k){switch(k){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Qo=function(H){return{name:"margin-"+H,initialValue:"0",prefix:!1,type:4}},jo=Qo("top"),Iu=Qo("right"),Ru=Qo("bottom"),Lu=Qo("left"),Cs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(H,k){return k.filter(vn).map(function(W){switch(W.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},wl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(H,k){switch(k){case"break-word":return"break-word";case"normal":default:return"normal"}}},Fa=function(H){return{name:"padding-"+H,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Du=Fa("top"),xs=Fa("right"),Ts=Fa("bottom"),Cl=Fa("left"),xl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(H,k){switch(k){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ss={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(H,k){switch(k){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Tl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(H,k){return k.length===1&&Ci(k[0],"none")?[]:xi(k).map(function(W){for(var K={color:Si.TRANSPARENT,offsetX:Xn,offsetY:Xn,blur:Xn},oe=0,he=0;he1?1:0],this.overflowWrap=ar(k,wl,W.overflowWrap),this.paddingTop=ar(k,Du,W.paddingTop),this.paddingRight=ar(k,xs,W.paddingRight),this.paddingBottom=ar(k,Ts,W.paddingBottom),this.paddingLeft=ar(k,Cl,W.paddingLeft),this.paintOrder=ar(k,ku,W.paintOrder),this.position=ar(k,Ss,W.position),this.textAlign=ar(k,xl,W.textAlign),this.textDecorationColor=ar(k,Il,(K=W.textDecorationColor)!==null&&K!==void 0?K:W.color),this.textDecorationLine=ar(k,Fu,(oe=W.textDecorationLine)!==null&&oe!==void 0?oe:W.textDecoration),this.textShadow=ar(k,Tl,W.textShadow),this.textTransform=ar(k,oo,W.textTransform),this.transform=ar(k,Mu,W.transform),this.transformOrigin=ar(k,mi,W.transformOrigin),this.visibility=ar(k,tn,W.visibility),this.webkitTextStrokeColor=ar(k,Pu,W.webkitTextStrokeColor),this.webkitTextStrokeWidth=ar(k,zo,W.webkitTextStrokeWidth),this.wordBreak=ar(k,qi,W.wordBreak),this.zIndex=ar(k,ea,W.zIndex)}return H.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},H.prototype.isTransparent=function(){return ki(this.backgroundColor)},H.prototype.isTransformed=function(){return this.transform!==null},H.prototype.isPositioned=function(){return this.position!==0},H.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},H.prototype.isFloating=function(){return this.float!==0},H.prototype.isInlineLevel=function(){return Nn(this.display,4)||Nn(this.display,33554432)||Nn(this.display,268435456)||Nn(this.display,536870912)||Nn(this.display,67108864)||Nn(this.display,134217728)},H}(),Nu=function(){function H(k,W){this.content=ar(k,Ll,W.content),this.quotes=ar(k,Dl,W.quotes)}return H}(),kl=function(){function H(k,W){this.counterIncrement=ar(k,Uu,W.counterIncrement),this.counterReset=ar(k,Wo,W.counterReset)}return H}(),ar=function(H,k,W){var K=new nl,oe=W!==null&&typeof W!="undefined"?W.toString():k.initialValue;K.write(oe);var he=new il(K.read());switch(k.type){case 2:var Be=he.parseComponentValue();return k.parse(H,vn(Be)?Be.value:k.initialValue);case 0:return k.parse(H,he.parseComponentValue());case 1:return k.parse(H,he.parseComponentValues());case 4:return he.parseComponentValue();case 3:switch(k.format){case"angle":return Do.parse(H,he.parseComponentValue());case"color":return bi.parse(H,he.parseComponentValue());case"image":return La.parse(H,he.parseComponentValue());case"length":var Ge=he.parseComponentValue();return ci(Ge)?Ge:Xn;case"length-percentage":var We=he.parseComponentValue();return Rn(We)?We:Xn;case"time":return Bs.parse(H,he.parseComponentValue())}break}},Ua="data-html2canvas-debug",Ds=function(H){var k=H.getAttribute(Ua);switch(k){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ka=function(H,k){var W=Ds(H);return W===1||k===W},Bi=function(){function H(k,W){if(this.context=k,this.textNodes=[],this.elements=[],this.flags=0,ka(W,3))debugger;this.styles=new Ul(k,window.getComputedStyle(W,null)),as(W)&&(this.styles.animationDuration.some(function(K){return K>0})&&(W.style.animationDuration="0s"),this.styles.transform!==null&&(W.style.transform="none")),this.bounds=v(this.context,W),ka(W,4)&&(this.flags|=16)}return H}(),Ms="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),uo=0;uo>4,vt[oe++]=(Be&15)<<4|Ge>>2,vt[oe++]=(Ge&3)<<6|We&63;return ot},Go=function(H){for(var k=H.length,W=[],K=0;K>ra,Nl=1<>ra,Hl=Us+Pa,Jo=Hl,Ql=2048>>6,Ao=Jo+Ql,Hu=65536>>Vo,Na=1<=0){if(k<55296||k>56319&&k<=65535)return W=this.index[k>>ra],W=(W<>ra)],W=(W<>Vo),W=this.index[W],W+=k>>ra&jl,W=this.index[W],W=(W<=55296&&oe<=56319&&W>10)+55296,Be%1024+56320)),(oe+1===W||K.length>16384)&&(he+=String.fromCharCode.apply(String,K),K.length=0)}return he},Vl=co(Ms),gi="\xD7",Ks="\xF7",Wu=function(H){return Vl.get(H)},zu=function(H,k,W){var K=W-2,oe=k[K],he=k[W-1],Be=k[W];if(he===Zo&&Be===Li)return gi;if(he===Zo||he===Li||he===ya)return Ks;if(Be===Zo||Be===Li||Be===ya)return Ks;if(he===Ps&&[Ps,Ns,Wl,ni].indexOf(Be)!==-1)return gi;if((he===Wl||he===Ns)&&(Be===Ns||Be===Hs))return gi;if((he===ni||he===Hs)&&Be===Hs)return gi;if(Be===Qs||Be===Qa)return gi;if(Be===ju)return gi;if(he===Qu)return gi;if(he===Qs&&Be===zl){for(;oe===Qa;)oe=k[--K];if(oe===zl)return gi}if(he===js&&Be===js){for(var Ge=0;oe===js;)Ge++,oe=k[--K];if(Ge%2===0)return gi}return Ks},ia=function(H){var k=Ku(H),W=k.length,K=0,oe=0,he=k.map(Wu);return{next:function(){if(K>=W)return{done:!0,value:null};for(var Be=gi;KBe.x||vt.y>Be.y;return Be=vt,ot===0?!0:Bt});return H.body.removeChild(k),Ge},Qi=function(){return typeof new Image().crossOrigin!="undefined"},Gu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(H){var k=new Image,W=H.createElement("canvas"),K=W.getContext("2d");if(!K)return!1;k.src="data:image/svg+xml,";try{K.drawImage(k,0,0),W.toDataURL()}catch(oe){return!1}return!0},ba=function(H){return H[0]===0&&H[1]===255&&H[2]===0&&H[3]===255},Xl=function(H){var k=H.createElement("canvas"),W=100;k.width=W,k.height=W;var K=k.getContext("2d");if(!K)return Promise.reject(!1);K.fillStyle="rgb(0, 255, 0)",K.fillRect(0,0,W,W);var oe=new Image,he=k.toDataURL();oe.src=he;var Be=qo(W,W,0,0,oe);return K.fillStyle="red",K.fillRect(0,0,W,W),Ws(Be).then(function(Ge){K.drawImage(Ge,0,0);var We=K.getImageData(0,0,W,W).data;K.fillStyle="red",K.fillRect(0,0,W,W);var ot=H.createElement("div");return ot.style.backgroundImage="url("+he+")",ot.style.height=W+"px",ba(We)?Ws(qo(W,W,0,0,ot)):Promise.reject(!1)}).then(function(Ge){return K.drawImage(Ge,0,0),ba(K.getImageData(0,0,W,W).data)}).catch(function(){return!1})},qo=function(H,k,W,K,oe){var he="http://www.w3.org/2000/svg",Be=document.createElementNS(he,"svg"),Ge=document.createElementNS(he,"foreignObject");return Be.setAttributeNS(null,"width",H.toString()),Be.setAttributeNS(null,"height",k.toString()),Ge.setAttributeNS(null,"width","100%"),Ge.setAttributeNS(null,"height","100%"),Ge.setAttributeNS(null,"x",W.toString()),Ge.setAttributeNS(null,"y",K.toString()),Ge.setAttributeNS(null,"externalResourcesRequired","true"),Be.appendChild(Ge),Ge.appendChild(oe),Be},Ws=function(H){return new Promise(function(k,W){var K=new Image;K.onload=function(){return k(K)},K.onerror=W,K.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(H))})},Hn={get SUPPORT_RANGE_BOUNDS(){var H=$o(document);return Object.defineProperty(Hn,"SUPPORT_RANGE_BOUNDS",{value:H}),H},get SUPPORT_WORD_BREAKING(){var H=Hn.SUPPORT_RANGE_BOUNDS&&go(document);return Object.defineProperty(Hn,"SUPPORT_WORD_BREAKING",{value:H}),H},get SUPPORT_SVG_DRAWING(){var H=Vu(document);return Object.defineProperty(Hn,"SUPPORT_SVG_DRAWING",{value:H}),H},get SUPPORT_FOREIGNOBJECT_DRAWING(){var H=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(Hn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:H}),H},get SUPPORT_CORS_IMAGES(){var H=Qi();return Object.defineProperty(Hn,"SUPPORT_CORS_IMAGES",{value:H}),H},get SUPPORT_RESPONSE_TYPE(){var H=Gu();return Object.defineProperty(Hn,"SUPPORT_RESPONSE_TYPE",{value:H}),H},get SUPPORT_CORS_XHR(){var H="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Hn,"SUPPORT_CORS_XHR",{value:H}),H},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var H=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Hn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:H}),H}},Di=function(){function H(k,W){this.text=k,this.bounds=W}return H}(),zs=function(H,k,W,K){var oe=Yl(k,W),he=[],Be=0;return oe.forEach(function(Ge){if(W.textDecorationLine.length||Ge.trim().length>0)if(Hn.SUPPORT_RANGE_BOUNDS){var We=es(K,Be,Ge.length).getClientRects();if(We.length>1){var ot=Vs(Ge),vt=0;ot.forEach(function(Lt){he.push(new Di(Lt,I.fromDOMRectList(H,es(K,vt+Be,Lt.length).getClientRects()))),vt+=Lt.length})}else he.push(new Di(Ge,I.fromDOMRectList(H,We)))}else{var Bt=K.splitText(Ge.length);he.push(new Di(Ge,Gs(H,K))),K=Bt}else Hn.SUPPORT_RANGE_BOUNDS||(K=K.splitText(Ge.length));Be+=Ge.length}),he},Gs=function(H,k){var W=k.ownerDocument;if(W){var K=W.createElement("html2canvaswrapper");K.appendChild(k.cloneNode(!0));var oe=k.parentNode;if(oe){oe.replaceChild(K,k);var he=v(H,K);return K.firstChild&&oe.replaceChild(K.firstChild,K),he}}return I.EMPTY},es=function(H,k,W){var K=H.ownerDocument;if(!K)throw new Error("Node has no owner document");var oe=K.createRange();return oe.setStart(H,k),oe.setEnd(H,k+W),oe},Vs=function(H){if(Hn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var k=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(k.segment(H)).map(function(W){return W.segment})}return mo(H)},vo=function(H,k){if(Hn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var W=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(W.segment(H)).map(function(K){return K.segment})}return Jl(H,k)},Yl=function(H,k){return k.letterSpacing!==0?Vs(H):vo(H,k)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(H,k){for(var W=Kt(H,{lineBreak:k.lineBreak,wordBreak:k.overflowWrap==="break-word"?"break-word":k.wordBreak}),K=[],oe,he=function(){if(oe.value){var Be=oe.value.slice(),Ge=E(Be),We="";Ge.forEach(function(ot){Xu.indexOf(ot)===-1?We+=n(ot):(We.length&&K.push(We),K.push(n(ot)),We="")}),We.length&&K.push(We)}};!(oe=W.next()).done;)he();return K},ts=function(){function H(k,W,K){this.text=Yu(W.data,K.textTransform),this.textBounds=zs(k,this.text,K,W)}return H}(),Yu=function(H,k){switch(k){case 1:return H.toLowerCase();case 3:return H.replace(Ju,yo);case 2:return H.toUpperCase();default:return H}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,yo=function(H,k,W){return H.length>0?k+W.toUpperCase():H},Xs=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe.src=K.currentSrc||K.src,oe.intrinsicWidth=K.naturalWidth,oe.intrinsicHeight=K.naturalHeight,oe.context.cache.addImage(oe.src),oe}return k}(Bi),Ys=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe.canvas=K,oe.intrinsicWidth=K.width,oe.intrinsicHeight=K.height,oe}return k}(Bi),Zl=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this,he=new XMLSerializer,Be=v(W,K);return K.setAttribute("width",Be.width+"px"),K.setAttribute("height",Be.height+"px"),oe.svg="data:image/svg+xml,"+encodeURIComponent(he.serializeToString(K)),oe.intrinsicWidth=K.width.baseVal.value,oe.intrinsicHeight=K.height.baseVal.value,oe.context.cache.addImage(oe.svg),oe}return k}(Bi),rs=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe.value=K.value,oe}return k}(Bi),ns=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe.start=K.start,oe.reversed=typeof K.reversed=="boolean"&&K.reversed===!0,oe}return k}(Bi),Zu=[{type:15,flags:0,unit:"px",number:3}],$l=[{type:16,flags:0,number:50}],ql=function(H){return H.width>H.height?new I(H.left+(H.width-H.height)/2,H.top,H.height,H.height):H.width0)W.textNodes.push(new ts(H,oe,W.styles));else if(Ka(oe))if(qs(oe)&&oe.assignedNodes)oe.assignedNodes().forEach(function(Ge){return Eo(H,Ge,W,K)});else{var Be=iu(H,oe);Be.styles.isVisible()&&(ou(oe,Be,K)?Be.flags|=4:Js(Be.styles)&&(Be.flags|=2),qu.indexOf(oe.tagName)!==-1&&(Be.flags|=8),W.elements.push(Be),oe.slot,oe.shadowRoot?Eo(H,oe.shadowRoot,Be,K):!wo(oe)&&!lu(oe)&&!Co(oe)&&Eo(H,oe,Be,K))}},iu=function(H,k){return Ea(k)?new Xs(H,k):uu(k)?new Ys(H,k):lu(k)?new Zl(H,k):su(k)?new rs(H,k):os(k)?new ns(H,k):eA(k)?new is(H,k):Co(k)?new tu(H,k):wo(k)?new ru(H,k):_i(k)?new nu(H,k):new Bi(H,k)},au=function(H,k){var W=iu(H,k);return W.flags|=4,Eo(H,k,W,W),W},ou=function(H,k,W){return k.styles.isPositionedWithZIndex()||k.styles.opacity<1||k.styles.isTransformed()||_n(H)&&W.styles.isTransparent()},Js=function(H){return H.isPositioned()||H.isFloating()},Zs=function(H){return H.nodeType===Node.TEXT_NODE},Ka=function(H){return H.nodeType===Node.ELEMENT_NODE},as=function(H){return Ka(H)&&typeof H.style!="undefined"&&!ji(H)},ji=function(H){return typeof H.className=="object"},su=function(H){return H.tagName==="LI"},os=function(H){return H.tagName==="OL"},eA=function(H){return H.tagName==="INPUT"},tA=function(H){return H.tagName==="HTML"},lu=function(H){return H.tagName==="svg"},_n=function(H){return H.tagName==="BODY"},uu=function(H){return H.tagName==="CANVAS"},ss=function(H){return H.tagName==="VIDEO"},Ea=function(H){return H.tagName==="IMG"},_i=function(H){return H.tagName==="IFRAME"},_o=function(H){return H.tagName==="STYLE"},$s=function(H){return H.tagName==="SCRIPT"},wo=function(H){return H.tagName==="TEXTAREA"},Co=function(H){return H.tagName==="SELECT"},qs=function(H){return H.tagName==="SLOT"},el=function(H){return H.tagName.indexOf("-")>0},Au=function(){function H(){this.counters={}}return H.prototype.getCounterValue=function(k){var W=this.counters[k];return W&&W.length?W[W.length-1]:1},H.prototype.getCounterValues=function(k){var W=this.counters[k];return W||[]},H.prototype.pop=function(k){var W=this;k.forEach(function(K){return W.counters[K].pop()})},H.prototype.parse=function(k){var W=this,K=k.counterIncrement,oe=k.counterReset,he=!0;K!==null&&K.forEach(function(Ge){var We=W.counters[Ge.counter];We&&Ge.increment!==0&&(he=!1,We.length||We.push(1),We[Math.max(0,We.length-1)]+=Ge.increment)});var Be=[];return he&&oe.forEach(function(Ge){var We=W.counters[Ge.counter];Be.push(Ge.counter),We||(We=W.counters[Ge.counter]=[]),We.push(Ge.reset)}),Be},H}(),cu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},ls={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},du={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},sn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},_a=function(H,k,W,K,oe,he){return HW?_(H,oe,he.length>0):K.integers.reduce(function(Be,Ge,We){for(;H>=Ge;)H-=Ge,Be+=K.values[We];return Be},"")+he},hu=function(H,k,W,K){var oe="";do W||H--,oe=K(H)+oe,H/=k;while(H*k>=k);return oe},Cn=function(H,k,W,K,oe){var he=W-k+1;return(H<0?"-":"")+(hu(Math.abs(H),he,K,function(Be){return n(Math.floor(Be%he)+k)})+oe)},wa=function(H,k,W){W===void 0&&(W=". ");var K=k.length;return hu(Math.abs(H),K,!1,function(oe){return k[Math.floor(oe%K)]})+W},Ki=1<<0,oa=1<<1,dn=1<<2,xo=1<<3,Wi=function(H,k,W,K,oe,he){if(H<-9999||H>9999)return _(H,4,oe.length>0);var Be=Math.abs(H),Ge=oe;if(Be===0)return k[0]+Ge;for(var We=0;Be>0&&We<=4;We++){var ot=Be%10;ot===0&&Nn(he,Ki)&&Ge!==""?Ge=k[ot]+Ge:ot>1||ot===1&&We===0||ot===1&&We===1&&Nn(he,oa)||ot===1&&We===1&&Nn(he,dn)&&H>100||ot===1&&We>1&&Nn(he,xo)?Ge=k[ot]+(We>0?W[We-1]:"")+Ge:ot===1&&We>0&&(Ge=W[We-1]+Ge),Be=Math.floor(Be/10)}return(H<0?K:"")+Ge},fu="\u5341\u767E\u5343\u842C",To="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",t="\uB9C8\uC774\uB108\uC2A4",_=function(H,k,W){var K=W?". ":"",oe=W?"\u3001":"",he=W?", ":"",Be=W?" ":"";switch(k){case 0:return"\u2022"+Be;case 1:return"\u25E6"+Be;case 2:return"\u25FE"+Be;case 5:var Ge=Cn(H,48,57,!0,K);return Ge.length<4?"0"+Ge:Ge;case 4:return wa(H,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",oe);case 6:return _a(H,1,3999,cu,3,K).toLowerCase();case 7:return _a(H,1,3999,cu,3,K);case 8:return Cn(H,945,969,!1,K);case 9:return Cn(H,97,122,!1,K);case 10:return Cn(H,65,90,!1,K);case 11:return Cn(H,1632,1641,!0,K);case 12:case 49:return _a(H,1,9999,ls,3,K);case 35:return _a(H,1,9999,ls,3,K).toLowerCase();case 13:return Cn(H,2534,2543,!0,K);case 14:case 30:return Cn(H,6112,6121,!0,K);case 15:return wa(H,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",oe);case 16:return wa(H,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",oe);case 17:case 48:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",oe,oa|dn|xo);case 47:return Wi(H,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",To,"\u8CA0",oe,Ki|oa|dn|xo);case 42:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",oe,oa|dn|xo);case 41:return Wi(H,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",To,"\u8D1F",oe,Ki|oa|dn|xo);case 26:return Wi(H,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,oe,0);case 25:return Wi(H,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,oe,Ki|oa|dn);case 31:return Wi(H,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",t,he,Ki|oa|dn);case 33:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",t,he,0);case 32:return Wi(H,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",t,he,Ki|oa|dn);case 18:return Cn(H,2406,2415,!0,K);case 20:return _a(H,1,19999,sn,3,K);case 21:return Cn(H,2790,2799,!0,K);case 22:return Cn(H,2662,2671,!0,K);case 22:return _a(H,1,10999,du,3,K);case 23:return wa(H,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return wa(H,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Cn(H,3302,3311,!0,K);case 28:return wa(H,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",oe);case 29:return wa(H,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",oe);case 34:return Cn(H,3792,3801,!0,K);case 37:return Cn(H,6160,6169,!0,K);case 38:return Cn(H,4160,4169,!0,K);case 39:return Cn(H,2918,2927,!0,K);case 40:return Cn(H,1776,1785,!0,K);case 43:return Cn(H,3046,3055,!0,K);case 44:return Cn(H,3174,3183,!0,K);case 45:return Cn(H,3664,3673,!0,K);case 46:return Cn(H,3872,3881,!0,K);case 3:default:return Cn(H,48,57,!0,K)}},y="data-html2canvas-ignore",R=function(){function H(k,W,K){if(this.context=k,this.options=K,this.scrolledElements=[],this.referenceElement=W,this.counters=new Au,this.quoteDepth=0,!W.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(W.ownerDocument.documentElement,!1)}return H.prototype.toIFrame=function(k,W){var K=this,oe=ie(k,W);if(!oe.contentWindow)return Promise.reject("Unable to find iframe window");var he=k.defaultView.pageXOffset,Be=k.defaultView.pageYOffset,Ge=oe.contentWindow,We=Ge.document,ot=ve(oe).then(function(){return j(K,void 0,void 0,function(){var vt,Bt;return D(this,function(Lt){switch(Lt.label){case 0:return this.scrolledElements.forEach(Ft),Ge&&(Ge.scrollTo(W.left,W.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ge.scrollY!==W.top||Ge.scrollX!==W.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ge.scrollX-W.left,Ge.scrollY-W.top,0,0))),vt=this.options.onclone,Bt=this.clonedReferenceElement,typeof Bt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:We.fonts&&We.fonts.ready?[4,We.fonts.ready]:[3,2];case 1:Lt.sent(),Lt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,de(We)]:[3,4];case 3:Lt.sent(),Lt.label=4;case 4:return typeof vt=="function"?[2,Promise.resolve().then(function(){return vt(We,Bt)}).then(function(){return oe})]:[2,oe]}})})});return We.open(),We.write(gt(document.doctype)+""),At(this.referenceElement.ownerDocument,he,Be),We.replaceChild(We.adoptNode(this.documentElement),We.documentElement),We.close(),ot},H.prototype.createElementClone=function(k){if(ka(k,2))debugger;if(uu(k))return this.createCanvasClone(k);if(ss(k))return this.createVideoClone(k);if(_o(k))return this.createStyleClone(k);var W=k.cloneNode(!1);return Ea(W)&&(Ea(k)&&k.currentSrc&&k.currentSrc!==k.src&&(W.src=k.currentSrc,W.srcset=""),W.loading==="lazy"&&(W.loading="eager")),el(W)?this.createCustomElementClone(W):W},H.prototype.createCustomElementClone=function(k){var W=document.createElement("html2canvascustomelement");return Je(k.style,W),W},H.prototype.createStyleClone=function(k){try{var W=k.sheet;if(W&&W.cssRules){var K=[].slice.call(W.cssRules,0).reduce(function(he,Be){return Be&&typeof Be.cssText=="string"?he+Be.cssText:he},""),oe=k.cloneNode(!1);return oe.textContent=K,oe}}catch(he){if(this.context.logger.error("Unable to access cssRules property",he),he.name!=="SecurityError")throw he}return k.cloneNode(!1)},H.prototype.createCanvasClone=function(k){var W;if(this.options.inlineImages&&k.ownerDocument){var K=k.ownerDocument.createElement("img");try{return K.src=k.toDataURL(),K}catch(ot){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",k)}}var oe=k.cloneNode(!1);try{oe.width=k.width,oe.height=k.height;var he=k.getContext("2d"),Be=oe.getContext("2d");if(Be)if(!this.options.allowTaint&&he)Be.putImageData(he.getImageData(0,0,k.width,k.height),0,0);else{var Ge=(W=k.getContext("webgl2"))!==null&&W!==void 0?W:k.getContext("webgl");if(Ge){var We=Ge.getContextAttributes();(We==null?void 0:We.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",k)}Be.drawImage(k,0,0)}return oe}catch(ot){this.context.logger.info("Unable to clone canvas as it is tainted",k)}return oe},H.prototype.createVideoClone=function(k){var W=k.ownerDocument.createElement("canvas");W.width=k.offsetWidth,W.height=k.offsetHeight;var K=W.getContext("2d");try{return K&&(K.drawImage(k,0,0,W.width,W.height),this.options.allowTaint||K.getImageData(0,0,W.width,W.height)),W}catch(he){this.context.logger.info("Unable to clone video as it is tainted",k)}var oe=k.ownerDocument.createElement("canvas");return oe.width=k.offsetWidth,oe.height=k.offsetHeight,oe},H.prototype.appendChildNode=function(k,W,K){(!Ka(W)||!$s(W)&&!W.hasAttribute(y)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(W)))&&((!this.options.copyStyles||!Ka(W)||!_o(W))&&k.appendChild(this.cloneNode(W,K)))},H.prototype.cloneChildNodes=function(k,W,K){for(var oe=this,he=k.shadowRoot?k.shadowRoot.firstChild:k.firstChild;he;he=he.nextSibling)if(Ka(he)&&qs(he)&&typeof he.assignedNodes=="function"){var Be=he.assignedNodes();Be.length&&Be.forEach(function(Ge){return oe.appendChildNode(W,Ge,K)})}else this.appendChildNode(W,he,K)},H.prototype.cloneNode=function(k,W){if(Zs(k))return document.createTextNode(k.data);if(!k.ownerDocument)return k.cloneNode(!1);var K=k.ownerDocument.defaultView;if(K&&Ka(k)&&(as(k)||ji(k))){var oe=this.createElementClone(k);oe.style.transitionProperty="none";var he=K.getComputedStyle(k),Be=K.getComputedStyle(k,":before"),Ge=K.getComputedStyle(k,":after");this.referenceElement===k&&as(oe)&&(this.clonedReferenceElement=oe),_n(oe)&&ir(oe);var We=this.counters.parse(new kl(this.context,he)),ot=this.resolvePseudoContent(k,oe,Be,Y.BEFORE);el(k)&&(W=!0),ss(k)||this.cloneChildNodes(k,oe,W),ot&&oe.insertBefore(ot,oe.firstChild);var vt=this.resolvePseudoContent(k,oe,Ge,Y.AFTER);return vt&&oe.appendChild(vt),this.counters.pop(We),(he&&(this.options.copyStyles||ji(k))&&!_i(k)||W)&&Je(he,oe),(k.scrollTop!==0||k.scrollLeft!==0)&&this.scrolledElements.push([oe,k.scrollLeft,k.scrollTop]),(wo(k)||Co(k))&&(wo(oe)||Co(oe))&&(oe.value=k.value),oe}return k.cloneNode(!1)},H.prototype.resolvePseudoContent=function(k,W,K,oe){var he=this;if(!K)return;var Be=K.content,Ge=W.ownerDocument;if(!Ge||!Be||Be==="none"||Be==="-moz-alt-content"||K.display==="none")return;this.counters.parse(new kl(this.context,K));var We=new Nu(this.context,K),ot=Ge.createElement("html2canvaspseudoelement");Je(K,ot),We.content.forEach(function(Bt){if(Bt.type===0)ot.appendChild(Ge.createTextNode(Bt.value));else if(Bt.type===22){var Lt=Ge.createElement("img");Lt.src=Bt.value,Lt.style.opacity="1",ot.appendChild(Lt)}else if(Bt.type===18){if(Bt.name==="attr"){var sr=Bt.values.filter(vn);sr.length&&ot.appendChild(Ge.createTextNode(k.getAttribute(sr[0].value)||""))}else if(Bt.name==="counter"){var Wt=Bt.values.filter(Xi),rr=Wt[0],Sr=Wt[1];if(rr&&vn(rr)){var or=he.counters.getCounterValue(rr.value),ur=Sr&&vn(Sr)?va.parse(he.context,Sr.value):3;ot.appendChild(Ge.createTextNode(_(or,ur,!1)))}}else if(Bt.name==="counters"){var rn=Bt.values.filter(Xi),rr=rn[0],Wr=rn[1],Sr=rn[2];if(rr&&vn(rr)){var hn=he.counters.getCounterValues(rr.value),lr=Sr&&vn(Sr)?va.parse(he.context,Sr.value):3,ln=Wr&&Wr.type===0?Wr.value:"",fn=hn.map(function(yi){return _(yi,lr,!1)}).join(ln);ot.appendChild(Ge.createTextNode(fn))}}}else if(Bt.type===20)switch(Bt.value){case"open-quote":ot.appendChild(Ge.createTextNode(Ml(We.quotes,he.quoteDepth++,!0)));break;case"close-quote":ot.appendChild(Ge.createTextNode(Ml(We.quotes,--he.quoteDepth,!1)));break;default:ot.appendChild(Ge.createTextNode(Bt.value))}}),ot.className=Gt+" "+Zt;var vt=oe===Y.BEFORE?" "+Gt:" "+Zt;return ji(W)?W.className.baseValue+=vt:W.className+=vt,ot},H.destroy=function(k){return k.parentNode?(k.parentNode.removeChild(k),!0):!1},H}(),Y;(function(H){H[H.BEFORE=0]="BEFORE",H[H.AFTER=1]="AFTER"})(Y||(Y={}));var ie=function(H,k){var W=H.createElement("iframe");return W.className="html2canvas-container",W.style.visibility="hidden",W.style.position="fixed",W.style.left="-10000px",W.style.top="0px",W.style.border="0",W.width=k.width.toString(),W.height=k.height.toString(),W.scrolling="no",W.setAttribute(y,"true"),H.body.appendChild(W),W},ue=function(H){return new Promise(function(k){if(H.complete){k();return}if(!H.src){k();return}H.onload=k,H.onerror=k})},de=function(H){return Promise.all([].slice.call(H.images,0).map(ue))},ve=function(H){return new Promise(function(k,W){var K=H.contentWindow;if(!K)return W("No window assigned for iframe");var oe=K.document;K.onload=H.onload=function(){K.onload=H.onload=null;var he=setInterval(function(){oe.body.childNodes.length>0&&oe.readyState==="complete"&&(clearInterval(he),k(H))},50)}})},Ve=["all","d","content"],Je=function(H,k){for(var W=H.length-1;W>=0;W--){var K=H.item(W);Ve.indexOf(K)===-1&&k.style.setProperty(K,H.getPropertyValue(K))}return k},gt=function(H){var k="";return H&&(k+=""),k},At=function(H,k,W){H&&H.defaultView&&(k!==H.defaultView.pageXOffset||W!==H.defaultView.pageYOffset)&&H.defaultView.scrollTo(k,W)},Ft=function(H){var k=H[0],W=H[1],K=H[2];k.scrollLeft=W,k.scrollTop=K},Nt=":before",jt=":after",Gt="___html2canvas___pseudoelement_before",Zt="___html2canvas___pseudoelement_after",Vt=`{ content: "" !important; display: none !important; }`,ir=function(H){_r(H,"."+Gt+Nt+Vt+` .`+Zt+jt+Vt)},_r=function(H,k){var W=H.ownerDocument;if(W){var K=W.createElement("style");K.textContent=k,H.appendChild(K)}},fr=function(){function H(){}return H.getOrigin=function(k){var W=H._link;return W?(W.href=k,W.href=W.href,W.protocol+W.hostname+W.port):"about:blank"},H.isSameOrigin=function(k){return H.getOrigin(k)===H._origin},H.setContext=function(k){H._link=k.document.createElement("a"),H._origin=H.getOrigin(k.location.href)},H._origin="about:blank",H}(),kr=function(){function H(k,W){this.context=k,this._options=W,this._cache={}}return H.prototype.addImage=function(k){var W=Promise.resolve();return this.has(k)||(ei(k)||hi(k))&&(this._cache[k]=this.loadImage(k)).catch(function(){}),W},H.prototype.match=function(k){return this._cache[k]},H.prototype.loadImage=function(k){return j(this,void 0,void 0,function(){var W,K,oe,he,Be=this;return D(this,function(Ge){switch(Ge.label){case 0:return W=fr.isSameOrigin(k),K=!qn(k)&&this._options.useCORS===!0&&Hn.SUPPORT_CORS_IMAGES&&!W,oe=!qn(k)&&!W&&!ei(k)&&typeof this._options.proxy=="string"&&Hn.SUPPORT_CORS_XHR&&!K,!W&&this._options.allowTaint===!1&&!qn(k)&&!ei(k)&&!oe&&!K?[2]:(he=k,oe?[4,this.proxy(he)]:[3,2]);case 1:he=Ge.sent(),Ge.label=2;case 2:return this.context.logger.debug("Added image "+k.substring(0,256)),[4,new Promise(function(We,ot){var vt=new Image;vt.onload=function(){return We(vt)},vt.onerror=ot,(Mn(he)||K)&&(vt.crossOrigin="anonymous"),vt.src=he,vt.complete===!0&&setTimeout(function(){return We(vt)},500),Be._options.imageTimeout>0&&setTimeout(function(){return ot("Timed out ("+Be._options.imageTimeout+"ms) loading image")},Be._options.imageTimeout)})];case 3:return[2,Ge.sent()]}})})},H.prototype.has=function(k){return typeof this._cache[k]!="undefined"},H.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},H.prototype.proxy=function(k){var W=this,K=this._options.proxy;if(!K)throw new Error("No proxy defined");var oe=k.substring(0,256);return new Promise(function(he,Be){var Ge=Hn.SUPPORT_RESPONSE_TYPE?"blob":"text",We=new XMLHttpRequest;We.onload=function(){if(We.status===200)if(Ge==="text")he(We.response);else{var Bt=new FileReader;Bt.addEventListener("load",function(){return he(Bt.result)},!1),Bt.addEventListener("error",function(Lt){return Be(Lt)},!1),Bt.readAsDataURL(We.response)}else Be("Failed to proxy resource "+oe+" with status code "+We.status)},We.onerror=Be;var ot=K.indexOf("?")>-1?"&":"?";if(We.open("GET",""+K+ot+"url="+encodeURIComponent(k)+"&responseType="+Ge),Ge!=="text"&&We instanceof XMLHttpRequest&&(We.responseType=Ge),W._options.imageTimeout){var vt=W._options.imageTimeout;We.timeout=vt,We.ontimeout=function(){return Be("Timed out ("+vt+"ms) proxying "+oe)}}We.send()})},H}(),yn=/^data:image\/svg\+xml/i,Gn=/^data:image\/.*;base64,/i,Bn=/^data:image\/.*/i,hi=function(H){return Hn.SUPPORT_SVG_DRAWING||!Yn(H)},qn=function(H){return Bn.test(H)},Mn=function(H){return Gn.test(H)},ei=function(H){return H.substr(0,4)==="blob"},Yn=function(H){return H.substr(-3).toLowerCase()==="svg"||yn.test(H)},zt=function(){function H(k,W){this.type=0,this.x=k,this.y=W}return H.prototype.add=function(k,W){return new H(this.x+k,this.y+W)},H}(),xn=function(H,k,W){return new zt(H.x+(k.x-H.x)*W,H.y+(k.y-H.y)*W)},Tn=function(){function H(k,W,K,oe){this.type=1,this.start=k,this.startControl=W,this.endControl=K,this.end=oe}return H.prototype.subdivide=function(k,W){var K=xn(this.start,this.startControl,k),oe=xn(this.startControl,this.endControl,k),he=xn(this.endControl,this.end,k),Be=xn(K,oe,k),Ge=xn(oe,he,k),We=xn(Be,Ge,k);return W?new H(this.start,K,Be,We):new H(We,Ge,he,this.end)},H.prototype.add=function(k,W){return new H(this.start.add(k,W),this.startControl.add(k,W),this.endControl.add(k,W),this.end.add(k,W))},H.prototype.reverse=function(){return new H(this.end,this.endControl,this.startControl,this.start)},H}(),Sn=function(H){return H.type===1},Wa=function(){function H(k){var W=k.styles,K=k.bounds,oe=Aa(W.borderTopLeftRadius,K.width,K.height),he=oe[0],Be=oe[1],Ge=Aa(W.borderTopRightRadius,K.width,K.height),We=Ge[0],ot=Ge[1],vt=Aa(W.borderBottomRightRadius,K.width,K.height),Bt=vt[0],Lt=vt[1],sr=Aa(W.borderBottomLeftRadius,K.width,K.height),Wt=sr[0],rr=sr[1],Sr=[];Sr.push((he+We)/K.width),Sr.push((Wt+Bt)/K.width),Sr.push((Be+rr)/K.height),Sr.push((ot+Lt)/K.height);var or=Math.max.apply(Math,Sr);or>1&&(he/=or,Be/=or,We/=or,ot/=or,Bt/=or,Lt/=or,Wt/=or,rr/=or);var ur=K.width-We,rn=K.height-Lt,Wr=K.width-Bt,hn=K.height-rr,lr=W.borderTopWidth,ln=W.borderRightWidth,fn=W.borderBottomWidth,jr=W.borderLeftWidth,wi=nn(W.paddingTop,k.bounds.width),yi=nn(W.paddingRight,k.bounds.width),Oi=nn(W.paddingBottom,k.bounds.width),ai=nn(W.paddingLeft,k.bounds.width);this.topLeftBorderDoubleOuterBox=he>0||Be>0?Qr(K.left+jr/3,K.top+lr/3,he-jr/3,Be-lr/3,Vr.TOP_LEFT):new zt(K.left+jr/3,K.top+lr/3),this.topRightBorderDoubleOuterBox=he>0||Be>0?Qr(K.left+ur,K.top+lr/3,We-ln/3,ot-lr/3,Vr.TOP_RIGHT):new zt(K.left+K.width-ln/3,K.top+lr/3),this.bottomRightBorderDoubleOuterBox=Bt>0||Lt>0?Qr(K.left+Wr,K.top+rn,Bt-ln/3,Lt-fn/3,Vr.BOTTOM_RIGHT):new zt(K.left+K.width-ln/3,K.top+K.height-fn/3),this.bottomLeftBorderDoubleOuterBox=Wt>0||rr>0?Qr(K.left+jr/3,K.top+hn,Wt-jr/3,rr-fn/3,Vr.BOTTOM_LEFT):new zt(K.left+jr/3,K.top+K.height-fn/3),this.topLeftBorderDoubleInnerBox=he>0||Be>0?Qr(K.left+jr*2/3,K.top+lr*2/3,he-jr*2/3,Be-lr*2/3,Vr.TOP_LEFT):new zt(K.left+jr*2/3,K.top+lr*2/3),this.topRightBorderDoubleInnerBox=he>0||Be>0?Qr(K.left+ur,K.top+lr*2/3,We-ln*2/3,ot-lr*2/3,Vr.TOP_RIGHT):new zt(K.left+K.width-ln*2/3,K.top+lr*2/3),this.bottomRightBorderDoubleInnerBox=Bt>0||Lt>0?Qr(K.left+Wr,K.top+rn,Bt-ln*2/3,Lt-fn*2/3,Vr.BOTTOM_RIGHT):new zt(K.left+K.width-ln*2/3,K.top+K.height-fn*2/3),this.bottomLeftBorderDoubleInnerBox=Wt>0||rr>0?Qr(K.left+jr*2/3,K.top+hn,Wt-jr*2/3,rr-fn*2/3,Vr.BOTTOM_LEFT):new zt(K.left+jr*2/3,K.top+K.height-fn*2/3),this.topLeftBorderStroke=he>0||Be>0?Qr(K.left+jr/2,K.top+lr/2,he-jr/2,Be-lr/2,Vr.TOP_LEFT):new zt(K.left+jr/2,K.top+lr/2),this.topRightBorderStroke=he>0||Be>0?Qr(K.left+ur,K.top+lr/2,We-ln/2,ot-lr/2,Vr.TOP_RIGHT):new zt(K.left+K.width-ln/2,K.top+lr/2),this.bottomRightBorderStroke=Bt>0||Lt>0?Qr(K.left+Wr,K.top+rn,Bt-ln/2,Lt-fn/2,Vr.BOTTOM_RIGHT):new zt(K.left+K.width-ln/2,K.top+K.height-fn/2),this.bottomLeftBorderStroke=Wt>0||rr>0?Qr(K.left+jr/2,K.top+hn,Wt-jr/2,rr-fn/2,Vr.BOTTOM_LEFT):new zt(K.left+jr/2,K.top+K.height-fn/2),this.topLeftBorderBox=he>0||Be>0?Qr(K.left,K.top,he,Be,Vr.TOP_LEFT):new zt(K.left,K.top),this.topRightBorderBox=We>0||ot>0?Qr(K.left+ur,K.top,We,ot,Vr.TOP_RIGHT):new zt(K.left+K.width,K.top),this.bottomRightBorderBox=Bt>0||Lt>0?Qr(K.left+Wr,K.top+rn,Bt,Lt,Vr.BOTTOM_RIGHT):new zt(K.left+K.width,K.top+K.height),this.bottomLeftBorderBox=Wt>0||rr>0?Qr(K.left,K.top+hn,Wt,rr,Vr.BOTTOM_LEFT):new zt(K.left,K.top+K.height),this.topLeftPaddingBox=he>0||Be>0?Qr(K.left+jr,K.top+lr,Math.max(0,he-jr),Math.max(0,Be-lr),Vr.TOP_LEFT):new zt(K.left+jr,K.top+lr),this.topRightPaddingBox=We>0||ot>0?Qr(K.left+Math.min(ur,K.width-ln),K.top+lr,ur>K.width+ln?0:Math.max(0,We-ln),Math.max(0,ot-lr),Vr.TOP_RIGHT):new zt(K.left+K.width-ln,K.top+lr),this.bottomRightPaddingBox=Bt>0||Lt>0?Qr(K.left+Math.min(Wr,K.width-jr),K.top+Math.min(rn,K.height-fn),Math.max(0,Bt-ln),Math.max(0,Lt-fn),Vr.BOTTOM_RIGHT):new zt(K.left+K.width-ln,K.top+K.height-fn),this.bottomLeftPaddingBox=Wt>0||rr>0?Qr(K.left+jr,K.top+Math.min(hn,K.height-fn),Math.max(0,Wt-jr),Math.max(0,rr-fn),Vr.BOTTOM_LEFT):new zt(K.left+jr,K.top+K.height-fn),this.topLeftContentBox=he>0||Be>0?Qr(K.left+jr+ai,K.top+lr+wi,Math.max(0,he-(jr+ai)),Math.max(0,Be-(lr+wi)),Vr.TOP_LEFT):new zt(K.left+jr+ai,K.top+lr+wi),this.topRightContentBox=We>0||ot>0?Qr(K.left+Math.min(ur,K.width+jr+ai),K.top+lr+wi,ur>K.width+jr+ai?0:We-jr+ai,ot-(lr+wi),Vr.TOP_RIGHT):new zt(K.left+K.width-(ln+yi),K.top+lr+wi),this.bottomRightContentBox=Bt>0||Lt>0?Qr(K.left+Math.min(Wr,K.width-(jr+ai)),K.top+Math.min(rn,K.height+lr+wi),Math.max(0,Bt-(ln+yi)),Lt-(fn+Oi),Vr.BOTTOM_RIGHT):new zt(K.left+K.width-(ln+yi),K.top+K.height-(fn+Oi)),this.bottomLeftContentBox=Wt>0||rr>0?Qr(K.left+jr+ai,K.top+hn,Math.max(0,Wt-(jr+ai)),rr-(fn+Oi),Vr.BOTTOM_LEFT):new zt(K.left+jr+ai,K.top+K.height-(fn+Oi))}return H}(),Vr;(function(H){H[H.TOP_LEFT=0]="TOP_LEFT",H[H.TOP_RIGHT=1]="TOP_RIGHT",H[H.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",H[H.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Vr||(Vr={}));var Qr=function(H,k,W,K,oe){var he=4*((Math.sqrt(2)-1)/3),Be=W*he,Ge=K*he,We=H+W,ot=k+K;switch(oe){case Vr.TOP_LEFT:return new Tn(new zt(H,ot),new zt(H,ot-Ge),new zt(We-Be,k),new zt(We,k));case Vr.TOP_RIGHT:return new Tn(new zt(H,k),new zt(H+Be,k),new zt(We,ot-Ge),new zt(We,ot));case Vr.BOTTOM_RIGHT:return new Tn(new zt(We,k),new zt(We,k+Ge),new zt(H+Be,ot),new zt(H,ot));case Vr.BOTTOM_LEFT:default:return new Tn(new zt(We,ot),new zt(We-Be,ot),new zt(H,k+Ge),new zt(H,k))}},vi=function(H){return[H.topLeftBorderBox,H.topRightBorderBox,H.bottomRightBorderBox,H.bottomLeftBorderBox]},Vn=function(H){return[H.topLeftContentBox,H.topRightContentBox,H.bottomRightContentBox,H.bottomLeftContentBox]},za=function(H){return[H.topLeftPaddingBox,H.topRightPaddingBox,H.bottomRightPaddingBox,H.bottomLeftPaddingBox]},zi=function(){function H(k,W,K){this.offsetX=k,this.offsetY=W,this.matrix=K,this.type=0,this.target=2|4}return H}(),Mi=function(){function H(k,W){this.path=k,this.target=W,this.type=1}return H}(),Ca=function(){function H(k){this.opacity=k,this.type=2,this.target=2|4}return H}(),ii=function(H){return H.type===0},xa=function(H){return H.type===1},tl=function(H){return H.type===2},iA=function(H,k){return H.length===k.length?H.some(function(W,K){return W===k[K]}):!1},dA=function(H,k,W,K,oe){return H.map(function(he,Be){switch(Be){case 0:return he.add(k,W);case 1:return he.add(k+K,W);case 2:return he.add(k+K,W+oe);case 3:return he.add(k,W+oe)}return he})},aA=function(){function H(k){this.element=k,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return H}(),oA=function(){function H(k,W){if(this.container=k,this.parent=W,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new Ca(this.container.styles.opacity)),this.container.styles.transform!==null){var K=this.container.bounds.left+this.container.styles.transformOrigin[0].number,oe=this.container.bounds.top+this.container.styles.transformOrigin[1].number,he=this.container.styles.transform;this.effects.push(new zi(K,oe,he))}if(this.container.styles.overflowX!==0){var Be=vi(this.curves),Ge=za(this.curves);iA(Be,Ge)?this.effects.push(new Mi(Be,2|4)):(this.effects.push(new Mi(Be,2)),this.effects.push(new Mi(Ge,4)))}}return H.prototype.getEffects=function(k){for(var W=[2,3].indexOf(this.container.styles.position)===-1,K=this.parent,oe=this.effects.slice(0);K;){var he=K.effects.filter(function(We){return!xa(We)});if(W||K.container.styles.position!==0||!K.parent){if(oe.unshift.apply(oe,he),W=[2,3].indexOf(K.container.styles.position)===-1,K.container.styles.overflowX!==0){var Be=vi(K.curves),Ge=za(K.curves);iA(Be,Ge)||oe.unshift(new Mi(Ge,2|4))}}else oe.unshift.apply(oe,he);K=K.parent}return oe.filter(function(We){return Nn(We.target,k)})},H}(),rA=function(H,k,W,K){H.container.elements.forEach(function(oe){var he=Nn(oe.flags,4),Be=Nn(oe.flags,2),Ge=new oA(oe,H);Nn(oe.styles.display,2048)&&K.push(Ge);var We=Nn(oe.flags,8)?[]:K;if(he||Be){var ot=he||oe.styles.isPositioned()?W:k,vt=new aA(Ge);if(oe.styles.isPositioned()||oe.styles.opacity<1||oe.styles.isTransformed()){var Bt=oe.styles.zIndex.order;if(Bt<0){var Lt=0;ot.negativeZIndex.some(function(Wt,rr){return Bt>Wt.element.container.styles.zIndex.order?(Lt=rr,!1):Lt>0}),ot.negativeZIndex.splice(Lt,0,vt)}else if(Bt>0){var sr=0;ot.positiveZIndex.some(function(Wt,rr){return Bt>=Wt.element.container.styles.zIndex.order?(sr=rr+1,!1):sr>0}),ot.positiveZIndex.splice(sr,0,vt)}else ot.zeroOrAutoZIndexOrTransformedOrOpacity.push(vt)}else oe.styles.isFloating()?ot.nonPositionedFloats.push(vt):ot.nonPositionedInlineLevel.push(vt);rA(Ge,vt,he?vt:W,We)}else oe.styles.isInlineLevel()?k.inlineLevel.push(Ge):k.nonInlineLevel.push(Ge),rA(Ge,k,W,We);Nn(oe.flags,8)&&sA(oe,We)})},sA=function(H,k){for(var W=H instanceof ns?H.start:1,K=H instanceof ns?H.reversed:!1,oe=0;oe0&&W.intrinsicHeight>0){var he=mu(W),Be=za(K);this.path(Be),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(oe,0,0,W.intrinsicWidth,W.intrinsicHeight,he.left,he.top,he.width,he.height),this.ctx.restore()}},k.prototype.renderNodeContent=function(W){return j(this,void 0,void 0,function(){var K,oe,he,Be,Ge,We,ot,ot,vt,Bt,Lt,sr,Wt,rr,Sr,or,ur,rn,Wr,ot,hn,Wt,or;return D(this,function(lr){switch(lr.label){case 0:this.applyEffects(W.getEffects(4)),K=W.container,oe=W.curves,he=K.styles,Be=0,Ge=K.textNodes,lr.label=1;case 1:return Be0&&ur>0&&(rn=he.ctx.createPattern(yi,"repeat"),he.renderRepeat(Wt,rn,rr,Sr))):ml(vt)&&(sa=nA(W,K,[null,null,null]),Wt=sa[0],Ga=sa[1],Va=sa[2],or=sa[3],ur=sa[4],Xa=vt.position.length===0?[ps]:vt.position,rr=nn(Xa[0],or),Sr=nn(Xa[Xa.length-1],ur),So=Ia(vt,rr,Sr,or,ur),la=So[0],Ya=So[1],la>0&&Ya>0&&(Bo=he.ctx.createRadialGradient(Ga+rr,Va+Sr,0,Ga+rr,Va+Sr,la),cl(vt.stops,la*2).forEach(function(rl){return Bo.addColorStop(rl.stop,Wn(rl.color))}),he.path(Wt),he.ctx.fillStyle=Bo,la!==Ya?(Oo=W.bounds.left+.5*W.bounds.width,Ta=W.bounds.top+.5*W.bounds.height,Io=Ya/la,Sa=1/Io,he.ctx.save(),he.ctx.translate(Oo,Ta),he.ctx.transform(1,0,0,Io,0,0),he.ctx.translate(-Oo,-Ta),he.ctx.fillRect(Ga,Sa*(Va-Ta)+Ta,or,ur*Sa),he.ctx.restore()):he.ctx.fill())),cs.label=6;case 6:return K--,[2]}})},he=this,Be=0,Ge=W.styles.backgroundImage.slice(0).reverse(),ot.label=1;case 1:return Be0?vt.style===2?[4,this.renderDashedDottedBorder(vt.color,vt.width,Ge,W.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Lt.sent(),[3,11];case 5:return vt.style===3?[4,this.renderDashedDottedBorder(vt.color,vt.width,Ge,W.curves,3)]:[3,7];case 6:return Lt.sent(),[3,11];case 7:return vt.style===4?[4,this.renderDoubleBorder(vt.color,vt.width,Ge,W.curves)]:[3,9];case 8:return Lt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(vt.color,Ge,W.curves)];case 10:Lt.sent(),Lt.label=11;case 11:Ge++,Lt.label=12;case 12:return We++,[3,3];case 13:return[2]}})})},k.prototype.renderDashedDottedBorder=function(W,K,oe,he,Be){return j(this,void 0,void 0,function(){var Ge,We,ot,vt,Bt,Lt,sr,Wt,rr,Sr,or,ur,rn,Wr,hn,lr,hn,lr;return D(this,function(ln){return this.ctx.save(),Ge=mA(he,oe),We=lA(he,oe),Be===2&&(this.path(We),this.ctx.clip()),Sn(We[0])?(ot=We[0].start.x,vt=We[0].start.y):(ot=We[0].x,vt=We[0].y),Sn(We[1])?(Bt=We[1].end.x,Lt=We[1].end.y):(Bt=We[1].x,Lt=We[1].y),oe===0||oe===2?sr=Math.abs(ot-Bt):sr=Math.abs(vt-Lt),this.ctx.beginPath(),Be===3?this.formatPath(Ge):this.formatPath(We.slice(0,2)),Wt=K<3?K*3:K*2,rr=K<3?K*2:K,Be===3&&(Wt=K,rr=K),Sr=!0,sr<=Wt*2?Sr=!1:sr<=Wt*2+rr?(or=sr/(2*Wt+rr),Wt*=or,rr*=or):(ur=Math.floor((sr+rr)/(Wt+rr)),rn=(sr-ur*Wt)/(ur-1),Wr=(sr-(ur+1)*Wt)/ur,rr=Wr<=0||Math.abs(rr-rn)0?[].concat(Object(Q.a)(d),Object(Q.a)(n(p).map(function(w){return Object(O.a)({fixed:a},w)}))):[].concat(Object(Q.a)(d),[Object(O.a)(Object(O.a)({},s),{},{fixed:a})])},[])}function u(i){for(var d=!0,s=0;s=0;p-=1){var w=i[p];if(a&&w.fixed!=="right")a=!1;else if(!a&&w.fixed==="right"){Object(I.a)(!1,"Index ".concat(p+1," of `columns` missing `fixed='right'` prop."));break}}}function c(i){return i.map(function(d){var s=d.fixed,A=Object(j.a)(d,["fixed"]),a=s;return s==="left"?a="right":s==="right"&&(a="left"),Object(O.a)({fixed:a},A)})}function o(i,d){var s=i.prefixCls,A=i.columns,a=i.children,p=i.expandable,w=i.expandedKeys,S=i.getRowKey,x=i.onTriggerExpand,L=i.expandIcon,b=i.rowExpandable,h=i.expandIconColumnIndex,r=i.direction,l=i.expandRowByClick,f=D.useMemo(function(){return A||E(a)},[A,a]),C=D.useMemo(function(){if(p){var F,P=h||0,z=f[P],Z=(F={},Object(q.a)(F,T.a,{className:"".concat(s,"-expand-icon-col")}),Object(q.a)(F,"title",""),Object(q.a)(F,"fixed",z?z.fixed:null),Object(q.a)(F,"className","".concat(s,"-row-expand-icon-cell")),Object(q.a)(F,"render",function(J,X,re){var se=S(X,re),_e=w.has(se),ge=b?b(X):!0,we=L({prefixCls:s,expanded:_e,expandable:ge,record:X,onExpand:x});return l?D.createElement("span",{onClick:function(He){return He.stopPropagation()}},we):we}),F),V=f.slice();return P>=0&&V.splice(P,0,Z),V}return f},[p,f,S,w,L,r]),g=D.useMemo(function(){var F=C;return d&&(F=d(F)),F.length||(F=[{render:function(){return null}}]),F},[d,C,r]),m=D.useMemo(function(){return r==="rtl"?c(n(g)):n(g)},[g,r]);return[g,m]}pe.b=o},x6Kt:function(qe,pe,G){var q=G("y+Vt"),Q=G("VpOo"),O=G("nPnh"),j=O.subPixelOptimizeRect,D={},B=q.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(I,v){var T,E,n,u;this.subPixelOptimize?(j(D,v,this.style),T=D.x,E=D.y,n=D.width,u=D.height,D.r=v.r,v=D):(T=v.x,E=v.y,n=v.width,u=v.height),v.r?Q.buildPath(I,v):I.rect(T,E,n,u),I.closePath();return}});qe.exports=B},"y+Vt":function(qe,pe,G){var q=G("Gev7"),Q=G("bYtY"),O=G("IMiH"),j=G("2DNl"),D=G("3C/r"),B=D.prototype.getCanvasPattern,I=Math.abs,v=new O(!0);function T(n){q.call(this,n),this.path=null}T.prototype={constructor:T,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(n,u){var c=this.style,o=this.path||v,i=c.hasStroke(),d=c.hasFill(),s=c.fill,A=c.stroke,a=d&&!!s.colorStops,p=i&&!!A.colorStops,w=d&&!!s.image,S=i&&!!A.image;if(c.bind(n,this,u),this.setTransform(n),this.__dirty){var x;a&&(x=x||this.getBoundingRect(),this._fillGradient=c.getGradient(n,s,x)),p&&(x=x||this.getBoundingRect(),this._strokeGradient=c.getGradient(n,A,x))}a?n.fillStyle=this._fillGradient:w&&(n.fillStyle=B.call(s,n)),p?n.strokeStyle=this._strokeGradient:S&&(n.strokeStyle=B.call(A,n));var L=c.lineDash,b=c.lineDashOffset,h=!!n.setLineDash,r=this.getGlobalScale();if(o.setScale(r[0],r[1],this.segmentIgnoreThreshold),this.__dirtyPath||L&&!h&&i?(o.beginPath(n),L&&!h&&(o.setLineDash(L),o.setLineDashOffset(b)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(n.beginPath(),this.path.rebuildPath(n)),d)if(c.fillOpacity!=null){var l=n.globalAlpha;n.globalAlpha=c.fillOpacity*c.opacity,o.fill(n),n.globalAlpha=l}else o.fill(n);if(L&&h&&(n.setLineDash(L),n.lineDashOffset=b),i)if(c.strokeOpacity!=null){var l=n.globalAlpha;n.globalAlpha=c.strokeOpacity*c.opacity,o.stroke(n),n.globalAlpha=l}else o.stroke(n);L&&h&&n.setLineDash([]),c.text!=null&&(this.restoreTransform(n),this.drawRectText(n,this.getBoundingRect()))},buildPath:function(n,u,c){},createPathProxy:function(){this.path=new O},getBoundingRect:function(){var n=this._rect,u=this.style,c=!n;if(c){var o=this.path;o||(o=this.path=new O),this.__dirtyPath&&(o.beginPath(),this.buildPath(o,this.shape,!1)),n=o.getBoundingRect()}if(this._rect=n,u.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=n.clone());if(this.__dirty||c){i.copy(n);var d=u.lineWidth,s=u.strokeNoScale?this.getLineScale():1;u.hasFill()||(d=Math.max(d,this.strokeContainThreshold||4)),s>1e-10&&(i.width+=d/s,i.height+=d/s,i.x-=d/s/2,i.y-=d/s/2)}return i}return n},contain:function(n,u){var c=this.transformCoordToLocal(n,u),o=this.getBoundingRect(),i=this.style;if(n=c[0],u=c[1],o.contain(n,u)){var d=this.path.data;if(i.hasStroke()){var s=i.lineWidth,A=i.strokeNoScale?this.getLineScale():1;if(A>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),j.containStroke(d,s/A,n,u)))return!0}if(i.hasFill())return j.contain(d,n,u)}return!1},dirty:function(n){n==null&&(n=!0),n&&(this.__dirtyPath=n,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(n){return this.animate("shape",n)},attrKV:function(n,u){n==="shape"?(this.setShape(u),this.__dirtyPath=!0,this._rect=null):q.prototype.attrKV.call(this,n,u)},setShape:function(n,u){var c=this.shape;if(c){if(Q.isObject(n))for(var o in n)n.hasOwnProperty(o)&&(c[o]=n[o]);else c[n]=u;this.dirty(!0)}return this},getLineScale:function(){var n=this.transform;return n&&I(n[0]-1)>1e-10&&I(n[3]-1)>1e-10?Math.sqrt(I(n[0]*n[3]-n[2]*n[1])):1}},T.extend=function(n){var u=function(o){T.call(this,o),n.style&&this.style.extendFrom(n.style,!1);var i=n.shape;if(i){this.shape=this.shape||{};var d=this.shape;for(var s in i)!d.hasOwnProperty(s)&&i.hasOwnProperty(s)&&(d[s]=i[s])}n.init&&n.init.call(this,o)};Q.inherits(u,T);for(var c in n)c!=="style"&&c!=="shape"&&(u.prototype[c]=n[c]);return u},Q.inherits(T,q);var E=T;qe.exports=E},"y0+3":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return n}),G.d(pe,"b",function(){return c});var q=/margin|padding|width|height|max|min|offset/,Q={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function j(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function D(o,i,d){if(i=i.toLowerCase(),d==="auto"){if(i==="height")return o.offsetHeight;if(i==="width")return o.offsetWidth}return i in Q||(Q[i]=q.test(i)),Q[i]?parseFloat(d)||0:d}function B(o,i){var d=arguments.length,s=j(o);return i=O[i]?"cssFloat"in o.style?"cssFloat":"styleFloat":i,d===1?s:D(o,i,s[i]||o.style[i])}function I(o,i,d){var s=arguments.length;if(i=O[i]?"cssFloat"in o.style?"cssFloat":"styleFloat":i,s===3)return typeof d=="number"&&q.test(i)&&(d="".concat(d,"px")),o.style[i]=d,d;for(var A in i)i.hasOwnProperty(A)&&I(o,A,i[A]);return j(o)}function v(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function T(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function E(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:i}}function n(){var o=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:i}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function c(o){var i=o.getBoundingClientRect(),d=document.documentElement;return{left:i.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},y23F:function(qe,pe){function G(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}G.prototype={constructor:G,_dragStart:function(O){for(var j=O.target;j&&!j.draggable;)j=j.parent;j&&(this._draggingTarget=j,j.dragging=!0,this._x=O.offsetX,this._y=O.offsetY,this.dispatchToElement(q(j,O),"dragstart",O.event))},_drag:function(O){var j=this._draggingTarget;if(j){var D=O.offsetX,B=O.offsetY,I=D-this._x,v=B-this._y;this._x=D,this._y=B,j.drift(I,v,O),this.dispatchToElement(q(j,O),"drag",O.event);var T=this.findHover(D,B,j).target,E=this._dropTarget;this._dropTarget=T,j!==T&&(E&&T!==E&&this.dispatchToElement(q(E,O),"dragleave",O.event),T&&T!==E&&this.dispatchToElement(q(T,O),"dragenter",O.event))}},_dragEnd:function(O){var j=this._draggingTarget;j&&(j.dragging=!1),this.dispatchToElement(q(j,O),"dragend",O.event),this._dropTarget&&this.dispatchToElement(q(this._dropTarget,O),"drop",O.event),this._draggingTarget=null,this._dropTarget=null}};function q(O,j){return{target:O,topTarget:j&&j.topTarget}}var Q=G;qe.exports=Q},yxFR:function(qe,pe,G){var q=G("y+Vt"),Q=G("nPnh"),O=Q.subPixelOptimizeLine,j={},D=q.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(B,I){var v,T,E,n;this.subPixelOptimize?(O(j,I,this.style),v=j.x1,T=j.y1,E=j.x2,n=j.y2):(v=I.x1,T=I.y1,E=I.x2,n=I.y2);var u=I.percent;if(u===0)return;B.moveTo(v,T),u<1&&(E=v*(1-u)+E*u,n=T*(1-u)+n*u),B.lineTo(E,n)},pointAt:function(B){var I=this.shape;return[I.x1*(1-B)+I.x2*B,I.y1*(1-B)+I.y2*B]}});qe.exports=D},z9Ch:function(qe,pe,G){qe.exports={flex_box_center:"flex_box_center___3OoGm",flex_space_between:"flex_space_between___1T26N",flex_box_vertical_center:"flex_box_vertical_center___1ToJb",flex_box_center_end:"flex_box_center_end___3yWc3",flex_box_column:"flex_box_column___2DqGp",title:"title___27RYc",export:"export___23HFM",title1_right:"title1_right___QCRrC",userPic:"userPic___1IO2N",userInfo:"userInfo___1tmSz",listItem:"listItem___j4sdw",rightInfo:"rightInfo___163Ic",shixunTitle:"shixunTitle___15lHO",shixunWrp:"shixunWrp___O2H0q",footerBar:"footerBar___NH_yZ",footerBarStatic:"footerBarStatic___2dJUI",exitComment:"exitComment___2O-uT",nextComment:"nextComment___2fkhG",modal:"modal___LOSk6"}},zarK:function(qe,pe,G){var q=G("YH21"),Q=q.addEventListener,O=q.removeEventListener,j=q.normalizeEvent,D=q.getNativeEvent,B=G("bYtY"),I=G("H6uX"),v=G("ItGF"),T=300,E=v.domSupported,n=function(){var m=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],F=["touchstart","touchend","touchmove"],P={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},z=B.map(m,function(Z){var V=Z.replace("mouse","pointer");return P.hasOwnProperty(V)?V:Z});return{mouse:m,touch:F,pointer:z}}(),u={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function c(m){return m==="mousewheel"&&v.browser.firefox?"DOMMouseScroll":m}function o(m){var F=m.pointerType;return F==="pen"||F==="touch"}function i(m){m.touching=!0,m.touchTimer!=null&&(clearTimeout(m.touchTimer),m.touchTimer=null),m.touchTimer=setTimeout(function(){m.touching=!1,m.touchTimer=null},700)}function d(m){m&&(m.zrByTouch=!0)}function s(m,F){return j(m.dom,new a(m,F),!0)}function A(m,F){for(var P=F,z=!1;P&&P.nodeType!==9&&!(z=P.domBelongToZr||P!==F&&P===m.painterRoot);)P=P.parentNode;return z}function a(m,F){this.type=F.type,this.target=this.currentTarget=m.dom,this.pointerType=F.pointerType,this.clientX=F.clientX,this.clientY=F.clientY}var p=a.prototype;p.stopPropagation=p.stopImmediatePropagation=p.preventDefault=B.noop;var w={mousedown:function(m){m=j(this.dom,m),this._mayPointerCapture=[m.zrX,m.zrY],this.trigger("mousedown",m)},mousemove:function(m){m=j(this.dom,m);var F=this._mayPointerCapture;F&&(m.zrX!==F[0]||m.zrY!==F[1])&&r(this,!0),this.trigger("mousemove",m)},mouseup:function(m){m=j(this.dom,m),r(this,!1),this.trigger("mouseup",m)},mouseout:function(m){m=j(this.dom,m),this._pointerCapturing&&(m.zrEventControl="no_globalout");var F=m.toElement||m.relatedTarget;m.zrIsToLocalDOM=A(this,F),this.trigger("mouseout",m)},touchstart:function(m){m=j(this.dom,m),d(m),this._lastTouchMoment=new Date,this.handler.processGesture(m,"start"),w.mousemove.call(this,m),w.mousedown.call(this,m)},touchmove:function(m){m=j(this.dom,m),d(m),this.handler.processGesture(m,"change"),w.mousemove.call(this,m)},touchend:function(m){m=j(this.dom,m),d(m),this.handler.processGesture(m,"end"),w.mouseup.call(this,m),+new Date-this._lastTouchMoment