You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
472 lines
1.6 MiB
472 lines
1.6 MiB
(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("<zrvml:"+T+' class="zrvml">')}}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<j.length;D++)O=O||j[D].__dirtyPath;this.__dirtyPath=O,this.__dirty=this.__dirty||O},beforeBrush:function(){this._updatePathDirty();for(var O=this.shape.paths||[],j=this.getGlobalScale(),D=0;D<O.length;D++)O[D].path||O[D].createPathProxy(),O[D].path.setScale(j[0],j[1],O[D].segmentIgnoreThreshold)},buildPath:function(O,j){for(var D=j.paths||[],B=0;B<D.length;B++)D[B].buildPath(O,D[B].shape,!0)},afterBrush:function(){for(var O=this.shape.paths||[],j=0;j<O.length;j++)O[j].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),q.prototype.getBoundingRect.call(this)}});qe.exports=Q},"1RvN":function(qe,pe){var G=function(){this.head=null,this.tail=null,this._len=0},q=G.prototype;q.insert=function(B){var I=new Q(B);return this.insertEntry(I),I},q.insertEntry=function(B){this.head?(this.tail.next=B,B.prev=this.tail,B.next=null,this.tail=B):this.head=this.tail=B,this._len++},q.remove=function(B){var I=B.prev,v=B.next;I?I.next=v:this.head=v,v?v.prev=I:this.tail=I,B.next=B.prev=null,this._len--},q.len=function(){return this._len},q.clear=function(){this.head=this.tail=null,this._len=0};var Q=function(B){this.value=B,this.next,this.prev},O=function(B){this._list=new G,this._map={},this._maxSize=B||10,this._lastRemovedEntry=null},j=O.prototype;j.put=function(B,I){var v=this._list,T=this._map,E=null;if(T[B]==null){var n=v.len(),u=this._lastRemovedEntry;if(n>=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<T.length;E++)v.animation.addAnimator(T[E]);this.clipPath&&this.clipPath.addSelfToZr(v)},removeSelfFromZr:function(v){this.__zr=null;var T=this.animators;if(T)for(var E=0;E<T.length;E++)v.animation.removeAnimator(T[E]);this.clipPath&&this.clipPath.removeSelfFromZr(v)}},D.mixin(B,j),D.mixin(B,O),D.mixin(B,Q);var I=B;qe.exports=I},"1eCo":function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){"use strict";var Q={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(j,D){var B=j.indentUnit,I={},v=D.htmlMode?Q:O;for(var T in v)I[T]=v[T];for(var T in D)I[T]=D[T];var E,n;function u(f,C){function g(P){return C.tokenize=P,P(f,C)}var m=f.next();if(m=="<")return f.eat("!")?f.eat("[")?f.match("CDATA[")?g(i("atom","]]>")):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&&/<!\[CDATA\[/.test(C))return 0;var F=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(F&&F[1])for(;m;)if(m.tagName==F[2]){m=m.prev;break}else if(I.implicitlyClosed.hasOwnProperty(m.tagName))m=m.prev;else break;else if(F)for(;m;){var P=I.contextGrabbers[m.tagName];if(P&&P.hasOwnProperty(F[2]))m=m.prev;else break}for(;m&&m.prev&&!m.startOfLine;)m=m.prev;return m?m.indent+B:f.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",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)<u}var o=[-1,-1,-1],i=[-1,-1];function d(){var x=i[0];i[0]=i[1],i[1]=x}function s(x,L,b,h,r,l,f,C,g,m){if(m>L&&m>h&&m>l&&m>C||m<L&&m<h&&m<l&&m<C)return 0;var F=v.cubicRootAt(L,h,l,C,m,o);if(F===0)return 0;for(var P=0,z=-1,Z,V,M=0;M<F;M++){var J=o[M],X=J===0||J===1?.5:1,re=v.cubicAt(x,b,r,f,J);if(re<g)continue;z<0&&(z=v.cubicExtrema(L,h,l,C,i),i[1]<i[0]&&z>1&&d(),Z=v.cubicAt(L,h,l,C,i[0]),z>1&&(V=v.cubicAt(L,h,l,C,i[1]))),z===2?J<i[0]?P+=Z<L?X:-X:J<i[1]?P+=V<Z?X:-X:P+=C<V?X:-X:J<i[0]?P+=Z<L?X:-X:P+=C<Z?X:-X}return P}function A(x,L,b,h,r,l,f,C){if(C>L&&C>h&&C>l||C<L&&C<h&&C<l)return 0;var g=v.quadraticRootAt(L,h,l,C,o);if(g===0)return 0;var m=v.quadraticExtremum(L,h,l);if(m>=0&&m<=1){for(var F=0,P=v.quadraticAt(L,h,l,m),z=0;z<g;z++){var Z=o[z]===0||o[z]===1?.5:1,V=v.quadraticAt(x,b,r,o[z]);if(V<f)continue;o[z]<m?F+=P<L?Z:-Z:F+=l<P?Z:-Z}return F}else{var Z=o[0]===0||o[0]===1?.5:1,V=v.quadraticAt(x,b,r,o[0]);return V<f?0:l<L?Z:-Z}}function a(x,L,b,h,r,l,f,C){if(C-=L,C>b||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&&V<Math.PI*1.5&&(F=-F),P+=F)}}return P}function p(x,L,b,h,r){for(var l=0,f=0,C=0,g=0,m=0,F=0;F<x.length;){var P=x[F++];P===E.M&&F>1&&(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<C;m++){var F=r[m],P=s(F),z=x(F)||S(F);F.invisible||(F.__dirty&&(P&&P.brush(F),this.clipPathManager.update(F),F.style&&(this.gradientManager.update(F.style.fill),this.gradientManager.update(F.style.stroke),this.shadowManager.update(z,F)),F.__dirty=!1),g.push(F))}var Z=v(f,g),V;for(m=0;m<Z.length;m++){var M=Z[m];if(M.removed)for(var J=0;J<M.count;J++){var F=f[M.indices[J]],z=x(F),X=S(F);w(l,z),w(l,X)}}for(m=0;m<Z.length;m++){var M=Z[m];if(M.added)for(var J=0;J<M.count;J++){var F=g[M.indices[J]],z=x(F),X=S(F);V?a(l,z,V):p(l,z),z?a(l,X,z):V?a(l,X,V):p(l,X),a(l,X,z),V=X||z||V,this.gradientManager.addWithoutUpdate(z||X,F),this.shadowManager.addWithoutUpdate(z||X,F),this.clipPathManager.markUsed(F)}else if(!M.removed)for(var J=0;J<M.count;J++){var F=g[M.indices[J]],z=x(F),X=S(F),z=x(F),X=S(F);this.gradientManager.markUsed(F),this.gradientManager.addWithoutUpdate(z||X,F),this.shadowManager.markUsed(F),this.shadowManager.addWithoutUpdate(z||X,F),this.clipPathManager.markUsed(F),X&&a(l,X,z),V=z||X||V}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=g},_getDefs:function(r){var l=this._svgDom,f=l.getElementsByTagName("defs");if(f.length===0)if(r){var f=l.insertBefore(Q("defs"),l.firstChild);return f.contains||(f.contains=function(g){var m=f.children;if(!m)return!1;for(var F=m.length-1;F>=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(/></g,`>
|
|
\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<I.length;v++)if(I[v].name===B)return I[v]},childCount:function(){return this._children.length},add:function(B){return B&&B!==this&&B.parent!==this&&(this._children.push(B),this._doAdd(B)),this},addBefore:function(B,I){if(B&&B!==this&&B.parent!==this&&I&&I.parent===this){var v=this._children,T=v.indexOf(I);T>=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;T<B.length;T++)v=B[T],I&&(I.delFromStorage(v),v instanceof j&&v.delChildrenFromStorage(I)),v.parent=null;return B.length=0,this},eachChild:function(B,I){for(var v=this._children,T=0;T<v.length;T++){var E=v[T];B.call(I,E,T)}return this},traverse:function(B,I){for(var v=0;v<this._children.length;v++){var T=this._children[v];B.call(I,T),T.type==="group"&&T.traverse(B,I)}return this},addChildrenToStorage:function(B){for(var I=0;I<this._children.length;I++){var v=this._children[I];B.addToStorage(v),v instanceof j&&v.addChildrenToStorage(B)}},delChildrenFromStorage:function(B){for(var I=0;I<this._children.length;I++){var v=this._children[I];B.delFromStorage(v),v instanceof j&&v.delChildrenFromStorage(B)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(B){for(var I=null,v=new O(0,0,0,0),T=B||this._children,E=[],n=0;n<T.length;n++){var u=T[n];if(u.ignore||u.invisible)continue;var c=u.getBoundingRect(),o=u.getLocalTransform(E);o?(v.copy(c),v.applyTransform(o),I=I||v.clone(),I.union(v)):(I=I||c.clone(),I.union(c))}return I||v}},q.inherits(j,Q);var D=j;qe.exports=D},"4mN7":function(qe,pe,G){var q=G("QBsz"),Q=G("Sj9i"),O=Math.min,j=Math.max,D=Math.sin,B=Math.cos,I=Math.PI*2,v=q.create(),T=q.create(),E=q.create();function n(A,a,p){if(A.length===0)return;var w=A[0],S=w[0],x=w[0],L=w[1],b=w[1],h;for(h=1;h<A.length;h++)w=A[h],S=O(S,w[0]),x=j(x,w[0]),L=O(L,w[1]),b=j(b,w[1]);a[0]=S,a[1]=L,p[0]=x,p[1]=b}function u(A,a,p,w,S,x){S[0]=O(A,p),S[1]=O(a,w),x[0]=j(A,p),x[1]=j(a,w)}var c=[],o=[];function i(A,a,p,w,S,x,L,b,h,r){var l=Q.cubicExtrema,f=Q.cubicAt,C,g=l(A,p,S,L,c);for(h[0]=Infinity,h[1]=Infinity,r[0]=-Infinity,r[1]=-Infinity,C=0;C<g;C++){var m=f(A,p,S,L,c[C]);h[0]=O(m,h[0]),r[0]=j(m,r[0])}for(g=l(a,w,x,b,o),C=0;C<g;C++){var F=f(a,w,x,b,o[C]);h[1]=O(F,h[1]),r[1]=j(F,r[1])}h[0]=O(A,h[0]),r[0]=j(A,r[0]),h[0]=O(L,h[0]),r[0]=j(L,r[0]),h[1]=O(a,h[1]),r[1]=j(a,r[1]),h[1]=O(b,h[1]),r[1]=j(b,r[1])}function d(A,a,p,w,S,x,L,b){var h=Q.quadraticExtremum,r=Q.quadraticAt,l=j(O(h(A,p,S),1),0),f=j(O(h(a,w,x),1),0),C=r(A,p,S,l),g=r(a,w,x,f);L[0]=O(A,S,C),L[1]=O(a,x,g),b[0]=j(A,S,C),b[1]=j(a,x,g)}function s(A,a,p,w,S,x,L,b,h){var r=q.min,l=q.max,f=Math.abs(S-x);if(f%I<1e-4&&f>1e-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:S<x&&L&&(S+=I),L){var C=x;x=S,S=C}for(var g=0;g<x;g+=Math.PI/2)g>S&&(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;F<g;F++)m[F]=arguments[F];return C=r.call.apply(r,[this].concat(m))||this,C.history=Object(D.a)(C.props),C}var f=l.prototype;return f.render=function(){return j.a.createElement(q.c,{history:this.history,children:this.props.children})},l}(j.a.Component),u=function(r){Object(Q.a)(l,r);function l(){for(var C,g=arguments.length,m=new Array(g),F=0;F<g;F++)m[F]=arguments[F];return C=r.call.apply(r,[this].concat(m))||this,C.history=Object(D.b)(C.props),C}var f=l.prototype;return f.render=function(){return j.a.createElement(q.c,{history:this.history,children:this.props.children})},l}(j.a.Component),c=function(l,f){return typeof l=="function"?l(f):l},o=function(l,f){return typeof l=="string"?Object(D.c)(l,null,null,f):l},i=function(l){return l},d=j.a.forwardRef;typeof d=="undefined"&&(d=i);function s(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}var A=d(function(r,l){var f=r.innerRef,C=r.navigate,g=r.onClick,m=Object(T.a)(r,["innerRef","navigate","onClick"]),F=m.target,P=Object(v.a)({},m,{onClick:function(Z){try{g&&g(Z)}catch(V){throw Z.preventDefault(),V}!Z.defaultPrevented&&Z.button===0&&(!F||F==="_self")&&!s(Z)&&(Z.preventDefault(),C())}});return i!==d?P.ref=l||f:P.ref=f,j.a.createElement("a",P)}),a=d(function(r,l){var f=r.component,C=f===void 0?A:f,g=r.replace,m=r.to,F=r.innerRef,P=Object(T.a)(r,["component","replace","to","innerRef"]);return j.a.createElement(q.e.Consumer,null,function(z){z||Object(E.a)(!1);var Z=z.history,V=o(c(m,z.location),z.location),M=V?Z.createHref(V):"",J=Object(v.a)({},P,{href:M,navigate:function(){var re=c(m,z.location),se=g?Z.replace:Z.push;se(re)}});return i!==d?J.ref=l||F:J.innerRef=F,j.a.createElement(C,J)})});if(!1)var p,w;var S=function(l){return l},x=j.a.forwardRef;typeof x=="undefined"&&(x=S);function L(){for(var r=arguments.length,l=new Array(r),f=0;f<r;f++)l[f]=arguments[f];return l.filter(function(C){return C}).join(" ")}var b=x(function(r,l){var f=r["aria-current"],C=f===void 0?"page":f,g=r.activeClassName,m=g===void 0?"active":g,F=r.activeStyle,P=r.className,z=r.exact,Z=r.isActive,V=r.location,M=r.sensitive,J=r.strict,X=r.style,re=r.to,se=r.innerRef,_e=Object(T.a)(r,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return j.a.createElement(q.e.Consumer,null,function(ge){ge||Object(E.a)(!1);var we=V||ge.location,Re=o(c(re,we),we),He=Re.pathname,Se=He&&He.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Te=Se?Object(q.f)(we.pathname,{path:Se,exact:z,sensitive:M,strict:J}):null,$e=!!(Z?Z(Te,we):Te),bt=$e?L(P,m):P,Ie=$e?Object(v.a)({},X,{},F):X,ze=Object(v.a)({"aria-current":$e&&C||null,className:bt,style:Ie,to:Re},_e);return S!==x?ze.ref=l||se:ze.innerRef=se,j.a.createElement(a,ze)})});if(!1)var h},"59Ip":function(qe,pe,G){var q=G("Sj9i");function Q(O,j,D,B,I,v,T,E,n,u,c){if(n===0)return!1;var o=n;if(c>j+o&&c>B+o&&c>v+o&&c>E+o||c<j-o&&c<B-o&&c<v-o&&c<E-o||u>O+o&&u>D+o&&u>I+o&&u>T+o||u<O-o&&u<D-o&&u<I-o&&u<T-o)return!1;var i=q.cubicProjectPoint(O,j,D,B,I,v,T,E,u,c,null);return i<=o/2}pe.containStroke=Q},"5VLF":function(qe,pe,G){"use strict";var q,Q;function O(j,D,B){var I=function(v,T){return j.js_beautify(v,T)};return I.js=j.js_beautify,I.css=D.css_beautify,I.html=B.html_beautify,I.js_beautify=j.js_beautify,I.css_beautify=D.css_beautify,I.html_beautify=B.html_beautify,I}!(q=[G("6UM0"),G("TXwP"),G("psGv")],Q=function(j,D,B){return O(j,D,B)}.apply(pe,q),Q!==void 0&&(qe.exports=Q))},"5gs/":function(qe,pe,G){"use strict";G.r(pe);var q=G("cWXX"),Q=G("/ezw"),O=G("g9YV"),j=G("wCAj"),D=G("/zsF"),B=G("PArb"),I=G("14J3"),v=G("BMrR"),T=G("+L6B"),E=G("2/Rp"),n=G("jCWc"),u=G("kPKH"),c=G("sPJy"),o=G("bE4q"),i=G("miYZ"),d=G("tsqr"),s=G("2qtc"),A=G("kLXV"),a=G("9og8"),p=G("Pv/L"),w=G("k1fw"),S=G("tJVT"),x=G("PpiC"),L=G("WmNS"),b=G.n(L),h=G("q1tI"),r=G.n(h),l=G("wd/R"),f=G.n(l),C=G("xOOu"),g=G.n(C),m=G("Ty5D"),F=G("9kvl"),P=G("55Ip"),z=G("jhfD"),Z=G("CTES"),V=G("RCxd"),M=G("/MfK"),J=G("m3rI"),X=G("xKgJ"),re=G("1vsH"),se=G("cVA7"),_e=G.n(se),ge=G("z9Ch"),we=G.n(ge),Re={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},He=function(Oe){var De,Ze,ht,Tt,kt,It=Oe.shixunHomeworks,St=Oe.globalSetting,ut=Oe.loading,nt=Oe.dispatch,tt=Object(m.i)(),Ce=Object(m.h)(),Pe=Object(h.useState)([]),pt=Object(S.a)(Pe,2),it=pt[0],xt=pt[1],_t=Object(h.useState)(Ce.query.tabs||0),Xe=Object(S.a)(_t,2),mt=Xe[0],Pt=Xe[1],Rt=It.shixunWorkReport,Qt=((De=Rt.echart_data)===null||De===void 0?void 0:De.efficiency_list.length)-parseInt((Ze=Rt.echart_data)===null||Ze===void 0?void 0:Ze.myself_eff[0]),Ir=function(){var Kt,Ur,Kr;return{title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(pr){if(pr.name===Rt.username){var Or;return"\u59D3\u540D\uFF1A"+Rt.username+"<br/>\u5B66\u53F7\uFF1A "+Rt.user_id+"<br/>\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+"<br/>\u5B66\u53F7\uFF1A "+Rt.user_id+"<br/>\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<si.length-1)){Nr.next=3;break}return Nr.next=3,Mr.addPage();case 3:case"end":return Nr.stop()}},Dn)}));return function(Dn){return on.apply(this,arguments)}}());case 2:case"end":return Cr.stop()}},gr)}),kn=0;case 6:if(!(kn<si.length)){Jt.next=11;break}return Jt.delegateYield(gn(kn),"t0",8);case 8:kn++,Jt.next=6;break;case 11:Fn.file("".concat(wt[nr-1].student_work_user_name).concat(nr,".pdf"),Un.output("blob")),er=Fn.folder("\u4EE3\u7801\u6587\u4EF6"),wn==null||((Jn=wn.shixun_detail)===null||Jn===void 0)||Jn.map(function(gr,Tr){var Xr,Cr=er.folder("\u7B2C".concat(Tr+1,"\u5173-").concat(gr.subject,"-").concat(gr.id));gr==null||((Xr=gr.game_codes)===null||Xr===void 0)||Xr.map(function(on){Cr.file("".concat(on.filename,".txt"),on==null?void 0:on.content)})}),$t.update({content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr),"/",wt==null?void 0:wt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(wt==null?void 0:wt.length)?($t.destroy(),en()):mr();case 16:case"end":return Jt.stop()}},In)})),2200);case 6:case"end":return Ln.stop()}},Qn)})),xr.apply(this,arguments)},mr=function(){return xr.apply(this,arguments)},nr=0,$t=A.a.info({width:460,title:r.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",r.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr+1),"/",tr!=="all"?1:wt==null?void 0:wt.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:we.a.modal,onOk:function(){}}),vr={margin:[0,0],filename:"".concat(et.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(tr!=="all"||(wt==null?void 0:wt.length)<2)){Gr.next=12;break}return Gr.delegateYield(b.a.mark(function En(){var Qn,wn,qr,Ln,In,Jn,Fn;return b.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:Jr(),Pr(),wn=wr.current.children,qr=Me()(),Ln=N.folder("".concat(et==null?void 0:et.username)),In=b.a.mark(function gn(kn){return b.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,qr.set(vr).from(wn[kn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Jt=Object(a.a)(b.a.mark(function gr(Tr){return b.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:if(!(kn<wn.length-1)){Cr.next=3;break}return Cr.next=3,Tr.addPage();case 3:case"end":return Cr.stop()}},gr)}));return function(gr){return Jt.apply(this,arguments)}}());case 2:case"end":return hr.stop()}},gn)}),Jn=0;case 7:if(!(Jn<wn.length)){Un.next=12;break}return Un.delegateYield(In(Jn),"t0",9);case 9:Jn++,Un.next=7;break;case 12:return Rr(!1),Ln.file("".concat(et.username,".pdf"),qr.output("blob"),{base64:!1}),Fn=Ln.folder("\u4EE3\u7801\u6587\u4EF6"),et==null||((Qn=et.shixun_detail)===null||Qn===void 0)||Qn.map(function(gn,kn){var er,hr=Fn.folder("\u7B2C".concat(kn+1,"\u5173-").concat(gn.subject,"-").concat(gn.id));gn==null||((er=gn.game_codes)===null||er===void 0)||er.map(function(Jt){hr.file("".concat(Jt.filename,".txt"),Jt==null?void 0:Jt.content)})}),$t.destroy(),en(),Un.abrupt("return",{v:void 0});case 19:case"end":return Un.stop()}},En)})(),"t0",7);case 7:if(Er=Gr.t0,!(typeof Er=="object")){Gr.next=10;break}return Gr.abrupt("return",Er.v);case 10:Gr.next=13;break;case 12:mr();case 13:case"end":return Gr.stop()}},dr)}));return function(tr){return br.apply(this,arguments)}}(),en=function(){N.generateAsync({type:"blob"}).then(function(dr){var tr=document.createElement("a");tr.href=window.URL.createObjectURL(dr),tr.download=et.course_name+".zip",document.body.appendChild(tr);var nr=document.createEvent("MouseEvents");nr.initEvent("click",!1,!1),tr.dispatchEvent(nr),document.body.removeChild(tr),$(new g.a)}),rt(!1)};Object(h.useEffect)(function(){an()},[tt.homeworkId]);var an=function(){var br=Object(a.a)(b.a.mark(function dr(){return b.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return un(!0),nr.next=3,It({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},tt)});case 3:un(!1),Object(X.c)()&&An();case 5:case"end":return nr.stop()}},dr)}));return function(){return br.apply(this,arguments)}}(),cn=[{title:"\u5173\u5361",dataIndex:"name",render:function(dr,tr,nr){return nr+1}},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:function(dr,tr,nr){return r.a.createElement("div",null,dr,tr.complete_status===4&&r.a.createElement(re.g,{status:tr.complete_status}))}},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:function(dr,tr,nr){return dr||"- -"}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:function(dr){return dr?"\u662F":"\u5426"}},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:function(dr,tr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},tr.myself_experience),"/",dr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(dr,tr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},dr),"/",tr.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(dr,tr){return Dt?r.a.createElement(bt,{max:tr.game_score_full,defaultValue:parseFloat(dr),onBlur:function(){var nr=Object(a.a)(b.a.mark(function $t(vr){var mr;return b.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,It({type:"shixunHomeworks/changeScore",payload:{categoryId:tt.homeworkId,type:"report",score:vr,challenge_id:tr.challenge_id}});case 2:return mr=Er.sent,Er.next=5,It({type:"shixunHomeworks/getShixunWorkReport",payload:Object(w.a)({},tt)});case 5:mr.status===0&&d.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return Er.stop()}},$t)}));return function($t){return nr.apply(this,arguments)}}()}):dr}}],mn=function(dr){It({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){dr==="next"?F.d.push("/classrooms/".concat(tt.coursesId,"/shixun_homework/").concat(tt.categoryId,"/").concat(Xe==null?void 0:Xe.student_work_id,"/comment")):F.d.push("/classrooms/".concat(tt.coursesId,"/shixun_homework/").concat(tt.categoryId,"/").concat(Qt==null?void 0:Qt.student_work_id,"/comment"))},200)};return r.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},r.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},r.a.createElement(Q.a,{loading:pn,active:!0,avatar:{size:40},paragraph:{rows:5}},r.a.createElement("div",{className:"edu-container"},et.course_id&&r.a.createElement("section",{className:"animated fadeIn"},r.a.createElement("aside",{className:""},et.category&&r.a.createElement(o.a,{separator:">"},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<l;C++)f[C]=arguments[C];return r=b.call.apply(b,[this].concat(f)),r.state={goInputText:""},r.buildOptionText=function(g){return"".concat(g," ").concat(r.props.locale.items_per_page)},r.changeSize=function(g){r.props.changeSize(Number(g))},r.handleChange=function(g){r.setState({goInputText:g.target.value})},r.handleBlur=function(g){var m=r.props,F=m.goButton,P=m.quickGo,z=m.rootPrefixCls,Z=r.state.goInputText;if(F||Z==="")return;if(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(z,"-prev"))>=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.current<w(void 0,l.state,l.props)},l.runIfEnter=function(F,P){if(F.key==="Enter"||F.charCode===13){for(var z=arguments.length,Z=new Array(z>2?z-2:0),V=2;V<z;V++)Z[V-2]=arguments[V];P.apply(void 0,Z)}},l.runIfEnterPrev=function(F){l.runIfEnter(F,l.prev)},l.runIfEnterNext=function(F){l.runIfEnter(F,l.next)},l.runIfEnterJumpPrev=function(F){l.runIfEnter(F,l.jumpPrev)},l.runIfEnterJumpNext=function(F){l.runIfEnter(F,l.jumpNext)},l.handleGoTO=function(F){(F.keyCode===o.ENTER||F.type==="click")&&l.handleChange(l.state.currentInputValue)};var f=r.onChange!==A,C="current"in r;C&&!f&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var g=r.defaultCurrent;"current"in r&&(g=r.current);var m=r.defaultPageSize;return"pageSize"in r&&(m=r.pageSize),g=Math.min(g,w(m,void 0,r)),l.state={current:g,currentInputValue:g,pageSize:m},l}return Object(D.a)(h,[{key:"componentDidUpdate",value:function(l,f){var C=this.props.prefixCls;if(f.current!==this.state.current&&this.paginationNode){var g=this.paginationNode.querySelector(".".concat(C,"-item-").concat(f.current));g&&document.activeElement===g&&g.blur()}}},{key:"getValidValue",value:function(l){var f=l.target.value,C=w(void 0,this.state,this.props),g=this.state.currentInputValue,m;return f===""?m=f:isNaN(Number(f))?m=g:f>=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<ze?$e+1:ze,yt=Object.keys(this.props).reduce(function(me,ye){return(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(me[ye]=l.props[ye]),me},{});if(re)return Fe&&(typeof Fe=="boolean"?xe=T.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Z.jump_to_confirm):xe=T.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Fe),xe=T.a.createElement("li",{title:J?"".concat(Z.jump_to).concat($e,"/").concat(ze):null,className:"".concat(C,"-simple-pager")},xe)),T.a.createElement("ul",Object(q.a)({className:n()(C,"".concat(C,"-simple"),Object(Q.a)({},"".concat(C,"-disabled"),F),g),style:m,ref:this.savePaginationNode},yt),T.a.createElement("li",{title:J?Z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(C,"-prev"),Object(Q.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ct)),T.a.createElement("li",{title:J?"".concat($e,"/").concat(ze):null,className:"".concat(C,"-simple-pager")},T.a.createElement("input",{type:"text",value:Ie,disabled:F,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),T.a.createElement("span",{className:"".concat(C,"-slash")},"/"),ze),T.a.createElement("li",{title:J?Z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(C,"-next"),Object(Q.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ft)),xe);if(ze<=3+ke*2){var Et={locale:Z,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:J,itemRender:se};ze||at.push(T.a.createElement(c,Object(q.a)({},Et,{key:"noPager",page:ze,className:"".concat(C,"-disabled")})));for(var Ot=1;Ot<=ze;Ot+=1){var Mt=$e===Ot;at.push(T.a.createElement(c,Object(q.a)({},Et,{key:Ot,page:Ot,active:Mt})))}}else{var Qe=M?Z.prev_3:Z.prev_5,Ne=M?Z.next_3:Z.next_5;_e&&(Ae=T.a.createElement("li",{title:J?Qe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(C,"-jump-prev"),Object(Q.a)({},"".concat(C,"-jump-prev-custom-icon"),!!ge))},se(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ge,"prev page"))),ne=T.a.createElement("li",{title:J?Ne:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(C,"-jump-next"),Object(Q.a)({},"".concat(C,"-jump-next-custom-icon"),!!we))},se(this.getJumpNextPage(),"jump-next",this.getItemIcon(we,"next page")))),ce=T.a.createElement(c,{locale:Z,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:!1,showTitle:J,itemRender:se}),ae=T.a.createElement(c,{locale:Z,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:J,itemRender:se});var lt=Math.max(1,$e-ke),dt=Math.min($e+ke,ze);$e-1<=ke&&(dt=1+ke*2),ze-$e<=ke&&(lt=ze-ke*2);for(var Ye=lt;Ye<=dt;Ye+=1){var st=$e===Ye;at.push(T.a.createElement(c,{locale:Z,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ye,page:Ye,active:st,showTitle:J,itemRender:se}))}$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;J<X;J++)M=Math.max(f(V[J],z).width,M);return E>n&&(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<re;X++)J[X]=h(J[X],M);return J.join(`
|
|
`)}function b(P,z,Z,V){V=D({},V),V.font=z;var Z=B(Z,"...");V.maxIterations=B(V.maxIterations,2);var M=V.minChar=B(V.minChar,0);V.cnCharWidth=d("\u56FD",z);var J=V.ascCharWidth=d("a",z);V.placeholder=B(V.placeholder,"");for(var X=P=Math.max(0,P-1),re=0;re<M&&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;J<X&&M<z;J++){var re=P.charCodeAt(J);M+=0<=re&&re<=127?Z:V}return J}function l(P){return d("\u56FD",P)}function f(P,z){return o.measureText(P,z)}o.measureText=function(P,z){var Z=j();return Z.font=z||c,Z.measureText(P)};function C(P,z,Z,V,M){P!=null&&(P+="");var J=B(V,l(z)),X=P?P.split(`
|
|
`):[],re=X.length*J,se=re,_e=!0;if(Z&&(se+=Z[0]+Z[2]),P&&M){_e=!1;var ge=M.outerHeight,we=M.outerWidth;if(ge!=null&&se>ge)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;He<Se;He++)X[He]=h(X[He],Re)}return{lines:X,height:re,outerHeight:se,lineHeight:J,canCacheByTextString:_e}}function g(P,z){var Z={lines:[],width:0,height:0};if(P!=null&&(P+=""),!P)return Z;for(var V=u.lastIndex=0,M;(M=u.exec(P))!=null;){var J=M.index;J>V&&m(Z,P.substring(V,J)),m(Z,M[2],M[1]),V=u.lastIndex}V<P.length&&m(Z,P.substring(V,P.length));var X=Z.lines,re=0,se=0,_e=[],ge=z.textPadding,we=z.truncate,Re=we&&we.outerWidth,He=we&&we.outerHeight;ge&&(Re!=null&&(Re-=ge[1]+ge[3]),He!=null&&(He-=ge[0]+ge[2]));for(var Se=0;Se<X.length;Se++){for(var Te=X[Se],$e=0,bt=0,Ie=0;Ie<Te.tokens.length;Ie++){var ze=Te.tokens[Ie],at=ze.styleName&&z.rich[ze.styleName]||{},Ae=ze.textPadding=at.textPadding,ne=ze.font=at.font||z.font,ae=ze.textHeight=B(at.textHeight,l(ne));if(Ae&&(ae+=Ae[0]+Ae[2]),ze.height=ae,ze.lineHeight=I(at.textLineHeight,z.textLineHeight,ae),ze.textAlign=at&&at.textAlign||z.textAlign,ze.textVerticalAlign=at&&at.textVerticalAlign||"middle",He!=null&&re+ze.lineHeight>He)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&&ft<ce&&(!xe||ft<ct?(ze.text="",ze.textWidth=ce=0):(ze.text=L(ze.text,ft-ct,ne,we.ellipsis,{minChar:we.minChar}),ze.textWidth=d(ze.text,ne),ce=ze.textWidth+ct))}bt+=ze.width=ce,at&&($e=Math.max($e,ze.lineHeight))}Te.width=bt,Te.lineHeight=$e,re+=$e,se=Math.max(se,bt)}Z.outerWidth=Z.width=B(z.textWidth,se),Z.outerHeight=Z.height=B(z.textHeight,re),ge&&(Z.outerWidth+=ge[1]+ge[3],Z.outerHeight+=ge[0]+ge[2]);for(var Se=0;Se<_e.length;Se++){var ze=_e[Se],yt=ze.percentWidth;ze.width=parseInt(yt,10)/100*se}return Z}function m(P,z,Z){for(var V=z==="",M=z.split(`
|
|
`),J=P.lines,X=0;X<M.length;X++){var re=M[X],se={styleName:Z,text:re,isLineHolder:!re&&!V};if(X)J.push({tokens:[se]});else{var _e=(J[J.length-1]||(J[0]={tokens:[]})).tokens,ge=_e.length;ge===1&&_e[0].isLineHolder?_e[0]=se:(re||!ge||V)&&_e.push(se)}}}function F(P){var z=(P.fontSize||P.fontFamily)&&[P.fontStyle,P.fontWeight,(P.fontSize||12)+"px",P.fontFamily||"sans-serif"].join(" ");return z&&v(z)||P.textFont||P.font}pe.DEFAULT_FONT=c,pe.$override=i,pe.getWidth=d,pe.getBoundingRect=s,pe.adjustTextX=p,pe.adjustTextY=w,pe.calculateTextPosition=S,pe.adjustTextPositionOnRect=x,pe.truncateText=L,pe.getLineHeight=l,pe.measureText=f,pe.parsePlainText=C,pe.parseRichText=g,pe.makeFont=F},"6RRn":function(qe,pe,G){"use strict";var q=G("wCXF"),Q=G("n6Qo");G.d(pe,"b",function(){return Q.a});var O=G("IBYe"),j=G("6eGT"),D=G("hW8S");G.d(pe,"a",function(){return D.a}),pe.c=q.b},"6UM0":function(qe,pe,G){var q,Q;(function(){var O;(function(){"use strict";var D=[function(T,E,n){var u=n(1).Beautifier,c=n(5).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(2).Output,c=n(3).Token,o=n(4),i=n(5).Options,d=n(7).Tokenizer,s=n(7).line_starters,A=n(7).positionable_operators,a=n(7).TOKEN;function p(M,J){return J.indexOf(M)!==-1}function w(M){return M.replace(/^\s+/g,"")}function S(M){for(var J={},X=0;X<M.length;X++)J[M[X].replace(/-/g,"_")]=M[X];return J}function x(M,J){return M&&M.type===a.RESERVED&&M.text===J}function L(M,J){return M&&M.type===a.RESERVED&&p(M.text,J)}var b=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],r=S(h),l=[r.before_newline,r.preserve_newline],f={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function C(M,J){if(J.multiline_frame||J.mode===f.ForInitializer||J.mode===f.Conditional)return;M.remove_indent(J.start_line_index)}function g(M){M=M.replace(o.allLineBreaks,`
|
|
`);for(var J=[],X=M.indexOf(`
|
|
`);X!==-1;)J.push(M.substring(0,X)),M=M.substring(X+1),X=M.indexOf(`
|
|
`);return M.length&&J.push(M),J}function m(M){return M===f.ArrayLiteral}function F(M){return p(M,[f.Expression,f.ForInitializer,f.Conditional])}function P(M,J){for(var X=0;X<M.length;X++){var re=M[X].trim();if(re.charAt(0)!==J)return!1}return!0}function z(M,J){for(var X=0,re=M.length,se;X<re;X++)if(se=M[X],se&&se.indexOf(J)!==0)return!1;return!0}function Z(M,J){J=J||{},this._source_text=M||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(J)}Z.prototype.create_flags=function(M,J){var X=0;M&&(X=M.indentation_level,!this._output.just_added_newline()&&M.line_indent_level>X&&(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;_e<X;_e+=1)this.print_newline(_e>0,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;ge<X;ge+=1)this.print_newline(!0,J)}};var V=["async","break","continue","return","throw","yield"];Z.prototype.allow_wrap_or_preserved_newline=function(M,J){if(J=J===void 0?!1:J,this._output.just_added_newline())return;var X=this._options.preserve_newlines&&M.newlines||J,re=p(this._flags.last_token.text,A)||p(M.text,A);if(re){var se=p(this._flags.last_token.text,A)&&p(this._options.operator_position,l)||p(M.text,A);X=X&&se}if(X)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,V))return;this._output.set_wrap_point()}},Z.prototype.print_newline=function(M,J){if(!J&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var X=this._tokens.peek();this._flags.mode===f.Statement&&!(this._flags.if_block&&x(X,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(M)&&(this._flags.multiline_frame=!0)},Z.prototype.print_token_line_indentation=function(M){this._output.just_added_newline()&&(this._options.keep_array_indentation&&M.newlines&&(M.text==="["||m(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(M.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},Z.prototype.print_token=function(M){if(this._output.raw){this._output.add_raw_token(M);return}if(this._options.comma_first&&M.previous&&M.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var J=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(J),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(M),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(M),this._output.non_breaking_space=!0,this._output.add_token(M.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},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<X.length;re++)se?(this.print_token_line_indentation(M),this._output.add_token(w(X[re]))):_e&&X[re]?(this.print_token_line_indentation(M),this._output.add_token(X[re].substring(we))):(this._output.current_line.set_indent(-1),this._output.add_token(X[re])),this.print_newline(!1,J);this._flags.alignment=0}},Z.prototype.handle_comment=function(M,J){M.newlines?this.print_newline(!1,J):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(M),this.print_newline(!1,J)},Z.prototype.handle_dot=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,b)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(M,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(M)},Z.prototype.handle_unknown=function(M,J){this.print_token(M),M.text[M.text.length-1]===`
|
|
`&&this.print_newline(!1,J)},Z.prototype.handle_eof=function(M){for(;this._flags.mode===f.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M)},T.exports.Beautifier=Z},function(T){function E(c){this.__parent=c,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=[]}E.prototype.clone_empty=function(){var c=new E(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},E.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},E.prototype.has_match=function(c){for(var o=this.__items.length-1;o>=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;o<c.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(c){for(var o=this.__lines.length;c<o;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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<s.length;A++)s[A]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[A];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",c),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}o.prototype=new u,T.exports.Options=o},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,E,n){var u=n(8).InputScanner,c=n(9).Tokenizer,o=n(9).TOKEN,i=n(13).Directives,d=n(4),s=n(12).Pattern,A=n(14).TemplatablePattern;function a(P,z){return z.indexOf(P)!==-1}var p={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},w=new i(/\/\*/,/\*\//),S=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,x=/[0-9]/,L=/[^\d\.]/,b=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".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(/<!--/),html_comment_end: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<this.__input_length},n.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},n.prototype.peek=function(u){var c=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(c=this.__input.charAt(u)),c},n.prototype.__match=function(u,c){u.lastIndex=c;var o=u.exec(this.__input);return o&&!(E&&u.sticky)&&(o.index!==c&&(o=null)),o},n.prototype.test=function(u,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(u,c):!1},n.prototype.testChar=function(u,c){var o=this.peek(c);return u.lastIndex=0,o!==null&&u.test(o)},n.prototype.match=function(u){var c=this.__match(u,this.__position);return c?this.__position+=c[0].length:c=null,c},n.prototype.read=function(u,c,o){var i="",d;return u&&(d=this.match(u),d&&(i+=d[0])),c&&(d||!u)&&(i+=this.readUntil(c,o)),i},n.prototype.readUntil=function(u,c){var o="",i=this.__position;u.lastIndex=this.__position;var d=u.exec(this.__input);return d?(i=d.index,c&&(i+=d[0].length)):i=this.__input_length,o=this.__input.substring(this.__position,i),this.__position=i,o},n.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},n.prototype.get_regexp=function(u,c){var o=null,i="g";return c&&E&&(i="y"),typeof u=="string"&&u!==""?o=new RegExp(u,i):u&&(o=new RegExp(u.source,i)),o},n.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(u){var c=this.__position,o=this.readUntilAfter(u);return this.__position=c,o},n.prototype.lookBack=function(u){var c=this.__position-1;return 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<this.__tokens_length},E.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},E.prototype.peek=function(n){var u=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(u=this.__tokens[n]),u},E.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},T.exports.TokenStream=E},function(T,E,n){var u=n(12).Pattern;function c(o,i){u.call(this,o,i),i?this._line_regexp=this._input.get_regexp(i._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}c.prototype=new u,c.prototype.__set_whitespace_patterns=function(o,i){o+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},c.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var i=this.__split(this._newline_regexp,o);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return o},c.prototype.matching=function(o,i){var d=this._create();return d.__set_whitespace_patterns(o,i),d._update(),d},c.prototype._create=function(){return new c(this._input,this)},c.prototype.__split=function(o,i){o.lastIndex=0;for(var d=0,s=[],A=o.exec(i);A;)s.push(i.substring(d,A.index)),d=A.index+A[0].length,A=o.exec(i);return d<i.length?s.push(i.substring(d,i.length)):s.push(""),s},T.exports.WhitespacePattern=c},function(T){function E(n,u){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,u&&(this._starting_pattern=this._input.get_regexp(u._starting_pattern,!0),this._match_pattern=this._input.get_regexp(u._match_pattern,!0),this._until_pattern=this._input.get_regexp(u._until_pattern),this._until_after=u._until_after)}E.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(n){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(n),u._update(),u},E.prototype.until=function(n){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(n),u._update(),u},E.prototype.starting_with=function(n){var u=this._create();return u._starting_pattern=this._input.get_regexp(n,!0),u._update(),u},E.prototype.matching=function(n){var u=this._create();return u._match_pattern=this._input.get_regexp(n,!0),u._update(),u},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},T.exports.Pattern=E},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(12).Pattern,c={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(i,d){u.call(this,i,d),this.__template_pattern=null,this._disabled=Object.assign({},c),this._excluded=Object.assign({},c),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var s=new u(i);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}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;n<T.length;n++){var u=T[n];u.invisible||u.ignore?(u.__alreadyNotVisible||u.onRemove(E),u.__alreadyNotVisible=!0):(u.__alreadyNotVisible&&u.onAdd(E),u.__alreadyNotVisible=!1,u.__dirty&&(u.beforeBrush&&u.beforeBrush(),(u.brushVML||u.brush).call(u,E),u.afterBrush&&u.afterBrush())),u.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(E),this._firstPaint=!1)},resize:function(T,E){var T=T==null?this._getWidth():T,E=E==null?this._getHeight():E;if(this._width!==T||this._height!==E){this._width=T,this._height=E;var n=this._vmlViewport.style;n.width=T+"px",n.height=E+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var T=this.root,E=T.currentStyle;return(T.clientWidth||D(E.width))-D(E.paddingLeft)-D(E.paddingRight)|0},_getHeight:function(){var T=this.root,E=T.currentStyle;return(T.clientHeight||D(E.height))-D(E.paddingTop)-D(E.paddingBottom)|0}};function I(T){return function(){q('In IE8.0 VML mode painter not support method "'+T+'"')}}j(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(T){B.prototype[T]=I(T)});var v=B;qe.exports=v},"7Cbv":function(qe,pe,G){"use strict";var q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Q=new Uint8Array(16);function O(){if(!q)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return q(Q)}var j=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function D(c){return typeof c=="string"&&j.test(c)}for(var B=D,I=[],v=0;v<256;++v)I.push((v+256).toString(16).substr(1));function T(c){var o=arguments.length>1&&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<b.length;r++)if(b[r]!==h[r])return!0;return!1}function w(b,h){for(var r=0;r<b.length;r++){var l=b[r];l.setTransform(h),h.beginPath(),l.buildPath(h,l.shape),h.clip(),l.restoreTransform(h)}}function S(b,h){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+b+"px","height:"+h+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var x=function(b,h,r){this.type="canvas";var l=!b.nodeName||b.nodeName.toUpperCase()==="CANVAS";this._opts=r=O.extend({},r||{}),this.dpr=r.devicePixelRatio||Q,this._singleCanvas=l,this.root=b;var f=b.style;f&&(f["-webkit-tap-highlight-color"]="transparent",f["-webkit-user-select"]=f["user-select"]=f["-webkit-touch-callout"]="none",b.innerHTML=""),this.storage=h;var C=this._zlevelList=[],g=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,l){var F=b.width,P=b.height;r.width!=null&&(F=r.width),r.height!=null&&(P=r.height),this.dpr=r.devicePixelRatio||1,b.width=F*this.dpr,b.height=P*this.dpr,this._width=F,this._height=P;var z=new I(b,this,this.dpr);z.__builtin__=!0,z.initContext(),g[u]=z,z.zlevel=u,C.push(u),this._domRoot=b}else{this._width=this._getSize(0),this._height=this._getSize(1);var m=this._domRoot=S(this._width,this._height);b.appendChild(m)}this._hoverlayer=null,this._hoverElements=[]};x.prototype={constructor:x,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var b=this.getViewportRoot();if(b)return{offsetLeft:b.offsetLeft||0,offsetTop:b.offsetTop||0}},refresh:function(b){var h=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(h,b,this._redrawId);for(var l=0;l<r.length;l++){var f=r[l],C=this._layers[f];if(!C.__builtin__&&C.refresh){var g=l===0?this._backgroundColor:null;C.refresh(g)}}return this.refreshHover(),this},addHover:function(b,h){if(b.__hoverMir)return;var r=new b.constructor({style:b.style,shape:b.shape,z:b.z,z2:b.z2,silent:b.silent});return r.__from=b,b.__hoverMir=r,h&&r.setStyle(h),this._hoverElements.push(r),r},removeHover:function(b){var h=b.__hoverMir,r=this._hoverElements,l=O.indexOf(r,h);l>=0&&r.splice(l,1),b.__hoverMir=null},clearHover:function(b){for(var h=this._hoverElements,r=0;r<h.length;r++){var l=h[r].__from;l&&(l.__hoverMir=null)}h.length=0},refreshHover:function(){var b=this._hoverElements,h=b.length,r=this._hoverlayer;if(r&&r.clear(),!h)return;B(b,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(n));var l={};r.ctx.save();for(var f=0;f<h;){var C=b[f],g=C.__from;if(!(g&&g.__zr)){b.splice(f,1),g.__hoverMir=null,h--;continue}f++,g.invisible||(C.transform=g.transform,C.invTransform=g.invTransform,C.__clipPaths=g.__clipPaths,this._doPaintEl(C,r,!0,l))}r.ctx.restore()},getHoverLayer:function(){return this.getLayer(n)},_paintList:function(b,h,r){if(this._redrawId!==r)return;h=h||!1,this._updateLayerStatus(b);var l=this._doPaintList(b,h);if(this._needsManuallyCompositing&&this._compositeManually(),!l){var f=this;v(function(){f._paintList(b,h,r)})}},_compositeManually:function(){var b=this.getLayer(u).ctx,h=this._domRoot.width,r=this._domRoot.height;b.clearRect(0,0,h,r),this.eachBuiltinLayer(function(l){l.virtual&&b.drawImage(l.dom,0,0,h,r)})},_doPaintList:function(b,h){for(var r=[],l=0;l<this._zlevelList.length;l++){var f=this._zlevelList[l],C=this._layers[f];C.__builtin__&&C!==this._hoverlayer&&(C.__dirty||h)&&r.push(C)}for(var g=!0,m=0;m<r.length;m++){var C=r[m],F=C.ctx,P={};F.save();var z=h?C.__startIndex:C.__drawIndex,Z=!h&&C.incremental&&Date.now,V=Z&&Date.now(),M=C.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(C.__startIndex===C.__endIndex)C.clear(!1,M);else if(z===C.__startIndex){var J=b[z];(!J.incremental||!J.notClear||h)&&C.clear(!1,M)}z===-1&&(console.error("For some unknown reason. drawIndex is -1"),z=C.__startIndex);for(var X=z;X<C.__endIndex;X++){var re=b[X];if(this._doPaintEl(re,C,h,P),re.__dirty=re.__dirtyText=!1,Z){var se=Date.now()-V;if(se>15)break}}C.__drawIndex=X,C.__drawIndex<C.__endIndex&&(g=!1),P.prevElClipPaths&&F.restore(),F.restore()}return E.wxa&&O.each(this._layers,function(_e){_e&&_e.ctx&&_e.ctx.draw&&_e.ctx.draw()}),g},_doPaintEl:function(b,h,r,l){var f=h.ctx,C=b.transform;if((h.__dirty||r)&&!b.invisible&&b.style.opacity!==0&&!(C&&!C[0]&&!C[3])&&!(b.culling&&a(b,this._width,this._height))){var g=b.__clipPaths,m=l.prevElClipPaths;(!m||p(g,m))&&(m&&(f.restore(),l.prevElClipPaths=null,l.prevEl=null),g&&(f.save(),w(g,f),l.prevElClipPaths=g)),b.beforeBrush&&b.beforeBrush(f),b.brush(f,l.prevEl||null),l.prevEl=b,b.afterBrush&&b.afterBrush(f)}},getLayer:function(b,h){this._singleCanvas&&!this._needsManuallyCompositing&&(b=u);var r=this._layers[b];return r||(r=new I("zr_"+b,this,this.dpr),r.zlevel=b,r.__builtin__=!0,this._layerConfig[b]?O.merge(r,this._layerConfig[b],!0):this._layerConfig[b-c]&&O.merge(r,this._layerConfig[b-c],!0),h&&(r.virtual=h),this.insertLayer(b,r),r.initContext()),r},insertLayer:function(b,h){var r=this._layers,l=this._zlevelList,f=l.length,C=null,g=-1,m=this._domRoot;if(r[b]){j("ZLevel "+b+" has been used already");return}if(!d(h)){j("Layer of zlevel "+b+" is not valid");return}if(f>0&&b>l[0]){for(g=0;g<f-1&&!(l[g]<b&&l[g+1]>b);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;f<r.length;f++)l=r[f],b.call(h,this._layers[l],l)},eachBuiltinLayer:function(b,h){var r=this._zlevelList,l,f,C;for(C=0;C<r.length;C++)f=r[C],l=this._layers[f],l.__builtin__&&b.call(h,l,f)},eachOtherLayer:function(b,h){var r=this._zlevelList,l,f,C;for(C=0;C<r.length;C++)f=r[C],l=this._layers[f],l.__builtin__||b.call(h,l,f)},getLayers:function(){return this._layers},_updateLayerStatus:function(b){this.eachBuiltinLayer(function(P,z){P.__dirty=P.__used=!1});function h(P){f&&(f.__endIndex!==P&&(f.__dirty=!0),f.__endIndex=P)}if(this._singleCanvas)for(var r=1;r<b.length;r++){var l=b[r];if(l.zlevel!==b[r-1].zlevel||l.incremental){this._needsManuallyCompositing=!0;break}}for(var f=null,C=0,g,r=0;r<b.length;r++){var l=b[r],m=l.zlevel,F;g!==m&&(g=m,C=0),l.incremental?(F=this.getLayer(m+o,this._needsManuallyCompositing),F.incremental=!0,C=1):F=this.getLayer(m+(C>0?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;l<this._zlevelList.length;l++){var f=this._zlevelList[l];if(f===b||f===b+c){var C=this._layers[f];O.merge(C,r[b],!0)}}}},delLayer:function(b){var h=this._layers,r=this._zlevelList,l=h[b];if(!l)return;l.dom.parentNode.removeChild(l.dom),delete h[b],r.splice(O.indexOf(r,b),1)},resize:function(b,h){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var l=this._opts;if(b!=null&&(l.width=b),h!=null&&(l.height=h),b=this._getSize(0),h=this._getSize(1),r.style.display="",this._width!==b||h!==this._height){r.style.width=b+"px",r.style.height=h+"px";for(var f in this._layers)this._layers.hasOwnProperty(f)&&this._layers[f].resize(b,h);O.each(this._progressiveLayers,function(C){C.resize(b,h)}),this.refresh(!0)}this._width=b,this._height=h}else{if(b==null||h==null)return;this._width=b,this._height=h,this.getLayer(u).resize(b,h)}return this},clearLayer:function(b){var h=this._layers[b];h&&h.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(b){if(b=b||{},this._singleCanvas&&!this._compositeManually)return this._layers[u].dom;var h=new I("image",this,b.pixelRatio||this.dpr);if(h.initContext(),h.clear(!1,b.backgroundColor||this._backgroundColor),b.pixelRatio<=this.dpr){this.refresh();var r=h.dom.width,l=h.dom.height,f=h.ctx;this.eachLayer(function(P){P.__builtin__?f.drawImage(P.dom,0,0,r,l):P.renderToCanvas&&(h.ctx.save(),P.renderToCanvas(h.ctx),h.ctx.restore())})}else for(var C={},g=this.storage.getDisplayList(!0),m=0;m<g.length;m++){var F=g[m];this._doPaintEl(F,h,!0,C)}return h.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(b){var h=this._opts,r=["width","height"][b],l=["clientWidth","clientHeight"][b],f=["paddingLeft","paddingTop"][b],C=["paddingRight","paddingBottom"][b];if(h[r]!=null&&h[r]!=="auto")return parseFloat(h[r]);var g=this.root,m=document.defaultView.getComputedStyle(g);return(g[l]||i(m[r])||i(g.style[r]))-(i(m[f])||0)-(i(m[C])||0)|0},pathToImage:function(b,h){h=h||this.dpr;var r=document.createElement("canvas"),l=r.getContext("2d"),f=b.getBoundingRect(),C=b.style,g=C.shadowBlur*h,m=C.shadowOffsetX*h,F=C.shadowOffsetY*h,P=C.hasStroke()?C.lineWidth:0,z=Math.max(P/2,-m+g),Z=Math.max(P/2,m+g),V=Math.max(P/2,-F+g),M=Math.max(P/2,F+g),J=f.width+z+Z,X=f.height+V+M;r.width=J*h,r.height=X*h,l.scale(h,h),l.clearRect(0,0,J,X),l.dpr=h;var re={position:b.position,rotation:b.rotation,scale:b.scale};b.position=[z-f.x,V-f.y],b.rotation=0,b.scale=[1,1],b.updateTransform(),b&&b.brush(l);var se=T,_e=new se({style:{x:0,y:0,image:r}});return re.position!=null&&(_e.position=b.position=re.position),re.rotation!=null&&(_e.rotation=b.rotation=re.rotation),re.scale!=null&&(_e.scale=b.scale=re.scale),_e}};var L=x;qe.exports=L},"7ahc":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return w});var q=G("k1fw"),Q=G("0Owb"),O=G("+L6B"),j=G("2/Rp"),D=G("y8nQ"),B=G("Vl3Y"),I=G("tJVT"),v=G("OaEy"),T=G("2fM7"),E=G("q1tI"),n=G.n(E),u=G("VrN/"),c=G.n(u),o=G("p77/"),i=G.n(o),d=G("c5Ni"),s=G.n(d),A=T.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},p={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};pe.b=function(S){var x=S.callback,L=S.onCancel,b=Object(E.useState)("python"),h=Object(I.a)(b,2),r=h[0],l=h[1];function f(g){l(p[g][1])}function C(g){x(g)}return n.a.createElement(B.a,Object(Q.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),n.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(T.a,{onChange:f},Object.keys(p).map(function(g){return n.a.createElement(A,{key:g,value:g},p[g][0])}))),n.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(w,{mode:r})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(j.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(j.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function w(S){var x=S.value,L=S.onChange,b=S.mode,h=S.options,r=h===void 0?{}:h,l=Object(E.useRef)(),f=Object(E.useState)(),C=Object(I.a)(f,2),g=C[0],m=C[1];return Object(E.useEffect)(function(){if(g){function F(P){var z=P.getValue();L&&L(z)}return g.on("change",F),function(){g.off("change",F)}}},[g,L]),Object(E.useEffect)(function(){g&&g.setOption("mode",b)},[g,b]),Object(E.useEffect)(function(){g&&((x!==g.getValue()||x==="")&&setTimeout(function(){g.setValue(x||" ")},300))},[g,x]),Object(E.useEffect)(function(){if(l.current&&!g){var F=c.a.fromTextArea(l.current,Object(q.a)({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));m(F)}},[l.current,g]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:l}))}},"7ixt":function(qe,pe,G){"use strict";G.d(pe,"a",function(){return O});var q={adjustX:1,adjustY:1},Q=[0,0],O={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:Q},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:Q},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:Q},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:Q},topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:Q},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:Q},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:Q},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:Q},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:Q},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:Q},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:Q},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:Q}},j=O},"7oTu":function(qe,pe,G){var q=G("IMiH"),Q=G("QBsz"),O=Q.applyTransform,j=q.CMD,D=[[],[],[]],B=Math.sqrt,I=Math.atan2;function v(T,E){var n=T.data,u,c,o,i,d,s,A=j.M,a=j.C,p=j.L,w=j.R,S=j.A,x=j.Q;for(o=0,i=0;o<n.length;){u=n[o++],i=o,c=0;switch(u){case A:c=1;break;case p:c=1;break;case a:c=3;break;case x:c=2;break;case S:var L=E[4],b=E[5],h=B(E[0]*E[0]+E[1]*E[1]),r=B(E[2]*E[2]+E[3]*E[3]),l=I(-E[1]/r,E[0]/h);n[o]*=h,n[o++]+=L,n[o]*=r,n[o++]+=b,n[o++]*=h,n[o++]*=r,n[o++]+=l,n[o++]+=l,o+=2,i=o;break;case w:s[0]=n[o++],s[1]=n[o++],O(s,s,E),n[i++]=s[0],n[i++]=s[1],s[0]+=n[o++],s[1]+=n[o++],O(s,s,E),n[i++]=s[0],n[i++]=s[1]}for(d=0;d<c;d++){var s=D[d];s[0]=n[o++],s[1]=n[o++],O(s,s,E),n[i++]=s[0],n[i++]=s[1]}}}qe.exports=v},"815F":function(qe,pe,G){"use strict";G.d(pe,"e",function(){return I}),G.d(pe,"c",function(){return T}),G.d(pe,"d",function(){return E}),G.d(pe,"a",function(){return u}),G.d(pe,"f",function(){return c}),G.d(pe,"b",function(){return o});var q=G("KQm4"),Q=G("VTBJ"),O=G("Ff2n"),j=G("Zm9Q"),D=G("Kwbf"),B=G("OZM5");function I(i,d){return i!=null?i:d}function v(){var i=arguments.length>0&&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<q.modeInfo.length;Q++){var O=q.modeInfo[Q];O.mimes&&(O.mime=O.mimes[0])}q.findModeByMIME=function(j){j=j.toLowerCase();for(var D=0;D<q.modeInfo.length;D++){var B=q.modeInfo[D];if(B.mime==j)return B;if(B.mimes){for(var I=0;I<B.mimes.length;I++)if(B.mimes[I]==j)return B}}if(/\+xml$/.test(j))return q.findModeByMIME("application/xml");if(/\+json$/.test(j))return q.findModeByMIME("application/json")},q.findModeByExtension=function(j){j=j.toLowerCase();for(var D=0;D<q.modeInfo.length;D++){var B=q.modeInfo[D];if(B.ext){for(var I=0;I<B.ext.length;I++)if(B.ext[I]==j)return B}}},q.findModeByFileName=function(j){for(var D=0;D<q.modeInfo.length;D++){var B=q.modeInfo[D];if(B.file&&B.file.test(j))return B}var I=j.lastIndexOf("."),v=I>-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<q.modeInfo.length;D++){var B=q.modeInfo[D];if(B.name.toLowerCase()==j)return B;if(B.alias){for(var I=0;I<B.alias.length;I++)if(B.alias[I].toLowerCase()==j)return B}}}})},"8XDt":function(qe,pe,G){G("qH13");var q=G("aX58"),Q=q.registerPainter,O=G("6fms");Q("vml",O)},"8hTe":function(qe,pe,G){qe.exports={button:"button___1wy9m"}},"9Bee":function(qe,pe,G){"use strict";var q=G("DYRE"),Q=G("zeV3"),O=G("+L6B"),j=G("2/Rp"),D=G("k1fw"),B=G("9og8"),I=G("tJVT"),v=G("WmNS"),T=G.n(v),E=G("q1tI"),n=G.n(E),u=G("vg9a"),c=G("DlQD"),o=G.n(c),i=G("rUJ1");function d(ee,U){var N=ee.match(/^(\s+)(?:```)/);if(N===null)return U;var $=N[1];return U.split(`
|
|
`).map(function(le){var te=le.match(/^\s+/);if(te===null)return le;var Ke=Object(I.a)(te,1),Ct=Ke[0];return Ct.length>=$.length?le.slice($.length):le}).join(`
|
|
`)}var s=[],A=["<ul>"],a=new o.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){s.length=0,A=["<ul>"]}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("<li><a href='#"+le.anchor+"'>"+le.text+"</a>"),U++;var te=[];return U=x(ee,U,le.level,te),te.length>0&&($.push("<ul>"),te.forEach(function(Ke){$.push(Ke)}),$.push("</ul>")),$.push("</li>"),U=x(ee,U,N,$),U}function L(){return x(s,0,0,A),A.push("</ul>"),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?"<p class='editormd-tex'>".concat(ee,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(U,'">').concat(N?ee:Object(i.escape)(ee,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(N?ee:Object(i.escape)(ee,!0))+"</code></pre>"},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}),"<h"+U+' id="'+$+'">'+ee+"</h"+U+">"},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]<le[3])){Ke.label=wt[1];break}if(wt[0]===6&&Ke.label<le[1]){Ke.label=le[1],le=wt;break}if(le&&Ke.label<le[2]){Ke.label=le[2],Ke.ops.push(wt);break}le[2]&&Ke.ops.pop(),Ke.trys.pop();continue}wt=U.call(ee,Ke)}catch(Yt){wt=[6,Yt],$=0}finally{N=le=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([Ut,Ht])}}}function Se(){for(var ee=0,U=0,N=arguments.length;U<N;U++)ee+=arguments[U].length;var $=Array(ee),le=0;for(U=0;U<N;U++)for(var te=arguments[U],Ke=0,Ct=te.length;Ke<Ct;Ke++,le++)$[le]=te[Ke];return $}var Te=function(){function ee(){}return ee.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ee.setAttributes=function(U,N){for(var $=0,le=N;$<le.length;$++){var te=le[$],Ke=te[0],Ct=te[1];U.setAttribute(Ke,Ct)}},ee.createRect=function(U,N,$){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",U.toString()),le.setAttribute("height",N.toString()),$&&ee.setAttributes(le,$),le},ee.createLine=function(U,N,$,le,te){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",U.toString()),Ke.setAttribute("y1",N.toString()),Ke.setAttribute("x2",$.toString()),Ke.setAttribute("y2",le.toString()),te&&ee.setAttributes(Ke,te),Ke},ee.createPolygon=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $.setAttribute("points",U),N&&ee.setAttributes($,N),$},ee.createCircle=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","circle");return $.setAttribute("cx",(U/2).toString()),$.setAttribute("cy",(U/2).toString()),$.setAttribute("r",U.toString()),N&&ee.setAttributes($,N),$},ee.createEllipse=function(U,N,$){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(U/2).toString()),le.setAttribute("cy",(N/2).toString()),le.setAttribute("rx",(U/2).toString()),le.setAttribute("ry",(N/2).toString()),$&&ee.setAttributes(le,$),le},ee.createGroup=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","g");return U&&ee.setAttributes(N,U),N},ee.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ee.createMarker=function(U,N,$,le,te,Ke,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","marker");return ee.setAttributes(Ut,[["id",U],["orient",N],["markerWidth",$.toString()],["markerHeight",le.toString()],["refX",te.toString()],["refY",Ke.toString()]]),Ut.appendChild(Ct),Ut},ee.createText=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","text");return N.setAttribute("x","0"),N.setAttribute("y","0"),U&&ee.setAttributes(N,U),N},ee.createTSpan=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $.textContent=U,N&&ee.setAttributes($,N),$},ee.createImage=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","image");return U&&ee.setAttributes(N,U),N},ee.createPoint=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $.x=U,$.y=N,$},ee.createPath=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","path");return $.setAttribute("d",U),N&&ee.setAttributes($,N),$},ee}(),$e=function(){function ee(){}return ee.addKey=function(U){ee.key=U},Object.defineProperty(ee,"isLicensed",{get:function(){return!!ee.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ee.key)},enumerable:!1,configurable:!0}),ee}(),bt=function(){function ee(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ee.prototype.rasterize=function(U,N,$){var le=this;return new Promise(function(te){var Ke=$!==void 0?$:document.createElement("canvas");U===null&&(le.markersOnly=!0,le.naturalSize=!1);var Ct=document.createElementNS("http://www.w3.org/2000/svg","svg");Ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ct.setAttribute("width",N.width.baseVal.valueAsString),Ct.setAttribute("height",N.height.baseVal.valueAsString),Ct.setAttribute("viewBox","0 0 "+N.viewBox.baseVal.width.toString()+" "+N.viewBox.baseVal.height.toString()),Ct.innerHTML=N.innerHTML,le.naturalSize===!0?(Ct.width.baseVal.value=U.naturalWidth,Ct.height.baseVal.value=U.naturalHeight):le.width!==void 0&&le.height!==void 0&&(Ct.width.baseVal.value=le.width,Ct.height.baseVal.value=le.height),Ke.width=Ct.width.baseVal.value,Ke.height=Ct.height.baseVal.value;var Ut=Ct.outerHTML,Ht=Ke.getContext("2d");le.markersOnly!==!0&&Ht.drawImage(U,0,0,Ke.width,Ke.height);var wt=window.URL,Yt=new Image(Ke.width,Ke.height);Yt.setAttribute("crossOrigin","anonymous");var Xt=new Blob([Ut],{type:"image/svg+xml"}),qt=wt.createObjectURL(Xt);Yt.onload=function(){Ht.drawImage(Yt,0,0),wt.revokeObjectURL(qt);var Ar=Ke.toDataURL(le.imageType,le.imageQuality);te(Ar)},Yt.src=qt})},ee}(),Ie=function(){},ze=function(){function ee(U){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+U+"_"}return Object.defineProperty(ee.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ee.prototype.addClass=function(U){return this.styleSheet===void 0&&this.addStyleSheet(),U.name=""+this.classNamePrefix+U.localName,this.classes.push(U),this.styleSheet.sheet.insertRule("."+U.name+" {"+U.style+"}",this.styleSheet.sheet.cssRules.length),U},ee.prototype.addRule=function(U){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(U),this.styleSheet.sheet.insertRule(U.selector+" {"+U.style+"}",this.styleSheet.sheet.cssRules.length)},ee.prototype.addStyleSheet=function(){var U;this.styleSheet=document.createElement("style"),((U=this.styleSheetRoot)!==null&&U!==void 0?U:document.head).appendChild(this.styleSheet),this.addRule(new at("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new at("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ae("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ae("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ee.prototype.removeStyleSheet=function(){var U;this.styleSheet&&(((U=this.styleSheetRoot)!==null&&U!==void 0?U:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ee}(),at=function(ee,U){this.selector=ee,this.style=U},Ae=function(ee,U){this.localName=ee,this.style=U},ne=function(){function ee(U,N,$,le,te){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=U,this.displayMode=N,this.markerItems=$,this.uiStyleSettings=le,this.styles=te,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ee.prototype.show=function(U){var N=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=U,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var $=document.createElement("div");$.className=this.toolbarBlockStyleClass.name,$.style.whiteSpace="nowrap",this.uiContainer.appendChild($),this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton($,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(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='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var 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,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},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;N<this.markerButtons.length;N++)N<U||N===U&&this.markerButtons.length-1===U?this.markerButtonBlock.appendChild(this.markerButtons[N]):(N===U&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[N]))}},ee.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ee.prototype.resetButtonStyles=function(){var U=this;this.buttons.forEach(function(N){N.className=N.className.replace(U.uiStyleSettings.toolbarButtonStyleColorsClassName?U.uiStyleSettings.toolbarButtonStyleColorsClassName:U.toolbarButtonStyleColorsClass.name,"").trim(),N.className=N.className.replace(U.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?U.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:U.toolbarActiveButtonStyleColorsClass.name,"").trim(),N.className+=" "+(U.uiStyleSettings.toolbarButtonStyleColorsClassName?U.uiStyleSettings.toolbarButtonStyleColorsClassName:U.toolbarButtonStyleColorsClass.name)})},ee.prototype.addActionButton=function(U,N,$){var le=this,te=document.createElement("div");switch(te.className=""+this.toolbarButtonStyleClass.name,te.innerHTML=N,te.setAttribute("data-action",$),te.addEventListener("click",function(){le.actionToolbarButtonClicked(te,$)}),$){case"select":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":te.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":te.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":te.style.fill=this.uiStyleSettings.closeButtonColor}U.appendChild(te),this.buttons.push(te)},ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ae("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ae("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ae("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ae("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Ae("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var U=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ae("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*U)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*U)+`px;
|
|
padding: `+U+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new at("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ee.prototype.markerToolbarButtonClicked=function(U,N){this.setActiveButton(U),this.buttonClickListeners&&this.buttonClickListeners.length>0&&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||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return 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=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),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||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||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||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return 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=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+N.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;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='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',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='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',U}(lt),Ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return 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='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',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;Ht<this.canvasElement.height;Ht++)for(var wt=0;wt<this.canvasElement.width;wt++)N.data[Ht*this.canvasElement.width*4+4*wt+3]>0&&(Ut=!0,Ht<te&&(te=Ht),wt<le&&(le=wt),Ht>Ct&&(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='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',U}(yt),Le=function(ee){function U(N,$,le){var te=ee.call(this,N,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||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=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,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=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,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='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',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='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',U}(Et),ye=function(ee){function U(N,$,le,te){var Ke=ee.call(this,N,te||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return 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='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',U}(me),Oe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',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,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),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.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:0},this.tipBase2Position={x:$+le,y:0}):(this.tipBase1Position={x:0,y:$},this.tipBase2Position={x:0,y:$+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-le,y:0},this.tipBase2Position={x:this.width-$,y:0}):(this.tipBase1Position={x:this.width,y:$},this.tipBase2Position={x:this.width,y:$+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?te<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$-le,y:this.height},this.tipBase2Position={x:this.width-$,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$-le},this.tipBase2Position={x:this.width,y:this.height-$}):te<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,$=Math.min(this.width/2,15),this.tipBase1Position={x:$,y:this.height},this.tipBase2Position={x:$+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$},this.tipBase2Position={x:0,y:this.height-$-le})},U.prototype.resize=function(N){ee.prototype.resize.call(this,N),this.positionTip()},U.prototype.positionTip=function(){Te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var N=this.tipGrip.visual.transform.baseVal.getItem(0);N.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(N,0)},Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),U.prototype.select=function(){this.positionTip(),ee.prototype.select.call(this)},U.prototype.getState=function(){var N=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},U.prototype.restoreState=function(N){var $=N;this.bgColor=$.bgColor,this.tipPosition=$.tipPosition,ee.prototype.restoreState.call(this,N),this.createTip(),this.setTipPoints()},U.prototype.scale=function(N,$){ee.prototype.scale.call(this,N,$),this.tipPosition={x:this.tipPosition.x*N,y:this.tipPosition.y*$},this.positionTip()},U.typeName="CalloutMarker",U.title="Callout marker",U.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',U}(st),Ze=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.strokeColor=le.defaultColor,te.strokeWidth=le.defaultStrokeWidth,te.strokeDasharray=le.defaultStrokeDasharray,te.fillColor=le.defaultFillColor,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.setOpacity=te.setOpacity.bind(te),te.createVisual=te.createVisual.bind(te),te.strokePanel=new xe("Line color",Se(le.defaultColorSet,["transparent"]),le.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.fillPanel=new xe("Fill color",Se(le.defaultColorSet,["transparent"]),te.fillColor,Oe),te.fillPanel.onColorChanged=te.setFillColor,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.opacityPanel=new ye("Opacity",le.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,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.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},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,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).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.fillColorChanged(N),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.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.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),U.prototype.getState=function(){var N=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this));return N.typeName=U.typeName,N},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.typeName="EllipseMarker",U.title="Ellipse marker",U.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',U}(yt),ht=function(ee){function U(N,$,le){return ee.call(this,N,$,le)||this}return we(U,ee),Object.defineProperty(U.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),U.prototype.ownsTarget=function(N){return!(!ee.prototype.ownsTarget.call(this,N)&&N!==this.tip1&&N!==this.tip2)},U.prototype.createTips=function(){this.tip1=Te.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.tip2)},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.tip1&&this.tip2&&(Te.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var 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='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',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='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',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='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',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;$<arguments.length;$++)N[$]=arguments[$];(U=this._availableMarkerTypes).push.apply(U,N)},ee.prototype.addRenderEventListener=function(U){this.addEventListener("render",function(N){U(N.dataUrl,N.state)})},ee.prototype.removeRenderEventListener=function(U){},ee.prototype.addCloseEventListener=function(U){this.addEventListener("close",function(){U()})},ee.prototype.removeCloseEventListener=function(U){},ee.prototype.setupResizeObserver=function(){var U=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){U.resize(U.target.clientWidth,U.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return U.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ee.prototype.onPopupTargetResize=function(){var U=1*this.target.clientWidth/this.target.clientHeight,N=this.editorCanvas.clientWidth/U>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*U:this.editorCanvas.clientWidth,$=N<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/U;this.resize(N,$)},ee.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ee.prototype.resize=function(U,N){this._isResizing=!0;var $=U/this.imageWidth,le=N/this.imageHeight;this.imageWidth=Math.round(U),this.imageHeight=Math.round(N),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers($,le),this._isResizing=!1},ee.prototype.scaleMarkers=function(U,N){var $,le=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(U,N):($=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(te){te!==le._currentMarker&&te.scale(U,N)}),$!==void 0&&this.setCurrentMarker($)},ee.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ee.prototype.setTopLeft=function(){var U=this.editingTarget.getBoundingClientRect(),N=this.editorCanvas.getBoundingClientRect();this.left=U.left-N.left,this.top=U.top-N.top},ee.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ee.prototype.addDefs=function(){for(var U,N=[],$=0;$<arguments.length;$++)N[$]=arguments[$];this.defs=Te.createDefs(),this.addDefsToImage(),(U=this.defs).append.apply(U,N)},ee.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ee.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ee.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ee.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ee.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ee.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ee.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ee.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var U=document.createElement("a");U.href="https://markerjs.com/",U.target="_blank",U.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ae(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ee.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ee.prototype.removeMarker=function(U){this.markerImage.removeChild(U.container),this.markers.indexOf(U)>-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),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(te){return te(new St(U))})}else this.undoRedoManager.replaceLastUndoStep(N),this.eventListeners.statechange.forEach(function(te){return te(new St(U))})}},ee.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ee.prototype.undoStep=function(){var U=this,N=this.undoRedoManager.undo();N!==void 0&&(this.restoreState(N),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new St(U))}))},ee.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ee.prototype.redoStep=function(){var U=this,N=this.undoRedoManager.redo();N!==void 0&&(this.restoreState(N),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($){return $(new St(U))}))},ee.prototype.stepZoom=function(){var U=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=U<this.zoomSteps.length-1?this.zoomSteps[U+1]:this.zoomSteps[0]},ee.prototype.panTo=function(U){this.contentDiv.scrollBy({left:this.prevPanPoint.x-U.x,top:this.prevPanPoint.y-U.y}),this.prevPanPoint=U},ee.prototype.startRenderAndClose=function(){return Re(this,void 0,void 0,function(){var U,N,$=this;return He(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return U=le.sent(),N=this.getState(),this.eventListeners.render.forEach(function(te){return te(new ut($,U,N))}),this.close(!0),[2]}})})},ee.prototype.getState=function(U){U===!0&&this.setCurrentMarker();var N={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($){return N.markers.push($.getState())}),N},ee.prototype.restoreState=function(U){var N=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);U.markers.forEach(function($){var le=N._availableMarkerTypes.find(function(Ke){return Ke.typeName===$.typeName});if(le!==void 0){var te=N.addNewMarker(le);te.restoreState($),N.markers.push(te)}}),U.width&&U.height&&(U.width!==this.imageWidth||U.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/U.width,this.imageHeight/U.height),this.eventListeners.restorestate.forEach(function($){return $(new St(N))})},ee.prototype.addNewMarker=function(U){var N=Te.createGroup();return this.markerImage.appendChild(N),new U(N,this.overlayContainer,this.settings)},ee.prototype.createNewMarker=function(U){var N,$=this;(N=typeof U=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===U}):U)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(N),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(N.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new nt($,$._currentMarker))}))},ee.prototype.markerCreated=function(U){var N=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(U),this.setCurrentMarker(U),U instanceof je&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(je):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($){return $(new nt(N,N._currentMarker))})},ee.prototype.colorChanged=function(U){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=U,this.settings.defaultStrokeColor=U)},ee.prototype.fillColorChanged=function(U){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=U)},ee.prototype.markerStateChanged=function(U){var N=this;this.eventListeners.markerchange.forEach(function($){return $(new nt(N,U))})},ee.prototype.setCurrentMarker=function(U){var N=this;this._currentMarker!==U&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($){return $(new nt(N,N._currentMarker))})),this._currentMarker=U,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function($){return $(new nt(N,N._currentMarker))}))},ee.prototype.onPointerDown=function(U){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||U.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var N=this.markers.find(function($){return $.ownsTarget(U.target)});N!==void 0?(this.setCurrentMarker(N),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(U.clientX,U.clientY),U.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:U.clientX,y:U.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(U.clientX,U.clientY))},ee.prototype.onDblClick=function(U){if(this._isFocused||this.focus(),this.mode==="select"){var N=this.markers.find(function($){return $.ownsTarget(U.target)});N!==void 0&&N!==this._currentMarker&&this.setCurrentMarker(N),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(U.clientX,U.clientY),U.target):this.setCurrentMarker()}},ee.prototype.onPointerMove=function(U){this.touchPoints!==1&&U.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||U.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(U.clientX,U.clientY)):this.zoomLevel>1&&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]<le[3])){Ke.label=wt[1];break}if(wt[0]===6&&Ke.label<le[1]){Ke.label=le[1],le=wt;break}if(le&&Ke.label<le[2]){Ke.label=le[2],Ke.ops.push(wt);break}le[2]&&Ke.ops.pop(),Ke.trys.pop();continue}wt=U.call(ee,Ke)}catch(Yt){wt=[6,Yt],$=0}finally{N=le=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([Ut,Ht])}}}var _t=function(){function ee(){}return ee.addKey=function(U){ee.key=U},Object.defineProperty(ee,"isLicensed",{get:function(){return!!ee.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ee.key)},enumerable:!1,configurable:!0}),ee}(),Xe=function(){function ee(){}return ee.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ee.setAttributes=function(U,N){for(var $=0,le=N;$<le.length;$++){var te=le[$],Ke=te[0],Ct=te[1];U.setAttribute(Ke,Ct)}},ee.createRect=function(U,N,$){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",U.toString()),le.setAttribute("height",N.toString()),$&&ee.setAttributes(le,$),le},ee.createLine=function(U,N,$,le,te){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",U.toString()),Ke.setAttribute("y1",N.toString()),Ke.setAttribute("x2",$.toString()),Ke.setAttribute("y2",le.toString()),te&&ee.setAttributes(Ke,te),Ke},ee.createPolygon=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $.setAttribute("points",U),N&&ee.setAttributes($,N),$},ee.createCircle=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","circle");return $.setAttribute("cx",(U/2).toString()),$.setAttribute("cy",(U/2).toString()),$.setAttribute("r",U.toString()),N&&ee.setAttributes($,N),$},ee.createEllipse=function(U,N,$){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(U/2).toString()),le.setAttribute("cy",(N/2).toString()),le.setAttribute("rx",(U/2).toString()),le.setAttribute("ry",(N/2).toString()),$&&ee.setAttributes(le,$),le},ee.createGroup=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","g");return U&&ee.setAttributes(N,U),N},ee.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ee.createMarker=function(U,N,$,le,te,Ke,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","marker");return ee.setAttributes(Ut,[["id",U],["orient",N],["markerWidth",$.toString()],["markerHeight",le.toString()],["refX",te.toString()],["refY",Ke.toString()]]),Ut.appendChild(Ct),Ut},ee.createText=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","text");return N.setAttribute("x","0"),N.setAttribute("y","0"),U&&ee.setAttributes(N,U),N},ee.createTSpan=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $.textContent=U,N&&ee.setAttributes($,N),$},ee.createImage=function(U){var N=document.createElementNS("http://www.w3.org/2000/svg","image");return U&&ee.setAttributes(N,U),N},ee.createPoint=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $.x=U,$.y=N,$},ee.createPath=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg","path");return $.setAttribute("d",U),N&&ee.setAttributes($,N),$},ee.createElement=function(U,N){var $=document.createElementNS("http://www.w3.org/2000/svg",U);return N&&ee.setAttributes($,N),$},ee.getHollowRectanglePath=function(U,N,$,le,te,Ke,Ct,Ut){return"M"+U+","+N+"V"+(N+le)+"H"+(U+$)+"V"+N+"H"+te+"V"+Ke+"H"+(te+Ct)+"V"+(Ke+Ut)+"H"+te+"V"+N+"Z"},ee}(),mt=function(){function ee(U){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+U+"_"}return Object.defineProperty(ee.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ee.prototype.addClass=function(U){return this.styleSheet===void 0&&this.addStyleSheet(),U.name=""+this.classNamePrefix+U.localName,this.classes.push(U),this.styleSheet.sheet.insertRule("."+U.name+" {"+U.style+"}",this.styleSheet.sheet.cssRules.length),U},ee.prototype.addRule=function(U){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(U),this.styleSheet.sheet.insertRule(U.selector+" {"+U.style+"}",this.styleSheet.sheet.cssRules.length)},ee.prototype.addStyleSheet=function(){var U;this.styleSheet=document.createElement("style"),((U=this.styleSheetRoot)!==null&&U!==void 0?U:document.head).appendChild(this.styleSheet),this.addRule(new Pt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Pt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Pt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Rt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Rt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ee.prototype.removeStyleSheet=function(){var U;this.styleSheet&&(((U=this.styleSheetRoot)!==null&&U!==void 0?U:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ee}(),Pt=function(ee,U){this.selector=ee,this.style=U},Rt=function(ee,U){this.localName=ee,this.style=U},Qt=function(){function ee(){this.blocks=[],this.display=""}return ee.prototype.addButtonBlock=function(U){U.className=this.blockClassName,U.buttonClassName=this.buttonClassName,U.buttonColorsClassName=this.buttonColorsClassName,U.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(U)},ee.prototype.addElementBlock=function(U){U.className===void 0&&(U.className=this.blockClassName),this.blocks.push(U)},ee.prototype.getUI=function(){var U=document.createElement("div");return U.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,U.style.display=this.display,this.blocks.forEach(function(N){return U.appendChild(N.getUI())}),U},ee}(),Ir=function(){function ee(){}return ee.prototype.getUI=function(){var U=document.createElement("div");if(U.className=this.className,this.minWidth!==void 0&&(U.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":U.style.justifyContent="flex-start";break;case"center":U.style.justifyContent="center";break;case"end":U.style.justifyContent="flex-end"}return U.style.whiteSpace="nowrap",U},ee}(),Fr=function(ee){function U(){var N=ee!==null&&ee.apply(this,arguments)||this;return N.buttons=[],N}return pt(U,ee),U.prototype.addButton=function(N){N.className=this.buttonClassName,N.colorsClassName=this.buttonColorsClassName,N.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(N)},U.prototype.getUI=function(){var N=ee.prototype.getUI.call(this);return this.buttons.forEach(function($){return N.appendChild($.getUI())}),N},U}(Ir),wr=function(){function ee(U,N){this._isActive=!1,this._isHidden=!1,this._icon=U,this.title=N,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ee.prototype,"icon",{get:function(){return this._icon},set:function(U){this._icon=U,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isActive",{get:function(){return this._isActive},set:function(U){this._isActive=U,this.adjustClassName()},enumerable:!1,configurable:!0}),ee.prototype.getUI=function(){var U=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return U.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ee.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ee.prototype.hide=function(){this._isHidden=!0},ee}(),Kt=function(ee){function U(){var N=ee!==null&&ee.apply(this,arguments)||this;return N.elements=[],N}return pt(U,ee),U.prototype.addElement=function(N){this.elements.push(N)},U.prototype.getUI=function(){var N=ee.prototype.getUI.call(this);return this.elements.forEach(function($){return N.appendChild($)}),N},U}(Ir),Ur=function(){function ee(U,N){this.horizontal=U,this.vertical=N}return Object.defineProperty(ee.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ee.prototype.getVerticalLength=function(U){return U/this.ratio},ee.prototype.getHorizontalLength=function(U){return U*this.ratio},ee}(),Kr=function(){function ee(){}return ee.getIcon=function(U,N){if(U>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'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},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;N<this.numberOfGridLines;N++)this.horizontalGridLines.push(Xe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Xe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function($){return U.gridContainer.appendChild($)}),this.verticalGridLines.forEach(function($){return U.gridContainer.appendChild($)}),this.cropRectElement=Xe.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new pr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ee.prototype.setCropRectangle=function(U){this.cropRect=U;var N=Object.assign({},this.cropRect);this.zoomFactor!==1&&(N.width=this.cropRect.width*this.zoomFactor,N.height=this.cropRect.height*this.zoomFactor,N.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-N.width/2,N.y=this.cropRect.height/this.cropRect.width>this.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.margin&&($=this.margin-N.x),N.x+=$,N.width=this.cropRect.x+this.cropRect.width-N.x;break;case this.bottomRightGrip:case this.topRightGrip:N.width+$>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.canvasWidth<le/this.canvasHeight?this.cropRect.width=$:this.cropRect.height=le,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=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_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/U;this.resize(N,$)}},ee.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ee.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Xe.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ee.prototype.resize=function(U,N){this.imageWidth=Math.round(U),this.imageHeight=Math.round(N),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},ee.prototype.setEditingTarget=function(){var U=document.createElement("canvas");U.width=this.target.naturalWidth,U.height=this.target.naturalHeight,U.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var N=U.toDataURL();Xe.setAttributes(this.editingTarget,[["href",N]]),this.setEditingTargetSize()},ee.prototype.setTopLeft=function(){var U=this.target.getBoundingClientRect(),N=this.editorCanvas.getBoundingClientRect();this.left=U.left-N.left-this.CANVAS_MARGIN,this.top=U.top-N.top-this.CANVAS_MARGIN},ee.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Xe.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Xe.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Xe.createGroup(),this.editingTargetRotationScaleContainer=Xe.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var U=Xe.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(U);var N=Xe.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(N),this.editingTargetContainer=Xe.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},ee.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ee.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Xe.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Or(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ee.prototype.zoomToCrop=function(){if(this.cropRect){var U=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,N=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=U+"px "+N+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-U+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-N+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ee.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},ee.prototype.cropRectChanged=function(U){this.cropRect=U,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ee.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},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.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var U=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,N=this.target.offsetTop>U+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('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){U.isGridVisible=!U.isGridVisible,le.isActive=U.isGridVisible},N.addButton(le);var te=new wr('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(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='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',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('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");wt.onClick=this.startRenderAndClose,Ht.addButton(wt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(wt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new wr('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");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('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");$.onClick=this.rotateLeftButtonClicked,N.addButton($);var le=new wr('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");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('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ct.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Ct);var Ut=new wr('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");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=/<pre[^>]*>/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("<p>[TOC]</p>",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<c&&o(n[i],n[i-1])<0;)i++;D(n,u,i)}else for(;i<c&&o(n[i],n[i-1])>=0;)i++;return i-u}function D(n,u,c){for(c--;u<c;){var o=n[u];n[u++]=n[c],n[c--]=o}}function B(n,u,c,o,i){for(o===u&&o++;o<c;o++){for(var d=n[o],s=u,A=o,a;s<A;)a=s+A>>>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;a<A&&d(n,u[c+i+a])>0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}else{for(A=i+1;a<A&&d(n,u[c+i-a])<=0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A);var p=s;s=i-a,a=i-p}for(s++;s<a;){var w=s+(a-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;a<A&&d(n,u[c+i-a])<0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A);var p=s;s=i-a,a=i-p}else{for(A=o-i;a<A&&d(n,u[c+i+a])>=0;)s=a,a=(a<<1)+1,a<=0&&(a=A);a>A&&(a=A),s+=i,a+=i}for(s++;s<a;){var w=s+(a-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]&&r--;else if(A[r]>A[r+1])break;L(r)}}function x(){for(;a>1;){var r=a-2;r>0&&A[r-1]<A[r+1]&&r--,L(r)}}function L(r){var l=s[r],f=A[r],C=s[r+1],g=A[r+1];A[r]=f+g,r===a-3&&(s[r+1]=s[r+2],A[r+1]=A[r+2]),a--;var m=v(n[C],n,l,f,0,u);if(l+=m,f-=m,f===0)return;if(g=I(n[l+f-1],n,C,g,g-1,u),g===0)return;f<=g?b(l,f,C,g):h(l,f,C,g)}function b(r,l,f,C){var g=0;for(g=0;g<l;g++)p[g]=n[r+g];var m=0,F=f,P=r;if(n[P++]=n[F++],--C===0){for(g=0;g<l;g++)n[P+g]=p[m+g];return}if(l===1){for(g=0;g<C;g++)n[P+g]=n[F+g];n[P+C]=p[m];return}for(var z=c,Z,V,M;;){Z=0,V=0,M=!1;do if(u(n[F],p[m])<0){if(n[P++]=n[F++],V++,Z=0,--C===0){M=!0;break}}else if(n[P++]=p[m++],Z++,V=0,--l===1){M=!0;break}while((Z|V)<z);if(M)break;do{if(Z=v(n[F],p,m,l,0,u),Z!==0){for(g=0;g<Z;g++)n[P+g]=p[m+g];if(P+=Z,m+=Z,l-=Z,l<=1){M=!0;break}}if(n[P++]=n[F++],--C===0){M=!0;break}if(V=I(p[m],n,F,C,0,u),V!==0){for(g=0;g<V;g++)n[P+g]=n[F+g];if(P+=V,F+=V,C-=V,C===0){M=!0;break}}if(n[P++]=p[m++],--l===1){M=!0;break}z--}while(Z>=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<C;g++)n[P+g]=n[F+g];n[P+C]=p[m]}else{if(l===0)throw new Error;for(g=0;g<l;g++)n[P+g]=p[m+g]}}function h(r,l,f,C){var g=0;for(g=0;g<C;g++)p[g]=n[f+g];var m=r+l-1,F=C-1,P=f+C-1,z=0,Z=0;if(n[P--]=n[m--],--l===0){for(z=P-(C-1),g=0;g<C;g++)n[z+g]=p[g];return}if(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];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)<V);if(X)break;do{if(M=l-v(p[F],n,r,l,l-1,u),M!==0){for(P-=M,m-=M,l-=M,Z=P+1,z=m+1,g=M-1;g>=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<J;g++)n[Z+g]=p[z+g];if(C<=1){X=!0;break}}if(n[P--]=n[m--],--l===0){X=!0;break}V--}while(M>=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;g<C;g++)n[z+g]=p[g]}}this.mergeRuns=S,this.forceMergeRuns=x,this.pushRun=w}function E(n,u,c,o){c||(c=0),o||(o=n.length);var i=o-c;if(i<2)return;var d=0;if(i<G){d=j(n,c,o,u),B(n,c,o,c+d,u);return}var s=new T(n,u),A=O(i);do{if(d=j(n,c,o,u),d<A){var a=i;a>A&&(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;c<E.length;c++){if(!E[c].empty())return q.Pass;var o=E[c].head,i=T.getTokenAt(o),d=q.innerMode(T.getMode(),i.state),s=d.state,A=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(s),a=A&&A.name;if(!a)return q.Pass;var p=d.mode.configuration=="html",w=typeof u=="object"&&u.dontCloseTags||p&&Q,S=typeof u=="object"&&u.indentTags||p&&O;i.end>o.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?`
|
|
|
|
`:"")+"</"+a+">",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?"/":"</",o=T.getOption("autoCloseTags"),i=typeof o=="object"&&o.dontIndentOnSlash,d=0;d<n.length;d++){if(!n[d].empty())return q.Pass;var s=n[d].head,A=T.getTokenAt(s),a=q.innerMode(T.getMode(),A.state),p=a.state;if(E&&(A.type=="string"||A.string.charAt(0)!="<"||A.start!=s.ch-1))return q.Pass;var w,S=a.mode.name!="xml"&&T.getMode().name=="htmlmixed";if(S&&a.mode.name=="javascript")w=c+"script";else if(S&&a.mode.name=="css")w=c+"style";else{var x=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(p);if(!x||x.length&&v(T,x,x[x.length-1],s))return q.Pass;w=c+x[x.length-1]}T.getLine(s.line).charAt(A.end)!=">"&&(w+=">"),u[d]=w}if(T.replaceSelections(u),n=T.listSelections(),!i)for(var d=0;d<n.length;d++)(d==n.length-1||n[d].head.line<n[d+1].head.line)&&T.indentLine(n[d].head.line)}function B(T){return T.getOption("disableInput")?q.Pass:D(T,!0)}q.commands.closeTag=function(T){return D(T)};function I(T,E){if(T.indexOf)return T.indexOf(E);for(var n=0,u=T.length;n<u;++n)if(T[n]==E)return n;return-1}function v(T,E,n,u,c){if(!q.scanForClosingTag)return!1;var o=Math.min(T.lastLine()+1,u.line+500),i=q.scanForClosingTag(T,u,null,o);if(!i||i.tag!=n)return!1;for(var d=c?1:0,s=E.length-1;s>=0&&E[s]==n;s--)++d;u=i.to;for(var s=1;s<d;s++){var A=q.scanForClosingTag(T,u,null,o);if(!A||A.tag!=n)return!1;u=A.to}return!0}})},BjJ7:function(qe,pe,G){"use strict";G.d(pe,"d",function(){return Q}),G.d(pe,"c",function(){return O}),G.d(pe,"e",function(){return j}),G.d(pe,"b",function(){return D}),G.d(pe,"a",function(){return I});var q=G("m3rI");function Q(v){var T=!0;if(v.length>0){for(var E=0;E<v.length;E++)if(v[E].compile_success==0||!v[E].compile_success){T=!1;break}}else T=!1;return T}function O(v){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=[],n=0;n<v.length;n++){var u=v[n],c=T?"".concat(T,"/").concat(u.name):"".concat(u.name);E.push({title:u.name,isLeaf:!(u.type==="tree"),key:c})}return E}function j(v,T,E){for(var n=0;n<v.length;n++){var u=v[n];if(u.key===T){u.children=E;break}u.children&&j(u.children,T,E)}return v}function D(v,T,E){var n;return function(){var u=this,c=arguments,o=function(){n=null,E||v.apply(u,c)},i=E&&!n;clearTimeout(n),n=setTimeout(o,T),i&&v.apply(u,c)}}var B=!0,I=q.a.API_SERVER},BlVb:function(qe,pe,G){var q=G("hyiK"),Q=1e-8;function O(D,B){return Math.abs(D-B)<Q}function j(D,B,I){var v=0,T=D[0];if(!T)return!1;for(var E=1;E<D.length;E++){var n=D[E];v+=q(T[0],T[1],n[0],n[1],B,I),T=n}var u=D[0];return(!O(T[0],u[0])||!O(T[1],u[1]))&&(v+=q(T[0],T[1],u[0],u[1],B,I)),v!==0}pe.contain=j},Bq2U:function(qe,pe,G){var q=G("RDYZ"),Q=G("Qe9p"),O=G("bYtY"),j=O.isArrayLike,D=Array.prototype.slice;function B(w,S){return w[S]}function I(w,S,x){w[S]=x}function v(w,S,x){return(S-w)*x+w}function T(w,S,x){return x>.5?S:w}function E(w,S,x,L,b){var h=w.length;if(b===1)for(var r=0;r<h;r++)L[r]=v(w[r],S[r],x);else for(var l=h&&w[0].length,r=0;r<h;r++)for(var f=0;f<l;f++)L[r][f]=v(w[r][f],S[r][f],x)}function n(w,S,x){var L=w.length,b=S.length;if(L!==b){var h=L>b;if(h)w.length=b;else for(var r=L;r<b;r++)w.push(x===1?S[r]:D.call(S[r]))}for(var l=w[0]&&w[0].length,r=0;r<w.length;r++)if(x===1)isNaN(w[r])&&(w[r]=S[r]);else for(var f=0;f<l;f++)isNaN(w[r][f])&&(w[r][f]=S[r][f])}function u(w,S,x){if(w===S)return!0;var L=w.length;if(L!==S.length)return!1;if(x===1){for(var b=0;b<L;b++)if(w[b]!==S[b])return!1}else for(var h=w[0].length,b=0;b<L;b++)for(var r=0;r<h;r++)if(w[b][r]!==S[b][r])return!1;return!0}function c(w,S,x,L,b,h,r,l,f){var C=w.length;if(f===1)for(var g=0;g<C;g++)l[g]=o(w[g],S[g],x[g],L[g],b,h,r);else for(var m=w[0].length,g=0;g<C;g++)for(var F=0;F<m;F++)l[g][F]=o(w[g][F],S[g][F],x[g][F],L[g][F],b,h,r)}function o(w,S,x,L,b,h,r){var l=(x-w)*.5,f=(L-S)*.5;return(2*(S-x)+l+f)*r+(-3*(S-x)-2*l-f)*h+l*b+S}function i(w){if(j(w)){var S=w.length;if(j(w[0])){for(var x=[],L=0;L<S;L++)x.push(D.call(w[L]));return x}return D.call(w)}return w}function d(w){return w[0]=Math.floor(w[0]),w[1]=Math.floor(w[1]),w[2]=Math.floor(w[2]),"rgba("+w.join(",")+")"}function s(w){var S=w[w.length-1].value;return j(S&&S[0])?2:1}function A(w,S,x,L,b,h){var r=w._getter,l=w._setter,f=S==="spline",C=L.length;if(!C)return;var g=L[0].value,m=j(g),F=!1,P=!1,z=m?s(L):0,Z;L.sort(function(ne,ae){return ne.time-ae.time}),Z=L[C-1].time;for(var V=[],M=[],J=L[0].value,X=!0,re=0;re<C;re++){V.push(L[re].time/Z);var se=L[re].value;if(m&&u(se,J,z)||!m&&se===J||(X=!1),J=se,typeof se=="string"){var _e=Q.parse(se);_e?(se=_e,F=!0):P=!0}M.push(se)}if(!h&&X)return;for(var ge=M[C-1],re=0;re<C-1;re++)m?n(M[re],ge,z):isNaN(M[re])&&!isNaN(ge)&&!P&&!F&&(M[re]=ge);m&&n(r(w._target,b),ge,z);var we=0,Re=0,He,Se,Te,$e,bt,Ie;if(F)var ze=[0,0,0,0];var at=function(ne,ae){var ce;if(ae<0)ce=0;else if(ae<Re){for(He=Math.min(we+1,C-1),ce=He;ce>=0&&!(V[ce]<=ae);ce--);ce=Math.min(ce,C-2)}else{for(ce=we;ce<C&&!(V[ce]>ae);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;w<this._clipList.length;w++)this._clipList[w].pause();this._paused=!0},resume:function(){for(var w=0;w<this._clipList.length;w++)this._clipList[w].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var w=this._doneList,S=w.length,x=0;x<S;x++)w[x].call(this)},start:function(w,S){var x=this,L=0,b=function(){L--,L||x._doneCallback()},h;for(var r in this._tracks){if(!this._tracks.hasOwnProperty(r))continue;var l=A(this,w,b,this._tracks[r],r,S);l&&(this._clipList.push(l),L++,this.animation&&this.animation.addClip(l),h=l)}if(h){var f=h.onframe;h.onframe=function(C,g){f(C,g);for(var m=0;m<x._onframeList.length;m++)x._onframeList[m](C,g)}}return L||this._doneCallback(),this},stop:function(w){for(var S=this._clipList,x=this.animation,L=0;L<S.length;L++){var b=S[L];w&&b.onframe(this._target,1),x&&x.removeClip(b)}S.length=0},delay:function(w){return this._delay=w,this},done:function(w){return w&&this._doneList.push(w),this},getClips:function(){return this._clipList}};var p=a;qe.exports=p},"C+DQ":function(qe,pe,G){},C0SR:function(qe,pe,G){var q=G("YH21"),Q=function(){this._track=[]};Q.prototype={constructor:Q,recognize:function(I,v,T){return this._doTrack(I,v,T),this._recognize(I)},clear:function(){return this._track.length=0,this},_doTrack:function(I,v,T){var E=I.touches;if(!E)return;for(var n={points:[],touches:[],target:v,event:I},u=0,c=E.length;u<c;u++){var o=E[u],i=q.clientToLocal(T,o,{});n.points.push([i.zrX,i.zrY]),n.touches.push(o)}this._track.push(n)},_recognize:function(I){for(var v in D)if(D.hasOwnProperty(v)){var T=D[v](this._track,I);if(T)return T}}};function O(I){var v=I[1][0]-I[0][0],T=I[1][1]-I[0][1];return Math.sqrt(v*v+T*T)}function j(I){return[(I[0][0]+I[1][0])/2,(I[0][1]+I[1][1])/2]}var D={pinch:function(I,v){var T=I.length;if(!T)return;var E=(I[T-1]||{}).points,n=(I[T-2]||{}).points||E;if(n&&n.length>1&&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<B.length;d++)i.push(d);return[{indices:i,count:B.length}]}function s(){for(var a=-1*n;a<=n;a+=2){var p,w=c[a-1],S=c[a+1],x=(S?S.newPos:0)-a;w&&(c[a-1]=void 0);var L=w&&w.newPos+1<T,b=S&&0<=x&&x<E;if(!L&&!b){c[a]=void 0;continue}if(!L||b&&w.newPos<S.newPos?(p=Q(S),v.pushComponent(p.components,void 0,!0)):(p=w,p.newPos++,v.pushComponent(p.components,!0,void 0)),x=v.extractCommon(p,B,D,a),p.newPos+1>=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+1<T&&u+1<E&&this.equals(B[n+1],I[u+1]);)n++,u++,c++;return c&&D.components.push({count:c}),D.newPos=n,u},tokenize:function(D){return D.slice()},join:function(D){return D.slice()}};function q(D,B,I,v){for(var T=0,E=B.length,n=0,u=0;T<E;T++){var c=B[T];if(c.removed){for(var o=[],i=u;i<u+c.count;i++)o.push(i);c.indices=o,u+=c.count}else{for(var o=[],i=n;i<n+c.count;i++)o.push(i);c.indices=o,n+=c.count,c.added||(u+=c.count)}}return B}function Q(D){return{newPos:D.newPos,components:D.components.slice(0)}}var O=new G;function j(D,B,I){return O.diff(D,B,I)}qe.exports=j},DN4a:function(qe,pe,G){var q=G("Fofx"),Q=G("QBsz"),O=q.identity,j=5e-5;function D(u){return u>j||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;Me<Le.length;Me++){var me=Le[Me];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(je,me.key,me)}}function Q(je,Le,Me){return Le&&q(je.prototype,Le),Me&&q(je,Me),je}function O(je,Le){if(!je)return;if(typeof je=="string")return j(je,Le);var Me=Object.prototype.toString.call(je).slice(8,-1);if(Me==="Object"&&je.constructor&&(Me=je.constructor.name),Me==="Map"||Me==="Set")return Array.from(je);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return j(je,Le)}function j(je,Le){(Le==null||Le>je.length)&&(Le=je.length);for(var Me=0,me=new Array(Le);Me<Le;Me++)me[Me]=je[Me];return me}function D(je,Le){var Me;if(typeof Symbol=="undefined"||je[Symbol.iterator]==null){if(Array.isArray(je)||(Me=O(je))||Le&&je&&typeof je.length=="number"){Me&&(je=Me);var me=0;return function(){return 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<arguments.length;Le++){Me=arguments[Le];for(me in Me)Object.prototype.hasOwnProperty.call(Me,me)&&(je[me]=Me[me])}return je}function m(je,Le){var Me=je.replace(/\|/g,function(Ee,Oe,De){for(var Ze=!1,ht=Oe;--ht>=0&&De[ht]==="\\";)Ze=!Ze;return Ze?"|":" |"}),me=Me.split(/ \|/),ye=0;if(me.length>Le)me.splice(Le);else for(;me.length<Le;)me.push("");for(;ye<me.length;ye++)me[ye]=me[ye].trim().replace(/\\\|/g,"|");return me}function F(je,Le,Me){var me=je.length;if(me===0)return"";for(var ye=0;ye<me;){var Ee=je.charAt(me-ye-1);if(Ee===Le&&!Me)ye++;else if(Ee!==Le&&Me)ye++;else break}return je.substr(0,me-ye)}function P(je,Le){if(je.indexOf(Le[1])===-1)return-1;for(var Me=je.length,me=0,ye=0;ye<Me;ye++)if(je[ye]==="\\")ye++;else if(je[ye]===Le[0])me++;else if(je[ye]===Le[1]&&(me--,me<0))return ye;return-1}function z(je){je&&je.sanitize&&!je.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var Z={escape:s,unescape:a,edit:w,cleanUrl:L,resolveUrl:f,noopTest:C,merge:g,splitCells:m,rtrim:F,findClosingBracket:P,checkSanitizeDeprecation:z},V=I.defaults,M=Z.rtrim,J=Z.splitCells,X=Z.escape,re=Z.findClosingBracket;function se(je,Le,Me){var me=Le.href,ye=Le.title?X(Le.title):null,Ee=je[1].replace(/\\([\[\]])/g,"$1");return je[0].charAt(0)!=="!"?{type:"link",raw:Me,href:me,title:ye,text:Ee}:{type:"image",raw:Me,href:me,title:ye,text:X(Ee)}}function _e(je,Le){var Me=je.match(/^(\s+)(?:```)/);if(Me===null)return Le;var me=Me[1];return Le.split(`
|
|
`).map(function(ye){var Ee=ye.match(/^\s+/);if(Ee===null)return ye;var Oe=Ee[0];return Oe.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<Oe;De++)/^ *-+: *$/.test(Ee.align[De])?Ee.align[De]="right":/^ *:-+: *$/.test(Ee.align[De])?Ee.align[De]="center":/^ *:-+ *$/.test(Ee.align[De])?Ee.align[De]="left":Ee.align[De]=null;for(Oe=Ee.cells.length,De=0;De<Oe;De++)Ee.cells[De]=J(Ee.cells[De],Ee.header.length);return Ee}}},Le.hr=function(me){var ye=this.rules.block.hr.exec(me);if(ye)return{type:"hr",raw:ye[0]}},Le.blockquote=function(me){var ye=this.rules.block.blockquote.exec(me);if(ye){var Ee=ye[0].replace(/^ *> ?/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;it<pt;it++)It=Tt[it],Ee=It,St=It.length,It=It.replace(/^ *([*+-]|\d+[.)]) */,""),~It.indexOf(`
|
|
`)&&(St-=It.length,It=this.options.pedantic?It.replace(/^ {1,4}/gm,""):It.replace(new RegExp("^ {1,"+St+"}","gm"),"")),it!==pt-1&&(ut=this.rules.block.bullet.exec(Tt[it+1])[0],(De?ut.length===1||!Ze&&ut[ut.length-1]===")":ut.length>1||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<Oe;De++)/^ *-+: *$/.test(Ee.align[De])?Ee.align[De]="right":/^ *:-+: *$/.test(Ee.align[De])?Ee.align[De]="center":/^ *:-+ *$/.test(Ee.align[De])?Ee.align[De]="left":Ee.align[De]=null;for(Oe=Ee.cells.length,De=0;De<Oe;De++)Ee.cells[De]=J(Ee.cells[De].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},Le.lheading=function(me){var ye=this.rules.block.lheading.exec(me);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},Le.paragraph=function(me){var ye=this.rules.block.paragraph.exec(me);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
|
|
`?ye[1].slice(0,-1):ye[1]}},Le.text=function(me,ye){var Ee=this.rules.block.text.exec(me);if(Ee){var Oe=ye[ye.length-1];return Oe&&Oe.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},Le.escape=function(me){var ye=this.rules.inline.escape.exec(me);if(ye)return{type:"escape",raw:ye[0],text:X(ye[1])}},Le.tag=function(me,ye,Ee){var Oe=this.rules.inline.tag.exec(me);if(Oe)return!ye&&/^<a /i.test(Oe[0])?ye=!0:ye&&/^<\/a>/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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable: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=/<!--(?!-?>)[\s\S]*?-->/,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","</?(?:tag)(?: +|\\n|/?>)|<(?: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","</?(?:tag)(?: +|\\n|/?>)|<(?: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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.pedantic=He({},Se.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\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:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Te.gfm.url=Re(Te.gfm.url,"i").replace("email",Te.gfm._extended_email).getRegex(),Te.breaks=He({},Te.gfm,{br:Re(Te.br).replace("{2,}","*").getRegex(),text:Re(Te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var $e={block:Se,inline:Te},bt=I.defaults,Ie=$e.block,ze=$e.inline;function at(je){return je.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ae(je){var Le="",Me,me,ye=je.length;for(Me=0;Me<ye;Me++)me=je.charCodeAt(Me),Math.random()>.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;De<Ze;De++)Oe.items[De].tokens=this.blockTokens(Oe.items[De].text,[],!1);ye.push(Oe);continue}if(Oe=this.tokenizer.html(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.def(me))){me=me.substring(Oe.raw.length),this.tokens.links[Oe.tag]||(this.tokens.links[Oe.tag]={href:Oe.href,title:Oe.title});continue}if(Oe=this.tokenizer.table(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.lheading(me)){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.paragraph(me))){me=me.substring(Oe.raw.length),ye.push(Oe);continue}if(Oe=this.tokenizer.text(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(me){var Tt="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Tt);break}else throw new Error(Tt)}}return ye},Le.inline=function(me){var ye,Ee,Oe,De,Ze,ht,Tt=me.length;for(ye=0;ye<Tt;ye++){ht=me[ye];switch(ht.type){case"paragraph":case"text":case"heading":{ht.tokens=[],this.inlineTokens(ht.text,ht.tokens);break}case"table":{for(ht.tokens={header:[],cells:[]},De=ht.header.length,Ee=0;Ee<De;Ee++)ht.tokens.header[Ee]=[],this.inlineTokens(ht.header[Ee],ht.tokens.header[Ee]);for(De=ht.cells.length,Ee=0;Ee<De;Ee++)for(Ze=ht.cells[Ee],ht.tokens.cells[Ee]=[],Oe=0;Oe<Ze.length;Oe++)ht.tokens.cells[Ee][Oe]=[],this.inlineTokens(Ze[Oe],ht.tokens.cells[Ee][Oe]);break}case"blockquote":{this.inline(ht.tokens);break}case"list":{for(De=ht.items.length,Ee=0;Ee<De;Ee++)this.inline(ht.items[Ee].tokens);break}}}return me},Le.inlineTokens=function(me,ye,Ee,Oe,De){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!1),Oe===void 0&&(Oe=!1),De===void 0&&(De="");var Ze,ht=me,Tt;if(this.tokens.links){var kt=Object.keys(this.tokens.links);if(kt.length>0)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?'<pre><code class="'+this.options.langPrefix+xe(Oe,!0)+'">'+(Ee?me:xe(me,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ee?me:xe(me,!0))+`</code></pre>
|
|
`},Le.blockquote=function(me){return`<blockquote>
|
|
`+me+`</blockquote>
|
|
`},Le.html=function(me){return me},Le.heading=function(me,ye,Ee,Oe){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+Oe.slug(Ee)+'">'+me+"</h"+ye+`>
|
|
`:"<h"+ye+">"+me+"</h"+ye+`>
|
|
`},Le.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Le.list=function(me,ye,Ee){var Oe=ye?"ol":"ul",De=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+De+`>
|
|
`+me+"</"+Oe+`>
|
|
`},Le.listitem=function(me){return"<li>"+me+`</li>
|
|
`},Le.checkbox=function(me){return"<input "+(me?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Le.paragraph=function(me){return"<p>"+me+`</p>
|
|
`},Le.table=function(me,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
|
|
<thead>
|
|
`+me+`</thead>
|
|
`+ye+`</table>
|
|
`},Le.tablerow=function(me){return`<tr>
|
|
`+me+`</tr>
|
|
`},Le.tablecell=function(me,ye){var Ee=ye.header?"th":"td",Oe=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return Oe+me+"</"+Ee+`>
|
|
`},Le.strong=function(me){return"<strong>"+me+"</strong>"},Le.em=function(me){return"<em>"+me+"</em>"},Le.codespan=function(me){return"<code>"+me+"</code>"},Le.br=function(){return this.options.xhtml?"<br/>":"<br>"},Le.del=function(me){return"<del>"+me+"</del>"},Le.link=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='<a href="'+xe(me)+'"';return ye&&(Oe+=' title="'+ye+'"'),Oe+=">"+Ee+"</a>",Oe},Le.image=function(me,ye,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='<img src="'+me+'" alt="'+Ee+'"';return ye&&(Oe+=' title="'+ye+'"'),Oe+=this.options.xhtml?"/>":">",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;Oe<mt;Oe++){nt=me[Oe];switch(nt.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(nt.tokens),nt.depth,yt(this.parseInline(nt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(nt.text,nt.lang,nt.escaped);continue}case"table":{for(St="",It="",ht=nt.header.length,De=0;De<ht;De++)It+=this.renderer.tablecell(this.parseInline(nt.tokens.header[De]),{header:!0,align:nt.align[De]});for(St+=this.renderer.tablerow(It),ut="",ht=nt.cells.length,De=0;De<ht;De++){for(kt=nt.tokens.cells[De],It="",Tt=kt.length,Ze=0;Ze<Tt;Ze++)It+=this.renderer.tablecell(this.parseInline(kt[Ze]),{header:!1,align:nt.align[Ze]});ut+=this.renderer.tablerow(It)}Ee+=this.renderer.table(St,ut);continue}case"blockquote":{ut=this.parse(nt.tokens),Ee+=this.renderer.blockquote(ut);continue}case"list":{for(tt=nt.ordered,Ce=nt.start,Pe=nt.loose,ht=nt.items.length,ut="",De=0;De<ht;De++)it=nt.items[De],xt=it.checked,_t=it.task,pt="",it.task&&(Xe=this.renderer.checkbox(xt),Pe?it.tokens.length>0&&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+1<mt&&me[Oe+1].type==="text";)nt=me[++Oe],ut+=`
|
|
`+(nt.tokens?this.parseInline(nt.tokens):nt.text);Ee+=ye?this.renderer.paragraph(ut):ut;continue}default:{var Pt='Token with "'+nt.type+'" type was not found.';if(this.options.silent){console.error(Pt);return}else throw new Error(Pt)}}}return Ee},Le.parseInline=function(me,ye){ye=ye||this.renderer;var Ee="",Oe,De,Ze=me.length;for(Oe=0;Oe<Ze;Oe++){De=me[Oe];switch(De.type){case"escape":{Ee+=ye.text(De.text);break}case"html":{Ee+=ye.html(De.text);break}case"link":{Ee+=ye.link(De.href,De.title,this.parseInline(De.tokens,ye));break}case"image":{Ee+=ye.image(De.href,De.title,De.text);break}case"strong":{Ee+=ye.strong(this.parseInline(De.tokens,ye));break}case"em":{Ee+=ye.em(this.parseInline(De.tokens,ye));break}case"codespan":{Ee+=ye.codespan(De.text);break}case"br":{Ee+=ye.br();break}case"del":{Ee+=ye.del(this.parseInline(De.tokens,ye));break}case"text":{Ee+=ye.text(De.text);break}default:{var ht='Token with "'+De.type+'" type was not found.';if(this.options.silent){console.error(ht);return}else throw new Error(ht)}}}return Ee},je}(),Ot=Z.merge,Mt=Z.checkSanitizeDeprecation,Qe=Z.escape,Ne=I.getDefaults,lt=I.changeDefaults,dt=I.defaults;function Ye(je,Le,Me){if(typeof je=="undefined"||je===null)throw new Error("marked(): input parameter is undefined or null");if(typeof je!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(je)+", string expected");if(typeof Le=="function"&&(Me=Le,Le=null),Le=Ot({},Ye.defaults,Le||{}),Mt(Le),Me){var me=Le.highlight,ye;try{ye=ne.lex(je,Le)}catch(Ze){return Me(Ze)}var Ee=function(ht){var Tt;if(!ht)try{Tt=Et.parse(ye,Le)}catch(kt){ht=kt}return Le.highlight=me,ht?Me(ht):Me(null,Tt)};if(!me||me.length<3)return Ee();if(delete Le.highlight,!ye.length)return Ee();var Oe=0;Ye.walkTokens(ye,function(Ze){Ze.type==="code"&&(Oe++,setTimeout(function(){me(Ze.text,Ze.lang,function(ht,Tt){if(ht)return Ee(ht);Tt!=null&&Tt!==Ze.text&&(Ze.text=Tt,Ze.escaped=!0),Oe--,Oe===0&&Ee()})},0))}),Oe===0&&Ee();return}try{var De=ne.lex(je,Le);return Le.walkTokens&&Ye.walkTokens(De,Le.walkTokens),Et.parse(De,Le)}catch(Ze){if(Ze.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Le.silent)return"<p>An error occurred:</p><pre>"+Qe(Ze.message+"",!0)+"</pre>";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<ht;kt++)Tt[kt]=arguments[kt];var It=je.renderer[De].apply(me,Tt);return It===!1&&(It=Ze.apply(me,Tt)),It}};for(var Ee in je.renderer)ye(Ee);Le.renderer=me}(),je.tokenizer&&function(){var me=Ye.defaults.tokenizer||new ge,ye=function(De){var Ze=me[De];me[De]=function(){for(var ht=arguments.length,Tt=new Array(ht),kt=0;kt<ht;kt++)Tt[kt]=arguments[kt];var It=je.tokenizer[De].apply(me,Tt);return It===!1&&(It=Ze.apply(me,Tt)),It}};for(var Ee in je.tokenizer)ye(Ee);Le.tokenizer=me}(),je.walkTokens){var Me=Ye.defaults.walkTokens;Le.walkTokens=function(me){je.walkTokens(me),Me&&Me(me)}}Ye.setOptions(Le)},Ye.walkTokens=function(je,Le){for(var Me=D(je),me;!(me=Me()).done;){var ye=me.value;Le(ye);switch(ye.type){case"table":{for(var Ee=D(ye.tokens.header),Oe;!(Oe=Ee()).done;){var De=Oe.value;Ye.walkTokens(De,Le)}for(var Ze=D(ye.tokens.cells),ht;!(ht=Ze()).done;)for(var Tt=ht.value,kt=D(Tt),It;!(It=kt()).done;){var St=It.value;Ye.walkTokens(St,Le)}break}case"list":{Ye.walkTokens(ye.items,Le);break}default:ye.tokens&&Ye.walkTokens(ye.tokens,Le)}}},Ye.Parser=Et,Ye.parser=Et.parse,Ye.Renderer=Fe,Ye.TextRenderer=ke,Ye.Lexer=ne,Ye.lexer=ne.lex,Ye.Tokenizer=ge,Ye.Slugger=ct,Ye.parse=Ye;var st=Ye;return st})},ELLl:function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){var Q={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,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<i.length;d++){var s=i.charAt(d),A="'"+s+"'";D[A]||(D[A]=I(s))}}B(Q.pairs+"`");function I(i){return function(d){return u(d,i)}}function v(i){var d=i.state.closeBrackets;if(!d||d.override)return d;var s=i.getModeAt(i.getCursor());return s.closeBrackets||d}function T(i){var d=v(i);if(!d||i.getOption("disableInput"))return q.Pass;for(var s=j(d,"pairs"),A=i.listSelections(),a=0;a<A.length;a++){if(!A[a].empty())return q.Pass;var p=c(i,A[a].head);if(!p||s.indexOf(p)%2!=0)return q.Pass}for(var a=A.length-1;a>=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;a<A.length;a++){if(!A[a].empty())return q.Pass;var p=c(i,A[a].head);if(!p||s.indexOf(p)%2!=0)return q.Pass}i.operation(function(){var w=i.lineSeparator()||`
|
|
`;i.replaceSelection(w+w,null),i.execCommand("goCharLeft"),A=i.listSelections();for(var S=0;S<A.length;S++){var x=A[S].head.line;i.indentLine(x,null,!0),i.indentLine(x+1,null,!0)}})}function n(i){var d=q.cmpPos(i.anchor,i.head)>0;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<x.length;h++){var r=x[h],l=r.head,f,C=i.getRange(l,O(l.line,l.ch+1));if(L&&!r.empty())f="surround";else if((S||!L)&&C==d)S&&o(i,l)?f="both":w.indexOf(d)>=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;P<z.length;P++)z[P]=m+z[P]+F;i.replaceSelections(z,"around"),z=i.listSelections().slice();for(var P=0;P<z.length;P++)z[P]=n(z[P]);i.setSelections(z)}else b=="both"?(i.replaceSelection(m+F,null),i.triggerElectric(m+F),i.execCommand("goCharLeft")):b=="addFour"&&(i.replaceSelection(m+m+m+m,"before"),i.execCommand("goCharRight"))})}function c(i,d){var s=i.getRange(O(d.line,d.ch-1),O(d.line,d.ch+1));return s.length==2?s:null}function o(i,d){var s=i.getTokenAt(O(d.line,d.ch+1));return/\bstring/.test(s.type)&&s.start==d.ch&&(d.ch==0||!/\bstring/.test(i.getTokenTypeAt(d)))}})},Fofx:function(qe,pe){var G=typeof Float32Array=="undefined"?Array:Float32Array;function q(){var E=new G(6);return Q(E),E}function Q(E){return E[0]=1,E[1]=0,E[2]=0,E[3]=1,E[4]=0,E[5]=0,E}function O(E,n){return E[0]=n[0],E[1]=n[1],E[2]=n[2],E[3]=n[3],E[4]=n[4],E[5]=n[5],E}function j(E,n,u){var c=n[0]*u[0]+n[2]*u[1],o=n[1]*u[0]+n[3]*u[1],i=n[0]*u[2]+n[2]*u[3],d=n[1]*u[2]+n[3]*u[3],s=n[0]*u[4]+n[2]*u[5]+n[4],A=n[1]*u[4]+n[3]*u[5]+n[5];return E[0]=c,E[1]=o,E[2]=i,E[3]=d,E[4]=s,E[5]=A,E}function D(E,n,u){return E[0]=n[0],E[1]=n[1],E[2]=n[2],E[3]=n[3],E[4]=n[4]+u[0],E[5]=n[5]+u[1],E}function B(E,n,u){var c=n[0],o=n[2],i=n[4],d=n[1],s=n[3],A=n[5],a=Math.sin(u),p=Math.cos(u);return E[0]=c*p+d*a,E[1]=-c*a+d*p,E[2]=o*p+s*a,E[3]=-o*a+p*s,E[4]=p*i+a*A,E[5]=p*A-a*i,E}function I(E,n,u){var c=u[0],o=u[1];return E[0]=n[0]*c,E[1]=n[1]*o,E[2]=n[2]*c,E[3]=n[3]*o,E[4]=n[4]*c,E[5]=n[5]*o,E}function v(E,n){var u=n[0],c=n[2],o=n[4],i=n[1],d=n[3],s=n[5],A=u*d-i*c;return A?(A=1/A,E[0]=d*A,E[1]=-i*A,E[2]=-c*A,E[3]=u*A,E[4]=(c*s-d*o)*A,E[5]=(i*o-u*s)*A,E):null}function T(E){var n=q();return O(n,E),n}pe.create=q,pe.identity=Q,pe.copy=O,pe.mul=j,pe.translate=D,pe.rotate=B,pe.scale=I,pe.invert=v,pe.clone=T},FxDU:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var q=G("QO+J"),Q=G("j5sG"),O=typeof ResizeObserver!="undefined"?Q.createSensor:q.createSensor;pe.createSensor=O},Gev7:function(qe,pe,G){var q=G("bYtY"),Q=G("K2GJ"),O=G("1bdT"),j=G("ni6a");function D(I){I=I||{},O.call(this,I);for(var v in I)I.hasOwnProperty(v)&&v!=="style"&&(this[v]=I[v]);this.style=new Q(I.style,this),this._rect=null,this.__clipPaths=null}D.prototype={constructor:D,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(I){},afterBrush:function(I){},brush:function(I,v){},getBoundingRect:function(){},contain:function(I,v){return this.rectContain(I,v)},traverse:function(I,v){I.call(v,this)},rectContain:function(I,v){var T=this.transformCoordToLocal(I,v),E=this.getBoundingRect();return E.contain(T[0],T[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(I){return this.animate("style",I)},attrKV:function(I,v){I!=="style"?O.prototype.attrKV.call(this,I,v):this.style.set(v)},setStyle:function(I,v){return this.style.set(I,v),this.dirty(!1),this},useStyle:function(I){return this.style=new Q(I,this),this.dirty(!1),this},calculateTextPosition:null},q.inherits(D,O),q.mixin(D,j);var B=D;qe.exports=B},Gytx:function(qe,pe){qe.exports=function(q,Q,O,j){var D=O?O.call(j,q,Q):void 0;if(D!==void 0)return!!D;if(q===Q)return!0;if(typeof q!="object"||!q||typeof Q!="object"||!Q)return!1;var B=Object.keys(q),I=Object.keys(Q);if(B.length!==I.length)return!1;for(var v=Object.prototype.hasOwnProperty.bind(Q),T=0;T<B.length;T++){var E=B[T];if(!v(E))return!1;var n=q[E],u=Q[E];if(D=O?O.call(j,n,u,E):void 0,D===!1||D===void 0&&n!==u)return!1}return!0}},H6uX:function(qe,pe){var G=Array.prototype.slice,q=function(D){this._$handlers={},this._$eventProcessor=D};q.prototype={constructor:q,one:function(D,B,I,v){return O(this,D,B,I,v,!0)},on:function(D,B,I,v){return O(this,D,B,I,v,!1)},isSilent:function(D){var B=this._$handlers;return!B[D]||!B[D].length},off:function(D,B){var I=this._$handlers;if(!D)return this._$handlers={},this;if(B){if(I[D]){for(var v=[],T=0,E=I[D].length;T<E;T++)I[D][T].h!==B&&v.push(I[D][T]);I[D]=v}I[D]&&I[D].length===0&&delete I[D]}else delete I[D];return this},trigger:function(D){var B=this._$handlers[D],I=this._$eventProcessor;if(B){var v=arguments,T=v.length;T>3&&(v=G.call(v,1));for(var E=B.length,n=0;n<E;){var u=B[n];if(I&&I.filter&&u.query!=null&&!I.filter(D,u.query)){n++;continue}switch(T){case 1:u.h.call(u.ctx);break;case 2:u.h.call(u.ctx,v[1]);break;case 3:u.h.call(u.ctx,v[1],v[2]);break;default:u.h.apply(u.ctx,v);break}u.one?(B.splice(n,1),E--):n++}}return I&&I.afterTrigger&&I.afterTrigger(D),this},triggerWithContext:function(D){var B=this._$handlers[D],I=this._$eventProcessor;if(B){var v=arguments,T=v.length;T>4&&(v=G.call(v,1,v.length-1));for(var E=v[v.length-1],n=B.length,u=0;u<n;){var c=B[u];if(I&&I.filter&&c.query!=null&&!I.filter(D,c.query)){u++;continue}switch(T){case 1:c.h.call(E);break;case 2:c.h.call(E,v[1]);break;case 3:c.h.call(E,v[1],v[2]);break;default:c.h.apply(E,v);break}c.one?(B.splice(u,1),n--):u++}}return I&&I.afterTrigger&&I.afterTrigger(D),this}};function Q(D,B){var I=D._$eventProcessor;return B!=null&&I&&I.normalizeQuery&&(B=I.normalizeQuery(B)),B}function O(D,B,I,v,T,E){var n=D._$handlers;if(typeof I=="function"&&(T=v,v=I,I=null),!v||!B)return D;I=Q(D,I),n[B]||(n[B]=[]);for(var u=0;u<n[B].length;u++)if(n[B][u].h===v)return D;var c={h:v,one:E,query:I,ctx:T||D,callAtLast:v.zrEventfulCallAtLast},o=n[B].length-1,i=n[B][o];return i&&i.callAtLast?n[B].splice(o,0,c):n[B].push(c),D}var j=q;qe.exports=j},H7XF:function(qe,pe,G){"use strict";pe.byteLength=v,pe.toByteArray=E,pe.fromByteArray=c;for(var q=[],Q=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,B=j.length;D<B;++D)q[D]=j[D],Q[j.charCodeAt(D)]=D;Q["-".charCodeAt(0)]=62,Q["_".charCodeAt(0)]=63;function I(o){var i=o.length;if(i%4>0)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<w;S+=4)i=Q[o.charCodeAt(S)]<<18|Q[o.charCodeAt(S+1)]<<12|Q[o.charCodeAt(S+2)]<<6|Q[o.charCodeAt(S+3)],a[p++]=i>>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;a<d;a+=3)s=(o[a]<<16&16711680)+(o[a+1]<<8&65280)+(o[a+2]&255),A.push(n(s));return A.join("")}function c(o){for(var i,d=o.length,s=d%3,A=[],a=16383,p=0,w=d-s;p<w;p+=a)A.push(u(o,p,p+a>w?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 <http://feross.org>
|
|
* @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()<ne)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(Ae=new Uint8Array(ne),Ae.__proto__=v.prototype):(Ae===null&&(Ae=new v(ne)),Ae.length=ne),Ae}function v(Ae,ne,ae){if(!v.TYPED_ARRAY_SUPPORT&&!(this instanceof v))return new v(Ae,ne,ae);if(typeof Ae=="number"){if(typeof ne=="string")throw new Error("If encoding is specified then the first argument must be a string");return u(this,Ae)}return T(this,Ae,ne,ae)}v.poolSize=8192,v._augment=function(Ae){return Ae.__proto__=v.prototype,Ae};function T(Ae,ne,ae,ce){if(typeof ne=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ne instanceof ArrayBuffer?i(Ae,ne,ae,ce):typeof ne=="string"?c(Ae,ne,ae):d(Ae,ne)}v.from=function(Ae,ne,ae){return T(null,Ae,ne,ae)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&v[Symbol.species]===v&&Object.defineProperty(v,Symbol.species,{value:null,configurable:!0}));function E(Ae){if(typeof Ae!="number")throw new TypeError('"size" argument must be a number');if(Ae<0)throw new RangeError('"size" argument must not be negative')}function n(Ae,ne,ae,ce){return E(ne),ne<=0?I(Ae,ne):ae!==void 0?typeof ce=="string"?I(Ae,ne).fill(ae,ce):I(Ae,ne).fill(ae):I(Ae,ne)}v.alloc=function(Ae,ne,ae){return n(null,Ae,ne,ae)};function u(Ae,ne){if(E(ne),Ae=I(Ae,ne<0?0:s(ne)|0),!v.TYPED_ARRAY_SUPPORT)for(var ae=0;ae<ne;++ae)Ae[ae]=0;return Ae}v.allocUnsafe=function(Ae){return u(null,Ae)},v.allocUnsafeSlow=function(Ae){return u(null,Ae)};function c(Ae,ne,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!v.isEncoding(ae))throw new TypeError('"encoding" must be a valid string encoding');var ce=a(ne,ae)|0;Ae=I(Ae,ce);var xe=Ae.write(ne,ae);return xe!==ce&&(Ae=Ae.slice(0,xe)),Ae}function o(Ae,ne){var ae=ne.length<0?0:s(ne.length)|0;Ae=I(Ae,ae);for(var ce=0;ce<ae;ce+=1)Ae[ce]=ne[ce]&255;return Ae}function i(Ae,ne,ae,ce){if(ne.byteLength,ae<0||ne.byteLength<ae)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<ae+(ce||0))throw new RangeError("'length' is out of bounds");return ae===void 0&&ce===void 0?ne=new Uint8Array(ne):ce===void 0?ne=new Uint8Array(ne,ae):ne=new Uint8Array(ne,ae,ce),v.TYPED_ARRAY_SUPPORT?(Ae=ne,Ae.__proto__=v.prototype):Ae=o(Ae,ne),Ae}function d(Ae,ne){if(v.isBuffer(ne)){var ae=s(ne.length)|0;return Ae=I(Ae,ae),Ae.length===0||ne.copy(Ae,0,0,ae),Ae}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||at(ne.length)?I(Ae,0):o(Ae,ne);if(ne.type==="Buffer"&&j(ne.data))return o(Ae,ne.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function s(Ae){if(Ae>=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<ke;++Fe)if(ne[Fe]!==ae[Fe]){ce=ne[Fe],xe=ae[Fe];break}return ce<xe?-1:xe<ce?1:0},v.isEncoding=function(ne){switch(String(ne).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},v.concat=function(ne,ae){if(!j(ne))throw new TypeError('"list" argument must be an Array of Buffers');if(ne.length===0)return v.alloc(0);var ce;if(ae===void 0)for(ae=0,ce=0;ce<ne.length;++ce)ae+=ne[ce].length;var xe=v.allocUnsafe(ae),Fe=0;for(ce=0;ce<ne.length;++ce){var ke=ne[ce];if(!v.isBuffer(ke))throw new TypeError('"list" argument must be an Array of Buffers');ke.copy(xe,Fe),Fe+=ke.length}return xe};function a(Ae,ne){if(v.isBuffer(Ae))return Ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ae)||Ae instanceof ArrayBuffer))return Ae.byteLength;typeof Ae!="string"&&(Ae=""+Ae);var ae=Ae.length;if(ae===0)return 0;for(var ce=!1;;)switch(ne){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":case void 0:return Te(Ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>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;ae<ne;ae+=2)w(this,ae,ae+1);return this},v.prototype.swap32=function(){var ne=this.length;if(ne%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ae=0;ae<ne;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},v.prototype.swap64=function(){var ne=this.length;if(ne%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ae=0;ae<ne;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},v.prototype.toString=function(){var ne=this.length|0;return ne===0?"":arguments.length===0?g(this,0,ne):p.apply(this,arguments)},v.prototype.equals=function(ne){if(!v.isBuffer(ne))throw new TypeError("Argument must be a Buffer");return this===ne?!0:v.compare(this,ne)===0},v.prototype.inspect=function(){var ne="",ae=pe.INSPECT_MAX_BYTES;return this.length>0&&(ne=this.toString("hex",0,ae).match(/.{2}/g).join(" "),this.length>ae&&(ne+=" ... ")),"<Buffer "+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;Ot<ft;++Ot)if(yt[Ot]!==Et[Ot]){ke=yt[Ot],ct=Et[Ot];break}return ke<ct?-1:ct<ke?1:0};function S(Ae,ne,ae,ce,xe){if(Ae.length===0)return-1;if(typeof ae=="string"?(ce=ae,ae=0):ae>2147483647?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;yt<ke;yt++)if(ft(Ae,yt)===ft(ne,Et===-1?0:yt-Et)){if(Et===-1&&(Et=yt),yt-Et+1===ct)return Et*Fe}else Et!==-1&&(yt-=yt-Et),Et=-1}else for(ae+ct>ke&&(ae=ke-ct),yt=ae;yt>=0;yt--){for(var Ot=!0,Mt=0;Mt<ct;Mt++)if(ft(Ae,yt+Mt)!==ft(ne,Mt)){Ot=!1;break}if(Ot)return yt}return-1}v.prototype.includes=function(ne,ae,ce){return this.indexOf(ne,ae,ce)!==-1},v.prototype.indexOf=function(ne,ae,ce){return S(this,ne,ae,ce,!0)},v.prototype.lastIndexOf=function(ne,ae,ce){return S(this,ne,ae,ce,!1)};function L(Ae,ne,ae,ce){ae=Number(ae)||0;var xe=Ae.length-ae;ce?(ce=Number(ce),ce>xe&&(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;ke<ce;++ke){var ct=parseInt(ne.substr(ke*2,2),16);if(isNaN(ct))return ke;Ae[ae+ke]=ct}return ke}function b(Ae,ne,ae,ce){return ze(Te(ne,Ae.length-ae),Ae,ae,ce)}function h(Ae,ne,ae,ce){return ze($e(ne),Ae,ae,ce)}function r(Ae,ne,ae,ce){return h(Ae,ne,ae,ce)}function l(Ae,ne,ae,ce){return ze(Ie(ne),Ae,ae,ce)}function f(Ae,ne,ae,ce){return ze(bt(ne,Ae.length-ae),Ae,ae,ce)}v.prototype.write=function(ne,ae,ce,xe){if(ae===void 0)xe="utf8",ce=this.length,ae=0;else if(ce===void 0&&typeof ae=="string")xe=ae,ce=this.length,ae=0;else if(isFinite(ae))ae=ae|0,isFinite(ce)?(ce=ce|0,xe===void 0&&(xe="utf8")):(xe=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Fe=this.length-ae;if((ce===void 0||ce>Fe)&&(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;xe<ae;){var Fe=Ae[xe],ke=null,ct=Fe>239?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;ce<ne;)ae+=String.fromCharCode.apply(String,Ae.slice(ce,ce+=m));return ae}function P(Ae,ne,ae){var ce="";ae=Math.min(Ae.length,ae);for(var xe=ne;xe<ae;++xe)ce+=String.fromCharCode(Ae[xe]&127);return ce}function z(Ae,ne,ae){var ce="";ae=Math.min(Ae.length,ae);for(var xe=ne;xe<ae;++xe)ce+=String.fromCharCode(Ae[xe]);return ce}function Z(Ae,ne,ae){var ce=Ae.length;(!ne||ne<0)&&(ne=0),(!ae||ae<0||ae>ce)&&(ae=ce);for(var xe="",Fe=ne;Fe<ae;++Fe)xe+=Se(Ae[Fe]);return xe}function V(Ae,ne,ae){for(var ce=Ae.slice(ne,ae),xe="",Fe=0;Fe<ce.length;Fe+=2)xe+=String.fromCharCode(ce[Fe]+ce[Fe+1]*256);return xe}v.prototype.slice=function(ne,ae){var ce=this.length;ne=~~ne,ae=ae===void 0?ce:~~ae,ne<0?(ne+=ce,ne<0&&(ne=0)):ne>ce&&(ne=ce),ae<0?(ae+=ce,ae<0&&(ae=0)):ae>ce&&(ae=ce),ae<ne&&(ae=ne);var xe;if(v.TYPED_ARRAY_SUPPORT)xe=this.subarray(ne,ae),xe.__proto__=v.prototype;else{var Fe=ae-ne;xe=new v(Fe,void 0);for(var ke=0;ke<Fe;++ke)xe[ke]=this[ke+ne]}return xe};function M(Ae,ne,ae){if(Ae%1!==0||Ae<0)throw new RangeError("offset is not uint");if(Ae+ne>ae)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;++ke<ae&&(Fe*=256);)xe+=this[ne+ke]*Fe;return xe},v.prototype.readUIntBE=function(ne,ae,ce){ne=ne|0,ae=ae|0,ce||M(ne,ae,this.length);for(var xe=this[ne+--ae],Fe=1;ae>0&&(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<ae&&(Fe*=256);)xe+=this[ne+ke]*Fe;return Fe*=128,xe>=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||ne<Fe)throw new RangeError('"value" argument is out of bounds');if(ae+ce>Ae.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<ce&&(ke*=256);)this[ae+ct]=ne/ke&255;return ae+ce},v.prototype.writeUIntBE=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=ce-1,ct=1;for(this[ae+ke]=ne&255;--ke>=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<Fe;++xe)Ae[ae+xe]=(ne&255<<8*(ce?xe:1-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<Fe;++xe)Ae[ae+xe]=ne>>>(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<ce&&(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.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<ce&&(xe=ce),xe===ce)return 0;if(ne.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(ce<0||ce>=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<xe-ce&&(xe=ne.length-ae+ce);var Fe=xe-ce,ke;if(this===ne&&ce<ae&&ae<xe)for(ke=Fe-1;ke>=0;--ke)ne[ke+ae]=this[ke+ce];else if(Fe<1e3||!v.TYPED_ARRAY_SUPPORT)for(ke=0;ke<Fe;++ke)ne[ke+ae]=this[ke+ce];else Uint8Array.prototype.set.call(ne,this.subarray(ce,ce+Fe),ae);return Fe},v.prototype.fill=function(ne,ae,ce,xe){if(typeof ne=="string"){if(typeof ae=="string"?(xe=ae,ae=0,ce=this.length):typeof ce=="string"&&(xe=ce,ce=this.length),ne.length===1){var Fe=ne.charCodeAt(0);Fe<256&&(ne=Fe)}if(xe!==void 0&&typeof xe!="string")throw new TypeError("encoding must be a string");if(typeof xe=="string"&&!v.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe)}else typeof ne=="number"&&(ne=ne&255);if(ae<0||this.length<ae||this.length<ce)throw new RangeError("Out of range index");if(ce<=ae)return this;ae=ae>>>0,ce=ce===void 0?this.length:ce>>>0,ne||(ne=0);var ke;if(typeof ne=="number")for(ke=ae;ke<ce;++ke)this[ke]=ne;else{var ct=v.isBuffer(ne)?ne:Te(new v(ne,xe).toString()),ft=ct.length;for(ke=0;ke<ce-ae;++ke)this[ke+ae]=ct[ke%ft]}return this};var we=/[^+\/0-9A-Za-z-_]/g;function Re(Ae){if(Ae=He(Ae).replace(we,""),Ae.length<2)return"";for(;Ae.length%4!==0;)Ae=Ae+"=";return Ae}function He(Ae){return Ae.trim?Ae.trim():Ae.replace(/^\s+|\s+$/g,"")}function Se(Ae){return Ae<16?"0"+Ae.toString(16):Ae.toString(16)}function Te(Ae,ne){ne=ne||Infinity;for(var ae,ce=Ae.length,xe=null,Fe=[],ke=0;ke<ce;++ke){if(ae=Ae.charCodeAt(ke),ae>55295&&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<Ae.length;++ae)ne.push(Ae.charCodeAt(ae)&255);return ne}function bt(Ae,ne){for(var ae,ce,xe,Fe=[],ke=0;ke<Ae.length&&!((ne-=2)<0);++ke)ae=Ae.charCodeAt(ke),ce=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<ce&&!(xe+ae>=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;A<a;A++){s=arguments[A];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(d[p]=s[p])}return d},E.apply(this,arguments)};function n(d){return d.displayName||d.name||"Component"}var u=function(){return{}};function c(d,s){s===void 0&&(s={});var A=!!d,a=d||u;return function(w){var S=function(L){T(b,L);function b(h,r){var l=L.call(this,h,r)||this;return l.unsubscribe=null,l.handleChange=function(){if(!l.unsubscribe)return;var f=a(l.store.getState(),l.props);l.setState({subscribed:f})},l.store=l.context,l.state={subscribed:a(l.store.getState(),h),store:l.store,props:h},l}return b.getDerivedStateFromProps=function(h,r){return d&&d.length===2&&h!==r.props?{subscribed:a(r.store.getState(),h),props:h}:{props:h}},b.prototype.componentDidMount=function(){this.trySubscribe()},b.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},b.prototype.shouldComponentUpdate=function(h,r){return!B()(this.props,h)||!B()(this.state.subscribed,r.subscribed)},b.prototype.trySubscribe=function(){A&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},b.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},b.prototype.render=function(){var h=E(E(E({},this.props),this.state.subscribed),{store:this.store});return q.createElement(w,E({},h,{ref:this.props.miniStoreForwardedRef}))},b.displayName="Connect("+n(w)+")",b.contextType=O,b}(q.Component);if(s.forwardRef){var x=q.forwardRef(function(L,b){return q.createElement(S,E({},L,{miniStoreForwardedRef:b}))});return v()(x,w)}return v()(S,w)}}var o=function(){return o=Object.assign||function(d){for(var s,A=1,a=arguments.length;A<a;A++){s=arguments[A];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(d[p]=s[p])}return d},o.apply(this,arguments)};function i(d){var s=d,A=[];function a(S){s=o(o({},s),S);for(var x=0;x<A.length;x++)A[x]()}function p(){return s}function w(S){return A.push(S),function(){var L=A.indexOf(S);A.splice(L,1)}}return{setState:a,getState:p,subscribe:w}}},IBYe:function(qe,pe,G){"use strict";function q(Q){return null}pe.a=q},IMiH:function(qe,pe,G){var q=G("Sj9i"),Q=G("QBsz"),O=G("4mN7"),j=G("mFDi"),D=G("LPTA"),B=D.devicePixelRatio,I={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},v=[],T=[],E=[],n=[],u=Math.min,c=Math.max,o=Math.cos,i=Math.sin,d=Math.sqrt,s=Math.abs,A=typeof Float32Array!="undefined",a=function(w){this._saveData=!(w||!1),this._saveData&&(this.data=[]),this._ctx=null};a.prototype={constructor:a,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(w,S,x){x=x||0,this._ux=s(x/B/w)||0,this._uy=s(x/B/S)||0},getContext:function(){return this._ctx},beginPath:function(w){return this._ctx=w,w&&w.beginPath(),w&&(this.dpr=w.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(w,S){return this.addData(I.M,w,S),this._ctx&&this._ctx.moveTo(w,S),this._x0=w,this._y0=S,this._xi=w,this._yi=S,this},lineTo:function(w,S){var x=s(w-this._xi)>this._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;x<w.length;x++)S+=w[x];this._dashSum=S}return this},setLineDashOffset:function(w){return this._dashOffset=w,this},len:function(){return this._len},setData:function(w){var S=w.length;!(this.data&&this.data.length===S)&&A&&(this.data=new Float32Array(S));for(var x=0;x<S;x++)this.data[x]=w[x];this._len=S},appendPath:function(w){w instanceof Array||(w=[w]);for(var S=w.length,x=0,L=this._len,b=0;b<S;b++)x+=w[b].len();A&&this.data instanceof Float32Array&&(this.data=new Float32Array(L+x));for(var b=0;b<S;b++)for(var h=w[b].data,r=0;r<h.length;r++)this.data[L++]=h[r];this._len=L},addData:function(w){if(!this._saveData)return;var S=this.data;this._len+arguments.length>S.length&&(this._expandData(),S=this.data);for(var x=0;x<arguments.length;x++)S[this._len++]=arguments[x];this._prevCmd=w},_expandData:function(){if(!(this.data instanceof Array)){for(var w=[],S=0;S<this._len;S++)w[S]=this.data[S];this.data=w}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(w,S){var x=this._dashSum,L=this._dashOffset,b=this._lineDash,h=this._ctx,r=this._xi,l=this._yi,f=w-r,C=S-l,g=d(f*f+C*C),m=r,F=l,P,z=b.length,Z;for(f/=g,C/=g,L<0&&(L=x+L),L%=x,m-=L*f,F-=L*C;f>0&&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&&m<r||f<0&&m>r||C>0&&F<l||C<0&&F>l)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(;M<J&&!(se+=f[M],se>l);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;h<w.length;){var r=w[h++];h===1&&(S=w[h],x=w[h+1],L=S,b=x);switch(r){case I.M:L=w[h++],b=w[h++],S=L,x=b,E[0]=L,E[1]=b,n[0]=L,n[1]=b;break;case I.L:O.fromLine(S,x,w[h],w[h+1],E,n),S=w[h++],x=w[h++];break;case I.C:O.fromCubic(S,x,w[h++],w[h++],w[h++],w[h++],w[h],w[h+1],E,n),S=w[h++],x=w[h++];break;case I.Q:O.fromQuadratic(S,x,w[h++],w[h++],w[h],w[h+1],E,n),S=w[h++],x=w[h++];break;case I.A:var l=w[h++],f=w[h++],C=w[h++],g=w[h++],m=w[h++],F=w[h++]+m;h+=1;var P=1-w[h++];h===1&&(L=o(m)*C+l,b=i(m)*g+f),O.fromArc(l,f,C,g,m,F,P,E,n),S=o(F)*C+l,x=i(F)*g+f;break;case I.R:L=S=w[h++],b=x=w[h++];var z=w[h++],Z=w[h++];O.fromLine(L,b,L+z,b+Z,E,n);break;case I.Z:S=L,x=b;break}Q.min(v,v,E),Q.max(T,T,n)}return h===0&&(v[0]=v[1]=T[0]=T[1]=0),new j(v[0],v[1],T[0]-v[0],T[1]-v[1])},rebuildPath:function(w){for(var S=this.data,x,L,b,h,r,l,f=this._ux,C=this._uy,g=this._len,m=0;m<g;){var F=S[m++];m===1&&(b=S[m],h=S[m+1],x=b,L=h);switch(F){case I.M:x=b=S[m++],L=h=S[m++],w.moveTo(b,h);break;case I.L:r=S[m++],l=S[m++],(s(r-b)>f||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;A<j.length;A++){var a=j[A],p=a[0];(s||i[p]!==d[p])&&(u[p]=q(u,p,i[p]||a[1]))}if((s||i.fill!==d.fill)&&(u.fillStyle=i.fill),(s||i.stroke!==d.stroke)&&(u.strokeStyle=i.stroke),(s||i.opacity!==d.opacity)&&(u.globalAlpha=i.opacity==null?1:i.opacity),(s||i.blend!==d.blend)&&(u.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var w=i.lineWidth;u.lineWidth=w/(this.strokeNoScale&&c&&c.getLineScale?c.getLineScale():1)}},hasFill:function(){var u=this.fill;return u!=null&&u!=="none"},hasStroke:function(){var u=this.stroke;return u!=null&&u!=="none"&&this.lineWidth>0},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;A<s.length;A++)d.addColorStop(s[A].offset,s[A].color);return d}};for(var v=D.prototype,T=0;T<j.length;T++){var E=j[T];E[0]in v||(v[E[0]]=E[1])}D.getGradient=v.getGradient;var n=D;qe.exports=n},LPTA:function(qe,pe){var G=1;typeof window!="undefined"&&(G=Math.max(window.devicePixelRatio||1,1));var q=0,Q=G;pe.debugMode=q,pe.devicePixelRatio=Q},LdHM:function(qe,pe,G){"use strict";G.d(pe,"b",function(){return p}),G.d(pe,"a",function(){return S});var q=G("1OyB"),Q=G("vuIU"),O=G("Ji7U"),j=G("LK+K"),D=G("q1tI"),B=G("rePB"),I=G("Ff2n"),v=G("ODXe"),T=G("4IlW"),E=G("bX4T"),n=G("YrtM"),u=G("TSYQ"),c=G.n(u),o=G("+nKL"),i=G("8OUc"),d=function(J,X){var re=J.prefixCls,se=J.id,_e=J.flattenOptions,ge=J.childrenAsData,we=J.values,Re=J.searchValue,He=J.multiple,Se=J.defaultActiveFirstOption,Te=J.height,$e=J.itemHeight,bt=J.notFoundContent,Ie=J.open,ze=J.menuItemSelectedIcon,at=J.virtual,Ae=J.onSelect,ne=J.onToggleOpen,ae=J.onActiveValue,ce=J.onScroll,xe=J.onMouseEnter,Fe="".concat(re,"-item"),ke=Object(n.a)(function(){return _e},[Ie,_e],function(st,je){return je[0]&&st[1]!==je[1]}),ct=D.useRef(null),ft=function(je){je.preventDefault()},yt=function(je){ct.current&&ct.current.scrollTo({index:je})},Et=function(je){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=ke.length,me=0;me<Me;me+=1){var ye=(je+me*Le+Me)%Me,Ee=ke[ye],Oe=Ee.group,De=Ee.data;if(!Oe&&!De.disabled)return ye}return-1},Ot=D.useState(function(){return Et(0)}),Mt=Object(v.a)(Ot,2),Qe=Mt[0],Ne=Mt[1],lt=function(je){Ne(je);var Le=ke[je];if(!Le){ae(null,-1);return}ae(Le.data.value,je)};D.useEffect(function(){lt(Se!==!1?Et(0):-1)},[ke.length,Re]),D.useEffect(function(){var st=setTimeout(function(){if(!He&&Ie&&we.size===1){var je=Array.from(we)[0],Le=ke.findIndex(function(Me){var me=Me.data;return me.value===je});lt(Le),yt(Le)}});return function(){return clearTimeout(st)}},[Ie]);var dt=function(je){je!==void 0&&Ae(je,{selected:!we.has(je)}),He||ne(!1)};if(D.useImperativeHandle(X,function(){return{onKeyDown:function(je){var Le=je.which;switch(Le){case T.a.UP:case T.a.DOWN:{var Me=0;if(Le===T.a.UP?Me=-1:Le===T.a.DOWN&&(Me=1),Me!==0){var me=Et(Qe+Me,Me);yt(me),lt(me)}break}case T.a.ENTER:{var ye=ke[Qe];ye&&!ye.data.disabled?dt(ye.data.value):dt(void 0),Ie&&je.preventDefault();break}case T.a.ESC:ne(!1)}},onKeyUp:function(){},scrollTo:function(je){yt(je)}}}),ke.length===0)return D.createElement("div",{role:"listbox",id:"".concat(se,"_list"),className:"".concat(Fe,"-empty"),onMouseDown:ft},bt);function Ye(st){var je=ke[st];if(!je)return null;var Le=je.data||{},Me=Le.value,me=Le.label,ye=Le.children,Ee=Object(E.a)(Le,!0),Oe=ge?ye:me;return je?D.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},Ee,{key:st,role:"option",id:"".concat(se,"_list_").concat(st),"aria-selected":we.has(Me)}),Me):null}return D.createElement(D.Fragment,null,D.createElement("div",{role:"listbox",id:"".concat(se,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ye(Qe-1),Ye(Qe),Ye(Qe+1)),D.createElement(o.a,{itemKey:"key",ref:ct,data:ke,height:Te,itemHeight:$e,fullHeight:!1,onMouseDown:ft,onScroll:ce,virtual:at,onMouseEnter:xe},function(st,je){var Le,Me=st.group,me=st.groupOption,ye=st.data,Ee=ye.label,Oe=ye.key;if(Me)return D.createElement("div",{className:c()(Fe,"".concat(Fe,"-group"))},Ee!==void 0?Ee:Oe);var De=ye.disabled,Ze=ye.value,ht=ye.title,Tt=ye.children,kt=ye.style,It=ye.className,St=Object(I.a)(ye,["disabled","value","title","children","style","className"]),ut=we.has(Ze),nt="".concat(Fe,"-option"),tt=c()(Fe,nt,It,(Le={},Object(B.a)(Le,"".concat(nt,"-grouped"),me),Object(B.a)(Le,"".concat(nt,"-active"),Qe===je&&!De),Object(B.a)(Le,"".concat(nt,"-disabled"),De),Object(B.a)(Le,"".concat(nt,"-selected"),ut),Le)),Ce=ge?Tt:Ee,Pe=!ze||typeof ze=="function"||ut;return D.createElement("div",Object.assign({},St,{"aria-selected":ut,className:tt,title:ht,onMouseMove:function(){if(Qe===je||De)return;lt(je)},onClick:function(){De||dt(Ze)},style:kt}),D.createElement("div",{className:"".concat(nt,"-content")},Ce||Ze),D.isValidElement(ze)||ut,Pe&&D.createElement(i.a,{className:"".concat(Fe,"-option-state"),customizeIcon:ze,customizeIconProps:{isSelected:ut}},ut?"\u2713":null))}))},s=D.forwardRef(d);s.displayName="OptionList";var A=s,a=function(){return null};a.isSelectOption=!0;var p=a,w=function(){return null};w.isSelectOptGroup=!0;var S=w,x=G("VTBJ"),L=G("Zm9Q");function b(M){var J=M.key,X=M.props,re=X.children,se=X.value,_e=Object(I.a)(X,["children","value"]);return Object(x.a)({key:J,value:se!==void 0?se:J,children:re},_e)}function h(M){var J=arguments.length>1&&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;_e<re.length;_e+=2){var ge=parseFloat(re[_e]),we=parseFloat(re[_e+1]);se.push([ge,we])}return se}var C={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function g(X,re,se,_e){var ge=re.__inheritedStyle||{},we=re.type==="text";if(X.nodeType===1&&(z(X,re),A(ge,V(X)),!_e)){for(var Re in C)if(C.hasOwnProperty(Re)){var He=X.getAttribute(Re);He!=null&&(ge[C[Re]]=He)}}var Se=we?"textFill":"fill",Te=we?"textStroke":"stroke";re.style=re.style||new u;var $e=re.style;ge.fill!=null&&$e.set(Se,F(ge.fill,se)),ge.stroke!=null&&$e.set(Te,F(ge.stroke,se)),w(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(bt){var Ie=bt==="lineWidth"&&we?"textStrokeWidth":bt;ge[bt]!=null&&$e.set(Ie,parseFloat(ge[bt]))}),(!ge.textBaseline||ge.textBaseline==="auto")&&(ge.textBaseline="alphabetic"),ge.textBaseline==="alphabetic"&&(ge.textBaseline="bottom"),ge.textAlign==="start"&&(ge.textAlign="left"),ge.textAlign==="end"&&(ge.textAlign="right"),w(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(bt){ge[bt]!=null&&$e.set(bt,ge[bt])}),ge.lineDash&&(re.style.lineDash=p(ge.lineDash).split(S)),$e[Te]&&$e[Te]!=="none"&&(re[Te]=!0),re.__inheritedStyle=ge}var m=/url\(\s*#(.*?)\)/;function F(X,re){var se=re&&X&&X.match(m);if(se){var _e=p(se[1]),ge=re[_e];return ge}return X}var P=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function z(X,re){var se=X.getAttribute("transform");if(se){se=se.replace(/,/g," ");var _e=null,ge=[];se.replace(P,function(Se,Te,$e){ge.push(Te,$e)});for(var we=ge.length-1;we>0;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<T.length;E++)this.addClip(T[E])},removeClip:function(v){var T=q.indexOf(this._clips,v);T>=0&&this._clips.splice(T,1)},removeAnimator:function(v){for(var T=v.getClips(),E=0;E<T.length;E++)this.removeClip(T[E]);v.animation=null},_update:function(){for(var v=new Date().getTime()-this._pausedTime,T=v-this._time,E=this._clips,n=E.length,u=[],c=[],o=0;o<n;o++){var i=E[o],d=i.step(v,T);d&&(u.push(d),c.push(i))}for(var o=0;o<n;)E[o]._needsRemove?(E[o]=E[n-1],E.pop(),n--):o++;n=u.length;for(var o=0;o<n;o++)c[o].fire(u[o]);this._time=v,this.onframe(T),this.trigger("frame",T),this.stage.update&&this.stage.update()},_startLoop:function(){var v=this;this._running=!0;function T(){v._running&&(j(T),!v._paused&&v._update())}j(T)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(v,T){T=T||{};var E=new D(v,T.loop,T.getter,T.setter);return this.addAnimator(E),E}},q.mixin(B,O);var I=B;qe.exports=I},NC18:function(qe,pe,G){var q=G("y+Vt"),Q=G("IMiH"),O=G("7oTu"),j=Math.sqrt,D=Math.sin,B=Math.cos,I=Math.PI,v=function(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])},T=function(a,p){return(a[0]*p[0]+a[1]*p[1])/(v(a)*v(p))},E=function(a,p){return(a[0]*p[1]<a[1]*p[0]?-1:1)*Math.acos(T(a,p))};function n(a,p,w,S,x,L,b,h,r,l,f){var C=r*(I/180),g=B(C)*(a-w)/2+D(C)*(p-S)/2,m=-1*D(C)*(a-w)/2+B(C)*(p-S)/2,F=g*g/(b*b)+m*m/(h*h);F>1&&(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;l<r.length;l++){for(var f=r[l],C=f.charAt(0),g,m=f.match(c)||[],F=m.length,P=0;P<F;P++)m[P]=parseFloat(m[P]);for(var z=0;z<F;){var Z,V,M,J,X,re,se,_e=p,ge=w;switch(C){case"l":p+=m[z++],w+=m[z++],g=h.L,b.addData(g,p,w);break;case"L":p=m[z++],w=m[z++],g=h.L,b.addData(g,p,w);break;case"m":p+=m[z++],w+=m[z++],g=h.M,b.addData(g,p,w),S=p,x=w,C="l";break;case"M":p=m[z++],w=m[z++],g=h.M,b.addData(g,p,w),S=p,x=w,C="L";break;case"h":p+=m[z++],g=h.L,b.addData(g,p,w);break;case"H":p=m[z++],g=h.L,b.addData(g,p,w);break;case"v":w+=m[z++],g=h.L,b.addData(g,p,w);break;case"V":w=m[z++],g=h.L,b.addData(g,p,w);break;case"C":g=h.C,b.addData(g,m[z++],m[z++],m[z++],m[z++],m[z++],m[z++]),p=m[z-2],w=m[z-1];break;case"c":g=h.C,b.addData(g,m[z++]+p,m[z++]+w,m[z++]+p,m[z++]+w,m[z++]+p,m[z++]+w),p+=m[z-2],w+=m[z-1];break;case"S":Z=p,V=w;var we=b.len(),Re=b.data;L===h.C&&(Z+=p-Re[we-4],V+=w-Re[we-3]),g=h.C,_e=m[z++],ge=m[z++],p=m[z++],w=m[z++],b.addData(g,Z,V,_e,ge,p,w);break;case"s":Z=p,V=w;var we=b.len(),Re=b.data;L===h.C&&(Z+=p-Re[we-4],V+=w-Re[we-3]),g=h.C,_e=p+m[z++],ge=w+m[z++],p+=m[z++],w+=m[z++],b.addData(g,Z,V,_e,ge,p,w);break;case"Q":_e=m[z++],ge=m[z++],p=m[z++],w=m[z++],g=h.Q,b.addData(g,_e,ge,p,w);break;case"q":_e=m[z++]+p,ge=m[z++]+w,p+=m[z++],w+=m[z++],g=h.Q,b.addData(g,_e,ge,p,w);break;case"T":Z=p,V=w;var we=b.len(),Re=b.data;L===h.Q&&(Z+=p-Re[we-4],V+=w-Re[we-3]),p=m[z++],w=m[z++],g=h.Q,b.addData(g,Z,V,p,w);break;case"t":Z=p,V=w;var we=b.len(),Re=b.data;L===h.Q&&(Z+=p-Re[we-4],V+=w-Re[we-3]),p+=m[z++],w+=m[z++],g=h.Q,b.addData(g,Z,V,p,w);break;case"A":M=m[z++],J=m[z++],X=m[z++],re=m[z++],se=m[z++],_e=p,ge=w,p=m[z++],w=m[z++],g=h.A,n(_e,ge,p,w,re,se,M,J,X,g,b);break;case"a":M=m[z++],J=m[z++],X=m[z++],re=m[z++],se=m[z++],_e=p,ge=w,p+=m[z++],w+=m[z++],g=h.A,n(_e,ge,p,w,re,se,M,J,X,g,b);break}}(C==="z"||C==="Z")&&(g=h.Z,b.addData(g),p=S,w=x),L=g}return b.toStatic(),b}function i(a,p){var w=o(a);return p=p||{},p.buildPath=function(S){if(S.setData){S.setData(w.data);var x=S.getContext();x&&S.rebuildPath(x)}else{var x=S;w.rebuildPath(x)}},p.applyTransform=function(S){O(w,S),this.dirty(!0)},p}function d(a,p){return new q(i(a,p))}function s(a,p){return q.extend(i(a,p))}function A(a,p){for(var w=[],S=a.length,x=0;x<S;x++){var L=a[x];L.path||L.createPathProxy(),L.__dirtyPath&&L.buildPath(L.path,L.shape,!0),w.push(L.path)}var b=new q(p);return b.createPathProxy(),b.buildPath=function(h){h.appendPath(w);var r=h.getContext();r&&h.rebuildPath(r)},b}pe.createFromString=d,pe.extendFromString=s,pe.mergePath=A},NohK:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0;var q=function(O){var j=arguments.length>1&&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<I;T++)v[T]=arguments[T];clearTimeout(D),D=setTimeout(function(){O.apply(B,v)},j)}};pe.default=q},NvD2:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return B});var q=G("Kwbf");function Q(I,v){var T=new Set;return I.forEach(function(E){v.has(E)||T.add(E)}),T}function O(I){var v=I||{},T=v.disabled,E=v.disableCheckbox,n=v.checkable;return!!(T||E)||n===!1}function j(I,v,T,E){for(var n=new Set(I),u=new Set,c=0;c<=T;c+=1){var o=v.get(c)||new Set;o.forEach(function(A){var a=A.key,p=A.node,w=A.children,S=w===void 0?[]:w;n.has(a)&&!E(p)&&S.filter(function(x){return!E(x.node)}).forEach(function(x){n.add(x.key)})})}for(var i=new Set,d=T;d>=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<v.length;E++)this.addDisplayable(v[E],T)},D.prototype.eachPendingDisplayable=function(v){for(var T=this._cursor;T<this._displayables.length;T++)v&&v(this._displayables[T]);for(var T=0;T<this._temporaryDisplayables.length;T++)v&&v(this._temporaryDisplayables[T])},D.prototype.update=function(){this.updateTransform();for(var v=this._cursor;v<this._displayables.length;v++){var T=this._displayables[v];T.parent=this,T.update(),T.parent=null}for(var v=0;v<this._temporaryDisplayables.length;v++){var T=this._temporaryDisplayables[v];T.parent=this,T.update(),T.parent=null}},D.prototype.brush=function(v,T){for(var E=this._cursor;E<this._displayables.length;E++){var n=this._displayables[E];n.beforeBrush&&n.beforeBrush(v),n.brush(v,E===this._cursor?null:this._displayables[E-1]),n.afterBrush&&n.afterBrush(v)}this._cursor=E;for(var E=0;E<this._temporaryDisplayables.length;E++){var n=this._temporaryDisplayables[E];n.beforeBrush&&n.beforeBrush(v),n.brush(v,E===0?null:this._temporaryDisplayables[E-1]),n.afterBrush&&n.afterBrush(v)}this._temporaryDisplayables=[],this.notClear=!0};var B=[];D.prototype.getBoundingRect=function(){if(!this._rect){for(var v=new j(Infinity,Infinity,-Infinity,-Infinity),T=0;T<this._displayables.length;T++){var E=this._displayables[T],n=E.getBoundingRect().clone();E.needLocalTransform()&&n.applyTransform(E.getLocalTransform(B)),v.union(n)}this._rect=v}return this._rect},D.prototype.contain=function(v,T){var E=this.transformCoordToLocal(v,T),n=this.getBoundingRect();if(n.contain(E[0],E[1]))for(var u=0;u<this._displayables.length;u++){var c=this._displayables[u];if(c.contain(v,T))return!0}return!1},Q(D,O);var I=D;qe.exports=I},OZM5:function(qe,pe,G){"use strict";G.d(pe,"b",function(){return E}),G.d(pe,"a",function(){return n}),G.d(pe,"k",function(){return u}),G.d(pe,"h",function(){return c}),G.d(pe,"i",function(){return o}),G.d(pe,"g",function(){return i}),G.d(pe,"c",function(){return d}),G.d(pe,"d",function(){return s}),G.d(pe,"j",function(){return p}),G.d(pe,"e",function(){return w}),G.d(pe,"f",function(){return S});var q=G("KQm4"),Q=G("U8pU"),O=G("Ff2n"),j=G("q1tI"),D=G.n(j),B=G("Kwbf"),I=G("WaYH"),v=.25,T=2;function E(x,L){var b=x.slice(),h=b.indexOf(L);return h>=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(".concat(Cr.content_type,")")):Cr.content_type.indexOf("video")>-1?$.replaceSelection('<video width="100%" controls src="'.concat(f.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Cr.content_type.indexOf("pdf")>-1?$.replaceSelection('<a href="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Cr.id,"?type=").concat(Cr.content_type,'&disposition=inline" target="_blank">').concat(Cr.name,"</a>")):$.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(".concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,'"></video>')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Mr.type,'&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):me.includes(li)?er.replaceSelection('<a href="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,'?type=office&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):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(".concat(Nr.content_type,")")):(Mr==null||((Kn=Mr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,'"></video>')):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Mr.type,'&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):me.includes(li)?er.replaceSelection('<a href="'.concat(f.a.API_SERVER,"/api/attachments/").concat(Nr.id,'?type=office&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):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;Cr<Tr.length;Cr++)Xr(Cr)}}),le(er),function(){er.off("paste",hr)}}},[]);var En=Object(n.useCallback)(function(){if(xr.current)try{}catch(er){console.log(er,"---- to set md editor body height")}},[an,xr,Br]);Object(n.useEffect)(function(){function er(){var Jt=new i.default(function(gr){var Tr=Object(O.a)(gr),Xr;try{for(Tr.s();!(Xr=Tr.n()).done;){var Cr=Xr.value;(Cr.target.offsetHeight>0||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);Jt<gr.length;Jt++){var Tr;hr()}return vr.current=setInterval(function(){$t.current&&Gr()},4e3),function(){clearInterval(vr.current);var Xr=Object(O.a)(er),Cr;try{for(Xr.s();!(Cr=Xr.n()).done;){var on=Cr.value;$.removeKeyMap(on)}}catch(Dn){Xr.e(Dn)}finally{Xr.f()}}}},[$]),Object(n.useEffect)(function(){Rr!==Br&&yr(Rr)},[Rr]),Object(Ot.a)(function(){if(!Ir&&Jr>0){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(`<br/>
|
|
`),$.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(Xr,' "').concat(Cr,'" )')):$.replaceSelection("")),$.focus();case ft:for(var on=er.row,Dn=er.col,Mr=er.align,li=`
|
|
`,Nr=0;Nr<on;Nr++){for(var jn=[],Kn=[],ui=0;ui<Dn;ui++)Nr===1&&Kn.push(Et[Mr]),jn.push(" ");Nr===1&&(li+="| ".concat(Kn.join(" | "),` |
|
|
`)),li+="| ".concat(jn.join(Dn===1?"":" | "),` |
|
|
`)}return $.replaceSelection(li+`
|
|
`),$.focus();default:throw new Error}},[$,Dr]),qr=Object(n.useMemo)(function(){switch(Dr){case Fe:return u.a.createElement(re,{callback:wn,onCancel:Ln});case ct:return u.a.createElement(se.b,{callback:wn,onCancel:Ln});case ke:return u.a.createElement(Se,{callback:wn,onCancel:Ln});case ft:return u.a.createElement(ae,{callback:wn,onCancel:Ln});default:return null}},[Dr]);function Ln(){Pr("")}Object(n.useEffect)(function(){if(Er.current){var er=Er.current,hr=!1,Jt=0;function gr(Cr){hr=!0,Jt=Cr.pageY}function Tr(){hr=!1}function Xr(Cr){if(hr){var on=Cr.pageY-Jt;on<0&&(on=0),on>300&&(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&&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;Ot<He;Ot++)re.push(a(se[ge++]))}return re.join(" ")}var l={};l.brush=function(X){var re=X.style,se=X.__svgEl;se||(se=Q("path"),X.__svgEl=se),X.path||X.createPathProxy();var _e=X.path;if(X.__dirtyPath){_e.beginPath(),_e.subPixelOptimize=!1,X.buildPath(_e,X.shape),X.__dirtyPath=!1;var ge=r(_e);ge.indexOf("NaN")<0&&L(se,"d",ge)}h(se,re,!1,X),x(se,X.transform),re.text!=null?z(X,X.getBoundingRect()):J(X)};var f={};f.brush=function(X){var re=X.style,se=re.image;if(se instanceof HTMLImageElement){var _e=se.src;se=_e}if(!se)return;var ge=re.x||0,we=re.y||0,Re=re.width,He=re.height,Se=X.__svgEl;Se||(Se=Q("image"),X.__svgEl=Se),se!==X.__imageSrc&&(b(Se,"href",se),X.__imageSrc=se),L(Se,"width",Re),L(Se,"height",He),L(Se,"x",ge),L(Se,"y",we),x(Se,X.transform),re.text!=null?z(X,X.getBoundingRect()):J(X)};var C={},g=new j,m={},F=[],P={left:"start",right:"end",center:"middle",middle:"middle"},z=function(X,re){var se=X.style,_e=X.transform,ge=X instanceof v||se.transformText;X.__dirty&&I.normalizeTextStyle(se,!0);var we=se.text;if(we!=null&&(we+=""),!I.needDrawText(we,se))return;we==null&&(we=""),!ge&&_e&&(g.copy(re),g.applyTransform(_e),re=g);var Re=X.__textSvgEl;Re||(Re=Q("text"),X.__textSvgEl=Re);var He=Re.style,Se=se.font||B.DEFAULT_FONT,Te=Re.__computedFont;Se!==Re.__styleFont&&(He.font=Re.__styleFont=Se,Te=Re.__computedFont=He.font);var $e=se.textPadding,bt=se.textLineHeight,Ie=X.__textCotentBlock;(!Ie||X.__dirtyText)&&(Ie=X.__textCotentBlock=B.parsePlainText(we,Te,$e,bt,se.truncate));var ze=Ie.outerHeight,at=Ie.lineHeight;I.getBoxPosition(m,X,se,re);var Ae=m.baseX,ne=m.baseY,ae=m.textAlign||"left",ce=m.textVerticalAlign;Z(Re,ge,_e,se,re,Ae,ne);var xe=B.adjustTextY(ne,ze,ce),Fe=Ae,ke=xe;$e&&(Fe=V(Ae,ae,$e),ke+=$e[0]),ke+=at/2,h(Re,se,!0,X);var ct=Ie.canCacheByTextString,ft=X.__tspanList||(X.__tspanList=[]),yt=ft.length;if(ct&&X.__canCacheByTextString&&X.__text===we){if(X.__dirtyText&&yt)for(var Et=0;Et<yt;++Et)M(ft[Et],ae,Fe,ke+Et*at)}else{X.__text=we,X.__canCacheByTextString=ct;for(var Ot=Ie.lines,Mt=Ot.length,Et=0;Et<Mt;Et++){var Qe=ft[Et],Ne=Ot[Et];Qe?Qe.__zrText!==Ne&&(Qe.innerHTML="",Qe.appendChild(document.createTextNode(Ne))):(Qe=ft[Et]=Q("tspan"),Re.appendChild(Qe),Qe.appendChild(document.createTextNode(Ne))),M(Qe,ae,Fe,ke+Et*at)}if(yt>Mt){for(;Et<yt;Et++)Re.removeChild(ft[Et]);ft.length=Mt}}};function Z(X,re,se,_e,ge,we,Re){D.identity(F),re&&se&&D.copy(F,se);var He=_e.textRotation;if(ge&&He){var Se=_e.textOrigin;Se==="center"?(we=ge.width/2+ge.x,Re=ge.height/2+ge.y):Se&&(we=Se[0]+ge.x,Re=Se[1]+ge.y),F[4]-=we,F[5]-=Re,D.rotate(F,F,He),F[4]+=we,F[5]+=Re}x(X,F)}function V(X,re,se){return re==="right"?X-se[1]:re==="center"?X+se[3]/2-se[1]/2:X+se[3]}function M(X,re,se,_e){L(X,"dominant-baseline","middle"),L(X,"text-anchor",P[re]),L(X,"x",se),L(X,"y",_e)}function J(X){X&&X.__textSvgEl&&(X.__textSvgEl.parentNode&&X.__textSvgEl.parentNode.removeChild(X.__textSvgEl),X.__textSvgEl=null,X.__tspanList=[],X.__text=null)}C.drawRectText=z,C.brush=function(X){var re=X.style;re.text!=null?z(X,!1):J(X)},pe.path=l,pe.image=f,pe.text=C},P4Qj:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.removeSensor=pe.getSensor=void 0;var q=j(G("chpo")),Q=G("FxDU"),O=G("24YM");function j(v){return v&&v.__esModule?v:{default:v}}var D={},B=function(T){var E=T.getAttribute(O.SizeSensorId);if(E&&D[E])return D[E];var n=(0,q.default)();T.setAttribute(O.SizeSensorId,n);var u=(0,Q.createSensor)(T);return D[n]=u,u};pe.getSensor=B;var I=function(T){var E=T.element.getAttribute(O.SizeSensorId);T.element.removeAttribute(O.SizeSensorId),T.destroy(),E&&D[E]&&delete D[E]};pe.removeSensor=I},QBsz:function(qe,pe){var G=typeof Float32Array=="undefined"?Array:Float32Array;function q(h,r){var l=new G(2);return h==null&&(h=0),r==null&&(r=0),l[0]=h,l[1]=r,l}function Q(h,r){return h[0]=r[0],h[1]=r[1],h}function O(h){var r=new G(2);return r[0]=h[0],r[1]=h[1],r}function j(h,r,l){return h[0]=r,h[1]=l,h}function D(h,r,l){return h[0]=r[0]+l[0],h[1]=r[1]+l[1],h}function B(h,r,l,f){return h[0]=r[0]+l[0]*f,h[1]=r[1]+l[1]*f,h}function I(h,r,l){return h[0]=r[0]-l[0],h[1]=r[1]-l[1],h}function v(h){return Math.sqrt(E(h))}var T=v;function E(h){return h[0]*h[0]+h[1]*h[1]}var n=E;function u(h,r,l){return h[0]=r[0]*l[0],h[1]=r[1]*l[1],h}function c(h,r,l){return h[0]=r[0]/l[0],h[1]=r[1]/l[1],h}function o(h,r){return h[0]*r[0]+h[1]*r[1]}function i(h,r,l){return h[0]=r[0]*l,h[1]=r[1]*l,h}function d(h,r){var l=v(r);return l===0?(h[0]=0,h[1]=0):(h[0]=r[0]/l,h[1]=r[1]/l),h}function s(h,r){return Math.sqrt((h[0]-r[0])*(h[0]-r[0])+(h[1]-r[1])*(h[1]-r[1]))}var A=s;function a(h,r){return(h[0]-r[0])*(h[0]-r[0])+(h[1]-r[1])*(h[1]-r[1])}var p=a;function w(h,r){return h[0]=-r[0],h[1]=-r[1],h}function S(h,r,l,f){return h[0]=r[0]+f*(l[0]-r[0]),h[1]=r[1]+f*(l[1]-r[1]),h}function x(h,r,l){var f=r[0],C=r[1];return h[0]=l[0]*f+l[2]*C+l[4],h[1]=l[1]*f+l[3]*C+l[5],h}function L(h,r,l){return h[0]=Math.min(r[0],l[0]),h[1]=Math.min(r[1],l[1]),h}function b(h,r,l){return h[0]=Math.max(r[0],l[0]),h[1]=Math.max(r[1],l[1]),h}pe.create=q,pe.copy=Q,pe.clone=O,pe.set=j,pe.add=D,pe.scaleAndAdd=B,pe.sub=I,pe.len=v,pe.length=T,pe.lenSquare=E,pe.lengthSquare=n,pe.mul=u,pe.div=c,pe.dot=o,pe.scale=i,pe.normalize=d,pe.distance=s,pe.dist=A,pe.distanceSquare=a,pe.distSquare=p,pe.negate=w,pe.lerp=S,pe.applyTransform=x,pe.min=L,pe.max=b},"QO+J":function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var q=O(G("NohK")),Q=G("24YM");function O(D){return D&&D.__esModule?D:{default:D}}var j=function(B){var I=void 0,v=[],T=function(){getComputedStyle(B).position==="static"&&(B.style.position="relative");var i=document.createElement("object");return i.onload=function(){i.contentDocument.defaultView.addEventListener("resize",E),E()},i.style.display="block",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.height="100%",i.style.width="100%",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.opacity="0",i.setAttribute("class",Q.SensorClassName),i.setAttribute("tabindex",Q.SensorTabIndex),i.type="text/html",B.appendChild(i),i.data="about:blank",i},E=(0,q.default)(function(){v.forEach(function(o){o(B)})}),n=function(i){I||(I=T()),v.indexOf(i)===-1&&v.push(i)},u=function(){I&&I.parentNode&&(I.contentDocument&&I.contentDocument.defaultView.removeEventListener("resize",E),I.parentNode.removeChild(I),I=void 0,v=[])},c=function(i){var d=v.indexOf(i);d!==-1&&v.splice(d,1),v.length===0&&I&&u()};return{element:B,bind:n,destroy:u,unbind:c}};pe.createSensor=j},Qe9p:function(qe,pe,G){var q=G("1RvN"),Q={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function O(r){return r=Math.round(r),r<0?0:r>255?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;xe<Fe;++xe){var ke=Ae[xe];if(ke.ignoreCase)ce=!0;else if(/[a-z]/i.test(ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ae=!0,ce=!1;break}}var ct={b:8,t:9,n:10,v:11,f:12,r:13};function ft(Qe){var Ne=Qe.charCodeAt(0);if(Ne!==92)return Ne;var lt=Qe.charAt(1);return Ne=ct[lt],Ne||("0"<=lt&<<="7"?parseInt(Qe.substring(1),8):lt==="u"||lt==="x"?parseInt(Qe.substring(2),16):Qe.charCodeAt(1))}function yt(Qe){if(Qe<32)return(Qe<16?"\\x0":"\\x")+Qe.toString(16);var Ne=String.fromCharCode(Qe);return Ne==="\\"||Ne==="-"||Ne==="]"||Ne==="^"?"\\"+Ne:Ne}function Et(Qe){var Ne=Qe.substring(1,Qe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),lt=[],dt=Ne[0]==="^",Ye=["["];dt&&Ye.push("^");for(var st=dt?1:0,je=Ne.length;st<je;++st){var Le=Ne[st];if(/\\[bdsw]/i.test(Le))Ye.push(Le);else{var Me=ft(Le),me;st+2<je&&Ne[st+1]==="-"?(me=ft(Ne[st+2]),st+=2):me=Me,lt.push([Me,me]),me<65||Me>122||(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;st<lt.length;++st){var Oe=lt[st];Oe[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],Oe[1]):ye.push(Ee=Oe)}for(var st=0;st<ye.length;++st){var Oe=ye[st];Ye.push(yt(Oe[0])),Oe[1]>Oe[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<lt;++Ye){var je=Ne[Ye];if(je==="(")++st;else if(je.charAt(0)==="\\"){var Le=+je.substring(1);Le&&(Le<=st?dt[Le]=-1:Ne[Ye]=yt(Le))}}for(var Ye=1;Ye<dt.length;++Ye)dt[Ye]===-1&&(dt[Ye]=++ne);for(var Ye=0,st=0;Ye<lt;++Ye){var je=Ne[Ye];if(je==="(")++st,dt[st]||(Ne[Ye]="(?:");else if(je.charAt(0)==="\\"){var Le=+je.substring(1);Le&&Le<=st&&(Ne[Ye]="\\"+dt[Le])}}for(var Ye=0;Ye<lt;++Ye)Ne[Ye]==="^"&&Ne[Ye+1]!=="^"&&(Ne[Ye]="");if(Qe.ignoreCase&&ae)for(var Ye=0;Ye<lt;++Ye){var je=Ne[Ye],Me=je.charAt(0);je.length>=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<Fe;++xe){var ke=Ae[xe];if(ke.global||ke.multiline)throw new Error(""+ke);Mt.push("(?:"+Ot(ke)+")")}return new RegExp(Mt.join("|"),ce?"gi":"g")}function M(Ae,ne){var ae=/(?:^|\s)nocode(?:\s|$)/,ce=[],xe=0,Fe=[],ke=0;function ct(ft){var yt=ft.nodeType;if(yt==1){if(ae.test(ft.className))return;for(var Et=ft.firstChild;Et;Et=Et.nextSibling)ct(Et);var Ot=ft.nodeName.toLowerCase();(Ot==="br"||Ot==="li")&&(ce[ke]=`
|
|
`,Fe[ke<<1]=xe++,Fe[ke++<<1|1]=ft)}else if(yt==3||yt==4){var Mt=ft.nodeValue;Mt.length&&(ne?Mt=Mt.replace(/\r\n?/g,`
|
|
`):Mt=Mt.replace(/[ \t\r\n]+/g," "),ce[ke]=Mt,Fe[ke<<1]=xe,xe+=Mt.length,Fe[ke++<<1|1]=ft)}}return ct(Ae),{sourceCode:ce.join("").replace(/\n$/,""),spans:Fe}}function J(Ae,ne,ae,ce,xe){if(!ae)return;var Fe={sourceNode:Ae,pre:1,langExtension:null,numberLines:null,sourceCode:ae,spans:null,basePos:ne,decorations:null};ce(Fe),xe.push.apply(xe,Fe.decorations)}var X=/\S/;function re(Ae){for(var ne=void 0,ae=Ae.firstChild;ae;ae=ae.nextSibling){var ce=ae.nodeType;ne=ce===1?ne?Ae:ae:ce===3&&X.test(ae.nodeValue)?Ae:ne}return ne===Ae?void 0:ne}function se(Ae,ne){var ae={},ce;(function(){for(var ke=Ae.concat(ne),ct=[],ft={},yt=0,Et=ke.length;yt<Et;++yt){var Ot=ke[yt],Mt=Ot[3];if(Mt)for(var Qe=Mt.length;--Qe>=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<lt;++Ne){var dt=Mt[Ne],Ye=Qe[dt],st=void 0,je;if(typeof Ye=="string")je=!1;else{var Le=ae[dt.charAt(0)];if(Le)st=dt.match(Le[1]),Ye=Le[0];else{for(var Me=0;Me<xe;++Me)if(Le=ne[Me],st=dt.match(Le[1]),st){Ye=Le[0];break}st||(Ye=f)}je=Ye.length>=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<ct.length;++Et)ft(ct[Et]);ne===(ne|0)&&ct[0].setAttribute("value",ne);var Ot=Fe.createElement("ol");Ot.className="linenums";for(var Mt=Math.max(0,ne-1|0)||0,Et=0,Qe=ct.length;Et<Qe;++Et)ke=ct[Et],ke.className="L"+(Et+Mt)%10,ke.firstChild||ke.appendChild(Fe.createTextNode("\xA0")),Ot.appendChild(ke);Ae.appendChild(Ot)}function Re(Ae){var ne=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ne=ne&&+ne[1]<=8;var ae=/\n/g,ce=Ae.sourceCode,xe=ce.length,Fe=0,ke=Ae.spans,ct=ke.length,ft=0,yt=Ae.decorations,Et=yt.length,Ot=0;yt[Et]=xe;var Mt,Qe;for(Qe=Mt=0;Qe<Et;)yt[Qe]!==yt[Qe+2]?(yt[Mt++]=yt[Qe++],yt[Mt++]=yt[Qe++]):Qe+=2;for(Et=Mt,Qe=Mt=0;Qe<Et;){for(var Ne=yt[Qe],lt=yt[Qe+1],dt=Qe+2;dt+2<=Et&&yt[dt+1]===lt;)dt+=2;yt[Mt++]=Ne,yt[Mt++]=lt,Qe=dt}Et=yt.length=Mt;var Ye=Ae.sourceNode,st="";Ye&&(st=Ye.style.display,Ye.style.display="none");try{for(var je=null;ft<ct;){var Le=ke[ft],Me=ke[ft+2]||xe,me=yt[Ot+2]||xe,dt=Math.min(Me,me),ye=ke[ft+1],Ee;if(ye.nodeType!==1&&(Ee=ce.substring(Fe,dt))){ne&&(Ee=Ee.replace(ae,"\r")),ye.nodeValue=Ee;var Oe=ye.ownerDocument,De=Oe.createElement("span");De.className=yt[Ot+1];var Ze=ye.parentNode;Ze.replaceChild(De,ye),De.appendChild(ye),Fe<Me&&(ke[ft+1]=ye=Oe.createTextNode(ce.substring(dt,Me)),Ze.insertBefore(ye,De.nextSibling))}Fe=dt,Fe>=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*</.test(ne)?"default-markup":"default-code"),He[Ae]}Se(ge,["default-code"]),Se(se([],[[f,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),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="<pre>"+Ae+"</pre>",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<Fe.length;++ct)for(var ft=0,yt=Fe[ct].length;ft<yt;++ft)ke.push(Fe[ct][ft]);Fe=null;var Et=Date;Et.now||(Et={now:function(){return+new Date}});var Ot=0,Mt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Qe=/\bprettyprint\b/,Ne=/\bprettyprinted\b/,lt=/pre|xmp/i,dt=/^code$/i,Ye=/^(?:pre|code|xmp)$/i,st={};function je(){for(var Le=v.PR_SHOULD_USE_CONTINUATION?Et.now()+250:Infinity;Ot<ke.length&&Et.now()<Le;Ot++){for(var Me=ke[Ot],me=st,ye=Me;ye=ye.previousSibling;){var Ee=ye.nodeType,Oe=(Ee===7||Ee===8)&&ye.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):Ee!==3||/\S/.test(ye.nodeValue))break;if(Oe){me={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(pt,it,xt){me[it]=xt});break}}var De=Me.className;if((me!==st||Qe.test(De))&&!Ne.test(De)){for(var Ze=!1,ht=Me.parentNode;ht;ht=ht.parentNode){var Tt=ht.tagName;if(Ye.test(Tt)&&ht.className&&Qe.test(ht.className)){Ze=!0;break}}if(!Ze){Me.className+=" prettyprinted";var kt=me.lang;if(!kt){kt=De.match(Mt);var It;!kt&&(It=re(Me))&&dt.test(It.tagName)&&(kt=It.className.match(Mt)),kt&&(kt=kt[1])}var St;if(lt.test(Me.tagName))St=1;else{var ut=Me.currentStyle,nt=ce.defaultView,tt=ut?ut.whiteSpace:nt&&nt.getComputedStyle?nt.getComputedStyle(Me,null).getPropertyValue("white-space"):0;St=tt&&tt.substring(0,3)==="pre"}var Ce=me.linenums;(Ce=Ce==="true"||+Ce)||(Ce=De.match(/\blinenums\b(?::(\d+))?/),Ce=Ce?Ce[1]&&Ce[1].length?+Ce[1]:!0:!1),Ce&&we(Me,Ce,St);var Pe={langExtension:kt,sourceNode:Me,numberLines:Ce,pre:St,sourceCode:null,basePos:null,spans:null,decorations:null};$e(Pe)}}}Ot<ke.length?v.setTimeout(je,250):typeof Ae=="function"&&Ae()}je()}var ze=v.PR={createSimpleLexer:se,registerLangHandler:Se,sourceDecorator:_e,PR_ATTRIB_NAME:F,PR_ATTRIB_VALUE:P,PR_COMMENT:b,PR_DECLARATION:g,PR_KEYWORD:L,PR_LITERAL:r,PR_NOCODE:z,PR_PLAIN:f,PR_PUNCTUATION:l,PR_SOURCE:m,PR_STRING:x,PR_TAG:C,PR_TYPE:h,prettyPrintOne:O?v.prettyPrintOne=bt:B=bt,prettyPrint:I=O?v.prettyPrint=Ie:I=Ie},at=v.define;typeof at=="function"&&at.amd&&at("google-code-prettify",[],function(){return ze})})()},SKnc:function(qe,pe,G){var q=G("bYtY"),Q=G("QuXc"),O=function(D,B,I,v,T,E){this.x=D==null?0:D,this.y=B==null?0:B,this.x2=I==null?1:I,this.y2=v==null?0:v,this.type="linear",this.global=E||!1,Q.call(this,T)};O.prototype={constructor:O},q.inherits(O,Q);var j=O;qe.exports=j},SUKs:function(qe,pe,G){var q=G("LPTA"),Q=q.debugMode,O=function(){};Q===1&&(O=console.error);var j=O;qe.exports=j},Sj9i:function(qe,pe,G){var q=G("QBsz"),Q=q.create,O=q.distSquare,j=Math.pow,D=Math.sqrt,B=1e-8,I=1e-4,v=D(3),T=1/3,E=Q(),n=Q(),u=Q();function c(r){return r>-B&&r<B}function o(r){return r>B||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<X&&(M=we,X=_e);X=Infinity;for(var Re=0;Re<32&&!(J<I);Re++)re=M-J,se=M+J,n[0]=i(r,f,g,F,re),n[1]=i(l,C,m,P,re),_e=O(n,E),re>=0&&_e<X?(M=re,X=_e):(u[0]=i(r,f,g,F,se),u[1]=i(l,C,m,P,se),ge=O(u,E),se<=1&&ge<X?(M=se,X=ge):J*=.5);return V&&(V[0]=i(r,f,g,F,M),V[1]=i(l,C,m,P,M)),D(X)}function w(r,l,f,C){var g=1-C;return g*(g*r+2*C*l)+C*C*f}function S(r,l,f,C){return 2*((1-C)*(l-r)+C*(f-l))}function x(r,l,f,C,g){var m=r-2*l+f,F=2*(l-r),P=r-C,z=0;if(c(m)){if(o(F)){var Z=-P/F;Z>=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<M&&(Z=J,M=X)}M=Infinity;for(var re=0;re<32&&!(V<I);re++){var se=Z-V,_e=Z+V;n[0]=w(r,f,g,se),n[1]=w(l,C,m,se);var X=O(n,E);if(se>=0&&X<M)Z=se,M=X;else{u[0]=w(r,f,g,_e),u[1]=w(l,C,m,_e);var ge=O(u,E);_e<=1&&ge<M?(Z=_e,M=ge):V*=.5}}return z&&(z[0]=w(r,f,g,Z),z[1]=w(l,C,m,Z)),D(M)}pe.cubicAt=i,pe.cubicDerivativeAt=d,pe.cubicRootAt=s,pe.cubicExtrema=A,pe.cubicSubdivide=a,pe.cubicProjectPoint=p,pe.quadraticAt=w,pe.quadraticDerivativeAt=S,pe.quadraticRootAt=x,pe.quadraticExtremum=L,pe.quadraticSubdivide=b,pe.quadraticProjectPoint=h},SqI9:function(qe,pe,G){var q=G("y+Vt"),Q=G("iXp4"),O=q.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:Q(q.prototype.brush),buildPath:function(j,D){var B=D.cx,I=D.cy,v=Math.max(D.r0||0,0),T=Math.max(D.r,0),E=D.startAngle,n=D.endAngle,u=D.clockwise,c=Math.cos(E),o=Math.sin(E);j.moveTo(c*v+B,o*v+I),j.lineTo(c*T+B,o*T+I),j.arc(B,I,T,E,n,!u),j.lineTo(Math.cos(n)*v+B,Math.sin(n)*v+I),v!==0&&j.arc(B,I,v,n,E,u),j.closePath()}});qe.exports=O},SrGk:function(qe,pe,G){var q=G("hydK"),Q=q.createElement,O=G("bYtY"),j=G("y+Vt"),D=G("Dagg"),B=G("dqUG"),I=G("P47w"),v=I.path,T=I.image,E=I.text,n="0",u="1";function c(i,d,s,A,a){this._zrId=i,this._svgRoot=d,this._tagNames=typeof s=="string"?[s]:s,this._markLabel=A,this._domName=a||"_dom",this.nextId=0}c.prototype.createElement=Q,c.prototype.getDefs=function(i){var d=this._svgRoot,s=this._svgRoot.getElementsByTagName("defs");return s.length===0?i?(s=d.insertBefore(this.createElement("defs"),d.firstChild),s.contains||(s.contains=function(A){var a=s.children;if(!a)return!1;for(var p=a.length-1;p>=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<i;n++)j.lineTo(I[n][0],I[n][1])}B&&j.closePath()}}pe.buildPath=O},TXwP:function(qe,pe,G){var q,Q;(function(){var O;(function(){"use strict";var D=[,,function(T){function E(c){this.__parent=c,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=[]}E.prototype.clone_empty=function(){var c=new E(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},E.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},E.prototype.has_match=function(c){for(var o=this.__items.length-1;o>=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;o<c.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(c){for(var o=this.__lines.length;c<o;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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<this.__input_length},n.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},n.prototype.peek=function(u){var c=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(c=this.__input.charAt(u)),c},n.prototype.__match=function(u,c){u.lastIndex=c;var o=u.exec(this.__input);return o&&!(E&&u.sticky)&&(o.index!==c&&(o=null)),o},n.prototype.test=function(u,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(u,c):!1},n.prototype.testChar=function(u,c){var o=this.peek(c);return u.lastIndex=0,o!==null&&u.test(o)},n.prototype.match=function(u){var c=this.__match(u,this.__position);return c?this.__position+=c[0].length:c=null,c},n.prototype.read=function(u,c,o){var i="",d;return u&&(d=this.match(u),d&&(i+=d[0])),c&&(d||!u)&&(i+=this.readUntil(c,o)),i},n.prototype.readUntil=function(u,c){var o="",i=this.__position;u.lastIndex=this.__position;var d=u.exec(this.__input);return d?(i=d.index,c&&(i+=d[0].length)):i=this.__input_length,o=this.__input.substring(this.__position,i),this.__position=i,o},n.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},n.prototype.get_regexp=function(u,c){var o=null,i="g";return c&&E&&(i="y"),typeof u=="string"&&u!==""?o=new RegExp(u,i):u&&(o=new RegExp(u.source,i)),o},n.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(u){var c=this.__position,o=this.readUntilAfter(u);return this.__position=c,o},n.prototype.lookBack=function(u){var c=this.__position-1;return 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||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return b},x.prototype.foundNestedPseudoClass=function(){for(var L=0,b=1,h=this._input.peek(b);h;){if(h==="{")return!0;if(h==="(")L+=1;else if(h===")"){if(L===0)return!1;L-=1}else if(h===";"||h==="}")return!1;b++,h=this._input.peek(b)}return!1},x.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},x.prototype.preserveSingleSpace=function(L){L&&(this._output.space_before_token=!0)},x.prototype.indent=function(){this._indentLevel++},x.prototype.outdent=function(){this._indentLevel>0&&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.NON_SEMICOLON_NEWLINE_PROPERTY.length;se++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[se])){z=!0;break}(l||C)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&r===0?(this.print_string(":"),f||(f=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var _e=M==='"'||M==="'";this.preserveSingleSpace(_e||V),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")z=!1,r===0?(f&&(this.outdent(),f=!1),g=!1,m=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),r++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),r&&(r--,this.outdent()));else{var ge=!1;this._input.lookBack("with")&&(ge=!0),this.preserveSingleSpace(V||ge),this.print_string(this._ch),f&&M==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),F=!0):(this.eatWhitespace(),r++,this.indent())}else if(this._ch===")")r&&(r--,this.outdent()),F&&this._input.peek()===";"&&this._options.selector_separator_newline&&(F=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!f||F)&&r===0&&!m&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||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;s<d.length;s++)d[s]!=="expand"?this.brace_style="collapse":this.brace_style=d[s]}c.prototype=new u,T.exports.Options=c}],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(15);O=v})();var j=O;!(q=[],Q=function(){return{css_beautify:j}}.apply(pe,q),Q!==void 0&&(qe.exports=Q))})()},VpOo:function(qe,pe){function G(q,Q){var O=Q.x,j=Q.y,D=Q.width,B=Q.height,I=Q.r,v,T,E,n;D<0&&(O=O+D,D=-D),B<0&&(j=j+B,B=-B),typeof I=="number"?v=T=E=n=I:I instanceof Array?I.length===1?v=T=E=n=I[0]:I.length===2?(v=E=I[0],T=n=I[1]):I.length===3?(v=I[0],T=n=I[1],E=I[2]):(v=I[0],T=I[1],E=I[2],n=I[3]):v=T=E=n=0;var u;v+T>D&&(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.length;++Y)R.appendChild(t[Y]);return R}function C(e,t,_,y){var R=f(e,t,_,y);return R.setAttribute("role","presentation"),R}var g;document.createRange?g=function(e,t,_,y){var R=document.createRange();return R.setEnd(y||e,_),R.setStart(e,t),R}:g=function(e,t,_){var y=document.body.createTextRange();try{y.moveToElementText(e.parentNode)}catch(R){return y}return y.collapse(!0),y.moveEnd("character",_),y.moveStart("character",t),y};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function F(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function P(e,t){var _=e.className;b(t).test(_)||(e.className+=(_?" ":"")+t)}function z(e,t){for(var _=e.split(" "),y=0;y<_.length;y++)_[y]&&!b(_[y]).test(t)&&(t+=" "+_[y]);return t}var Z=function(e){e.select()};d?Z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:I&&(Z=function(e){try{e.select()}catch(t){}});function V(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function M(e,t,_){t||(t={});for(var y in e)e.hasOwnProperty(y)&&(_!==!1||!t.hasOwnProperty(y))&&(t[y]=e[y]);return t}function J(e,t,_,y,R){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var Y=y||0,ie=R||0;;){var ue=e.indexOf(" ",Y);if(ue<0||ue>=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||_<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=_)};function re(e,t){for(var _=0;_<e.length;++_)if(e[_]==t)return _;return-1}var se=50,_e={toString:function(){return"CodeMirror.Pass"}},ge={scroll:!1},we={origin:"*mouse"},Re={origin:"+move"};function He(e,t,_){for(var y=0,R=0;;){var Y=e.indexOf(" ",y);Y==-1&&(Y=e.length);var ie=Y-y;if(Y==e.length||R+ie>=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<e.length;y++)_[y]=t(e[y],y);return _}function Ie(e,t,_){for(var y=0,R=_(t);y<e.length&&_(e[y])<=R;)y++;e.splice(y,0,t)}function ze(){}function at(e,t){var _;return Object.create?_=Object.create(e):(ze.prototype=e,_=new ze),t&&M(t,_),_}var Ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(e){return/\w/.test(e)||e>"\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<e.length)&&Fe(e.charAt(t));)t+=_;return t}function ct(e,t,_){for(var y=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;Y<e.length;++Y){var ie=e[Y];(ie.from<_&&ie.to>t||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;R<e.length;++R){var Y=e[R];if(Y.from<t&&Y.to>t)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<gt;++Ft)At.push(_(ve.charCodeAt(Ft)));for(var Nt=0,jt=Je;Nt<gt;++Nt){var Gt=At[Nt];Gt=="m"?At[Nt]=jt:jt=Gt}for(var Zt=0,Vt=Je;Zt<gt;++Zt){var ir=At[Zt];ir=="1"&&Vt=="r"?At[Zt]="n":Y.test(ir)&&(Vt=ir,ir=="r"&&(At[Zt]="R"))}for(var _r=1,fr=At[0];_r<gt-1;++_r){var kr=At[_r];kr=="+"&&fr=="1"&&At[_r+1]=="1"?At[_r]="1":kr==","&&fr==At[_r+1]&&(fr=="1"||fr=="n")&&(At[_r]=fr),fr=kr}for(var yn=0;yn<gt;++yn){var Gn=At[yn];if(Gn==",")At[yn]="N";else if(Gn=="%"){var Bn=void 0;for(Bn=yn+1;Bn<gt&&At[Bn]=="%";++Bn);for(var hi=yn&&At[yn-1]=="!"||Bn<gt&&At[Bn]=="1"?"1":"N",qn=yn;qn<Bn;++qn)At[qn]=hi;yn=Bn-1}}for(var Mn=0,ei=Je;Mn<gt;++Mn){var Yn=At[Mn];ei=="L"&&Yn=="1"?At[Mn]="L":Y.test(Yn)&&(ei=Yn)}for(var zt=0;zt<gt;++zt)if(R.test(At[zt])){var xn=void 0;for(xn=zt+1;xn<gt&&R.test(At[xn]);++xn);for(var Tn=(zt?At[zt-1]:Je)=="L",Sn=(xn<gt?At[xn]:Je)=="L",Wa=Tn==Sn?Tn?"L":"R":Je,Vr=zt;Vr<xn;++Vr)At[Vr]=Wa;zt=xn-1}for(var Qr=[],vi,Vn=0;Vn<gt;)if(ie.test(At[Vn])){var za=Vn;for(++Vn;Vn<gt&&ie.test(At[Vn]);++Vn);Qr.push(new de(0,za,Vn))}else{var zi=Vn,Mi=Qr.length,Ca=Ve=="rtl"?1:0;for(++Vn;Vn<gt&&At[Vn]!="L";++Vn);for(var ii=zi;ii<Vn;)if(ue.test(At[ii])){zi<ii&&(Qr.splice(Mi,0,new de(1,zi,ii)),Mi+=Ca);var xa=ii;for(++ii;ii<Vn&&ue.test(At[ii]);++ii);Qr.splice(Mi,0,new de(2,xa,ii)),Mi+=Ca,zi=ii}else++ii;zi<Vn&&Qr.splice(Mi,0,new de(1,zi,Vn))}return Ve=="ltr"&&(Qr[0].level==1&&(vi=ve.match(/^\s+/))&&(Qr[0].from=vi[0].length,Qr.unshift(new de(0,0,vi[0].length))),$e(Qr).level==1&&(vi=ve.match(/\s+$/))&&($e(Qr).to-=vi[0].length,Qr.push(new de(0,gt-vi[0].length,gt)))),Ve=="rtl"?Qr.reverse():Qr}}();function Mt(e,t){var _=e.order;return _==null&&(_=e.order=Ot(e.text,t)),_}var Qe=[],Ne=function(e,t,_){if(e.addEventListener)e.addEventListener(t,_,!1);else if(e.attachEvent)e.attachEvent("on"+t,_);else{var y=e._handlers||(e._handlers={});y[t]=(y[t]||Qe).concat(_)}};function lt(e,t){return e._handlers&&e._handlers[t]||Qe}function dt(e,t,_){if(e.removeEventListener)e.removeEventListener(t,_,!1);else if(e.detachEvent)e.detachEvent("on"+t,_);else{var y=e._handlers,R=y&&y[t];if(R){var Y=re(R,_);Y>-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;y<t.length;++y)re(_,t[y])==-1&&_.push(t[y])}function Le(e,t){return lt(e,t).length>0}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.pos<this.string.length)return this.string.charAt(this.pos++)},wr.prototype.eat=function(e){var t=this.string.charAt(this.pos),_;if(typeof e=="string"?_=t==e:_=t&&(e.test?e.test(t):e(t)),_)return++this.pos,t},wr.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},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.lastColumnPos<this.start&&(this.lastColumnValue=J(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?J(this.string,this.lineStart,this.tabSize):0)},wr.prototype.indentation=function(){return J(this.string,null,this.tabSize)-(this.lineStart?J(this.string,this.lineStart,this.tabSize):0)},wr.prototype.match=function(e,t,_){if(typeof e=="string"){var y=function(ie){return _?ie.toLowerCase():ie},R=this.string.substr(this.pos,e.length);if(y(R)==y(e))return t!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?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<Y){_=R;break}t-=Y}return _.lines[t]}function Ur(e,t,_){var y=[],R=t.line;return e.iter(t.line,_.line+1,function(Y){var ie=Y.text;R==_.line&&(ie=ie.slice(0,_.ch)),R==t.line&&(ie=ie.slice(t.ch)),y.push(ie),++R}),y}function Kr(e,t,_){var y=[];return e.iter(t,_,function(R){y.push(R.text)}),y}function Rr(e,t){var _=t-e.height;if(_)for(var y=e;y;y=y.parent)y.height+=_}function pr(e){if(e.parent==null)return null;for(var t=e.parent,_=re(t.lines,e),y=t.parent;y;t=y,y=y.parent)for(var R=0;!(y.children[R]==t);++R)_+=y.children[R].chunkSize();return _+t.first}function Or(e,t){var _=e.first;e:do{for(var y=0;y<e.children.length;++y){var R=e.children[y],Y=R.height;if(t<Y){e=R;continue e}t-=Y,_+=R.chunkSize()}return _}while(!e.lines);for(var ie=0;ie<e.lines.length;++ie){var ue=e.lines[ie],de=ue.height;if(t<de)break;t-=de}return _+ie}function pn(e,t){return t>=e.first&&t<e.first+e.size}function un(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function fe(e,t,_){if(_===void 0&&(_=null),!(this instanceof fe))return new fe(e,t,_);this.line=e,this.ch=t,this.sticky=_}function be(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&be(e,t)==0}function rt(e){return fe(e.line,e.ch)}function et(e,t){return be(e,t)<0?t:e}function Dt(e,t){return be(e,t)<0?e:t}function ee(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function U(e,t){if(t.line<e.first)return fe(e.first,0);var _=e.first+e.size-1;return t.line>_?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;y<t.length;y++)_[y]=U(e,t[y]);return _}var le=function(e,t){this.state=e,this.lookAhead=t},te=function(e,t,_,y){this.state=t,this.doc=e,this.line=_,this.maxLookAhead=y||0,this.baseTokens=null,this.baseTokenPos=1};te.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.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;gt<At;){var jt=R[Je];jt>At&&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(;Nt<Je;Nt+=2){var Gt=R[Nt+1];R[Nt+1]=(Gt?Gt+" ":"")+"overlay "+Ft}},Y),_.state=ie,_.baseTokens=null,_.baseTokenPos=1},de=0;de<e.state.overlays.length;++de)ue(de);return{styles:R,classes:Y.bgClass||Y.textClass?Y:null}}function Ct(e,t,_){if(!t.styles||t.styles[0]!=e.state.modeGen){var y=Ut(e,pr(t)),R=t.text.length>e.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&&ve<R.viewTo?ue.save():null,ue.nextLine()}),_&&(y.modeFrontier=ue.line),ue}function Ht(e,t,_,y){var R=e.doc.mode,Y=new wr(t,e.options.tabSize,_);for(Y.start=Y.pos=y||0,t==""&&wt(R,_.state);!Y.eol();)Yt(R,Y,_.state),Y.start=Y.pos}function wt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var _=Ir(e,t);if(_.mode.blankLine)return _.mode.blankLine(_.state)}function Yt(e,t,_,y){for(var R=0;R<10;R++){y&&(y[0]=Ir(e,_).mode);var Y=e.token(t,_);if(t.pos>t.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.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,ie=Yt(Y,ve,de.state),y&&Ve.push(new Xt(ve,ie,Qt(R.mode,de.state)));return y?Ve:new Xt(ve,ie,de.state)}function Ar(e,t){if(e)for(;;){var _=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!_)break;e=e.slice(0,_.index)+e.slice(_.index+_[0].length);var y=_[1]?"bgClass":"textClass";t[y]==null?t[y]=_[2]:new RegExp("(?:^|\\s)"+_[2]+"(?:$|\\s)").test(t[y])||(t[y]+=" "+_[2])}return e}function Br(e,t,_,y,R,Y,ie){var ue=_.flattenSpans;ue==null&&(ue=e.options.flattenSpans);var de=0,ve=null,Ve=new wr(t,e.options.tabSize,y),Je,gt=e.options.addModeClass&&[null];for(t==""&&Ar(wt(_,y.state),Y);!Ve.eol();){if(Ve.pos>e.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(;de<Ve.start;)de=Math.min(Ve.start,de+5e3),R(de,ve);ve=Je}Ve.start=Ve.pos}for(;de<Ve.pos;){var Ft=Math.min(Ve.pos,de+5e3);R(Ft,ve),de=Ft}}function yr(e,t,_){for(var y,R,Y=e.doc,ie=_?-1:t-(e.doc.mode.innerMode?1e3:100),ue=t;ue>ie;--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<t-10)return;for(var _=e.first,y=t-1;y>_;y--){var R=Kt(e,y).stateAfter;if(R&&(!(R instanceof le)||y+R.lookAhead<t)){_=y+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,_)}var cr=!1,Dr=!1;function Pr(){cr=!0}function An(){Dr=!0}function zr(e,t,_){this.marker=e,this.from=t,this.to=_}function Jr(e,t){if(e)for(var _=0;_<e.length;++_){var y=e[_];if(y.marker==t)return y}}function bn(e,t){for(var _,y=0;y<e.length;++y)e[y]!=t&&(_||(_=[])).push(e[y]);return _}function $r(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function en(e,t,_){var y;if(e)for(var R=0;R<e.length;++R){var Y=e[R],ie=Y.marker,ue=Y.from==null||(ie.inclusiveLeft?Y.from<=t:Y.from<t);if(ue||Y.from==t&&ie.type=="bookmark"&&(!_||!Y.marker.insertLeft)){var de=Y.to==null||(ie.inclusiveRight?Y.to>=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<e.length;++R){var Y=e[R],ie=Y.marker,ue=Y.to==null||(ie.inclusiveRight?Y.to>=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.from<t);(y||(y=[])).push(new zr(ie,de?null:Y.from-t,Y.to==null?null:Y.to-t))}}return y}function cn(e,t){if(t.full)return null;var _=pn(e,t.from.line)&&Kt(e,t.from.line).markedSpans,y=pn(e,t.to.line)&&Kt(e,t.to.line).markedSpans;if(!_&&!y)return null;var R=t.from.ch,Y=t.to.ch,ie=be(t.from,t.to)==0,ue=en(_,R,ie),de=an(y,Y,ie),ve=t.text.length==1,Ve=$e(t.text).length+(ve?R:0);if(ue)for(var Je=0;Je<ue.length;++Je){var gt=ue[Je];if(gt.to==null){var At=Jr(de,gt.marker);At?ve&&(gt.to=At.to==null?null:At.to+Ve):gt.to=R}}if(de)for(var Ft=0;Ft<de.length;++Ft){var Nt=de[Ft];if(Nt.to!=null&&(Nt.to+=Ve),Nt.from==null){var jt=Jr(ue,Nt.marker);jt||(Nt.from=Ve,ve&&(ue||(ue=[])).push(Nt))}else Nt.from+=Ve,ve&&(ue||(ue=[])).push(Nt)}ue&&(ue=mn(ue)),de&&de!=ue&&(de=mn(de));var Gt=[ue];if(!ve){var Zt=t.text.length-2,Vt;if(Zt>0&&ue)for(var ir=0;ir<ue.length;++ir)ue[ir].to==null&&(Vt||(Vt=[])).push(new zr(ue[ir].marker,null,null));for(var _r=0;_r<Zt;++_r)Gt.push(Vt);Gt.push(de)}return Gt}function mn(e){for(var t=0;t<e.length;++t){var _=e[t];_.from!=null&&_.from==_.to&&_.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function br(e,t,_){var y=null;if(e.iter(t.line,_.line+1,function(At){if(At.markedSpans)for(var Ft=0;Ft<At.markedSpans.length;++Ft){var Nt=At.markedSpans[Ft].marker;Nt.readOnly&&(!y||re(y,Nt)==-1)&&(y||(y=[])).push(Nt)}}),!y)return null;for(var R=[{from:t,to:_}],Y=0;Y<y.length;++Y)for(var ie=y[Y],ue=ie.find(0),de=0;de<R.length;++de){var ve=R[de];if(be(ve.to,ue.from)<0||be(ve.from,ue.to)>0)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.length;++_)t[_].marker.detachLine(e);e.markedSpans=null}function tr(e,t){if(!t)return;for(var _=0;_<t.length;++_)t[_].marker.attachLine(e);e.markedSpans=t}function nr(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function vr(e,t){var _=e.lines.length-t.lines.length;if(_!=0)return _;var y=e.find(),R=t.find(),Y=be(y.from,R.from)||nr(e)-nr(t);if(Y)return-Y;var ie=be(y.to,R.to)||$t(e)-$t(t);return ie||t.id-e.id}function mr(e,t){var _=Dr&&e.markedSpans,y;if(_)for(var R=void 0,Y=0;Y<_.length;++Y)R=_[Y],R.marker.collapsed&&(t?R.from:R.to)==null&&(!y||vr(y,R.marker)<0)&&(y=R.marker);return y}function xr(e){return mr(e,!0)}function Er(e){return mr(e,!1)}function On(e,t){var _=Dr&&e.markedSpans,y;if(_)for(var R=0;R<_.length;++R){var Y=_[R];Y.marker.collapsed&&(Y.from==null||Y.from<t)&&(Y.to==null||Y.to>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<ie.length;++ue){var de=ie[ue];if(!de.marker.collapsed)continue;var ve=de.marker.find(0),Ve=be(ve.from,_)||nr(de.marker)-nr(R),Je=be(ve.to,y)||$t(de.marker)-$t(R);if(Ve>=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;Y<t.markedSpans.length;++Y)if(R=t.markedSpans[Y],R.marker.collapsed&&!R.marker.widgetNode&&R.from==_.to&&(R.to==null||R.to!=_.from)&&(R.marker.inclusiveLeft||_.marker.inclusiveRight)&&Jn(e,t,R))return!0}function Fn(e){e=En(e);for(var t=0,_=e.parent,y=0;y<_.lines.length;++y){var R=_.lines[y];if(R==e)break;t+=R.height}for(var Y=_.parent;Y;_=Y,Y=_.parent)for(var ie=0;ie<Y.children.length;++ie){var ue=Y.children[ie];if(ue==_)break;t+=ue.height}return t}function si(e){if(e.height==0)return 0;for(var t=e.text.length,_,y=e;_=xr(y);){var R=_.find(0,!0);y=R.from.line,t+=R.from.ch-R.to.ch}for(y=e;_=Er(y);){var Y=_.find(0,!0);t-=y.text.length-Y.from.ch,y=Y.to.line,t+=y.text.length-Y.to.ch}return t}function Un(e){var t=e.display,_=e.doc;t.maxLine=Kt(_,_.first),t.maxLineLength=si(t.maxLine),t.maxLineChanged=!0,_.iter(function(y){var R=si(y);R>t.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;R<e.length;R++){var Y=e.charAt(R);Y==" "&&_&&(R==e.length-1||e.charCodeAt(R+1)==32)&&(Y="\xA0"),y+=Y,_=Y==" "}return y}function Dn(e,t){return function(_,y,R,Y,ie,ue,de){R=R?R+" cm-force-border":"cm-force-border";for(var ve=_.pos,Ve=ve+y.length;;){for(var Je=void 0,gt=0;gt<t.length&&!(Je=t[gt],Je.to>ve&&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;_r<y.length;++_r){var fr=y[_r],kr=fr.marker;if(kr.type=="bookmark"&&fr.from==de&&kr.widgetNode)Vt.push(kr);else if(fr.from<=de&&(fr.to==null||fr.to>de||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<ir.length;Gn+=2)ir[Gn+1]==At&&(Nt+=" "+ir[Gn]);if(!Gt||Gt.from==de)for(var Bn=0;Bn<Vt.length;++Bn)Mr(t,0,Vt[Bn]);if(Gt&&(Gt.from||0)==de){if(Mr(t,(Gt.to==null?ue+1:Gt.to)-de,Gt.marker,Gt.from==null),Gt.to==null)return;Gt.to==de&&(Gt=!1)}}if(de>=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(;_<t.length;_++)t[_].call(null);for(var y=0;y<e.ops.length;y++){var R=e.ops[y];if(R.cursorActivityHandlers)for(;R.cursorActivityCalled<R.cursorActivityHandlers.length;)R.cursorActivityHandlers[R.cursorActivityCalled++].call(null,R.cm)}}while(_<t.length)}function Zr(e,t){var _=e.ownsGroup;if(!_)return;try{ds(_)}finally{Kn=null,t(_)}}var Hr=null;function Yr(e,t){var _=lt(e,t);if(!_.length)return;var y=Array.prototype.slice.call(arguments,2),R;Kn?R=Kn.delayedCallbacks:Hr?R=Hr:(R=Hr=[],setTimeout(Ai,0));for(var Y=function(ue){R.push(function(){return _[ue].apply(null,y)})},ie=0;ie<_.length;++ie)Y(ie)}function Ai(){var e=Hr;Hr=null;for(var t=0;t<e.length;++t)e[t]()}function Gi(e,t,_,y){for(var R=0;R<t.changes.length;R++){var Y=t.changes[R];Y=="text"?hs(e,t):Y=="gutter"?Lo(e,t,_,y):Y=="class"?fs(e,t):Y=="widget"&&nl(e,t,y)}t.changes=null}function Vi(e){return e.node==e.text&&(e.node=f("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),I&&v<8&&(e.node.style.zIndex=2)),e.node}function Ja(e,t){var _=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(_&&(_+=" CodeMirror-linebackground"),t.background)_?t.background.className=_:(t.background.parentNode.removeChild(t.background),t.background=null);else if(_){var y=Vi(t);t.background=y.insertBefore(f("div",null,_),y.firstChild),e.display.input.setUneditable(t.background)}}function Ro(e,t){var _=e.display.externalMeasured;return _&&_.line==t.line?(e.display.externalMeasured=null,t.measure=_.measure,_.built):Tr(e,t)}function hs(e,t){var _=t.text.className,y=Ro(e,t);t.text==t.node&&(t.node=y.pre),t.text.parentNode.replaceChild(y.pre,t.text),t.text=y.pre,y.bgClass!=t.bgClass||y.textClass!=t.textClass?(t.bgClass=y.bgClass,t.textClass=y.textClass,fs(e,t)):_&&(t.text.className=_)}function fs(e,t){Ja(e,t),t.line.wrapClass?Vi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var _=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=_||""}function Lo(e,t,_,y){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var R=Vi(t);t.gutterBackground=f("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?y.fixedPos:-y.gutterTotalWidth)+"px; width: "+y.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),R.insertBefore(t.gutterBackground,t.text)}var Y=t.line.gutterMarkers;if(e.options.lineNumbers||Y){var ie=Vi(t),ue=t.gutter=f("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?y.fixedPos:-y.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ue),ie.insertBefore(ue,t.text),t.line.gutterClass&&(ue.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(t.lineNumber=ue.appendChild(f("div",un(e.options,_),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+y.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var de=0;de<e.display.gutterSpecs.length;++de){var ve=e.display.gutterSpecs[de].className,Ve=Y.hasOwnProperty(ve)&&Y[ve];Ve&&ue.appendChild(f("div",[Ve],"CodeMirror-gutter-elt","left: "+y.gutterLeft[ve]+"px; width: "+y.gutterWidth[ve]+"px"))}}}function nl(e,t,_){t.alignable&&(t.alignable=null);for(var y=b("CodeMirror-linewidget"),R=t.node.firstChild,Y=void 0;R;R=Y)Y=R.nextSibling,y.test(R.className)&&t.node.removeChild(R);Ba(e,t,_)}function il(e,t,_,y){var R=Ro(e,t);return t.text=t.node=R.pre,R.bgClass&&(t.bgClass=R.bgClass),R.textClass&&(t.textClass=R.textClass),fs(e,t),Lo(e,t,_,y),Ba(e,t,y),t.node}function Ba(e,t,_){if(ua(e,t.line,t,_,!0),t.rest)for(var y=0;y<t.rest.length;y++)ua(e,t.rest[y],t,_,!1)}function ua(e,t,_,y,R){if(!t.widgets)return;for(var Y=Vi(_),ie=0,ue=t.widgets;ie<ue.length;++ie){var de=ue[ie],ve=f("div",[de.node],"CodeMirror-linewidget"+(de.className?" "+de.className:""));de.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),vn(de,ve,_,y),e.display.input.setUneditable(ve),R&&de.above?Y.insertBefore(ve,_.gutter||_.text):Y.appendChild(ve),Yr(de,"redraw")}}function vn(e,t,_,y){if(e.noHScroll){(_.alignable||(_.alignable=[])).push(t);var R=y.wrapperWidth;t.style.left=y.fixedPos+"px",e.coverGutter||(R-=y.gutterTotalWidth,t.style.paddingLeft=y.gutterTotalWidth+"px"),t.style.width=R+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-y.gutterTotalWidth+"px"))}function Za(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!m(document.body,e.node)){var _="position: relative;";e.coverGutter&&(_+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(_+="width: "+t.display.wrapper.clientWidth+"px;"),l(t.display.measure,f("div",[e.node],null,_))}return e.height=e.node.parentNode.offsetHeight}function Ci(e,t){for(var _=De(t);_!=e.wrapper;_=_.parentNode)if(!_||_.nodeType==1&&_.getAttribute("cm-ignore-events")=="true"||_.parentNode==e.sizer&&_!=e.mover)return!0}function $a(e){return e.lineSpace.offsetTop}function Xi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function xi(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=l(e.measure,f("pre","x","CodeMirror-line-like")),_=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,y={left:parseInt(_.paddingLeft),right:parseInt(_.paddingRight)};return!isNaN(y.left)&&!isNaN(y.right)&&(e.cachedPaddingH=y),y}function Ii(e){return se-e.display.nativeBarWidth}function ci(e){return e.display.scroller.clientWidth-Ii(e)-e.display.barWidth}function Rn(e){return e.display.scroller.clientHeight-Ii(e)-e.display.barHeight}function al(e,t,_){var y=e.options.lineWrapping,R=y&&ci(e);if(!t.measure.heights||y&&t.measure.width!=R){var Y=t.measure.heights=[];if(y){t.measure.width=R;for(var ie=t.text.firstChild.getClientRects(),ue=0;ue<ie.length-1;ue++){var de=ie[ue],ve=ie[ue+1];Math.abs(de.bottom-ve.bottom)>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<e.rest.length;y++)if(e.rest[y]==t)return{map:e.measure.maps[y],cache:e.measure.caches[y]};for(var R=0;R<e.rest.length;R++)if(pr(e.rest[R])>_)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<e.display.viewTo)return e.display.view[Ji(e,t)];var _=e.display.externalMeasured;if(_&&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;ve<e.length;ve+=3)if(ue=e[ve],de=e[ve+1],t<ue?(R=0,Y=1,ie="left"):t<de?(R=t-ue,Y=R+1):(ve==e.length-3||t==de&&e[ve+3]>t)&&(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<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)y=e[(ve+=3)+2],ie="right";break}return{node:y,start:R,end:Y,collapse:ie,coverStart:ue,coverEnd:de}}function ol(e,t){var _=ms;if(t=="left")for(var y=0;y<e.length&&!((_=e[y]).left!=_.right);y++);else for(var R=e.length-1;R>=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+ue<R.coverEnd&&Fe(t.line.text.charAt(R.coverStart+ue));)++ue;if(I&&v<9&&ie==0&&ue==R.coverEnd-R.coverStart?ve=Y.parentNode.getBoundingClientRect():ve=ol(g(Y,ie,ue).getClientRects(),y),ve.left||ve.right||ie==0)break;ue=ie,ie=ie-1,de="right"}I&&v<11&&(ve=sl(e.display.measure,ve))}else{ie>0&&(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<jt.length-1&&!(Nt<jt[Gt]);Gt++);var Zt=Gt?jt[Gt-1]:0,Vt=jt[Gt],ir={left:(de=="right"?ve.right:ve.left)-t.rect.left,right:(de=="left"?ve.left:ve.right)-t.rect.left,top:Zt,bottom:Vt};return!ve.left&&!ve.right&&(ir.bogus=!0),e.options.singleCursorHeightPerLine||(ir.rtop=At,ir.rbottom=Ft),ir}function sl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pe(e))return t;var _=screen.logicalXDPI/screen.deviceXDPI,y=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*_,right:t.right*_,top:t.top*y,bottom:t.bottom*y}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function fi(e){e.display.externalMeasure=null,r(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vs(e.display.view[t])}function bi(e){fi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ki(){return n&&s?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return n&&s?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ri(e){var t=0;if(e.widgets)for(var _=0;_<e.widgets.length;++_)e.widgets[_].above&&(t+=Za(e.widgets[_]));return t}function qa(e,t,_,y,R){if(!R){var Y=Ri(t);_.top+=Y,_.bottom+=Y}if(y=="line")return _;y||(y="local");var ie=Fn(t);if(y=="local"?ie+=$a(e.display):ie-=e.display.viewOffset,y=="page"||y=="window"){var ue=e.display.lineSpace.getBoundingClientRect();ie+=ue.top+(y=="window"?0:Wn());var de=ue.left+(y=="window"?0:ki());_.left+=de,_.right+=de}return _.top+=ie,_.bottom+=ie,_}function ys(e,t,_){if(_=="div")return t;var y=t.left,R=t.top;if(_=="page")y-=ki(),R-=Wn();else if(_=="local"||!_){var Y=e.display.sizer.getBoundingClientRect();y+=Y.left,R+=Y.top}var ie=e.display.lineSpace.getBoundingClientRect();return{left:y-ie.left,top:R-ie.top}}function eo(e,t,_,y,R){return y||(y=Kt(e.doc,t.line)),qa(e,y,Ui(e,y,t.ch,R),_)}function Ei(e,t,_,y,R,Y){y=y||Kt(e.doc,t.line),R||(R=nn(e,y));function ie(Ft,Nt){var jt=Ti(e,R,Ft,Nt?"right":"left",Y);return Nt?jt.left=jt.right:jt.right=jt.left,qa(e,y,jt,_)}var ue=Mt(y,e.doc.direction),de=t.ch,ve=t.sticky;if(de>=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<At.right-y,Vt=Zt==ve;Ft=gt+(Vt?0:1),jt=Vt?"after":"before",Nt=Zt?At.left:At.right}else{!ve&&(Ft==de||Ft==ue)&&Ft++,jt=Ft==0?"after":Ft==t.text.length?"before":Ti(e,Y,Ft-(ve?1:0)).bottom+ie<=R==ve?"after":"before";var ir=Ei(e,fe(_,Ft,jt),"line",t,Y);Nt=ir.left,Gt=R<ir.top?-1:R>=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<R.length;gt++){var At=R[gt];if(At.from>=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=Nt<Y?Y-Nt+1e9:Nt-Y;(!Ve||Je>jt)&&(Ve=At,Je=jt)}return Ve||(Ve=R[R.length-1]),Ve.from<de&&(Ve={from:de,to:Ve.to,level:Ve.level}),Ve.to>ve&&(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;ie<R.widgets.length;ie++)R.widgets[ie].height&&(Y+=R.widgets[ie].height);return _?Y+(Math.ceil(R.text.length/y)||1)*t:Y+t}}function Mo(e){var t=e.doc,_=dl(e);t.iter(function(y){var R=_(y);R!=y.height&&Rr(y,R)})}function Yi(e,t,_,y){var R=e.display;if(!_&&De(t).getAttribute("cm-not-content")=="true")return null;var Y,ie,ue=R.lineSpace.getBoundingClientRect();try{Y=t.clientX-ue.left,ie=t.clientY-ue.top}catch(Je){return null}var de=Si(e,Y,ie),ve;if(y&&de.xRel>0&&(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&&_<R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>t)&&(R.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=R.viewTo)Dr&&qr(e.doc,t)<R.viewTo&&Ni(e);else if(_<=R.viewFrom)Dr&&Ln(e.doc,_+y)>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&&(_<ve.lineN?ve.lineN+=y:t<ve.lineN+ve.size&&(R.externalMeasured=null))}function Pi(e,t,_){e.curOp.viewChanged=!0;var y=e.display,R=e.display.externalMeasured;if(R&&t>=R.lineN&&t<R.lineN+R.size&&(y.externalMeasured=null),t<y.viewFrom||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;de<R;de++)ue+=ie[de].size;if(ue!=t){if(y>0){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<t&&(y.view=y.view.slice(Ji(e,t))),y.viewFrom=t,y.viewTo<_?y.view=y.view.concat(jn(e,y.viewTo,_)):y.viewTo>_&&(y.view=y.view.slice(0,Ji(e,_)))),y.viewTo=_}function fl(e){for(var t=e.display.view,_=0,y=0;y<t.length;y++){var R=t[y];!R.hidden&&(!R.node||R.changes)&&++_}return _}function Zi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,t){t===void 0&&(t=!0);for(var _=e.doc,y={},R=y.cursors=document.createDocumentFragment(),Y=y.selection=document.createDocumentFragment(),ie=0;ie<_.sel.ranges.length;ie++){if(!t&&ie==_.sel.primIndex)continue;var ue=_.sel.ranges[ie];if(ue.from().line>=e.display.viewTo||ue.to().line<e.display.viewFrom)continue;var de=ue.empty();(de||e.options.showCursorWhenSelecting)&&ml(e,ue.head,R),de||bu(e,ue,Y)}return y}function ml(e,t,_){var y=Ei(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),R=_.appendChild(f("div","\xA0","CodeMirror-cursor"));if(R.style.left=y.left+"px",R.style.top=y.top+"px",R.style.height=Math.max(0,y.bottom-y.top)*e.options.cursorHeight+"px",y.other){var Y=_.appendChild(f("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=y.other.left+"px",Y.style.top=y.other.top+"px",Y.style.height=(y.other.bottom-y.other.top)*.85+"px"}}function La(e,t){return e.top-t.top||e.left-t.left}function bu(e,t,_){var y=e.display,R=e.doc,Y=document.createDocumentFragment(),ie=xi(e.display),ue=ie.left,de=Math.max(y.sizerWidth,ci(e)-y.sizer.offsetLeft)-ie.right,ve=R.direction=="ltr";function Ve(Vt,ir,_r,fr){ir<0&&(ir=0),ir=Math.round(ir),fr=Math.round(fr),Y.appendChild(f("div",null,"CodeMirror-selected","position: absolute; left: "+Vt+`px;
|
|
top: `+ir+"px; width: "+(_r==null?de-Vt:_r)+`px;
|
|
height: `+(fr-ir)+"px"))}function Je(Vt,ir,_r){var fr=Kt(R,Vt),kr=fr.text.length,yn,Gn;function Bn(Mn,ei){return eo(e,fe(Vt,Mn),"div",fr,ei)}function hi(Mn,ei,Yn){var zt=Al(e,fr,null,Mn),xn=ei=="ltr"==(Yn=="after")?"left":"right",Tn=Yn=="after"?zt.begin:zt.end-(/\s/.test(fr.text.charAt(zt.end-1))?2:1);return Bn(Tn,xn)[xn]}var qn=Mt(fr,R.direction);return ft(qn,ir||0,_r==null?kr:_r,function(Mn,ei,Yn,zt){var xn=Yn=="ltr",Tn=Bn(Mn,xn?"left":"right"),Sn=Bn(ei-1,xn?"right":"left"),Wa=ir==null&&Mn==0,Vr=_r==null&&ei==kr,Qr=zt==0,vi=!qn||zt==qn.length-1;if(Sn.top-Tn.top<=3){var Vn=(ve?Wa:Vr)&&Qr,za=(ve?Vr:Wa)&&vi,zi=Vn?ue:(xn?Tn:Sn).left,Mi=za?de:(xn?Sn:Tn).right;Ve(zi,Tn.top,Mi-zi,Tn.bottom)}else{var Ca,ii,xa,tl;xn?(Ca=ve&&Wa&&Qr?ue:Tn.left,ii=ve?de:hi(Mn,Yn,"before"),xa=ve?ue:hi(ei,Yn,"after"),tl=ve&&Vr&&vi?de:Sn.right):(Ca=ve?hi(Mn,Yn,"before"):ue,ii=!ve&&Wa&&Qr?de:Tn.right,xa=!ve&&Vr&&vi?ue:Sn.left,tl=ve?hi(ei,Yn,"after"):de),Ve(Ca,Tn.top,ii-Ca,Tn.bottom),Tn.bottom<Sn.top&&Ve(ue,Tn.bottom,null,Sn.top),Ve(xa,Sn.top,tl-xa,Sn.bottom)}(!yn||La(Tn,yn)<0)&&(yn=Tn),La(Sn,yn)<0&&(yn=Sn),(!Gn||La(Tn,Gn)<0)&&(Gn=Tn),La(Sn,Gn)<0&&(Gn=Sn)}),{start:yn,end:Gn}}var gt=t.from(),At=t.to();if(gt.line==At.line)Je(gt.line,gt.ch,At.ch);else{var Ft=Kt(R,gt.line),Nt=Kt(R,At.line),jt=En(Ft)==En(Nt),Gt=Je(gt.line,gt.ch,jt?Ft.text.length+1:null).end,Zt=Je(At.line,jt?0:null,At.ch).start;jt&&(Gt.top<Zt.top-2?(Ve(Gt.right,Gt.top,null,Gt.bottom),Ve(ue,Zt.top,Zt.left,Zt.bottom)):Ve(Gt.right,Gt.top,Zt.left-Gt.right,Gt.bottom)),Gt.bottom<Zt.top&&Ve(ue,Gt.bottom,null,Zt.top)}_.appendChild(Y)}function Fo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var _=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?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<t.view.length;y++){var R=t.view[y],Y=e.options.lineWrapping,ie=void 0,ue=0;if(R.hidden)continue;if(I&&v<8){var de=R.node.offsetTop+R.node.offsetHeight;ie=de-_,_=de}else{var ve=R.node.getBoundingClientRect();ie=ve.bottom-ve.top,!Y&&R.text.firstChild&&(ue=R.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Ve=R.line.height-ie;if((Ve>.005||Ve<-.005)&&(Rr(R.line,ie),ha(R.line),R.rest))for(var Je=0;Je<R.rest.length;Je++)ha(R.rest[Je]);if(ue>e.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<e.widgets.length;++t){var _=e.widgets[t],y=_.node.parentNode;y&&(_.height=y.offsetHeight)}}function ko(e,t,_){var y=_&&_.top!=null?Math.max(0,_.top):e.scroller.scrollTop;y=Math.floor(y-$a(e));var R=_&&_.bottom!=null?_.bottom:y+e.wrapper.clientHeight,Y=Or(t,y),ie=Or(t,R);if(_&&_.ensure){var ue=_.ensure.from.line,de=_.ensure.to.line;ue<Y?(Y=ue,ie=Or(t,Fn(Kt(t,ue))+e.wrapper.clientHeight)):Math.min(de,t.lastLine())>=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.top<y,ve=t.bottom>ue-y;if(t.top<R)ie.scrollTop=de?0:t.top;else if(t.bottom>R+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.left<gt?ie.scrollLeft=Math.max(0,t.left+Je-(Ft?0:10)):t.right>At+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;_<t.length;_++)Tu(t[_]);for(var y=0;y<t.length;y++)Su(t[y]);for(var R=0;R<t.length;R++)Bu(t[R]);for(var Y=0;Y<t.length;Y++)Ho(t[Y]);for(var ie=0;ie<t.length;ie++)Ou(t[ie])}function Tu(e){var t=e.cm,_=t.display;Iu(t),e.updateMaxLine&&Un(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<_.viewFrom||e.scrollToPos.to.line>=_.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<t.doc.scrollLeft&&fa(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var _=e.focus&&e.focus==F();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,_),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hi(t,e.barMeasure),e.updatedDisplay&&Ts(t,e.barMeasure),e.selectionChanged&&Fo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),_&&gl(e.cm)}function Ou(e){var t=e.cm,_=t.display,y=t.doc;if(e.updatedDisplay&&wl(t,e.update),_.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(_.wheelStartX=_.wheelStartY=null),e.scrollTop!=null&&no(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&fa(t,e.scrollLeft,!0,!0),e.scrollToPos){var R=Po(t,U(y,e.scrollToPos.from),U(y,e.scrollToPos.to),e.scrollToPos.margin);Eu(t,R)}var Y=e.maybeHiddenMarkers,ie=e.maybeUnhiddenMarkers;if(Y)for(var ue=0;ue<Y.length;++ue)Y[ue].lines.length||Ye(Y[ue],"hide");if(ie)for(var de=0;de<ie.length;++de)ie[de].lines.length&&Ye(ie[de],"unhide");_.wrapper.offsetHeight&&(y.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function di(e,t){if(e.curOp)return t();ma(e);try{return t()}finally{ga(e)}}function Pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ma(e);try{return t.apply(e,arguments)}finally{ga(e)}}}function ri(e){return function(){if(this.curOp)return e.apply(this,arguments);ma(this);try{return e.apply(this,arguments)}finally{ga(this)}}}function zn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ma(t);try{return e.apply(this,arguments)}finally{ga(t)}}}function va(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,V(Qo,e))}function Qo(e){var t=e.doc;if(t.highlightFrontier>=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&><ie.length;++gt)Je=ie[gt]!=Y.styles[gt];Je&&R.push(y.line),Y.stateAfter=y.save(),y.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&Ht(e,Y.text,y),Y.stateAfter=y.line%5==0?y.save():null,y.nextLine();if(+new Date>_)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<R.length;Y++)Pi(e,R[Y],"text")})}var jo=function(e,t,_){var y=e.display;this.viewport=t,this.visible=ko(y,e.doc,t),this.editorIsHidden=!y.wrapper.offsetWidth,this.wrapperHeight=y.wrapper.clientHeight,this.wrapperWidth=y.wrapper.clientWidth,this.oldDisplayWidth=ci(e),this.force=_,this.dims=bs(e),this.events=[]};jo.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ye.apply(null,this.events[e])};function Iu(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ii(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ii(e)+"px",t.scrollbarsClipped=!0)}function Ru(e){if(e.hasFocus())return null;var t=F();if(!t||!m(e.display.lineDiv,t))return null;var _={activeElt:t};if(window.getSelection){var y=window.getSelection();y.anchorNode&&y.extend&&m(e.display.lineDiv,y.anchorNode)&&(_.anchorNode=y.anchorNode,_.anchorOffset=y.anchorOffset,_.focusNode=y.focusNode,_.focusOffset=y.focusOffset)}return _}function Lu(e){if(!e||!e.activeElt||e.activeElt==F())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&m(document.body,e.anchorNode)&&m(document.body,e.focusNode)){var t=window.getSelection(),_=document.createRange();_.setEnd(e.anchorNode,e.anchorOffset),_.collapse(!1),t.removeAllRanges(),t.addRange(_),t.extend(e.focusNode,e.focusOffset)}}function Cs(e,t){var _=e.display,y=e.doc;if(t.editorIsHidden)return Ni(e),!1;if(!t.force&&t.visible.from>=_.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);_.viewFrom<Y&&Y-_.viewFrom<20&&(Y=Math.max(y.first,_.viewFrom)),_.viewTo>ie&&_.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<de.length;Ve++){var Je=de[Ve];if(!Je.hidden)if(!Je.node||Je.node.parentNode!=Y){var gt=il(e,Je,ve,_);Y.insertBefore(gt,ie)}else{for(;ie!=Je.node;)ie=ue(ie);var At=R&&t!=null&&t<=ve&&Je.lineNumber;Je.changes&&(re(Je.changes,"gutter")>-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;de<ue.length;de++)ue[de].style.left=Y}e.options.fixedGutter&&(t.gutters.style.left=y+R+"px")}function xl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,_=un(e.options,t.first+t.size-1),y=e.display;if(_.length!=y.lineNumChars){var R=y.measure.appendChild(f("div",[f("div",_)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=R.firstChild.offsetWidth,ie=R.offsetWidth-Y;return y.lineGutter.style.width="",y.lineNumInnerWidth=Math.max(Y,y.lineGutter.offsetWidth-ie)+1,y.lineNumWidth=y.lineNumInnerWidth+ie,y.lineNumChars=y.lineNumInnerWidth?_.length:-1,y.lineGutter.style.width=y.lineNumWidth+"px",xs(e.display),!0}return!1}function Ss(e,t){for(var _=[],y=!1,R=0;R<e.length;R++){var Y=e[R],ie=null;if(typeof Y!="string"&&(ie=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(t)y=!0;else continue;_.push({className:Y,style:ie})}return t&&!y&&_.push({className:"CodeMirror-linenumbers",style:null}),_}function Tl(e){var t=e.gutters,_=e.gutterSpecs;r(t),e.lineGutter=null;for(var y=0;y<_.length;++y){var R=_[y],Y=R.className,ie=R.style,ue=t.appendChild(f("div",null,"CodeMirror-gutter "+Y));ie&&(ue.style.cssText=ie),Y=="CodeMirror-linenumbers"&&(e.lineGutter=ue,ue.style.width=(e.lineNumWidth||1)+"px")}t.style.display=_.length?"":"none",xs(e)}function oo(e){Tl(e.display),ti(e),Cl(e)}function Mu(e,t,_,y){var R=this;this.input=_,R.scrollbarFiller=f("div",null,"CodeMirror-scrollbar-filler"),R.scrollbarFiller.setAttribute("cm-not-content","true"),R.gutterFiller=f("div",null,"CodeMirror-gutter-filler"),R.gutterFiller.setAttribute("cm-not-content","true"),R.lineDiv=C("div",null,"CodeMirror-code"),R.selectionDiv=f("div",null,null,"position: relative; z-index: 1"),R.cursorDiv=f("div",null,"CodeMirror-cursors"),R.measure=f("div",null,"CodeMirror-measure"),R.lineMeasure=f("div",null,"CodeMirror-measure"),R.lineSpace=C("div",[R.measure,R.lineMeasure,R.selectionDiv,R.cursorDiv,R.lineDiv],null,"position: relative; outline: none");var Y=C("div",[R.lineSpace],"CodeMirror-lines");R.mover=f("div",[Y],null,"position: relative"),R.sizer=f("div",[R.mover],"CodeMirror-sizer"),R.sizerWidth=null,R.heightForcer=f("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),R.gutters=f("div",null,"CodeMirror-gutters"),R.lineGutter=null,R.scroller=f("div",[R.sizer,R.heightForcer,R.gutters],"CodeMirror-scroll"),R.scroller.setAttribute("tabIndex","-1"),R.wrapper=f("div",[R.scrollbarFiller,R.gutterFiller,R.scroller],"CodeMirror"),I&&v<8&&(R.gutters.style.zIndex=-1,R.scroller.style.paddingRight=0),!T&&!(O&&A)&&(R.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(R.wrapper):e(R.wrapper)),R.viewFrom=R.viewTo=t.first,R.reportedViewFrom=R.reportedViewTo=t.first,R.view=[],R.renderedView=null,R.externalMeasured=null,R.viewOffset=0,R.lastWrapHeight=R.lastWrapWidth=0,R.updateLineNumbers=null,R.nativeBarWidth=R.barHeight=R.barWidth=0,R.scrollbarsClipped=!1,R.lineNumWidth=R.lineNumInnerWidth=R.lineNumChars=null,R.alignWidgets=!1,R.cachedCharWidth=R.cachedTextHeight=R.cachedPaddingH=null,R.maxLine=null,R.maxLineLength=0,R.maxLineChanged=!1,R.wheelDX=R.wheelDY=R.wheelStartX=R.wheelStartY=null,R.shift=!1,R.selForContextMenu=null,R.activeTouch=null,R.gutterSpecs=Ss(y.gutters,y.lineNumbers),Tl(R),_.init(R)}var Ko=0,pi=null;I?pi=-.53:O?pi=15:n?pi=-.7:c&&(pi=-1/3);function Sl(e){var t=e.wheelDeltaX,_=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),_==null&&e.detail&&e.axis==e.VERTICAL_AXIS?_=e.detail:_==null&&(_=e.wheelDelta),{x:t,y:_}}function Bl(e){var t=Sl(e);return t.x*=pi,t.y*=pi,t}function Ol(e,t){var _=Sl(t),y=_.x,R=_.y,Y=e.display,ie=Y.scroller,ue=ie.scrollWidth>ie.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<Ve.length;Je++)if(Ve[Je].node==ve){e.display.currentWheelTarget=ve;break e}}if(y&&!O&&!u&&pi!=null){R&&de&&ro(e,Math.max(0,ie.scrollTop+R*pi)),fa(e,Math.max(0,ie.scrollLeft+y*pi)),(!R||R&&de)&&me(t),Y.wheelStartX=null;return}if(R&&pi!=null){var gt=R*pi,At=e.doc.scrollTop,Ft=At+Y.wrapper.clientHeight;gt<0?At=Math.max(0,At+gt-50):Ft=Math.min(e.doc.height,Ft+gt+50),Fa(e,{top:At,bottom:Ft})}Ko<20&&(Y.wheelStartX==null?(Y.wheelStartX=ie.scrollLeft,Y.wheelStartY=ie.scrollTop,Y.wheelDX=y,Y.wheelDY=R,setTimeout(function(){if(Y.wheelStartX==null)return;var Nt=ie.scrollLeft-Y.wheelStartX,jt=ie.scrollTop-Y.wheelStartY,Gt=jt&&Y.wheelDY&&jt/Y.wheelDY||Nt&&Y.wheelDX&&Nt/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!Gt)return;pi=(pi*Ko+Gt)/(Ko+1),++Ko},200)):(Y.wheelDX+=y,Y.wheelDY+=R))}var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var _=this.ranges[t],y=e.ranges[t];if(!Ue(_.anchor,y.anchor)||!Ue(_.head,y.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new tn(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var _=0;_<this.ranges.length;_++){var y=this.ranges[_];if(be(t,y.from())>=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;Y<t.length;Y++){var ie=t[Y],ue=t[Y-1],de=be(ue.to(),ie.from());if(y&&!ie.empty()?de>0: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;y<e.sel.ranges.length;y++){var R=e.sel.ranges[y];_.push(new tn(Bs(R.anchor,t),Bs(R.head,t)))}return oi(e.cm,_,e.sel.primIndex)}function Il(e,t,_){return e.line==t.line?fe(_.line,e.ch-t.ch+_.ch):fe(_.line+(e.line-t.line),e.ch)}function Fu(e,t,_){for(var y=[],R=fe(e.first,0),Y=R,ie=0;ie<t.length;ie++){var ue=t[ie],de=Il(ue.from,R,Y),ve=Il(ea(ue),R,Y);if(R=ue.to,Y=ve,_=="around"){var Ve=e.sel.ranges[ie],Je=be(Ve.head,Ve.anchor)<0;y[ie]=new tn(Je?ve:de,Je?de:ve)}else y[ie]=new tn(de,de)}return new mi(y,e.sel.primIndex)}function Is(e){e.doc.mode=mt(e.options,e.doc.modeOption),so(e)}function so(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,va(e,100),e.state.modeGen++,e.curOp&&ti(e)}function Rl(e,t){return t.from.ch==0&&t.to.ch==0&&$e(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Rs(e,t,_,y){function R(Zt){return _?_[Zt]:null}function Y(Zt,Vt,ir){kn(Zt,Vt,ir,y),Yr(Zt,"change",Zt,t)}function ie(Zt,Vt){for(var ir=[],_r=Zt;_r<Vt;++_r)ir.push(new gn(ve[_r],R(_r),y));return ir}var ue=t.from,de=t.to,ve=t.text,Ve=Kt(e,ue.line),Je=Kt(e,de.line),gt=$e(ve),At=R(ve.length-1),Ft=de.line-ue.line;if(t.full)e.insert(0,ie(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(Rl(e,t)){var Nt=ie(0,ve.length-1);Y(Je,Je.text,At),Ft&&e.remove(ue.line,Ft),Nt.length&&e.insert(ue.line,Nt)}else if(Ve==Je)if(ve.length==1)Y(Ve,Ve.text.slice(0,ue.ch)+gt+Ve.text.slice(de.ch),At);else{var jt=ie(1,ve.length-1);jt.push(new gn(gt+Ve.text.slice(de.ch),At,y)),Y(Ve,Ve.text.slice(0,ue.ch)+ve[0],R(0)),e.insert(ue.line+1,jt)}else if(ve.length==1)Y(Ve,Ve.text.slice(0,ue.ch)+ve[0]+Je.text.slice(de.ch),R(0)),e.remove(ue.line+1,Ft);else{Y(Ve,Ve.text.slice(0,ue.ch)+ve[0],R(0)),Y(Je,gt+Je.text.slice(de.ch),At);var Gt=ie(1,ve.length-1);Ft>1&&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;ue<R.linked.length;++ue){var de=R.linked[ue];if(de.doc==Y)continue;var ve=ie&&de.sharedHist;if(_&&!ve)continue;t(de.doc,ve),y(de.doc,R,ve)}}y(e,null,!0)}function Nn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Mo(e),Is(e),Ll(e),e.options.lineWrapping||Un(e),e.options.mode=t.modeOption,ti(e)}function Ll(e){(e.doc.direction=="rtl"?P:h)(e.display.lineDiv,"CodeMirror-rtl")}function Uu(e){di(e,function(){Ll(e),ti(e)})}function Wo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ls(e,t){var _={from:rt(t.from),to:ea(t),text:Ur(e,t.from,t.to)};return Ul(e,_,t.from.line,t.to.line+1),ta(e,function(y){return Ul(y,_,t.from.line,t.to.line+1)},!0),_}function Dl(e){for(;e.length;){var t=$e(e);if(t.ranges)e.pop();else break}}function Ml(e,t){if(t)return Dl(e.done),$e(e.done);if(e.done.length&&!$e(e.done).ranges)return $e(e.done);if(e.done.length>1&&!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;_<e.length;++_)e[_].marker.explicitlyCleared?t||(t=e.slice(0,_)):t&&t.push(e[_]);return t?t.length?t:null:e}function kl(e,t){var _=t["spans_"+e.id];if(!_)return null;for(var y=[],R=0;R<t.text.length;++R)y.push(Nu(_[R]));return y}function ar(e,t){var _=kl(e,t),y=cn(e,t);if(!_)return y;if(!y)return _;for(var R=0;R<_.length;++R){var Y=_[R],ie=y[R];if(Y&&ie){e:for(var ue=0;ue<ie.length;++ue){for(var de=ie[ue],ve=0;ve<Y.length;++ve)if(Y[ve].marker==de.marker)continue e;Y.push(de)}}else ie&&(_[R]=ie)}return _}function Ua(e,t,_){for(var y=[],R=0;R<e.length;++R){var Y=e[R];if(Y.ranges){y.push(_?mi.prototype.deepCopy.call(Y):Y);continue}var ie=Y.changes,ue=[];y.push({changes:ue});for(var de=0;de<ie.length;++de){var ve=ie[de],Ve=void 0;if(ue.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var Je in ve)(Ve=Je.match(/^spans_(\d+)$/))&&(re(t,Number(Ve[1]))>-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<e.sel.ranges.length;Y++)y[Y]=Ds(e.sel.ranges[Y],t[Y],null,R);var ie=oi(e.cm,y,e.sel.primIndex);$n(e,ie,_)}function Ms(e,t,_,y){var R=e.sel.ranges.slice(0);R[t]=_,$n(e,oi(e.cm,R,e.sel.primIndex),y)}function Fs(e,t,_,y){$n(e,qi(t,_),y)}function lo(e,t,_){var y={ranges:t.ranges,update:function(R){this.ranges=[];for(var Y=0;Y<R.length;Y++)this.ranges[Y]=new tn(U(e,R[Y].anchor),U(e,R[Y].head))},origin:_&&_.origin};return Ye(e,"beforeSelectionChange",e,y),e.cm&&Ye(e.cm,"beforeSelectionChange",e.cm,y),y.ranges!=t.ranges?oi(e.cm,y.ranges,y.ranges.length-1):t}function uo(e,t,_){var y=e.history.done,R=$e(y);R&&R.ranges?(y[y.length-1]=t,Go(e,t,_)):$n(e,t,_)}function $n(e,t,_){Go(e,t,_),Pu(e,e.sel,e.cm?e.cm.curOp.id:NaN,_)}function Go(e,t,_){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=lo(e,t,_));var y=_&&_.bias||(be(t.primary().head,e.sel.primary().head)<0?-1:1);Pl(e,Vo(e,t,y,!0)),!(_&&_.scroll===!1)&&e.cm&&Ma(e.cm)}function Pl(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,je(e.cm)),Yr(e,"cursorActivity",e)}function ra(e){Pl(e,Vo(e,e.sel,null,!1))}function Vo(e,t,_,y){for(var R,Y=0;Y<t.ranges.length;Y++){var ie=t.ranges[Y],ue=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],de=Xo(e,ie.anchor,ue&&ue.anchor,_,y),ve=Xo(e,ie.head,ue&&ue.head,_,y);(R||de!=ie.anchor||ve!=ie.head)&&(R||(R=t.ranges.slice(0,Y)),R[Y]=new tn(de,ve))}return R?oi(e.cm,R,t.primIndex):t}function na(e,t,_,y,R){var Y=Kt(e,t.line);if(Y.markedSpans)for(var ie=0;ie<Y.markedSpans.length;++ie){var ue=Y.markedSpans[ie],de=ue.marker,ve="selectLeft"in de?!de.selectLeft:de.inclusiveLeft,Ve="selectRight"in de?!de.selectRight:de.inclusiveRight;if((ue.from==null||(ve?ue.from<=t.ch:ue.from<t.ch))&&(ue.to==null||(Ve?ue.to>=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<e.first+e.size-1?fe(t.line+1,0):null:new fe(t.line,t.ch+_)}function Nl(e){e.setSelection(fe(e.firstLine(),0),fe(e.lastLine()),ge)}function Yo(e,t,_){var y={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return y.canceled=!0}};return _&&(y.update=function(R,Y,ie,ue){R&&(y.from=U(e,R)),Y&&(y.to=U(e,Y)),ie&&(y.text=ie),ue!==void 0&&(y.origin=ue)}),Ye(e,"beforeChange",e,y),e.cm&&Ye(e.cm,"beforeChange",e.cm,y),y.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:y.from,to:y.to,text:y.text,origin:y.origin}}function Pa(e,t,_){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,Pa)(e,t,_);if(e.cm.state.suppressEdits)return}if((Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))&&(t=Yo(e,t,!0),!t))return;var y=cr&&!_&&br(e,t.from,t.to);if(y)for(var R=y.length-1;R>=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<ue.length&&!(Y=ue[ve],_?Y.ranges&&!Y.equals(e.sel):!Y.ranges);ve++);if(ve==ue.length)return;for(R.lastOrigin=R.lastSelOrigin=null;;)if(Y=ue.pop(),Y.ranges){if(zo(Y,de),_&&!Y.equals(e.sel)){$n(e,Y,{clearRedo:!1});return}ie=Y}else if(y){ue.push(Y);return}else break;var Ve=[];zo(ie,de),de.push({changes:Ve,generation:R.generation}),R.generation=Y.generation||++R.maxGeneration;for(var Je=Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"),gt=function(Nt){var jt=Y.changes[Nt];if(jt.origin=t,Je&&!Yo(e,jt,!1))return ue.length=0,{};Ve.push(Ls(e,jt));var Gt=Nt?Os(e,jt):$e(ue);Ao(e,jt,Gt,ar(e,jt)),!Nt&&e.cm&&e.cm.scrollIntoView({from:jt.from,to:ea(jt)});var Zt=[];ta(e,function(Vt,ir){!ir&&re(Zt,Vt.history)==-1&&(Kl(Vt.history,jt),Zt.push(Vt.history)),Ao(Vt,jt,null,ar(Vt,jt))})},At=Y.changes.length-1;At>=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.line<e.first){Ql(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var R=t.text.length-1-(e.first-t.from.line);Ql(e,R),t={from:fe(e.first,0),to:fe(t.to.line+R,t.to.ch),text:[$e(t.text)],origin:t.origin}}var Y=e.lastLine();t.to.line>Y&&(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){_<e.line?e.line+=y:t<e.line&&(e.line=t,e.ch=0)}function ks(e,t,_,y){for(var R=0;R<e.length;++R){var Y=e[R],ie=!0;if(Y.ranges){Y.copied||(Y=e[R]=Y.deepCopy(),Y.copied=!0);for(var ue=0;ue<Y.ranges.length;ue++)jl(Y.ranges[ue].anchor,t,_,y),jl(Y.ranges[ue].head,t,_,y);continue}for(var de=0;de<Y.changes.length;++de){var ve=Y.changes[de];if(_<ve.from.line)ve.from=fe(ve.from.line+y,ve.from.ch),ve.to=fe(ve.to.line+y,ve.to.ch);else if(t<=ve.to.line){ie=!1;break}}ie||(e.splice(0,R+1),R=0)}}function Kl(e,t){var _=t.from.line,y=t.to.line,R=t.text.length-(y-_)-1;ks(e.done,_,y,R),ks(e.undone,_,y,R)}function co(e,t,_,y){var R=t,Y=t;return typeof t=="number"?Y=Kt(e,ee(e,t)):R=pr(t),R==null?null:(y(Y,R)&&e.cm&&Pi(e.cm,R,_),Y)}function ho(e){this.lines=e,this.parent=null;for(var t=0,_=0;_<e.length;++_)e[_].parent=this,t+=e[_].height;this.height=t}ho.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var _=e,y=e+t;_<y;++_){var R=this.lines[_];this.height-=R.height,er(R),Yr(R,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,_){this.height+=_,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var y=0;y<t.length;++y)t[y].parent=this},iterN:function(e,t,_){for(var y=e+t;e<y;++e)if(_(this.lines[e]))return!0}};function Ha(e){this.children=e;for(var t=0,_=0,y=0;y<e.length;++y){var R=e[y];t+=R.chunkSize(),_+=R.height,R.parent=this}this.size=t,this.height=_,this.parent=null}Ha.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var _=0;_<this.children.length;++_){var y=this.children[_],R=y.chunkSize();if(e<R){var Y=Math.min(t,R-e),ie=y.height;if(y.removeInner(e,Y),this.height-=ie-y.height,R==Y&&(this.children.splice(_--,1),y.parent=null),(t-=Y)==0)break;e=0}else e-=R}if(this.size-t<25&&(this.children.length>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;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,_){this.size+=t.length,this.height+=_;for(var y=0;y<this.children.length;++y){var R=this.children[y],Y=R.chunkSize();if(e<=Y){if(R.insertInner(e,t,_),R.lines&&R.lines.length>50){for(var ie=R.lines.length%25+25,ue=ie;ue<R.lines.length;){var de=new ho(R.lines.slice(ue,ue+=25));R.height-=de.height,this.children.splice(++y,0,de),de.parent=this}R.lines=R.lines.slice(0,ie),this.maybeSpill()}break}e-=Y}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),_=new Ha(t);if(e.parent){e.size-=_.size,e.height-=_.height;var R=re(e.parent.children,e);e.parent.children.splice(R+1,0,_)}else{var y=new Ha(e.children);y.parent=e,e.children=[y,_],e=y}_.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,_){for(var y=0;y<this.children.length;++y){var R=this.children[y],Y=R.chunkSize();if(e<Y){var ie=Math.min(t,Y-e);if(R.iterN(e,ie,_))return!0;if((t-=ie)==0)break;e=0}else e-=Y}}};var fo=function(e,t,_){if(_)for(var y in _)_.hasOwnProperty(y)&&(this[y]=_[y]);this.doc=e,this.node=t};fo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,_=this.line,y=pr(_);if(y==null||!t)return;for(var R=0;R<t.length;++R)t[R]==this&&t.splice(R--,1);t.length||(_.widgets=null);var Y=Za(this);Rr(_,Math.max(0,_.height-Y)),e&&(di(e,function(){po(e,_,-Y),Pi(e,y,"widget")}),Yr(e,"lineWidgetCleared",e,this,y))},fo.prototype.changed=function(){var e=this,t=this.height,_=this.doc.cm,y=this.line;this.height=null;var R=Za(this)-t;if(!R)return;In(this.doc,y)||Rr(y,y.height+R),_&&di(_,function(){_.curOp.forceUpdate=!0,po(_,y,R),Yr(_,"lineWidgetChanged",_,e,pr(y))})},Me(fo);function po(e,t,_){Fn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ws(e,_)}function Qu(e,t,_,y){var R=new fo(e,_,y),Y=e.cm;return Y&&R.noHScroll&&(Y.display.alignWidgets=!0),co(e,t,"widget",function(ie){var ue=ie.widgets||(ie.widgets=[]);if(R.insertAt==null?ue.push(R):ue.splice(Math.min(ue.length-1,Math.max(0,R.insertAt)),0,R),R.line=ie,Y&&!In(e,ie)){var de=Fn(ie)<e.scrollTop;Rr(ie,ie.height+Za(R)),de&&ws(Y,R.height),Y.curOp.forceUpdate=!0}return!0}),Y&&Yr(Y,"lineWidgetAdded",Y,R,typeof t=="number"?t:pr(t)),R}var Zo=0,Li=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Zo};Li.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ma(e),Le(this,"clear")){var _=this.find();_&&Yr(this,"clear",_.from,_.to)}for(var y=null,R=null,Y=0;Y<this.lines.length;++Y){var ie=this.lines[Y],ue=Jr(ie.markedSpans,this);e&&!this.collapsed?Pi(e,pr(ie),"text"):e&&(ue.to!=null&&(R=pr(ie)),ue.from!=null&&(y=pr(ie))),ie.markedSpans=bn(ie.markedSpans,ue),ue.from==null&&this.collapsed&&!In(this.doc,ie)&&e&&Rr(ie,da(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var de=0;de<this.lines.length;++de){var ve=En(this.lines[de]),Ve=si(ve);Ve>e.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;R<this.lines.length;++R){var Y=this.lines[R],ie=Jr(Y.markedSpans,this);if(ie.from!=null&&(_=fe(t?Y:pr(Y),ie.from),e==-1))return _;if(ie.to!=null&&(y=fe(t?Y:pr(Y),ie.to),e==1))return y}return _&&{from:_,to:y}},Li.prototype.changed=function(){var e=this,t=this.find(-1,!0),_=this,y=this.doc.cm;if(!t||!y)return;di(y,function(){var R=t.line,Y=pr(t.line),ie=Aa(y,Y);if(ie&&(vs(ie),y.curOp.selectionChanged=y.curOp.forceUpdate=!0),y.curOp.updateMaxLine=!0,!In(_.doc,R)&&_.height!=null){var ue=_.height;_.height=null;var de=Za(_)-ue;de&&Rr(R,R.height+de)}Yr(y,"markerChanged",y,e)})},Li.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||re(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Li.prototype.detachLine=function(e){if(this.lines.splice(re(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(Li);function ya(e,t,_,y,R){if(y&&y.shared)return ju(e,t,_,y,R);if(e.cm&&!e.cm.curOp)return Pn(e.cm,ya)(e,t,_,y,R);var Y=new Li(e,R),ie=be(t,_);if(y&&M(y,Y,!1),ie>0||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;_<e.length;++_)e[_].parent=this};Qa.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Yr(this,"clear")},Qa.prototype.find=function(e,t){return this.primary.find(e,t)},Me(Qa);function ju(e,t,_,y,R){y=M(y),y.shared=!1;var Y=[ya(e,t,_,y,R)],ie=Y[0],ue=y.widgetNode;return ta(e,function(de){ue&&(y.widgetNode=ue.cloneNode(!0)),Y.push(ya(de,U(de,t),U(de,_),y,R));for(var ve=0;ve<de.linked.length;++ve)if(de.linked[ve].isParent)return;ie=$e(Y)}),new Qa(Y,ie)}function Ps(e){return e.findMarks(fe(e.first,0),e.clipPos(fe(e.lastLine())),function(t){return t.parent})}function Ns(e,t){for(var _=0;_<t.length;_++){var y=t[_],R=y.find(),Y=e.clipPos(R.from),ie=e.clipPos(R.to);if(be(Y,ie)){var ue=ya(e,Y,ie,y.primary,y.primary.type);y.markers.push(ue),ue.parent=y}}}function Hs(e){for(var t=function(y){var R=e[y],Y=[R.primary.doc];ta(R.primary.doc,function(de){return Y.push(de)});for(var ie=0;ie<R.markers.length;ie++){var ue=R.markers[ie];re(Y,ue.doc)==-1&&(ue.parent=null,R.markers.splice(ie--,1))}},_=0;_<e.length;_++)t(_)}var Wl=0,ni=function(e,t,_,y,R){if(!(this instanceof ni))return new ni(e,t,_,y,R);_==null&&(_=0),Ha.call(this,[new ho([new gn("",null)])]),this.first=_,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=_;var Y=fe(_,0);this.sel=qi(Y),this.history=new Wo(null),this.id=++Wl,this.modeOption=t,this.lineSep=y,this.direction=R=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Rs(this,{from:Y,to:Y,text:e}),$n(this,qi(Y),ge)};ni.prototype=at(Ha.prototype,{constructor:ni,iter:function(e,t,_){_?this.iterN(e-this.first,t-e,_):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var _=0,y=0;y<t.length;++y)_+=t[y].height;this.insertInner(e-this.first,t,_)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Kr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zn(function(e){var t=fe(this.first,0),_=this.first+this.size-1;Pa(this,{from:t,to:fe(_,Kt(this,_).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&$i(this.cm,0,0),$n(this,qi(t),ge)}),replaceRange:function(e,t,_,y){t=U(this,t),_=_?U(this,_):t,Na(this,e,t,_,y)},getRange:function(e,t,_){var y=Ur(this,U(this,e),U(this,t));return _===!1?y:y.join(_||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pn(this,e))return Kt(this,e)},getLineNumber:function(e){return pr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Kt(this,e)),En(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return U(this,e)},getCursor:function(e){var t=this.sel.primary(),_;return e==null||e=="head"?_=t.head:e=="anchor"?_=t.anchor:e=="end"||e=="to"||e===!1?_=t.to():_=t.from(),_},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zn(function(e,t,_){Fs(this,U(this,typeof e=="number"?fe(e,t||0):e),null,_)}),setSelection:zn(function(e,t,_){Fs(this,U(this,e),U(this,t||e),_)}),extendSelection:zn(function(e,t,_){ka(this,U(this,e),t&&U(this,t),_)}),extendSelections:zn(function(e,t){Bi(this,$(this,e),t)}),extendSelectionsBy:zn(function(e,t){var _=bt(this.sel.ranges,e);Bi(this,$(this,_),t)}),setSelections:zn(function(e,t,_){if(!e.length)return;for(var y=[],R=0;R<e.length;R++)y[R]=new tn(U(this,e[R].anchor),U(this,e[R].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),$n(this,oi(this.cm,y,t),_)}),addSelection:zn(function(e,t,_){var y=this.sel.ranges.slice(0);y.push(new tn(U(this,e),U(this,t||e))),$n(this,oi(this.cm,y,y.length-1),_)}),getSelection:function(e){for(var t=this.sel.ranges,_,y=0;y<t.length;y++){var R=Ur(this,t[y].from(),t[y].to());_=_?_.concat(R):R}return e===!1?_:_.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],_=this.sel.ranges,y=0;y<_.length;y++){var R=Ur(this,_[y].from(),_[y].to());e!==!1&&(R=R.join(e||this.lineSeparator())),t[y]=R}return t},replaceSelection:function(e,t,_){for(var y=[],R=0;R<this.sel.ranges.length;R++)y[R]=e;this.replaceSelections(y,t,_||"+input")},replaceSelections:zn(function(e,t,_){for(var y=[],R=this.sel,Y=0;Y<R.ranges.length;Y++){var ie=R.ranges[Y];y[Y]={from:ie.from(),to:ie.to(),text:this.splitLines(e[Y]),origin:_}}for(var ue=t&&t!="end"&&Fu(this,y,t),de=y.length-1;de>=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.done.length;y++)e.done[y].ranges||++t;for(var R=0;R<e.undone.length;R++)e.undone[R].ranges||++_;return{undo:t,redo:_}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ta(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ua(this.history.done),undone:Ua(this.history.undone)}},setHistory:function(e){var t=this.history=new Wo(this.history.maxGeneration);t.done=Ua(e.done.slice(0),null,!0),t.undone=Ua(e.undone.slice(0),null,!0)},setGutterMarker:zn(function(e,t,_){return co(this,e,"gutter",function(y){var R=y.gutterMarkers||(y.gutterMarkers={});return R[t]=_,!_&&ce(R)&&(y.gutterMarkers=null),!0})}),clearGutter:zn(function(e){var t=this;this.iter(function(_){_.gutterMarkers&&_.gutterMarkers[e]&&co(t,_,"gutter",function(){return _.gutterMarkers[e]=null,ce(_.gutterMarkers)&&(_.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!pn(this,e))return null;if(t=e,e=Kt(this,e),!e)return null}else if(t=pr(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:zn(function(e,t,_){return co(this,e,t=="gutter"?"gutter":"class",function(y){var R=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!y[R])y[R]=_;else{if(b(_).test(y[R]))return!1;y[R]+=" "+_}return!0})}),removeLineClass:zn(function(e,t,_){return co(this,e,t=="gutter"?"gutter":"class",function(y){var R=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",Y=y[R];if(Y)if(_==null)y[R]=null;else{var ie=Y.match(b(_));if(!ie)return!1;var ue=ie.index+ie[0].length;y[R]=Y.slice(0,ie.index)+(!ie.index||ue==Y.length?"":" ")+Y.slice(ue)||null}else return!1;return!0})}),addLineWidget:zn(function(e,t,_){return Qu(this,e,t,_)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,_){return ya(this,U(this,e),U(this,t),_,_&&_.type||"range")},setBookmark:function(e,t){var _={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=U(this,e),ya(this,e,e,_,"bookmark")},findMarksAt:function(e){e=U(this,e);var t=[],_=Kt(this,e.line).markedSpans;if(_)for(var y=0;y<_.length;++y){var R=_[y];(R.from==null||R.from<=e.ch)&&(R.to==null||R.to>=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<ie.length;ue++){var de=ie[ue];!(de.to!=null&&R==e.line&&e.ch>=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.line<this.first||e.ch<0)return 0;var _=this.lineSeparator().length;return this.iter(this.first,e.line,function(y){t+=y.text.length+_}),t},copy:function(e){var t=new ni(Kr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,_=this.first+this.size;e.from!=null&&e.from>t&&(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<this.linked.length;++t){var _=this.linked[t];if(_.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Hs(Ps(this));break}if(e.history==this.history){var y=[e.id];ta(e,function(R){return y.push(R.id)},!0),e.history=new Wo(null),e.history.done=Ua(this.history.done,y),e.history.undone=Ua(this.history.undone,y)}},iterLinkedDocs:function(e){ta(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ut(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:zn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Uu(this.cm)})}),ni.prototype.eachLine=ni.prototype.iter;var Qs=0;function zl(e){var t=this;if(Gl(t),st(t,e)||Ci(t.display,e))return;me(e),I&&(Qs=+new Date);var _=Yi(t,e,!0),y=e.dataTransfer.files;if(!_||t.isReadOnly())return;if(y&&y.length&&window.FileReader&&window.File)for(var R=y.length,Y=Array(R),ie=0,ue=function(){++ie==R&&Pn(t,function(){_=U(t.doc,_);var At={from:_,to:_,text:t.doc.splitLines(Y.filter(function(Ft){return Ft!=null}).join(t.doc.lineSeparator())),origin:"paste"};Pa(t.doc,At),uo(t.doc,qi(U(t.doc,_),U(t.doc,ea(At))))})()},de=function(At,Ft){if(t.options.allowDropFileTypes&&re(t.options.allowDropFileTypes,At.type)==-1){ue();return}var Nt=new FileReader;Nt.onerror=function(){return ue()},Nt.onload=function(){var jt=Nt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(jt)){ue();return}Y[Ft]=jt,ue()},Nt.readAsText(At)},ve=0;ve<y.length;ve++)de(y[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(_)>-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<Je.length;++gt)Na(t.doc,"",Je[gt].anchor,Je[gt].head,"drag");t.replaceSelection(Ve,"around","paste"),t.display.input.focus()}}catch(At){}}}function js(e,t){if(I&&(!e.state.draggingText||+new Date-Qs<100)){Oe(t);return}if(st(e,t)||Ci(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!c){var _=f("img",null,null,"position: fixed; left: 0; top: 0;");_.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(_.width=_.height=1,e.display.wrapper.appendChild(_),_._top=_.offsetTop),t.dataTransfer.setDragImage(_,0,0),u&&_.parentNode.removeChild(_)}}function Ku(e,t){var _=Yi(e,t);if(!_)return;var y=document.createDocumentFragment();ml(e,_,y),e.display.dragCursor||(e.display.dragCursor=f("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),l(e.display.dragCursor,y)}function Gl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),_=[],y=0;y<t.length;y++){var R=t[y].CodeMirror;R&&_.push(R)}_.length&&_[0].operation(function(){for(var Y=0;Y<_.length;Y++)e(_[Y])})}var gi=!1;function Ks(){if(gi)return;Wu(),gi=!0}function Wu(){var e;Ne(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(zu)},100))}),Ne(window,"blur",function(){return Vl(Da)})}function zu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ia={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},mo=0;mo<10;mo++)ia[mo+48]=ia[mo+96]=String(mo);for(var $o=65;$o<=90;$o++)ia[$o]=String.fromCharCode($o);for(var go=1;go<=12;go++)ia[go+111]=ia[go+63235]="F"+go;var Qi={};Qi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Qi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Qi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Qi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Qi.default=a?Qi.macDefault:Qi.pcDefault;function Gu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var _,y,R,Y,ie=0;ie<t.length-1;ie++){var ue=t[ie];if(/^(cmd|meta|m)$/i.test(ue))Y=!0;else if(/^a(lt)?$/i.test(ue))_=!0;else if(/^(c|ctrl|control)$/i.test(ue))y=!0;else if(/^s(hift)?$/i.test(ue))R=!0;else throw new Error("Unrecognized modifier name: "+ue)}return _&&(e="Alt-"+e),y&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),R&&(e="Shift-"+e),e}function Vu(e){var t={};for(var _ in e)if(e.hasOwnProperty(_)){var y=e[_];if(/^(name|fallthrough|(de|at)tach)$/.test(_))continue;if(y=="..."){delete e[_];continue}for(var R=bt(_.split(" "),Gu),Y=0;Y<R.length;Y++){var ie=void 0,ue=void 0;Y==R.length-1?(ue=R.join(" "),ie=y):(ue=R.slice(0,Y+1).join(" "),ie="...");var de=t[ue];if(!de)t[ue]=ie;else if(de!=ie)throw new Error("Inconsistent bindings for "+ue)}delete e[_]}for(var ve in t)e[ve]=t[ve];return e}function ba(e,t,_,y){t=Hn(t);var R=t.call?t.call(e,y):t[e];if(R===!1)return"nothing";if(R==="...")return"multi";if(R!=null&&_(R))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return ba(e,t.fallthrough,_,y);for(var Y=0;Y<t.fallthrough.length;Y++){var ie=ba(e,t.fallthrough[Y],_,y);if(ie)return ie}}}function Xl(e){var t=typeof e=="string"?e:ia[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function qo(e,t,_){var y=e;return t.altKey&&y!="Alt"&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&y!="Ctrl"&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&y!="Mod"&&(e="Cmd-"+e),!_&&t.shiftKey&&y!="Shift"&&(e="Shift-"+e),e}function Ws(e,t){if(u&&e.keyCode==34&&e.char)return!1;var _=ia[e.keyCode];return _==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(_=e.code),qo(_,e,t))}function Hn(e){return typeof e=="string"?Qi[e]:e}function Di(e,t){for(var _=e.doc.sel.ranges,y=[],R=0;R<_.length;R++){for(var Y=t(_[R]);y.length&&be(Y.from,$e(y).to)<=0;){var ie=y.pop();if(be(ie.from,Y.from)<0){Y.from=ie.from;break}}y.push(Y)}di(e,function(){for(var ue=y.length-1;ue>=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&&Gt<R.length;Gt+=Zt){var _r=R[Gt],fr=Zt>0==(_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&&kr<Vt.end)return ir(kr,fr)}},Nt=Ft(Y+y,y,Ve);if(Nt)return Nt;var jt=y>0?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.line<e.lastLine()?{from:t.head,to:fe(t.head.line+1,0)}:{from:t.head,to:fe(t.head.line,_)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Di(e,function(t){return{from:fe(t.from().line,0),to:U(e.doc,fe(t.to().line+1,0))}})},delLineLeft:function(e){return Di(e,function(t){return{from:fe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Di(e,function(t){var _=e.charCoords(t.head,"div").top+5,y=e.coordsChar({left:0,top:_},"div");return{from:y,to:t.from()}})},delWrappedLineRight:function(e){return Di(e,function(t){var _=e.charCoords(t.head,"div").top+5,y=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:_},"div");return{from:t.from(),to:y}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(fe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(fe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Yl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Jl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Xu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var _=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:_},"div")},Re)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var _=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:_},"div")},Re)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var _=e.cursorCoords(t.head,"div").top+5,y=e.coordsChar({left:0,top:_},"div");return y.ch<e.getLine(y.line).search(/\S/)?Jl(e,t.head):y},Re)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],_=e.listSelections(),y=e.options.tabSize,R=0;R<_.length;R++){var Y=_[R].from(),ie=J(e.getLine(Y.line),Y.ch,y);t.push(Te(y-ie%y))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return di(e,function(){for(var t=e.listSelections(),_=[],y=0;y<t.length;y++){if(!t[y].empty())continue;var R=t[y].head,Y=Kt(e.doc,R.line).text;if(Y){if(R.ch==Y.length&&(R=new fe(R.line,R.ch-1)),R.ch>0)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;y<t.length;y++)e.indentLine(t[y].from().line,null,!0);Ma(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var _=Kt(e.doc,t),y=En(_);return y!=_&&(t=pr(y)),es(!0,e,y,t,1)}function Xu(e,t){var _=Kt(e.doc,t),y=Qn(_);return y!=_&&(t=pr(y)),es(!0,e,_,t,-1)}function Jl(e,t){var _=Yl(e,t.line),y=Kt(e.doc,_.line),R=Mt(y,e.doc.direction);if(!R||R[0].level==0){var Y=Math.max(_.ch,y.text.search(/\S/)),ie=t.line==_.line&&t.ch<=Y&&t.ch;return fe(_.line,ie?0:Y,_.sticky)}return _}function ts(e,t,_){if(typeof t=="string"&&(t=vo[t],!t))return!1;e.display.input.ensurePolled();var y=e.display.shift,R=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),_&&(e.display.shift=!1),R=t(e)!=_e}finally{e.display.shift=y,e.state.suppressEdits=!1}return R}function Yu(e,t,_){for(var y=0;y<e.state.keyMaps.length;y++){var R=ba(t,e.state.keyMaps[y],_,e);if(R)return R}return e.options.extraKeys&&ba(t,e.options.extraKeys,_,e)||ba(t,e.options.keyMap,_,e)}var Ju=new X;function yo(e,t,_,y){var R=e.state.keySeq;if(R){if(Xl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==R&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,R+" "+t,_,y))return!0}return Xs(e,t,_,y)}function Xs(e,t,_,y){var R=Yu(e,t,y);return R=="multi"&&(e.state.keySeq=t),R=="handled"&&Yr(e,"keyHandled",e,t,_),(R=="handled"||R=="multi")&&(me(_),Fo(e)),!!R}function Ys(e,t){var _=Ws(t,!0);return _?t.shiftKey&&!e.state.keySeq?yo(e,"Shift-"+_,t,function(y){return ts(e,y,!0)})||yo(e,_,t,function(y){if(typeof y=="string"?/^go[A-Z]/.test(y):y.motion)return ts(e,y)}):yo(e,_,t,function(y){return ts(e,y)}):!1}function Zl(e,t,_){return yo(e,"'"+_+"'",t,function(y){return ts(e,y,!0)})}var rs=null;function ns(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=F(),st(t,e))return;I&&v<11&&e.keyCode==27&&(e.returnValue=!1);var _=e.keyCode;t.display.shift=_==16||e.shiftKey;var y=Ys(t,e);u&&(rs=y?_:null,!y&&_==88&&!tt&&(a?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),O&&!a&&!y&&_==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),_==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Zu(t)}function Zu(e){var t=e.display.lineDiv;P(t,"CodeMirror-crosshair");function _(y){(y.keyCode==18||!y.altKey)&&(h(t,"CodeMirror-crosshair"),dt(document,"keyup",_),dt(document,"mouseover",_))}Ne(document,"keyup",_),Ne(document,"mouseover",_)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function ql(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ci(t.display,e)||st(t,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var _=e.keyCode,y=e.charCode;if(u&&_==rs){rs=null,me(e);return}if(u&&(!e.which||e.which<10)&&Ys(t,e))return;var R=String.fromCharCode(y==null?_:y);if(R=="\b")return;if(Zl(t,e,R))return;t.display.input.onKeyPress(e)}var $u=400,ja=function(e,t,_){this.time=e,this.pos=t,this.button=_};ja.prototype.compare=function(e,t,_){return this.time+$u>e&&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.line<fr.from)&&setTimeout(Pn(e,function(){Ft==ir&&Nt(Vt)}),150)}else{var kr=Vt.clientY<At.top?-20:Vt.clientY>At.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<e.display.gutterSpecs.length;++de){var ve=ie.gutters.childNodes[de];if(ve&&ve.getBoundingClientRect().right>=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;ue<ss.length;++ue)ss[ue](this);ga(this),T&&t.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}_n.defaults=su,_n.optionHandlers=os;function uu(e){var t=e.display;Ne(t.scroller,"mousedown",Pn(e,is)),I&&v<11?Ne(t.scroller,"dblclick",Pn(e,function(de){if(st(e,de))return;var ve=Yi(e,de);if(!ve||Js(e,de)||Ci(e.display,de))return;me(de);var Ve=e.findWordAt(ve);ka(e.doc,Ve.anchor,Ve.head)})):Ne(t.scroller,"dblclick",function(de){return st(e,de)||me(de)}),Ne(t.scroller,"contextmenu",function(de){return Zs(e,de)}),Ne(t.input.getField(),"contextmenu",function(de){t.scroller.contains(de.target)||Zs(e,de)});var _,y={end:0};function R(){t.activeTouch&&(_=setTimeout(function(){return t.activeTouch=null},1e3),y=t.activeTouch,y.end=+new Date)}function Y(de){if(de.touches.length!=1)return!1;var ve=de.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ie(de,ve){if(ve.left==null)return!0;var Ve=ve.left-de.left,Je=ve.top-de.top;return Ve*Ve+Je*Je>20*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(gt<Ve&&(Je+=Te(Ve-gt)),Je!=ve)return Na(R,Je,fe(t,0),fe(t,ve.length),"+input"),ue.stateAfter=null,!0;for(var Ft=0;Ft<R.sel.ranges.length;Ft++){var Nt=R.sel.ranges[Ft];if(Nt.head.line==t&&Nt.head.ch<ve.length){var jt=fe(t,ve.length);Ms(R,Ft,new tn(jt,jt));break}}}var _i=null;function _o(e){_i=e}function $s(e,t,_,y,R){var Y=e.doc;e.display.shift=!1,y||(y=Y.sel);var ie=+new Date-200,ue=R=="paste"||e.state.pasteIncoming>ie,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<Y.electricChars.length;ue++)if(t.indexOf(Y.electricChars.charAt(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;y<e.doc.sel.ranges.length;y++){var R=e.doc.sel.ranges[y].head.line,Y={anchor:fe(R,0),head:fe(R+1,0)};_.push(Y),t.push(e.getRange(Y.anchor,Y.head))}return{text:t,ranges:_}}function el(e,t,_,y){e.setAttribute("autocorrect",_?"":"off"),e.setAttribute("autocapitalize",y?"":"off"),e.setAttribute("spellcheck",!!t)}function Au(){var e=f("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=f("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return T?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(e.style.border="1px solid black"),el(e),t}function cu(e){var t=e.optionHandlers,_=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(y,R){var Y=this.options,ie=Y[y];if(Y[y]==R&&y!="mode")return;Y[y]=R,t.hasOwnProperty(y)&&Pn(this,t[y])(this,R,ie),Ye(this,"optionChange",this,y)},getOption:function(y){return this.options[y]},getDoc:function(){return this.doc},addKeyMap:function(y,R){this.state.keyMaps[R?"push":"unshift"](Hn(y))},removeKeyMap:function(y){for(var R=this.state.keyMaps,Y=0;Y<R.length;++Y)if(R[Y]==y||R[Y].name==y)return R.splice(Y,1),!0},addOverlay:ri(function(y,R){var Y=y.token?y:e.getMode(this.options,y);if(Y.startState)throw new Error("Overlays may not be stateful.");Ie(this.state.overlays,{mode:Y,modeSpec:y,opaque:R&&R.opaque,priority:R&&R.priority||0},function(ie){return ie.priority}),this.state.modeGen++,ti(this)}),removeOverlay:ri(function(y){for(var R=this.state.overlays,Y=0;Y<R.length;++Y){var ie=R[Y].modeSpec;if(ie==y||typeof y=="string"&&ie.name==y){R.splice(Y,1),this.state.modeGen++,ti(this);return}}}),indentLine:ri(function(y,R,Y){typeof R!="string"&&typeof R!="number"&&(R==null?R=this.options.smartIndent?"smart":"prev":R=R?"add":"subtract"),pn(this.doc,y)&&Ea(this,y,R,Y)}),indentSelection:ri(function(y){for(var R=this.doc.sel.ranges,Y=-1,ie=0;ie<R.length;ie++){var ue=R[ie];if(ue.empty())ue.head.line>Y&&(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;Je<Y;++Je)Ea(this,Je,y);var gt=this.doc.sel.ranges;de.ch==0&&R.length==gt.length&>[ie].from().ch>0&&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]<ue)Y=ve+1;else{de=R[ve*2+2];break}}var Ve=de?de.indexOf("overlay "):-1;return Ve<0?de:Ve==0?null:de.slice(0,Ve-1)},getModeAt:function(y){var R=this.doc.mode;return R.innerMode?e.innerMode(R,this.getTokenAt(y).state).mode:R},getHelper:function(y,R){return this.getHelpers(y,R)[0]},getHelpers:function(y,R){var Y=[];if(!_.hasOwnProperty(R))return Y;var ie=_[R],ue=this.getModeAt(y);if(typeof ue[R]=="string")ie[ue[R]]&&Y.push(ie[ue[R]]);else if(ue[R])for(var de=0;de<ue[R].length;de++){var ve=ie[ue[R][de]];ve&&Y.push(ve)}else ue.helperType&&ie[ue.helperType]?Y.push(ie[ue.helperType]):ie[ue.name]&&Y.push(ie[ue.name]);for(var Ve=0;Ve<ie._global.length;Ve++){var Je=ie._global[Ve];Je.pred(ue,this)&&re(Y,Je.val)==-1&&Y.push(Je.val)}return Y},getStateAfter:function(y,R){var Y=this.doc;return y=ee(Y,y==null?Y.first+Y.size-1:y),Ut(this,y+1,R).state},cursorCoords:function(y,R){var Y,ie=this.doc.sel.primary();return y==null?Y=ie.head:typeof y=="object"?Y=U(this.doc,y):Y=y?ie.from():ie.to(),Ei(this,Y,R||"page")},charCoords:function(y,R){return eo(this,U(this.doc,y),R||"page")},coordsChar:function(y,R){return y=ys(this,y,R||"page"),Si(this,y.left,y.top)},lineAtHeight:function(y,R){return y=ys(this,{top:y,left:0},R||"page").top,Or(this.doc,y+this.display.viewOffset)},heightAtLine:function(y,R,Y){var ie=!1,ue;if(typeof y=="number"){var de=this.doc.first+this.doc.size-1;y<this.doc.first?y=this.doc.first:y>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;ve<R&&!(de=ls(this.doc,de,ue,Y,ie),de.hitSide);++ve);return de},moveH:ri(function(y,R){var Y=this;this.extendSelectionsBy(function(ie){return Y.display.shift||Y.doc.extend||ie.empty()?ls(Y.doc,ie.head,y,R,Y.options.rtlMoveVisually):y<0?ie.from():ie.to()},Re)}),deleteH:ri(function(y,R){var Y=this.doc.sel,ie=this.doc;Y.somethingSelected()?ie.replaceSelection("",null,"+delete"):Di(this,function(ue){var de=ls(ie,ue.head,y,R,!1);return y<0?{from:de,to:ue.head}:{from:ue.head,to:de}})}),findPosV:function(y,R,Y,ie){var ue=1,de=ie;R<0&&(ue=-1,R=-R);for(var ve=U(this.doc,y),Ve=0;Ve<R;++Ve){var Je=Ei(this,ve,"div");if(de==null?de=Je.left:Je.left=de,ve=du(this,Je,ue,Y),ve.hitSide)break}return ve},moveV:ri(function(y,R){var Y=this,ie=this.doc,ue=[],de=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Ve){if(de)return y<0?Ve.from():Ve.to();var Je=Ei(Y,Ve.head,"div");Ve.goalColumn!=null&&(Je.left=Ve.goalColumn),ue.push(Je.left);var gt=du(Y,Je,y,R);return R=="page"&&Ve==ie.sel.primary()&&ws(Y,eo(Y,gt,"div").top-Je.top),gt},Re),ue.length)for(var ve=0;ve<ie.sel.ranges.length;ve++)ie.sel.ranges[ve].goalColumn=ue[ve]}),findWordAt:function(y){var R=this.doc,Y=Kt(R,y.line).text,ie=y.ch,ue=y.ch;if(Y){var de=this.getHelper(y,"wordChars");(y.sticky=="before"||ue==Y.length)&&ie?--ie:++ue;for(var ve=Y.charAt(ie),Ve=ae(ve,de)?function(Je){return ae(Je,de)}:/\s/.test(ve)?function(Je){return/\s/.test(Je)}:function(Je){return!/\s/.test(Je)&&!ae(Je)};ie>0&&Ve(Y.charAt(ie-1));)--ie;for(;ue<Y.length&&Ve(Y.charAt(ue));)++ue}return new tn(fe(y.line,ie),fe(y.line,ue))},toggleOverwrite:function(y){if(y!=null&&y==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):h(this.display.cursorDiv,"CodeMirror-overwrite"),Ye(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==F()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ri(function(y,R){$i(this,y,R)}),getScrollInfo:function(){var y=this.display.scroller;return{left:y.scrollLeft,top:y.scrollTop,height:y.scrollHeight-Ii(this)-this.display.barHeight,width:y.scrollWidth-Ii(this)-this.display.barWidth,clientHeight:Rn(this),clientWidth:ci(this)}},scrollIntoView:ri(function(y,R){y==null?(y={from:this.doc.sel.primary().head,to:null},R==null&&(R=this.options.cursorScrollMargin)):typeof y=="number"?y={from:fe(y,0),to:null}:y.from==null&&(y={from:y,to:null}),y.to||(y.to=y.from),y.margin=R||0,y.from.line!=null?wu(this,y):yl(this,y.from,y.to,y.margin)}),setSize:ri(function(y,R){var Y=this,ie=function(de){return typeof de=="number"||/^\d+$/.test(String(de))?de+"px":de};y!=null&&(this.display.wrapper.style.width=ie(y)),R!=null&&(this.display.wrapper.style.height=ie(R)),this.options.lineWrapping&&fi(this);var ue=this.display.viewFrom;this.doc.iter(ue,this.display.viewTo,function(de){if(de.widgets){for(var ve=0;ve<de.widgets.length;ve++)if(de.widgets[ve].noHScroll){Pi(Y,ue,"widget");break}}++ue}),this.curOp.forceUpdate=!0,Ye(this,"refresh",this)}),operation:function(y){return di(this,y)},startOperation:function(){return ma(this)},endOperation:function(){return ga(this)},refresh:ri(function(){var y=this.display.cachedTextHeight;ti(this),this.curOp.forceUpdate=!0,bi(this),$i(this,this.doc.scrollLeft,this.doc.scrollTop),xs(this.display),(y==null||Math.abs(y-da(this.display))>.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||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){e.removeAllRanges();return}var Y=Ki(t,e.anchorNode,e.anchorOffset),ie=Ki(t,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&ie&&!ie.bad&&be(Dt(Y,ie),y)==0&&be(et(Y,ie),R)==0)return;var ue=t.display.view,de=y.line>=t.display.viewFrom&&_a(t,y)||{node:ue[0].measure.map[2],offset:0},ve=R.line<t.display.viewTo&&_a(t,R);if(!ve){var Ve=ue[ue.length-1].measure,Je=Ve.maps?Ve.maps[Ve.maps.length-1]:Ve.map;ve={node:Je[Je.length-1],offset:Je[Je.length-2]-Je[Je.length-3]}}if(!de||!ve){e.removeAllRanges();return}var gt=e.rangeCount&&e.getRangeAt(0),At;try{At=g(de.node,de.offset,ve.offset,ve.node)}catch(Ft){}At&&(!O&&t.state.focused?(e.collapse(de.node,de.offset),At.collapsed||(e.removeAllRanges(),e.addRange(At))):(e.removeAllRanges(),e.addRange(At)),gt&&e.anchorNode==null?e.addRange(gt):O&&this.startGracePeriod()),this.rememberSelection()},sn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},sn.prototype.showMultipleSelections=function(e){l(this.cm.display.cursorDiv,e.cursors),l(this.cm.display.selectionDiv,e.selection)},sn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},sn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},sn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},sn.prototype.blur=function(){this.div.blur()},sn.prototype.getField=function(){return this.div},sn.prototype.supportsTouch=function(){return!0},sn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():di(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},sn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},sn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(s&&n&&this.cm.display.gutterSpecs.length&&hu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var _=Ki(t,e.anchorNode,e.anchorOffset),y=Ki(t,e.focusNode,e.focusOffset);_&&y&&di(t,function(){$n(t.doc,qi(_,y),ge),(_.bad||y.bad)&&(t.curOp.selectionChanged=!0)})},sn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,_=e.doc.sel.primary(),y=_.from(),R=_.to();if(y.ch==0&&y.line>e.firstLine()&&(y=fe(y.line-1,Kt(e.doc,y.line-1).length)),R.ch==Kt(e.doc,R.line).text.length&&R.line<e.lastLine()&&(R=fe(R.line+1,0)),y.line<t.viewFrom||R.line>t.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);At<Gt&&Nt.charCodeAt(At)==jt.charCodeAt(At);)++At;for(var Zt=$e(Je),Vt=$e(gt),ir=Math.min(Zt.length-(Je.length==1?At:0),Vt.length-(gt.length==1?At:0));Ft<ir&&Zt.charCodeAt(Zt.length-Ft-1)==Vt.charCodeAt(Vt.length-Ft-1);)++Ft;if(Je.length==1&>.length==1&&ie==y.line)for(;At&&At>y.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<At.childNodes.length;Vt++)gt(At.childNodes[Vt]);/^(pre|p)$/i.test(At.nodeName)&&(de=!0),Zt&&(ie=!0)}else At.nodeType==3&&Je(At.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(gt(t),t==_);)t=t.nextSibling,de=!1;return Y}function Ki(e,t,_){var y;if(t==e.display.lineDiv){if(y=e.display.lineDiv.childNodes[_],!y)return Cn(e.clipPos(fe(e.display.viewTo-1)),!0);t=null,_=0}else for(y=t;;y=y.parentNode){if(!y||y==e.display.lineDiv)return null;if(y.parentNode&&y.parentNode==e.display.lineDiv)break}for(var R=0;R<e.display.view.length;R++){var Y=e.display.view[R];if(Y.node==y)return oa(Y,t,_)}}function oa(e,t,_){var y=e.text.firstChild,R=!1;if(!t||!m(y,t))return Cn(fe(pr(e.line),0),!0);if(t==y&&(R=!0,t=y.childNodes[_],_=0,!t)){var Y=e.rest?$e(e.rest):e.line;return Cn(fe(pr(Y),Y.text.length),R)}var ie=t.nodeType==3?t:null,ue=t;for(!ie&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ie=t.firstChild,_&&(_=ie.nodeValue.length));ue.parentNode!=y;)ue=ue.parentNode;var de=e.measure,ve=de.maps;function Ve(jt,Gt,Zt){for(var Vt=-1;Vt<(ve?ve.length:0);Vt++)for(var ir=Vt<0?de.map:ve[Vt],_r=0;_r<ir.length;_r+=3){var fr=ir[_r+2];if(fr==jt||fr==Gt){var kr=pr(Vt<0?e.line:e.rest[Vt]),yn=ir[_r]+Zt;return(Zt<0||fr!=jt)&&(yn=ir[_r+(Zt?1:0)]),fe(kr,yn)}}}var Je=Ve(ie,ue,_);if(Je)return Cn(Je,R);for(var gt=ue.nextSibling,At=ie?ie.nodeValue.length-_:0;gt;gt=gt.nextSibling){if(Je=Ve(gt,gt.firstChild,0),Je)return Cn(fe(Je.line,Je.ch-At),R);At+=gt.textContent.length}for(var Ft=ue.previousSibling,Nt=_;Ft;Ft=Ft.previousSibling){if(Je=Ve(Ft,Ft.firstChild,-1),Je)return Cn(fe(Je.line,Je.ch+Nt),R);Nt+=Ft.textContent.length}}var dn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};dn.prototype.init=function(e){var t=this,_=this,y=this.cm;this.createField(e);var R=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(R.style.width="0px"),Ne(R,"input",function(){I&&v>=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);ie<ue&&y.charCodeAt(ie)==R.charCodeAt(ie);)++ie;return di(t,function(){$s(t,R.slice(ie),y.length-ie,null,e.composing?"*compose":null),R.length>1e3||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;g<h;g+=1){var m;C.push(T.createElement("span",{key:g,className:n()(f,(m={},Object(q.a)(m,"".concat(f,"-start"),r[g+1]),Object(q.a)(m,"".concat(f,"-end"),l[g+1]),Object(q.a)(m,"".concat(f,"-end-first-level"),!g&&l[0]),m))}))}return T.createElement("span",{"aria-hidden":"true",className:"".concat(b,"-indent")},C)},i=o,d=G("815F"),s="open",A="close",a="---",p=function(x){Object(I.a)(b,x);var L=Object(v.a)(b);function b(){var h;return Object(j.a)(this,b),h=L.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(r){var l=h.props.context.onNodeClick;l(r,Object(d.b)(h.props)),h.isSelectable()?h.onSelect(r):h.onCheck(r)},h.onSelectorDoubleClick=function(r){var l=h.props.context.onNodeDoubleClick;l(r,Object(d.b)(h.props))},h.onSelect=function(r){if(h.isDisabled())return;var l=h.props.context.onNodeSelect;r.preventDefault(),l(r,Object(d.b)(h.props))},h.onCheck=function(r){if(h.isDisabled())return;var l=h.props,f=l.disableCheckbox,C=l.checked,g=h.props.context.onNodeCheck;if(!h.isCheckable()||f)return;r.preventDefault();var m=!C;g(r,Object(d.b)(h.props),m)},h.onMouseEnter=function(r){var l=h.props.context.onNodeMouseEnter;l(r,Object(d.b)(h.props))},h.onMouseLeave=function(r){var l=h.props.context.onNodeMouseLeave;l(r,Object(d.b)(h.props))},h.onContextMenu=function(r){var l=h.props.context.onNodeContextMenu;l(r,Object(d.b)(h.props))},h.onDragStart=function(r){var l=h.props.context.onNodeDragStart;r.stopPropagation(),h.setState({dragNodeHighlight:!0}),l(r,Object(B.a)(h));try{r.dataTransfer.setData("text/plain","")}catch(f){}},h.onDragEnter=function(r){var l=h.props.context.onNodeDragEnter;r.preventDefault(),r.stopPropagation(),l(r,Object(B.a)(h))},h.onDragOver=function(r){var l=h.props.context.onNodeDragOver;r.preventDefault(),r.stopPropagation(),l(r,Object(B.a)(h))},h.onDragLeave=function(r){var l=h.props.context.onNodeDragLeave;r.stopPropagation(),l(r,Object(B.a)(h))},h.onDragEnd=function(r){var l=h.props.context.onNodeDragEnd;r.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(r,Object(B.a)(h))},h.onDrop=function(r){var l=h.props.context.onNodeDrop;r.preventDefault(),r.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(r,Object(B.a)(h))},h.onExpand=function(r){var l=h.props.context.onNodeExpand;l(r,Object(d.b)(h.props))},h.setSelectHandle=function(r){h.selectHandle=r},h.getNodeState=function(){var r=h.props.expanded;return h.isLeaf()?null:r?s:A},h.hasChildren=function(){var r=h.props.eventKey,l=h.props.context.keyEntities,f=l[r]||{},C=f.children;return!!(C||[]).length},h.isLeaf=function(){var r=h.props,l=r.isLeaf,f=r.loaded,C=h.props.context.loadData,g=h.hasChildren();return l===!1?!1:l||!C&&!g||C&&f&&!g},h.isDisabled=function(){var r=h.props.disabled,l=h.props.context.disabled;return!!(l||r)},h.isCheckable=function(){var r=h.props.checkable,l=h.props.context.checkable;return!l||r===!1?!1:l},h.syncLoadData=function(r){var l=r.expanded,f=r.loading,C=r.loaded,g=h.props.context,m=g.loadData,F=g.onNodeLoad;if(f)return;m&&l&&!h.isLeaf()&&(!h.hasChildren()&&!C&&F(Object(d.b)(h.props)))},h.renderSwitcher=function(){var r=h.props,l=r.expanded,f=r.switcherIcon,C=h.props.context,g=C.prefixCls,m=C.switcherIcon,F=f||m;if(h.isLeaf())return T.createElement("span",{className:n()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},typeof F=="function"?F(Object(O.a)(Object(O.a)({},h.props),{},{isLeaf:!0})):F);var P=n()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(l?s:A));return T.createElement("span",{onClick:h.onExpand,className:P},typeof F=="function"?F(Object(O.a)(Object(O.a)({},h.props),{},{isLeaf:!1})):F)},h.renderCheckbox=function(){var r=h.props,l=r.checked,f=r.halfChecked,C=r.disableCheckbox,g=h.props.context.prefixCls,m=h.isDisabled(),F=h.isCheckable();if(!F)return null;var P=typeof F!="boolean"?F:null;return T.createElement("span",{className:n()("".concat(g,"-checkbox"),l&&"".concat(g,"-checkbox-checked"),!l&&f&&"".concat(g,"-checkbox-indeterminate"),(m||C)&&"".concat(g,"-checkbox-disabled")),onClick:h.onCheck},P)},h.renderIcon=function(){var r=h.props.loading,l=h.props.context.prefixCls;return T.createElement("span",{className:n()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(h.getNodeState()||"docu"),r&&"".concat(l,"-icon_loading"))})},h.renderSelector=function(){var r=h.state.dragNodeHighlight,l=h.props,f=l.title,C=l.selected,g=l.icon,m=l.loading,F=l.data,P=h.props.context,z=P.prefixCls,Z=P.showIcon,V=P.icon,M=P.draggable,J=P.loadData,X=P.titleRender,re=h.isDisabled(),se="".concat(z,"-node-content-wrapper"),_e;if(Z){var ge=g||V;_e=ge?T.createElement("span",{className:n()("".concat(z,"-iconEle"),"".concat(z,"-icon__customize"))},typeof ge=="function"?ge(h.props):ge):h.renderIcon()}else J&&m&&(_e=h.renderIcon());var we;typeof f=="function"?we=f(F):X?we=X(F):we=f;var Re=T.createElement("span",{className:"".concat(z,"-title")},we);return T.createElement("span",{ref:h.setSelectHandle,title:typeof f=="string"?f:"",className:n()("".concat(se),"".concat(se,"-").concat(h.getNodeState()||"normal"),!re&&(C||r)&&"".concat(z,"-node-selected"),!re&&M&&"draggable"),draggable:!re&&M||void 0,"aria-grabbed":!re&&M||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:M?h.onDragStart:void 0},_e,Re)},h}return Object(D.a)(b,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var r=this.props.selectable,l=this.props.context.selectable;return typeof r=="boolean"?r:l}},{key:"render",value:function(){var r,l=this.props,f=l.eventKey,C=l.className,g=l.style,m=l.dragOver,F=l.dragOverGapTop,P=l.dragOverGapBottom,z=l.isLeaf,Z=l.isStart,V=l.isEnd,M=l.expanded,J=l.selected,X=l.checked,re=l.halfChecked,se=l.loading,_e=l.domRef,ge=l.active,we=l.onMouseMove,Re=Object(Q.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),He=this.props.context,Se=He.prefixCls,Te=He.filterTreeNode,$e=He.draggable,bt=He.keyEntities,Ie=this.isDisabled(),ze=Object(c.f)(Re),at=bt[f]||{},Ae=at.level,ne=V[V.length-1];return T.createElement("div",Object.assign({ref:_e,className:n()(C,"".concat(Se,"-treenode"),(r={},Object(q.a)(r,"".concat(Se,"-treenode-disabled"),Ie),Object(q.a)(r,"".concat(Se,"-treenode-switcher-").concat(M?"open":"close"),!z),Object(q.a)(r,"".concat(Se,"-treenode-checkbox-checked"),X),Object(q.a)(r,"".concat(Se,"-treenode-checkbox-indeterminate"),re),Object(q.a)(r,"".concat(Se,"-treenode-selected"),J),Object(q.a)(r,"".concat(Se,"-treenode-loading"),se),Object(q.a)(r,"".concat(Se,"-treenode-active"),ge),Object(q.a)(r,"".concat(Se,"-treenode-leaf-last"),ne),Object(q.a)(r,"drag-over",!Ie&&m),Object(q.a)(r,"drag-over-gap-top",!Ie&&F),Object(q.a)(r,"drag-over-gap-bottom",!Ie&&P),Object(q.a)(r,"filter-node",Te&&Te(Object(d.b)(this.props))),r)),style:g,onDragEnter:$e?this.onDragEnter:void 0,onDragOver:$e?this.onDragOver:void 0,onDragLeave:$e?this.onDragLeave:void 0,onDrop:$e?this.onDrop:void 0,onDragEnd:$e?this.onDragEnd:void 0,onMouseMove:we},ze),T.createElement(i,{prefixCls:Se,level:Ae,isStart:Z,isEnd:V}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),b}(T.Component),w=function(L){return T.createElement(u.a.Consumer,null,function(b){return T.createElement(p,Object.assign({},L,{context:b}))})};w.displayName="TreeNode",w.defaultProps={title:a},w.isTreeNode=1;var S=pe.a=w},Xm8N:function(qe,pe,G){"use strict";var q=G("2qtc"),Q=G("kLXV"),O=G("miYZ"),j=G("tsqr"),D=G("9og8"),B=G("WmNS"),I=G.n(B),v=G("q1tI"),T=G.n(v),E=G("ErOA"),n=G("Ty5D"),u=G("9kvl"),c=function(i){var d=i.shixunHomeworks,s=i.dispatch,A=Object(n.i)();return T.a.createElement(Q.a,{centered:!0,title:"\u63D0\u793A",visible:d.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(D.a)(I.a.mark(function a(){var p,w,S,x;return I.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,Object(E.a)("/api/myshixuns/".concat(d.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:A.coursesId}});case 2:p=b.sent,p.shixun_identifier&&(j.b.success("\u64CD\u4F5C\u6210\u529F"),s({type:"shixunHomeworks/setActionTabs",payload:{}}),x=p==null||((w=p.new_works)===null||w===void 0||((S=w.find(function(h){return"".concat(h.homework_common_id)===A.categoryId}))===null||S===void 0))?void 0:S.id,u.d.replace("/classrooms/".concat(A.coursesId,"/shixun_homework/").concat(A.categoryId,"/").concat(x,"/comment")));case 4:case"end":return b.stop()}},a)})),onCancel:function(){s({type:"shixunHomeworks/setActionTabs",payload:{}})}},T.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),T.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};pe.a=Object(u.a)(function(o){var i=o.shixunHomeworks;return{shixunHomeworks:i}})(c)},Xmg4:function(qe,pe,G){var q=G("bYtY"),Q=G("LPTA"),O=Q.devicePixelRatio,j=G("K2GJ"),D=G("3C/r");function B(){return!1}function I(E,n,u){var c=q.createCanvas(),o=n.getWidth(),i=n.getHeight(),d=c.style;return d&&(d.position="absolute",d.left=0,d.top=0,d.width=o+"px",d.height=i+"px",c.setAttribute("data-zr-dom-id",E)),c.width=o*u,c.height=i*u,c}var v=function(E,n,u){var c;u=u||O,typeof E=="string"?c=I(E,n,u):q.isObject(E)&&(c=E,E=c.id),this.id=E,this.dom=c;var o=c.style;o&&(c.onselectstart=B,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=n,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=u};v.prototype={constructor:v,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var E=this.dpr;this.domBack=I("back-"+this.id,this.painter,E),this.ctxBack=this.domBack.getContext("2d"),E!==1&&this.ctxBack.scale(E,E)},resize:function(E,n){var u=this.dpr,c=this.dom,o=c.style,i=this.domBack;o&&(o.width=E+"px",o.height=n+"px"),c.width=E*u,c.height=n*u,i&&(i.width=E*u,i.height=n*u,u!==1&&this.ctxBack.scale(u,u))},clear:function(E,n){var u=this.dom,c=this.ctx,o=u.width,i=u.height,n=n||this.clearColor,d=this.motionBlur&&!E,s=this.lastFrameAlpha,A=this.dpr;if(d&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(u,0,0,o/A,i/A)),c.clearRect(0,0,o,i),n&&n!=="transparent"){var a;n.colorStops?(a=n.__canvasGradient||j.getGradient(c,n,{x:0,y:0,width:o,height:i}),n.__canvasGradient=a):n.image&&(a=D.prototype.getCanvasPattern.call(n,c)),c.save(),c.fillStyle=a||n,c.fillRect(0,0,o,i),c.restore()}if(d){var p=this.domBack;c.save(),c.globalAlpha=s,c.drawImage(p,0,0,o,i),c.restore()}}};var T=v;qe.exports=T},Xnb7:function(qe,pe,G){var q=G("1RvN"),Q=new q(50);function O(I){if(typeof I=="string"){var v=Q.get(I);return v&&v.image}else return I}function j(I,v,T,E,n){if(I)if(typeof I=="string"){if(v&&v.__zrImageSrc===I||!T)return v;var u=Q.get(I),c={hostEl:T,cb:E,cbPayload:n};return u?(v=u.image,!B(v)&&u.pending.push(c)):(v=new Image,v.onload=v.onerror=D,Q.put(I,v.__cachedImgObj={image:v,pending:[c]}),v.src=v.__zrImageSrc=I),v}else return I;else return v}function D(){var I=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var v=0;v<I.pending.length;v++){var T=I.pending[v],E=T.cb;E&&E(this,T.cbPayload),T.hostEl.dirty()}I.pending.length=0}function B(I){return I&&I.width&&I.height}pe.findExistImage=O,pe.createOrUpdateImage=j,pe.isImageReady=B},Y1PL:function(qe,pe,G){"use strict";G.r(pe),G.d(pe,"ResizableTextArea",function(){return re});var q=G("wx14"),Q=G("1OyB"),O=G("vuIU"),j=G("Ji7U"),D=G("LK+K"),B=G("q1tI"),I=G("VTBJ"),v=G("rePB"),T=G("Zm9Q"),E=G("Kwbf"),n=G("c+Xe"),u=G("m+aA"),c=G("bdgK"),o=new Map;function i(ge){ge.forEach(function(we){var Re,He=we.target;(Re=o.get(He))===null||Re===void 0||Re.forEach(function(Se){return Se(He)})})}var d=new c.default(i),s=null,A=null;function a(ge,we){o.has(ge)||(o.set(ge,new Set),d.observe(ge)),o.get(ge).add(we)}function p(ge,we){o.has(ge)&&(o.get(ge).delete(we),o.get(ge).size||(d.unobserve(ge),o.delete(ge)))}var w=function(ge){Object(j.a)(Re,ge);var we=Object(D.a)(Re);function Re(){return Object(Q.a)(this,Re),we.apply(this,arguments)}return Object(O.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(B.Component),S=B.createContext(null);function x(ge){var we=ge.children,Re=ge.onBatchResize,He=B.useRef(0),Se=B.useRef([]),Te=B.useContext(S),$e=B.useCallback(function(bt,Ie,ze){He.current+=1;var at=He.current;Se.current.push({size:bt,element:Ie,data:ze}),Promise.resolve().then(function(){at===He.current&&(Re==null||Re(Se.current),Se.current=[])}),Te==null||Te(bt,Ie,ze)},[Re,Te]);return B.createElement(S.Provider,{value:$e},we)}function L(ge){var we=ge.children,Re=ge.disabled,He=B.useRef(null),Se=B.useRef(null),Te=B.useContext(S),$e=B.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),bt=B.isValidElement(we)&&Object(n.c)(we),Ie=bt?we.ref:null,ze=B.useMemo(function(){return Object(n.a)(Ie,He)},[Ie,He]),at=B.useRef(ge);at.current=ge;var Ae=B.useCallback(function(ne){var ae=at.current,ce=ae.onResize,xe=ae.data,Fe=ne.getBoundingClientRect(),ke=Fe.width,ct=Fe.height,ft=ne.offsetWidth,yt=ne.offsetHeight,Et=Math.floor(ke),Ot=Math.floor(ct);if($e.current.width!==Et||$e.current.height!==Ot||$e.current.offsetWidth!==ft||$e.current.offsetHeight!==yt){var Mt={width:Et,height:Ot,offsetWidth:ft,offsetHeight:yt};$e.current=Mt;var Qe=ft===Math.round(ke)?ke:ft,Ne=yt===Math.round(ct)?ct:yt,lt=Object(I.a)(Object(I.a)({},Mt),{},{offsetWidth:Qe,offsetHeight:Ne});Te==null||Te(lt,ne,xe),ce&&Promise.resolve().then(function(){ce(lt,ne)})}},[]);return B.useEffect(function(){var ne=Object(u.a)(He.current)||Object(u.a)(Se.current);return ne&&!Re&&a(ne,Ae),function(){return p(ne,Ae)}},[He.current,Re]),B.createElement(w,{ref:Se},bt?B.cloneElement(we,{ref:ze}):we)}var b="rc-observer-key";function h(ge){var we=ge.children,Re=Object(T.a)(we);return Re.map(function(He,Se){var Te=(He==null?void 0:He.key)||"".concat(b,"-").concat(Se);return B.createElement(L,Object(q.a)({},ge,{key:Te}),He)})}h.Collection=x;var r=h,l=G("bT9E"),f=G("TSYQ"),C=G.n(f),g=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,m=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],F={},P;function z(ge){var we=arguments.length>1&&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;E<I;E++)T+=Q(D[E-1],D[E]);var n=T/2;n=n<I?I:n;for(var E=0;E<n;E++){var u=E/(n-1)*(B?I:I-1),c=Math.floor(u),o=u-c,i,d=D[c%I],s,A;B?(i=D[(c-1+I)%I],s=D[(c+1)%I],A=D[(c+2)%I]):(i=D[c===0?c:c-1],s=D[c>I-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 <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"#include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},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;J<V.length;J++){var X=m[V[J]];if(X)return X}return M[0]}return m[M]||M}var P=null,z=pe.b=function(V){var M=V.width,J=M===void 0?"100%":M,X=V.height,re=X===void 0?"100%":X,se=V.value,_e=V.language,ge=_e===void 0?"javascript":_e,we=V.style,Re=we===void 0?{}:we,He=V.options,Se=He===void 0?{}:He,Te=V.overrideServices,$e=Te===void 0?{}:Te,bt=V.theme,Ie=bt===void 0?"vs-dark":bt,ze=V.onEditBlur,at=V.onSave,Ae=V.autoHeight,ne=Ae===void 0?!1:Ae,ae=V.forbidCopy,ce=ae===void 0?!1:ae,xe=V.onChange,Fe=xe===void 0?C:xe,ke=V.editorDidMount,ct=ke===void 0?C:ke,ft=V.onFocus,yt=ft===void 0?C:ft,Et=V.filename,Ot=Et===void 0?"educoder.txt":Et,Mt=V.errorLine,Qe=V.errorContent,Ne=Qe===void 0?"":Qe,lt=Object(B.a)(V,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),dt=Object(I.useRef)(),Ye=Object(I.useRef)({}),st=Object(I.useRef)(),je=Object(I.useRef)(!1),Le=Object(I.useRef)(),Me=Object(I.useState)(!1),me=Object(D.a)(Me,2),ye=me[0],Ee=me[1];function Oe(){var Xe;return dt.current&&(Xe=new T.default(function(mt){var Pt=Object(j.a)(mt),Rt;try{for(Pt.s();!(Rt=Pt.n()).done;){var Qt=Rt.value;(Qt.target.offsetHeight>0||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(mt<re?re:mt)}else xt(re)};function It(Xe){var mt=document.createEvent("MouseEvents");mt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Xe.dispatchEvent(mt)}function St(Xe,mt){var Pt=window.URL||window.webkitURL||window,Rt=new Blob([mt]),Qt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qt.href=Pt.createObjectURL(Rt),Qt.download=Xe,It(Qt)}Object(I.useEffect)(function(){kt()},[kt]),Object(I.useEffect)(function(){dt.current&&!ye&&G.e(27).then(G.t.bind(null,"M/lh",7)).then(function(Xe){try{P=Xe,Ye.current.instance=P.editor.create(dt.current,{value:se,language:F(ge),theme:Ie,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},$e);var mt=Ye.current.instance;if(ct(mt,P),setTimeout(function(){kt(),Ye.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){St(Ot||"educoder.txt",mt.getValue())}})},500),Ye.current.subscription=mt.onDidChangeModelContent(function(Rt){je.current?clearTimeout(Le.current):(kt(),Fe(mt.getValue(),Rt)),Le.current=setTimeout(function(){je.current=!1},500)}),window.Monaco||b(P),ce&&(mt.addCommand(P.KeyMod.CtrlCmd|P.KeyMod.Shift|P.KeyCode.KEY_V,function(){return De(),null}),mt.addCommand(P.KeyMod.CtrlCmd|P.KeyCode.KEY_C,function(){return De(),null})),window.Monaco=P,ze&&mt.onDidBlurEditorWidget(function(){ze(mt.getValue())}),yt&&mt.onDidFocusEditorText(function(){yt(mt.getValue())}),ce){mt.addCommand(P.KeyMod.CtrlCmd|P.KeyCode.KEY_V,function(){return De(),null}),mt.onDidPaste(function(Rt){Ye.current.pastePos=Rt});try{window.addEventListener("paste",ht)}catch(Rt){}}var Pt=Oe();return Ee(!0),function(){var Rt=Ye.current.instance;Rt.dispose();var Qt=Rt.getModel();Qt&&Qt.dispose(),Ye.current.subscription&&Ye.current.subscription.dispose(),ce&&window.removeEventListener("paste",ht),Pt.unobserve(dt.current)}}catch(Rt){}})},[]),Object(I.useEffect)(function(){var Xe=Ye.current.instance;if(Xe&&ye)return document.addEventListener("keydown",Tt,!1),function(){document.removeEventListener("keydown",Tt)}},[at,ye]),Object(I.useEffect)(function(){var Xe=Ye.current.instance;if(Xe&&ye){var mt=F(ge);P.editor.setModelLanguage(Xe.getModel(),mt),console.log("language:",ge,Xe.getModel(),mt)}},[ge,ye]),Object(I.useEffect)(function(){var Xe=Ye.current.instance;Xe&&ye&&P.editor.setTheme(Ie)},[Ie,ye]),Object(I.useEffect)(function(){var Xe=Ye.current.instance;Xe&&ye&&(Xe.updateOptions(Object(q.a)({},Se)),setTimeout(function(){Xe.getModel().updateOptions(Object(q.a)({},Se))},200))},[JSON.stringify(Se),ye]),Object(I.useEffect)(function(){var Xe=Ye.current.instance;Xe&&ye&&Xe.layout()},[J,re,ye]);var ut=Object(I.useState)(f(J)),nt=Object(D.a)(ut,2),tt=nt[0],Ce=nt[1],Pe=Object(I.useState)(f(re)),pt=Object(D.a)(Pe,2),it=pt[0],xt=pt[1],_t=Object(q.a)(Object(q.a)({},Re),{},{width:tt,height:it});return v.a.createElement("div",{className:"my-monaco-editor",ref:dt,style:_t})};function Z(V){var M=V.width,J=M===void 0?"100%":M,X=V.height,re=X===void 0?"100%":X,se=V.original,_e=V.modified,ge=V.language,we=V.options,Re=we===void 0?{}:we,He=Object(I.useRef)(),Se=Object(I.useState)(null),Te=Object(D.a)(Se,2),$e=Te[0],bt=Te[1];function Ie(ne){var ae;return He.current&&(ae=new T.default(function(ce){var xe=Object(j.a)(ce),Fe;try{for(xe.s();!(Fe=xe.n()).done;){var ke=Fe.value;(ke.target.offsetHeight>0||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.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var c=getComputedStyle(n,null);return Q(c.overflowY,u)||Q(c.overflowX,u)||function(o){var i=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(s){return null}}(o);return!!i&&(i.clientHeight<o.scrollHeight||i.clientWidth<o.scrollWidth)}(n)}return!1}function j(n,u,c,o,i,d,s,A){return d<n&&s>u||d>n&&s<u?0:d<=n&&A<=c||s>=u&&A>=c?d-n-o:s>u&&A<c||d<n&&A>c?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<w.length;V++){var M=w[V],J=M.getBoundingClientRect(),X=J.height,re=J.width,se=J.top,_e=J.right,ge=J.bottom,we=J.left;if(o==="if-needed"&&C>=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||u<D-c&&u<I-c&&u<T-c||n>j+c&&n>B+c&&n>v+c||n<j-c&&n<B-c&&n<v-c)return!1;var o=Q(j,D,B,I,v,T,n,u,null);return o<=c/2}pe.containStroke=O},aX58:function(qe,pe,G){var q=G("3gBT"),Q=G("ItGF"),O=G("bYtY"),j=G("0s+r"),D=G("r6Bn"),B=G("7SHv"),I=G("MKOG"),v=G("zarK");/*!
|
|
* ZRender, a high performance 2d drawing library.
|
|
*
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
* All rights reserved.
|
|
*
|
|
* LICENSE
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
*/var T=!Q.canvasSupported,E={canvas:B},n={},u="4.3.1";function c(a,p){var w=new A(q(),a,p);return n[w.id]=w,w}function o(a){if(a)a.dispose();else{for(var p in n)n.hasOwnProperty(p)&&n[p].dispose();n={}}return this}function i(a){return n[a]}function d(a,p){E[a]=p}function s(a){delete n[a]}var A=function(a,p,w){w=w||{},this.dom=p,this.id=a;var S=this,x=new D,L=w.renderer;if(T){if(!E.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");L="vml"}else(!L||!E[L])&&(L="canvas");var b=new E[L](p,x,w,a);this.storage=x,this.painter=b;var h=!Q.node&&!Q.worker?new v(b.getViewportRoot(),b.root):null;this.handler=new j(x,b,h,b.root),this.animation=new I({stage:{update:O.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var r=x.delFromStorage,l=x.addToStorage;x.delFromStorage=function(f){r.call(x,f),f&&f.removeSelfFromZr(S)},x.addToStorage=function(f){l.call(x,f),f.addSelfToZr(S)}};A.prototype={constructor:A,getId:function(){return this.id},add:function(a){this.storage.addRoot(a),this._needsRefresh=!0},remove:function(a){this.storage.delRoot(a),this._needsRefresh=!0},configLayer:function(a,p){this.painter.configLayer&&this.painter.configLayer(a,p),this._needsRefresh=!0},setBackgroundColor:function(a){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(a),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var a;this._needsRefresh&&(a=!0,this.refreshImmediately()),this._needsRefreshHover&&(a=!0,this.refreshHoverImmediately()),a&&this.trigger("rendered")},addHover:function(a,p){if(this.painter.addHover){var w=this.painter.addHover(a,p);return this.refreshHover(),w}},removeHover:function(a){this.painter.removeHover&&(this.painter.removeHover(a),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(a){a=a||{},this.painter.resize(a.width,a.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(a,p){return this.painter.pathToImage(a,p)},setCursorStyle:function(a){this.handler.setCursorStyle(a)},findHover:function(a,p){return this.handler.findHover(a,p)},on:function(a,p,w){this.handler.on(a,p,w)},off:function(a,p){this.handler.off(a,p)},trigger:function(a,p){this.handler.trigger(a,p)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,s(this.id)}},pe.version=u,pe.init=c,pe.dispose=o,pe.getInstance=i,pe.registerPainter=d},bT9E:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return Q});var q=G("VTBJ");function Q(O,j){var D=Object(q.a)({},O);return Array.isArray(j)&&j.forEach(function(B){delete D[B]}),D}},bYtY:function(qe,pe){var G={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},q={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Q=Object.prototype.toString,O=Array.prototype,j=O.forEach,D=O.filter,B=O.slice,I=O.map,v=O.reduce,T={};function E(Ie,ze){Ie==="createCanvas"&&(s=null),T[Ie]=ze}function n(Ie){if(Ie==null||typeof Ie!="object")return Ie;var ze=Ie,at=Q.call(Ie);if(at==="[object Array]"){if(!He(Ie)){ze=[];for(var Ae=0,ne=Ie.length;Ae<ne;Ae++)ze[Ae]=n(Ie[Ae])}}else if(q[at]){if(!He(Ie)){var ae=Ie.constructor;if(Ie.constructor.from)ze=ae.from(Ie);else{ze=new ae(Ie.length);for(var Ae=0,ne=Ie.length;Ae<ne;Ae++)ze[Ae]=n(Ie[Ae])}}}else if(!G[at]&&!He(Ie)&&!Z(Ie)){ze={};for(var ce in Ie)Ie.hasOwnProperty(ce)&&(ze[ce]=n(Ie[ce]))}return ze}function u(Ie,ze,at){if(!F(ze)||!F(Ie))return at?n(ze):Ie;for(var Ae in ze)if(ze.hasOwnProperty(Ae)){var ne=Ie[Ae],ae=ze[Ae];F(ae)&&F(ne)&&!C(ae)&&!C(ne)&&!Z(ae)&&!Z(ne)&&!P(ae)&&!P(ne)&&!He(ae)&&!He(ne)?u(ne,ae,at):(at||!(Ae in Ie))&&(Ie[Ae]=n(ze[Ae],!0))}return Ie}function c(Ie,ze){for(var at=Ie[0],Ae=1,ne=Ie.length;Ae<ne;Ae++)at=u(at,Ie[Ae],ze);return at}function o(Ie,ze){for(var at in ze)ze.hasOwnProperty(at)&&(Ie[at]=ze[at]);return Ie}function i(Ie,ze,at){for(var Ae in ze)ze.hasOwnProperty(Ae)&&(at?ze[Ae]!=null:Ie[Ae]==null)&&(Ie[Ae]=ze[Ae]);return Ie}var d=function(){return T.createCanvas()};T.createCanvas=function(){return document.createElement("canvas")};var s;function A(){return s||(s=d().getContext("2d")),s}function a(Ie,ze){if(Ie){if(Ie.indexOf)return Ie.indexOf(ze);for(var at=0,Ae=Ie.length;at<Ae;at++)if(Ie[at]===ze)return at}return-1}function p(Ie,ze){var at=Ie.prototype;function Ae(){}Ae.prototype=ze.prototype,Ie.prototype=new Ae;for(var ne in at)at.hasOwnProperty(ne)&&(Ie.prototype[ne]=at[ne]);Ie.prototype.constructor=Ie,Ie.superClass=ze}function w(Ie,ze,at){Ie="prototype"in Ie?Ie.prototype:Ie,ze="prototype"in ze?ze.prototype:ze,i(Ie,ze,at)}function S(Ie){return Ie?typeof Ie=="string"?!1:typeof Ie.length=="number":void 0}function x(Ie,ze,at){if(!(Ie&&ze))return;if(Ie.forEach&&Ie.forEach===j)Ie.forEach(ze,at);else if(Ie.length===+Ie.length)for(var Ae=0,ne=Ie.length;Ae<ne;Ae++)ze.call(at,Ie[Ae],Ae,Ie);else for(var ae in Ie)Ie.hasOwnProperty(ae)&&ze.call(at,Ie[ae],ae,Ie)}function L(Ie,ze,at){if(!(Ie&&ze))return;if(Ie.map&&Ie.map===I)return Ie.map(ze,at);for(var Ae=[],ne=0,ae=Ie.length;ne<ae;ne++)Ae.push(ze.call(at,Ie[ne],ne,Ie));return Ae}function b(Ie,ze,at,Ae){if(!(Ie&&ze))return;if(Ie.reduce&&Ie.reduce===v)return Ie.reduce(ze,at,Ae);for(var ne=0,ae=Ie.length;ne<ae;ne++)at=ze.call(Ae,at,Ie[ne],ne,Ie);return at}function h(Ie,ze,at){if(!(Ie&&ze))return;if(Ie.filter&&Ie.filter===D)return Ie.filter(ze,at);for(var Ae=[],ne=0,ae=Ie.length;ne<ae;ne++)ze.call(at,Ie[ne],ne,Ie)&&Ae.push(Ie[ne]);return Ae}function r(Ie,ze,at){if(!(Ie&&ze))return;for(var Ae=0,ne=Ie.length;Ae<ne;Ae++)if(ze.call(at,Ie[Ae],Ae,Ie))return Ie[Ae]}function l(Ie,ze){var at=B.call(arguments,2);return function(){return Ie.apply(ze,at.concat(B.call(arguments)))}}function f(Ie){var ze=B.call(arguments,1);return function(){return Ie.apply(this,ze.concat(B.call(arguments)))}}function C(Ie){return Q.call(Ie)==="[object Array]"}function g(Ie){return typeof Ie=="function"}function m(Ie){return Q.call(Ie)==="[object String]"}function F(Ie){var ze=typeof Ie;return ze==="function"||!!Ie&&ze==="object"}function P(Ie){return!!G[Q.call(Ie)]}function z(Ie){return!!q[Q.call(Ie)]}function Z(Ie){return typeof Ie=="object"&&typeof Ie.nodeType=="number"&&typeof Ie.ownerDocument=="object"}function V(Ie){return Ie!==Ie}function M(Ie){for(var ze=0,at=arguments.length;ze<at;ze++)if(arguments[ze]!=null)return arguments[ze]}function J(Ie,ze){return Ie!=null?Ie:ze}function X(Ie,ze,at){return Ie!=null?Ie:ze!=null?ze:at}function re(){return Function.call.apply(B,arguments)}function se(Ie){if(typeof Ie=="number")return[Ie,Ie,Ie,Ie];var ze=Ie.length;return ze===2?[Ie[0],Ie[1],Ie[0],Ie[1]]:ze===3?[Ie[0],Ie[1],Ie[2],Ie[1]]:Ie}function _e(Ie,ze){if(!Ie)throw new Error(ze)}function ge(Ie){return Ie==null?null:typeof Ie.trim=="function"?Ie.trim():Ie.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var we="__ec_primitive__";function Re(Ie){Ie[we]=!0}function He(Ie){return Ie[we]}function Se(Ie){var ze=C(Ie);this.data={};var at=this;Ie instanceof Se?Ie.each(Ae):Ie&&x(Ie,Ae);function Ae(ne,ae){ze?at.set(ne,ae):at.set(ae,ne)}}Se.prototype={constructor:Se,get:function(Ie){return this.data.hasOwnProperty(Ie)?this.data[Ie]:null},set:function(Ie,ze){return this.data[Ie]=ze},each:function(Ie,ze){ze!==void 0&&(Ie=l(Ie,ze));for(var at in this.data)this.data.hasOwnProperty(at)&&Ie(this.data[at],at)},removeKey:function(Ie){delete this.data[Ie]}};function Te(Ie){return new Se(Ie)}function $e(Ie,ze){for(var at=new Ie.constructor(Ie.length+ze.length),Ae=0;Ae<Ie.length;Ae++)at[Ae]=Ie[Ae];var ne=Ie.length;for(Ae=0;Ae<ze.length;Ae++)at[Ae+ne]=ze[Ae];return at}function bt(){}pe.$override=E,pe.clone=n,pe.merge=u,pe.mergeAll=c,pe.extend=o,pe.defaults=i,pe.createCanvas=d,pe.getContext=A,pe.indexOf=a,pe.inherits=p,pe.mixin=w,pe.isArrayLike=S,pe.each=x,pe.map=L,pe.reduce=b,pe.filter=h,pe.find=r,pe.bind=l,pe.curry=f,pe.isArray=C,pe.isFunction=g,pe.isString=m,pe.isObject=F,pe.isBuiltInObject=P,pe.isTypedArray=z,pe.isDom=Z,pe.eqNaN=V,pe.retrieve=M,pe.retrieve2=J,pe.retrieve3=X,pe.slice=re,pe.normalizeCssArray=se,pe.assert=_e,pe.trim=ge,pe.setAsPrimitive=Re,pe.isPrimitive=He,pe.createHashMap=Te,pe.concatArray=$e,pe.noop=bt},biw7:function(qe,pe,G){"use strict";var q=G("q1tI"),Q=G.n(q),O=q.createContext(null);pe.a=O},c5Ni:function(qe,pe,G){},chpo:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0;var q=1,Q=function(){return"".concat(q++)};pe.default=Q},crp1:function(qe,pe,G){"use strict";G.d(pe,"b",function(){return Pe}),G.d(pe,"a",function(){return _t});var q={},Q=function(fe,be,Ue,rt,et){var Dt=q[be]||(q[be]=URL.createObjectURL(new Blob([fe],{type:"text/javascript"}))),ee=new Worker(Dt);return ee.onerror=function(U){return et(U.error,null)},ee.onmessage=function(U){return et(null,U.data)},ee.postMessage(Ue,rt),ee},O=Uint8Array,j=Uint16Array,D=Uint32Array,B=new O([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),I=new O([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),v=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),T=function(fe,be){for(var Ue=new j(31),rt=0;rt<31;++rt)Ue[rt]=be+=1<<fe[rt-1];for(var et=new D(Ue[30]),rt=1;rt<30;++rt)for(var Dt=Ue[rt];Dt<Ue[rt+1];++Dt)et[Dt]=Dt-Ue[rt]<<5|rt;return[Ue,et]},E=T(B,2),n=E[0],u=E[1];n[28]=258,u[258]=28;for(var c=T(I,0),o=c[0],i=c[1],d=new j(32768),s=0;s<32768;++s){var A=(s&43690)>>>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<rt;++et)++Dt[fe[et]-1];var ee=new j(be);for(et=0;et<be;++et)ee[et]=ee[et-1]+Dt[et-1]<<1;var U;if(Ue){U=new j(1<<be);var N=15-be;for(et=0;et<rt;++et)if(fe[et])for(var $=et<<4|fe[et],le=be-fe[et],te=ee[fe[et]-1]++<<le,Ke=te|(1<<le)-1;te<=Ke;++te)U[d[te]>>>N]=$}else for(U=new j(rt),et=0;et<rt;++et)U[et]=d[ee[fe[et]-1]++]>>>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;Ue<fe.length;++Ue)fe[Ue]>be&&(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;cr<Ar;++cr)Lr[v[cr]]=r(fe,N+cr*3,7);N+=Ar*3;var Dr=h(Lr),Pr=(1<<Dr)-1;if(!Dt&&N+Br*(Dr+7)>Ut)break;for(var An=a(Lr,Dr,1),cr=0;cr<Br;){var zr=An[r(fe,N,Pr)];N+=zr&15;var wt=zr>>>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<<Ke)-1,cn=(1<<Ct)-1,mn=Ke+Ct+18;Dt||N+mn<Ut;){var Jr=le[l(fe,N)&an],br=Jr>>>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<<tr)-1)+n[cr],N+=tr}var nr=te[l(fe,N)&cn],$t=nr>>>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<<tr)-1,N+=tr}if(N>Ut)throw"unexpected EOF";et&&ee($+131072);for(var vr=$+dr;$<vr;$+=4)be[$]=be[$-en],be[$+1]=be[$+1-en],be[$+2]=be[$+2-en],be[$+3]=be[$+3-en];$=vr}}Ue.l=le,Ue.p=N,Ue.b=$,le&&(U=1,Ue.m=Ke,Ue.d=te,Ue.n=Ct)}while(!U);return $==be.length?be:C(be,0,$)},m=function(fe,be,Ue){Ue<<=be&7;var rt=be/8>>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;rt<fe.length;++rt)fe[rt]&&Ue.push({s:rt,f:fe[rt]});var et=Ue.length,Dt=Ue.slice();if(!et)return[new O(0),0];if(et==1){var ee=new O(Ue[0].s+1);return ee[Ue[0].s]=1,[ee,1]}Ue.sort(function(Br,yr){return Br.f-yr.f}),Ue.push({s:-1,f:25001});var U=Ue[0],N=Ue[1],$=0,le=1,te=2;for(Ue[0]={s:-1,f:U.f+N.f,l:U,r:N};le!=et-1;)U=Ue[Ue[$].f<Ue[te].f?$++:te++],N=Ue[$!=le&&Ue[$].f<Ue[te].f?$++:te++],Ue[le++]={s:-1,f:U.f+N.f,l:U,r:N};for(var Ke=Dt[0].s,rt=1;rt<et;++rt)Dt[rt].s>Ke&&(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<<wt;for(Dt.sort(function(yr,Lr){return Ct[Lr.s]-Ct[yr.s]||yr.f-Lr.f});rt<et;++rt){var Xt=Dt[rt].s;if(Ct[Xt]>be)Ht+=Yt-(1<<Ut-Ct[Xt]),Ct[Xt]=be;else break}for(Ht>>>=wt;Ht>0;){var qt=Dt[rt].s;Ct[qt]<be?Ht-=1<<be-Ct[qt]++-1:++rt}for(;rt>=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<be.length;++rt)Ue+=fe[rt]*be[rt];return Ue},M=function(fe,be,Ue){var rt=Ue.length,et=f(be+2);fe[et]=rt&255,fe[et+1]=rt>>>8,fe[et+2]=fe[et]^255,fe[et+3]=fe[et+1]^255;for(var Dt=0;Dt<rt;++Dt)fe[et+Dt+4]=Ue[Dt];return(et+4+rt)*8},J=function(fe,be,Ue,rt,et,Dt,ee,U,N,$,le){m(be,le++,Ue),++et[256];for(var te=P(et,15),Ke=te[0],Ct=te[1],Ut=P(Dt,15),Ht=Ut[0],wt=Ut[1],Yt=Z(Ke),Xt=Yt[0],qt=Yt[1],Ar=Z(Ht),Br=Ar[0],yr=Ar[1],Lr=new j(19),cr=0;cr<Xt.length;++cr)Lr[Xt[cr]&31]++;for(var cr=0;cr<Br.length;++cr)Lr[Br[cr]&31]++;for(var Dr=P(Lr,7),Pr=Dr[0],An=Dr[1],zr=19;zr>4&&!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+($r<bn)),le+=2,$r<bn){en=a(Ke,Ct,0),an=Ke,cn=a(Ht,wt,0),mn=Ht;var br=a(Pr,An,0);m(be,le,qt-257),m(be,le+5,yr-1),m(be,le+10,zr-4),le+=14;for(var cr=0;cr<zr;++cr)m(be,le+3*cr,Pr[v[cr]]);le+=3*zr;for(var dr=[Xt,Br],tr=0;tr<2;++tr)for(var nr=dr[tr],cr=0;cr<nr.length;++cr){var $t=nr[cr]&31;m(be,le,br[$t]),le+=Pr[$t],$t>15&&(m(be,le,nr[cr]>>>5&127),le+=nr[cr]>>>12)}}else en=S,an=p,cn=L,mn=w;for(var cr=0;cr<U;++cr)if(rt[cr]>255){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<ee?$=M(N,$,fe.subarray(le,te)):(N[le]=Dt,$=M(N,$,fe.subarray(le,ee)))}else{for(var Ke=X[be-1],Ct=Ke>>>13,Ut=Ke&8191,Ht=(1<<Ue)-1,wt=new j(32768),Yt=new j(Ht+1),Xt=Math.ceil(Ue/3),qt=2*Xt,Ar=function(qr){return(fe[qr]^fe[qr+1]<<Xt^fe[qr+2]<<qt)&Ht},Br=new D(25e3),yr=new j(288),Lr=new j(32),cr=0,Dr=0,le=0,Pr=0,An=0,zr=0;le<ee;++le){var Jr=Ar(le),bn=le&32767,$r=Yt[Jr];if(wt[bn]=$r,Yt[Jr]=bn,An<=le){var en=ee-le;if((cr>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;an<mr;++an){var Er=le-dr+an+32768&32767,On=wt[Er],Gr=Er-On+32768&32767;Gr>xr&&(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<be.length;++rt)Ue=_e[Ue&255^be[rt]]^Ue>>>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<U;++ee)rt+=Ue[ee],et+=rt;rt%=65521,et%=65521}fe=rt,be=et},d:function(){return(fe>>>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<rt.length;++ee){var U=rt[ee],N=Dt[ee];if(typeof U=="function"){be+=";"+N+"=";var $=U.toString();if(U.prototype)if($.indexOf("[native code]")!=-1){var le=$.indexOf(" ",8)+1;be+=$.slice(le,$.indexOf("(",le))}else{be+=$;for(var te in U.prototype)be+=";"+N+".prototype."+te+"="+U.prototype[te].toString()}else be+=$}else Ue[N]=U}return[be,Ue]},Te=[],$e=function(fe){var be=[];for(var Ue in fe)(fe[Ue]instanceof O||fe[Ue]instanceof j||fe[Ue]instanceof D)&&be.push((fe[Ue]=new fe[Ue].constructor(fe[Ue])).buffer);return be},bt=function(fe,be,Ue,rt){var et;if(!Te[Ue]){for(var Dt="",ee={},U=fe.length-1,N=0;N<U;++N)et=Se(fe[N],Dt,ee),Dt=et[0],ee=et[1];Te[Ue]=Se(fe[U],Dt,ee)}var $=He({},Te[Ue][1]);return Q(Te[Ue][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+be.toString()+"}",Ue,$,$e($),rt)},Ie=function(){return[O,j,D,B,I,v,n,o,x,b,d,a,h,r,l,f,C,g,Oe,ce,xe]},ze=function(){return[O,j,D,B,I,v,u,i,S,p,L,w,d,X,re,a,m,F,P,z,Z,V,M,J,f,C,se,Re,Me,ce]},at=function(){return[Ot,Ne,Et,ge,_e]},Ae=function(){return[Mt,Qe]},ne=function(){return[lt,Et,we]},ae=function(){return[dt]},ce=function(fe){return postMessage(fe,[fe.buffer])},xe=function(fe){return fe&&fe.size&&new O(fe.size)},Fe=function(fe,be,Ue,rt,et,Dt){var ee=bt(Ue,rt,et,function(U,N){ee.terminate(),Dt(U,N)});return be.consume||(fe=new O(fe)),ee.postMessage([fe,be],[fe.buffer]),function(){ee.terminate()}},ke=function(fe){return fe.ondata=function(be,Ue){return postMessage([be,Ue],[be.buffer])},function(be){return fe.push(be.data[0],be.data[1])}},ct=function(fe,be,Ue,rt,et){var Dt,ee=bt(fe,rt,et,function(U,N){U?(ee.terminate(),be.ondata.call(be,U)):(N[1]&&ee.terminate(),be.ondata.call(be,U,N[0],N[1]))});ee.postMessage(Ue),be.push=function(U,N){if(Dt)throw"stream finished";if(!be.ondata)throw"no stream handler";ee.postMessage([U,Dt=N],[U.buffer])},be.terminate=function(){ee.terminate()}},ft=function(fe,be){return fe[be]|fe[be+1]<<8},yt=function(fe,be){return(fe[be]|fe[be+1]<<8|fe[be+2]<<16)+(fe[be+3]<<23)*2},Et=function(fe,be,Ue){for(;Ue;++be)fe[be]=Ue,Ue>>>=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;ee<Ue;++ee){if(et+5>rt.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<fe.length;){var et=fe[rt++];et<128||be?Ue+=String.fromCharCode(et):et<224?Ue+=String.fromCharCode((et&31)<<6|fe[rt++]&63):et<240?Ue+=String.fromCharCode((et&15)<<12|(fe[rt++]&63)<<6|fe[rt++]&63):(et=((et&15)<<18|(fe[rt++]&63)<<12|(fe[rt++]&63)<<6|fe[rt++]&63)-65536,Ue+=String.fromCharCode(55296|et>>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;Ht<le.length;++Ht)le[Ht]()},Ke=function(){var Ht=new O(U+22),wt=ee,Yt=U-ee;U=0;for(var Xt=0;Xt<N;++Xt){var qt=$[Xt];try{Kr(Ht,U,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,null,qt.t),Kr(Ht,ee,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,U,qt.t),ee+=46+qt.n.length,U+=30+qt.n.length+qt.d.length}catch(Ar){return Ue(Ar,null)}}Rr(Ht,ee,$.length,Yt,wt),Ue(null,Ht)};Dt||Ke();for(var Ct=function(Ht){var wt=et[Ht],Yt=rt[wt],Xt=Yt[0],qt=Yt[1],Ar=ge(),Br=Xt.length;Ar.p(Xt);var yr=Ir(wt),Lr=yr.length,cr=qt.level==0?0:8,Dr=function(Pr,An){if(Pr)te(),Ue(Pr,null);else{var zr=An.length;$[Ht]={t:cr,d:An,m:Br,c:Ar.d(),u:wt.length!=zr,n:yr,p:qt},ee+=30+Lr+zr,U+=76+2*Lr+zr,--Dt||Ke()}};if(yr.length>65535&&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;Ut<N;++Ut)Ct(Ut);return te}function Or(fe,be){be===void 0&&(be={});var Ue={},rt=[];Qt(fe,"",Ue,be);var et=0,Dt=0;for(var ee in Ue){var U=Ue[ee],N=U[0],$=U[1],le=$.level==0?0:8,te=Ir(ee),Ke=te.length;if(te.length>65535)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;qt<rt.length;++qt){var Ar=rt[qt];Kr(wt,Ar.o,Ar.c,Ar.d,Ar.m,Ar.n,Ar.u,Ar.p,null,Ar.t),Kr(wt,et,Ar.c,Ar.d,Ar.m,Ar.n,Ar.u,Ar.p,Ar.o,Ar.t),et+=46+Ar.n.length}return Rr(wt,et,rt.length,Xt,Yt),wt}function pn(fe,be){if(typeof be!="function")throw"no callback";for(var Ue=[],rt=function(){for(var Ke=0;Ke<Ue.length;++Ke)Ue[Ke]()},et={},Dt=fe.length-22;yt(fe,Dt)!=101010256;--Dt)if(!Dt||fe.length-Dt>65558){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;te<U;++te)le(te);return rt}function un(fe){for(var be={},Ue=fe.length-22;yt(fe,Ue)!=101010256;--Ue)if(!Ue||fe.length-Ue>65558)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;ee<rt;++ee){var U=Kt(fe,et,Dt),N=U[0],$=U[1],le=U[2],te=U[3],Ke=U[4],Ct=U[5],Ut=wr(fe,Ct);if(et=Ke,!N)be[te]=C(fe,Ut,Ut+$);else if(N==8)be[te]=Oe(fe.subarray(Ut,Ut+$),new O(le));else throw"unknown compression type "+N}return be}},dMvE:function(qe,pe){var G={linear:function(Q){return Q},quadraticIn:function(Q){return Q*Q},quadraticOut:function(Q){return Q*(2-Q)},quadraticInOut:function(Q){return(Q*=2)<1?.5*Q*Q:-.5*(--Q*(Q-2)-1)},cubicIn:function(Q){return Q*Q*Q},cubicOut:function(Q){return--Q*Q*Q+1},cubicInOut:function(Q){return(Q*=2)<1?.5*Q*Q*Q:.5*((Q-=2)*Q*Q+2)},quarticIn:function(Q){return Q*Q*Q*Q},quarticOut:function(Q){return 1- --Q*Q*Q*Q},quarticInOut:function(Q){return(Q*=2)<1?.5*Q*Q*Q*Q:-.5*((Q-=2)*Q*Q*Q-2)},quinticIn:function(Q){return Q*Q*Q*Q*Q},quinticOut:function(Q){return--Q*Q*Q*Q*Q+1},quinticInOut:function(Q){return(Q*=2)<1?.5*Q*Q*Q*Q*Q:.5*((Q-=2)*Q*Q*Q*Q+2)},sinusoidalIn:function(Q){return 1-Math.cos(Q*Math.PI/2)},sinusoidalOut:function(Q){return Math.sin(Q*Math.PI/2)},sinusoidalInOut:function(Q){return .5*(1-Math.cos(Math.PI*Q))},exponentialIn:function(Q){return Q===0?0:Math.pow(1024,Q-1)},exponentialOut:function(Q){return Q===1?1:1-Math.pow(2,-10*Q)},exponentialInOut:function(Q){return Q===0?0:Q===1?1:(Q*=2)<1?.5*Math.pow(1024,Q-1):.5*(-Math.pow(2,-10*(Q-1))+2)},circularIn:function(Q){return 1-Math.sqrt(1-Q*Q)},circularOut:function(Q){return Math.sqrt(1- --Q*Q)},circularInOut:function(Q){return(Q*=2)<1?-.5*(Math.sqrt(1-Q*Q)-1):.5*(Math.sqrt(1-(Q-=2)*Q)+1)},elasticIn:function(Q){var O,j=.1,D=.4;return Q===0?0:Q===1?1:(!j||j<1?(j=1,O=D/4):O=D*Math.asin(1/j)/(2*Math.PI),-(j*Math.pow(2,10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/D)))},elasticOut:function(Q){var O,j=.1,D=.4;return Q===0?0:Q===1?1:(!j||j<1?(j=1,O=D/4):O=D*Math.asin(1/j)/(2*Math.PI),j*Math.pow(2,-10*Q)*Math.sin((Q-O)*(2*Math.PI)/D)+1)},elasticInOut:function(Q){var O,j=.1,D=.4;return Q===0?0:Q===1?1:(!j||j<1?(j=1,O=D/4):O=D*Math.asin(1/j)/(2*Math.PI),(Q*=2)<1?-.5*(j*Math.pow(2,10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/D)):j*Math.pow(2,-10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/D)*.5+1)},backIn:function(Q){var O=1.70158;return Q*Q*((O+1)*Q-O)},backOut:function(Q){var O=1.70158;return--Q*Q*((O+1)*Q+O)+1},backInOut:function(Q){var O=1.70158*1.525;return(Q*=2)<1?.5*(Q*Q*((O+1)*Q-O)):.5*((Q-=2)*Q*((O+1)*Q+O)+2)},bounceIn:function(Q){return 1-G.bounceOut(1-Q)},bounceOut:function(Q){return Q<1/2.75?7.5625*Q*Q:Q<2/2.75?7.5625*(Q-=1.5/2.75)*Q+.75:Q<2.5/2.75?7.5625*(Q-=2.25/2.75)*Q+.9375:7.5625*(Q-=2.625/2.75)*Q+.984375},bounceInOut:function(Q){return Q<.5?G.bounceIn(Q*2)*.5:G.bounceOut(Q*2-1)*.5+.5}},q=G;qe.exports=q},dejd:function(qe,pe,G){},dmUQ:function(qe,pe,G){"use strict";var q=G("Ff2n"),Q=G("rePB"),O=G("1OyB"),j=G("vuIU"),D=G("Ji7U"),B=G("md7G"),I=G("foSv"),v=G("q1tI"),T=G.n(v),E=G("TSYQ"),n=G.n(E),u=G("4IlW");function c(l,f){var C=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),C.push.apply(C,g)}return C}function o(l){for(var f=1;f<arguments.length;f++){var C=arguments[f]!=null?arguments[f]:{};f%2?c(Object(C),!0).forEach(function(g){Object(Q.a)(l,g,C[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(C)):c(Object(C)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(C,g))})}return l}function i(l){var f=d();return function(){var g=Object(I.a)(l),m;if(f){var F=Object(I.a)(this).constructor;m=Reflect.construct(g,arguments,F)}else m=g.apply(this,arguments);return Object(B.a)(this,m)}}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function s(){}function A(l){l.preventDefault()}var a=function(f){return f.replace(/[^\w.-]+/g,"")},p=200,w=600,S=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(f){return f!=null},L=function(f,C){return C===f||typeof C=="number"&&typeof f=="number"&&isNaN(C)&&isNaN(f)},b=function(l){Object(D.a)(C,l);var f=i(C);function C(g){var m;Object(O.a)(this,C),m=f.call(this,g),m.onKeyDown=function(z){var Z=m.props,V=Z.onKeyDown,M=Z.onPressEnter;if(z.keyCode===u.a.UP){var J=m.getRatio(z);m.up(z,J,null),m.stop()}else if(z.keyCode===u.a.DOWN){var X=m.getRatio(z);m.down(z,X,null),m.stop()}else z.keyCode===u.a.ENTER&&M&&M(z);if(m.recordCursorPosition(),m.lastKeyCode=z.keyCode,V){for(var re=arguments.length,se=new Array(re>1?re-1:0),_e=1;_e<re;_e++)se[_e-1]=arguments[_e];V.apply(void 0,[z].concat(se))}},m.onKeyUp=function(z){var Z=m.props.onKeyUp;if(m.stop(),m.recordCursorPosition(),Z){for(var V=arguments.length,M=new Array(V>1?V-1:0),J=1;J<V;J++)M[J-1]=arguments[J];Z.apply(void 0,[z].concat(M))}},m.onChange=function(z){var Z=m.props.onChange;m.state.focused&&(m.inputting=!0),m.rawInput=m.props.parser(m.getValueFromEvent(z)),m.setState({inputValue:m.rawInput}),Z(m.toNumber(m.rawInput))},m.onMouseUp=function(){var z=m.props.onMouseUp;m.recordCursorPosition(),z&&z.apply(void 0,arguments)},m.onFocus=function(){var z;m.setState({focused:!0}),(z=m.props).onFocus.apply(z,arguments)},m.onBlur=function(){var z=m.props.onBlur;m.inputting=!1,m.setState({focused:!1});var Z=m.getCurrentValidValue(m.state.inputValue),V=m.setValue(Z,s);if(z){var M=m.input.value,J=m.getInputDisplayValue({focus:!1,value:V});m.input.value=J&&Number(J),z.apply(void 0,arguments),m.input.value=M}},m.getRatio=function(z){var Z=1;return z.metaKey||z.ctrlKey?Z=.1:z.shiftKey&&(Z=10),Z},m.getFullNum=function(z){return isNaN(z)?z:/e/i.test(String(z))?Number(z).toFixed(18).replace(/\.?0+$/,""):z},m.getPrecision=function(z){if(x(m.props.precision))return m.props.precision;var Z=String(z);if(Z.indexOf("e-")>=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"&&re<V&&z&&z(V)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var se=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?se=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(se=this.cursorStart):se=this.input.value.length,this.fixCaret(se,se)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(_e){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(m){var F=m;return F===""?F="":this.isNotCompleteNumber(parseFloat(F))?F=this.state.value:F=this.getValidValue(F),this.toNumber(F)}},{key:"getValueFromEvent",value:function(m){var F=m.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(F=F.replace(this.props.decimalSeparator,".")),F}},{key:"getValidValue",value:function(m){var F=arguments.length>1&&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:(z<F&&(z=F),z>P&&(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||J<V.min;if(J>V.max?J=V.max:J<V.min&&(J=V.min),this.setValue(J,null),this.setState({focused:!0},function(){P.pressingUpOrDown=!1}),X)return;this.autoStepTimer=setTimeout(function(){P[m](F,z,!0)},Z?p:w)}},{key:"fixCaret",value:function(m,F){if(m===void 0||F===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,z=this.input.selectionEnd;(m!==P||F!==z)&&this.input.setSelectionRange(m,F)}catch(Z){}}},{key:"render",value:function(){var m,F=this.props,P=F.prefixCls,z=F.disabled,Z=F.readOnly,V=F.useTouch,M=F.autoComplete,J=F.upHandler,X=F.downHandler,re=F.className,se=F.max,_e=F.min,ge=F.style,we=F.title,Re=F.onMouseEnter,He=F.onMouseLeave,Se=F.onMouseOver,Te=F.onMouseOut,$e=F.required,bt=F.onClick,Ie=F.tabIndex,ze=F.type,at=F.placeholder,Ae=F.id,ne=F.inputMode,ae=F.pattern,ce=F.step,xe=F.maxLength,Fe=F.autoFocus,ke=F.name,ct=F.onPaste,ft=F.onInput,yt=Object(q.a)(F,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Et=this.state,Ot=Et.value,Mt=Et.focused,Qe=n()(P,(m={},Object(Q.a)(m,re,!!re),Object(Q.a)(m,"".concat(P,"-disabled"),z),Object(Q.a)(m,"".concat(P,"-focused"),Mt),m)),Ne={};Object.keys(yt).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(Ne[Oe]=yt[Oe])});var lt=!Z&&!z,dt=this.getInputDisplayValue(null),Ye=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)>=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<<E)-1&~I)/G);return O[D][n]}for(var u=B|1<<D,c=D+1;B&1<<c;)c++;for(var o=0,i=0,d=0;i<E;i++){var s=1<<i;s&I||(o+=(d%2?-1:1)*O[D][i]*q(O,j-1,c,u,I|s,v),d++)}return v[T]=o,o}function Q(O,j){var D=[[O[0],O[1],1,0,0,0,-j[0]*O[0],-j[0]*O[1]],[0,0,0,O[0],O[1],1,-j[1]*O[0],-j[1]*O[1]],[O[2],O[3],1,0,0,0,-j[2]*O[2],-j[2]*O[3]],[0,0,0,O[2],O[3],1,-j[3]*O[2],-j[3]*O[3]],[O[4],O[5],1,0,0,0,-j[4]*O[4],-j[4]*O[5]],[0,0,0,O[4],O[5],1,-j[5]*O[4],-j[5]*O[5]],[O[6],O[7],1,0,0,0,-j[6]*O[6],-j[6]*O[7]],[0,0,0,O[6],O[7],1,-j[7]*O[6],-j[7]*O[7]]],B={},I=q(D,8,0,0,0,B);if(I===0)return;for(var v=[],T=0;T<8;T++)for(var E=0;E<8;E++)v[E]==null&&(v[E]=0),v[E]+=((T+E)%2?-1:1)*q(D,7,T===0?1:0,1<<T,1<<E,B)/I*j[T];return function(n,u,c){var o=u*v[6]+c*v[7]+1;n[0]=(u*v[0]+c*v[1]+v[2])/o,n[1]=(u*v[3]+c*v[4]+v[5])/o}}pe.buildTransformer=Q},hW8S:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return j}),G.d(pe,"c",function(){return D}),G.d(pe,"b",function(){return B});var q=G("VTBJ"),Q=G("Ff2n"),O=G("Kwbf"),j="RC_TABLE_INTERNAL_COL_DEFINE";function D(I){var v=I.expandable,T=Object(Q.a)(I,["expandable"]);return"expandable"in I?Object(q.a)(Object(q.a)({},T),v):T}function B(I){return Object.keys(I).reduce(function(v,T){return(T.substr(0,5)==="data-"||T.substr(0,5)==="aria-")&&(v[T]=I[T]),v},{})}},hX1E:function(qe,pe){var G=Math.PI*2;function q(Q){return Q%=G,Q<0&&(Q+=G),Q}pe.normalizeRadian=q},hydK:function(qe,pe){var G="http://www.w3.org/2000/svg";function q(Q){return document.createElementNS(G,Q)}pe.createElement=q},hyiK:function(qe,pe){function G(q,Q,O,j,D,B){if(B>Q&&B>j||B<Q&&B<j)return 0;if(j===Q)return 0;var I=j<Q?1:-1,v=(B-Q)/(j-Q);(v===1||v===0)&&(I=j<Q?.5:-.5);var T=v*(O-q)+q;return T===D?Infinity:T>D?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<D.length;v++){var T=D[v],E=T&&T.shape,n=T&&T.type;if(E&&(n==="sector"&&E.startAngle===E.endAngle||n==="rect"&&(!E.width||!E.height))){for(var u=0;u<Q.length;u++)Q[u][2]=B[Q[u][0]],B[Q[u][0]]=Q[u][1];I=!0;break}}if(j.apply(this,arguments),I)for(var u=0;u<Q.length;u++)B[Q[u][0]]=Q[u][2]}:j}qe.exports=O},j5sG:function(qe,pe,G){"use strict";Object.defineProperty(pe,"__esModule",{value:!0}),pe.createSensor=void 0;var q=Q(G("NohK"));function Q(j){return j&&j.__esModule?j:{default:j}}var O=function(D){var B=void 0,I=[],v=(0,q.default)(function(){I.forEach(function(c){c(D)})}),T=function(){var o=new ResizeObserver(v);return o.observe(D),v(),o},E=function(o){B||(B=T()),I.indexOf(o)===-1&&I.push(o)},n=function(){B.disconnect(),I=[],B=void 0},u=function(o){var i=I.indexOf(o);i!==-1&&I.splice(i,1),I.length===0&&B&&n()};return{element:D,bind:E,destroy:n,unbind:u}};pe.createSensor=O},jTL6:function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(O,j){var D=j.cx,B=j.cy,I=Math.max(j.r,0),v=j.startAngle,T=j.endAngle,E=j.clockwise,n=Math.cos(v),u=Math.sin(v);O.moveTo(n*I+D,u*I+B),O.arc(D,B,I,v,T,!E)}});qe.exports=Q},juDX:function(qe,pe,G){G("P47w");var q=G("aX58"),Q=q.registerPainter,O=G("3CBa");Q("svg",O)},kSUc:function(qe,pe,G){},"kVK+":function(qe,pe){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */pe.read=function(G,q,Q,O,j){var D,B,I=j*8-O-1,v=(1<<I)-1,T=v>>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<<T)-1,n=E>>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<<j|I,T+=j;T>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<M.listStack[M.listStack.length-1];)M.listStack.pop(),M.listStack.length?M.indentation=M.listStack[M.listStack.length-1]:M.list=!1;M.list!==!1&&(M.indentationDiff=we-M.listStack[M.listStack.length-1])}var Re=!X&&!se&&!M.prevLine.header&&(!_e||!re)&&!M.prevLine.fencedCodeEnd,He=(M.list===!1||se||X)&&M.indentation<=ge&&V.match(T),Se=null;if(M.indentationDiff>=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<J,re=J+3;if(M.fencedEndRE&&M.indentation<=re&&(X||V.match(M.fencedEndRE))){O.highlightFormatting&&(M.formatting="code-block");var se;return X||(se=h(M)),M.localMode=M.localState=null,M.block=x,M.f=l,M.fencedEndRE=null,M.code=0,M.thisLine.fencedCodeEnd=!0,X?p(V,M,M.block):se}else return M.localMode?M.localMode.token(V,M.localState):(V.skipToEnd(),I.code)}function h(V){var M=[];if(V.formatting){M.push(I.formatting),typeof V.formatting=="string"&&(V.formatting=[V.formatting]);for(var J=0;J<V.formatting.length;J++)M.push(I.formatting+"-"+V.formatting[J]),V.formatting[J]==="header"&&M.push(I.formatting+"-"+V.formatting[J]+"-"+V.header),V.formatting[J]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=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:"<!--",blockCommentEnd:"-->",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||I<Q-v&&I<j-v||B>q+v&&B>O+v||B<q-v&&B<O-v)return!1;if(q!==O)T=(Q-j)/(q-O),E=(q*j-O*Q)/(q-O);else return Math.abs(B-q)<=v/2;var n=T*B-I+E,u=n*n/(T*T+1);return u<=v/2*v/2}pe.containStroke=G},mFDi:function(qe,pe,G){var q=G("QBsz"),Q=G("Fofx"),O=q.applyTransform,j=Math.min,D=Math.max;function B(v,T,E,n){E<0&&(v=v+E,E=-E),n<0&&(T=T+n,n=-n),this.x=v,this.y=T,this.width=E,this.height=n}B.prototype={constructor:B,union:function(v){var T=j(v.x,this.x),E=j(v.y,this.y);this.width=D(v.x+v.width,this.x+this.width)-T,this.height=D(v.y+v.height,this.y+this.height)-E,this.x=T,this.y=E},applyTransform:function(){var v=[],T=[],E=[],n=[];return function(u){if(!u)return;v[0]=E[0]=this.x,v[1]=n[1]=this.y,T[0]=n[0]=this.x+this.width,T[1]=E[1]=this.y+this.height,O(v,v,u),O(T,T,u),O(E,E,u),O(n,n,u),this.x=j(v[0],T[0],E[0],n[0]),this.y=j(v[1],T[1],E[1],n[1]);var c=D(v[0],T[0],E[0],n[0]),o=D(v[1],T[1],E[1],n[1]);this.width=c-this.x,this.height=o-this.y}}(),calculateTransform:function(v){var T=this,E=v.width/T.width,n=v.height/T.height,u=Q.create();return Q.translate(u,u,[-T.x,-T.y]),Q.scale(u,u,[E,n]),Q.translate(u,u,[v.x,v.y]),u},intersect:function(v){if(!v)return!1;v instanceof B||(v=B.create(v));var T=this,E=T.x,n=T.x+T.width,u=T.y,c=T.y+T.height,o=v.x,i=v.x+v.width,d=v.y,s=v.y+v.height;return!(n<o||i<E||c<d||s<u)},contain:function(v,T){var E=this;return v>=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+o<I)return!1;if(Math.abs(v-T)%O<1e-4)return!0;if(E){var d=v;v=Q(T),T=Q(d)}else v=Q(v),T=Q(T);v>T&&(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<x;S++)Q(p,p,E[S]),O(w,w,E[S]);Q(p,p,c[0]),O(w,w,c[1])}for(var S=0,x=E.length;S<x;S++){var L=E[S];if(u)A=E[S?S-1:x-1],a=E[(S+1)%x];else if(S===0||S===x-1){o.push(I(E[S]));continue}else A=E[S-1],a=E[S+1];v(i,a,A),j(i,i,n);var b=D(L,A),h=D(L,a),r=b+h;r!==0&&(b/=r,h/=r),j(d,i,-b),j(s,i,h);var l=B([],L,d),f=B([],L,s);c&&(O(l,l,p),Q(l,l,w),O(f,f,p),Q(f,f,w)),o.push(l),o.push(f)}return u&&o.push(o.shift()),o}qe.exports=T},nPnh:function(qe,pe){var G=Math.round;function q(j,D,B){if(!D)return;var I=D.x1,v=D.x2,T=D.y1,E=D.y2;j.x1=I,j.x2=v,j.y1=T,j.y2=E;var n=B&&B.lineWidth;if(!n)return;G(I*2)===G(v*2)&&(j.x1=j.x2=O(I,n,!0)),G(T*2)===G(E*2)&&(j.y1=j.y2=O(T,n,!0))}function Q(j,D,B){if(!D)return;var I=D.x,v=D.y,T=D.width,E=D.height;j.x=I,j.y=v,j.width=T,j.height=E;var n=B&&B.lineWidth;if(!n)return;j.x=O(I,n,!0),j.y=O(v,n,!0),j.width=Math.max(O(I+T,n,!1)-j.x,T===0?0:1),j.height=Math.max(O(v+E,n,!1)-j.y,E===0?0:1)}function O(j,D,B){if(!D)return j;var I=G(j*2);return(I+G(D))%2===0?I/2:(I+(B?1:-1))/2}pe.subPixelOptimizeLine=q,pe.subPixelOptimizeRect=Q,pe.subPixelOptimize=O},ni6a:function(qe,pe,G){var q=G("pzxd"),Q=G("mFDi"),O=G("gut8"),j=O.WILL_BE_RESTORED,D=new Q,B=function(){};B.prototype={constructor:B,drawRectText:function(v,T){var E=this.style;T=E.textRect||T,this.__dirty&&q.normalizeTextStyle(E,!0);var n=E.text;if(n!=null&&(n+=""),!q.needDrawText(n,E))return;v.save();var u=this.transform;E.transformText?this.setTransform(v):u&&(D.copy(T),D.applyTransform(u),T=D),q.renderText(this,v,n,E,T,j),v.restore()}};var I=B;qe.exports=I},osHv:function(qe,pe,G){(function(q){q(G("VrN/"))})(function(q){"use strict";var Q=q.Pos;function O(s,A){return s.line-A.line||s.ch-A.ch}var j="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",D=j+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B=new RegExp("<(/?)(["+j+"]["+D+"]*)","g");function I(s,A,a,p){this.line=A,this.ch=a,this.cm=s,this.text=s.getLine(A),this.min=p?Math.max(p.from,s.firstLine()):s.firstLine(),this.max=p?Math.min(p.to-1,s.lastLine()):s.lastLine()}function v(s,A){var a=s.cm.getTokenTypeAt(Q(s.line,A));return a&&/\btag\b/.test(a)}function T(s){return s.line>=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;d<i.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(i){for(var d=this.__lines.length;i<d;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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<this.__input_length},c.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},c.prototype.peek=function(o){var i=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(i=this.__input.charAt(o)),i},c.prototype.__match=function(o,i){o.lastIndex=i;var d=o.exec(this.__input);return d&&!(u&&o.sticky)&&(d.index!==i&&(d=null)),d},c.prototype.test=function(o,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(o,i):!1},c.prototype.testChar=function(o,i){var d=this.peek(i);return o.lastIndex=0,d!==null&&o.test(d)},c.prototype.match=function(o){var i=this.__match(o,this.__position);return i?this.__position+=i[0].length:i=null,i},c.prototype.read=function(o,i,d){var s="",A;return o&&(A=this.match(o),A&&(s+=A[0])),i&&(A||!o)&&(s+=this.readUntil(i,d)),s},c.prototype.readUntil=function(o,i){var d="",s=this.__position;o.lastIndex=this.__position;var A=o.exec(this.__input);return A?(s=A.index,i&&(s+=A[0].length)):s=this.__input_length,d=this.__input.substring(this.__position,s),this.__position=s,d},c.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},c.prototype.get_regexp=function(o,i){var d=null,s="g";return i&&u&&(s="y"),typeof o=="string"&&o!==""?d=new RegExp(o,s):o&&(d=new RegExp(o.source,s)),d},c.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},c.prototype.peekUntilAfter=function(o){var i=this.__position,d=this.readUntilAfter(o);return this.__position=i,d},c.prototype.lookBack=function(o){var i=this.__position-1;return 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<this.__tokens_length},u.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__tokens[this.__position],this.__position+=1),c},u.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__tokens_length&&(o=this.__tokens[c]),o},u.prototype.add=function(c){this.__parent_token&&(c.parent=this.__parent_token),this.__tokens.push(c),this.__tokens_length+=1},n.exports.TokenStream=u},function(n,u,c){var o=c(12).Pattern;function i(d,s){o.call(this,d,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new o,i.prototype.__set_whitespace_patterns=function(d,s){d+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var s=this.__split(this._newline_regexp,d);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return d},i.prototype.matching=function(d,s){var A=this._create();return A.__set_whitespace_patterns(d,s),A._update(),A},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(d,s){d.lastIndex=0;for(var A=0,a=[],p=d.exec(s);p;)a.push(s.substring(A,p.index)),A=p.index+p[0].length,p=d.exec(s);return A<s.length?a.push(s.substring(A,s.length)):a.push(""),a},n.exports.WhitespacePattern=i},function(n){function u(c,o){this._input=c,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}u.prototype.read=function(){var c=this._input.read(this._starting_pattern);return(!this._starting_pattern||c)&&(c+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),c},u.prototype.read_match=function(){return this._input.match(this._match_pattern)},u.prototype.until_after=function(c){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(c),o._update(),o},u.prototype.until=function(c){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(c),o._update(),o},u.prototype.starting_with=function(c){var o=this._create();return o._starting_pattern=this._input.get_regexp(c,!0),o._update(),o},u.prototype.matching=function(c){var o=this._create();return o._match_pattern=this._input.get_regexp(c,!0),o._update(),o},u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){},n.exports.Pattern=u},function(n){function u(c,o){c=typeof c=="string"?c:c.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(c+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(c+/\sbeautify\signore:end\s/.source+o,"g")}u.prototype.get_directives=function(c){if(!c.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(c);i;)o[i[1]]=i[2],i=this.__directive_pattern.exec(c);return o},u.prototype.readIgnored=function(c){return c.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=u},function(n,u,c){var o=c(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(s,A){o.call(this,s,A),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),A&&(this.__template_pattern=this._input.get_regexp(A.__template_pattern),this._excluded=Object.assign(this._excluded,A._excluded),this._disabled=Object.assign(this._disabled,A._disabled));var a=new o(s);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),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.newlines<this.max_preserve_newlines+1?C.newlines:this.max_preserve_newlines+1);for(var m=0;m<g;m++)this.print_newline(m>0);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(/^(<!--|<!\[CDATA\[)/)){var X=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.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("</")===0?(C.add_raw_token(g),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(C.traverse_whitespace(g),this._set_tag_position(C,g,P,m,F),P.is_inline_element||C.set_wrap_point(),C.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=g.text.length+1),!P.tag_complete&&!P.is_unformatted&&(C.alignment_size=P.alignment_size),P};var r=function(C,g){if(this.parent=C||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var m;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(m=g.text.match(/^<([^\s>]*)/),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(/<!--/).until_after(/-->/),cdata:b.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:b.starting_with(/<!\[/).until_after(/]>/),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("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(b=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","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<A.length;Qe++){var Ne=A[Qe],lt=Ne[0],dt=Ne[1],Ye=se[lt];(!He||Ye!==Re[lt])&&(X[dt]=n(X,dt,Ye||Ne[2]))}yt+=ne/2;var st=se.textStrokeWidth,je=He?Re.textStrokeWidth:null,Le=!He||st!==je,Me=!He||Le||se.textStroke!==Re.textStroke,me=P(se.textStroke,st),ye=z(se.textFill);if(me&&(Le&&(X.lineWidth=st),Me&&(X.strokeStyle=me)),ye&&((!He||se.textFill!==Re.textFill)&&(X.fillStyle=ye)),Ae.length===1)me&&X.strokeText(Ae[0],ft,yt),ye&&X.fillText(Ae[0],ft,yt);else for(var Qe=0;Qe<Ae.length;Qe++)me&&X.strokeText(Ae[Qe],ft,yt),ye&&X.fillText(Ae[Qe],ft,yt),yt+=ne}function b(J,X,re,se,_e,ge){ge!==o&&(X.__attrCachedBy=c.NONE);var we=J.__textCotentBlock;(!we||J.__dirtyText)&&(we=J.__textCotentBlock=v.parseRichText(re,se)),h(J,X,we,se,_e)}function h(J,X,re,se,_e){var ge=re.width,we=re.outerWidth,Re=re.outerHeight,He=se.textPadding,Se=m(p,J,se,_e),Te=Se.baseX,$e=Se.baseY,bt=Se.textAlign,Ie=Se.textVerticalAlign;r(X,se,_e,Te,$e);var ze=v.adjustTextX(Te,we,bt),at=v.adjustTextY($e,Re,Ie),Ae=ze,ne=at;He&&(Ae+=He[3],ne+=He[0]);var ae=Ae+ge;f(se)&&C(J,X,se,ze,at,we,Re);for(var ce=0;ce<re.lines.length;ce++){for(var xe=re.lines[ce],Fe=xe.tokens,ke=Fe.length,ct=xe.lineHeight,ft=xe.width,yt=0,Et=Ae,Ot=ae,Mt=ke-1,Qe;yt<ke&&(Qe=Fe[yt],!Qe.textAlign||Qe.textAlign==="left");)l(J,X,Qe,se,ct,ne,Et,"left"),ft-=Qe.width,Et+=Qe.width,yt++;for(;Mt>=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<Oe;ht++){var Tt=Ee[ht],kt=V(Tt.color);Ze.push(Tt.offset*Ot+Et+" "+kt[0]),(ht===0||ht===Oe-1)&&De.push(kt)}if(Oe>=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<st;){Qe=Ye[Ne++],Mt="",Ot=0;switch(Qe){case Fe:Mt=" m ",Ot=1,lt=Ye[Ne++],dt=Ye[Ne++],re[0][0]=lt,re[0][1]=dt;break;case ct:Mt=" l ",Ot=1,lt=Ye[Ne++],dt=Ye[Ne++],re[0][0]=lt,re[0][1]=dt;break;case yt:case ke:Mt=" c ",Ot=3;var je=Ye[Ne++],Le=Ye[Ne++],Me=Ye[Ne++],me=Ye[Ne++],ye,Ee;Qe===yt?(ye=Me,Ee=me,Me=(Me+2*je)/3,me=(me+2*Le)/3,je=(lt+2*je)/3,Le=(dt+2*Le)/3):(ye=Ye[Ne++],Ee=Ye[Ne++]),re[0][0]=je,re[0][1]=Le,re[1][0]=Me,re[1][1]=me,re[2][0]=ye,re[2][1]=Ee,lt=ye,dt=Ee;break;case ft:var Oe=0,De=0,Ze=1,ht=1,Tt=0;xe&&(Oe=xe[4],De=xe[5],Ze=A(xe[0]*xe[0]+xe[1]*xe[1]),ht=A(xe[2]*xe[2]+xe[3]*xe[3]),Tt=Math.atan2(-xe[1]/ht,xe[0]/Ze));var kt=Ye[Ne++],It=Ye[Ne++],St=Ye[Ne++],ut=Ye[Ne++],nt=Ye[Ne++]+Tt,tt=Ye[Ne++]+nt+Tt;Ne++;var Ce=Ye[Ne++],Pe=kt+p(nt)*St,pt=It+w(nt)*ut,je=kt+p(tt)*St,Le=It+w(tt)*ut,it=Ce?" wa ":" at ";Math.abs(Pe-je)<1e-4&&(Math.abs(tt-nt)>.01?Ce&&(Pe+=270/b):Math.abs(pt-It)<1e-4?Ce&&Pe<kt||!Ce&&Pe>kt?Le-=270/b:Le+=270/b:Ce&&pt<It||!Ce&&pt>It?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;Xe<Ot;Xe++){var mt=re[Xe];xe&&O(mt,mt,xe),Et.push(s(mt[0]*b-h),x,s(mt[1]*b-h),Xe<Ot-1?x:"")}}}return Et.join("")};u.prototype.brushVML=function(ce){var xe=this.style,Fe=this._vmlEl;Fe||(Fe=i.createNode("shape"),f(Fe),this._vmlEl=Fe),X(Fe,"fill",xe,this),X(Fe,"stroke",xe,this);var ke=this.transform,ct=ke!=null,ft=Fe.getElementsByTagName("stroke")[0];if(ft){var yt=xe.lineWidth;if(ct&&!xe.strokeNoScale){var Et=ke[0]*ke[3]-ke[1]*ke[2];yt*=A(a(Et))}ft.weight=yt+"px"}var Ot=this.path||(this.path=new c);this.__dirtyPath&&(Ot.beginPath(),Ot.subPixelOptimize=!1,this.buildPath(Ot,this.shape),Ot.toStatic(),this.__dirtyPath=!1),Fe.path=se(Ot,this.transform),Fe.style.zIndex=P(this.zlevel,this.z,this.z2),m(ce,Fe),xe.text!=null?this.drawRectText(ce,this.getBoundingRect()):this.removeRectText(ce)},u.prototype.onRemove=function(ce){F(ce,this._vmlEl),this.removeRectText(ce)},u.prototype.onAdd=function(ce){m(ce,this._vmlEl),this.appendRectText(ce)};var _e=function(ce){return typeof ce=="object"&&ce.tagName&&ce.tagName.toUpperCase()==="IMG"};E.prototype.brushVML=function(ce){var xe=this.style,Fe=xe.image,ke,ct;if(_e(Fe)){var ft=Fe.src;if(ft===this._imageSrc)ke=this._imageWidth,ct=this._imageHeight;else{var yt=Fe.runtimeStyle,Et=yt.width,Ot=yt.height;yt.width="auto",yt.height="auto",ke=Fe.width,ct=Fe.height,yt.width=Et,yt.height=Ot,this._imageSrc=ft,this._imageWidth=ke,this._imageHeight=ct}Fe=ft}else Fe===this._imageSrc&&(ke=this._imageWidth,ct=this._imageHeight);if(!Fe)return;var Mt=xe.x||0,Qe=xe.y||0,Ne=xe.width,lt=xe.height,dt=xe.sWidth,Ye=xe.sHeight,st=xe.sx||0,je=xe.sy||0,Le=dt&&Ye,Me=this._vmlEl;Me||(Me=i.doc.createElement("div"),f(Me),this._vmlEl=Me);var me=Me.style,ye=!1,Ee,Oe=1,De=1;if(this.transform&&(Ee=this.transform,Oe=A(Ee[0]*Ee[0]+Ee[1]*Ee[1]),De=A(Ee[2]*Ee[2]+Ee[3]*Ee[3]),ye=Ee[1]||Ee[2]),ye){var Ze=[Mt,Qe],ht=[Mt+Ne,Qe],Tt=[Mt,Qe+lt],kt=[Mt+Ne,Qe+lt];O(Ze,Ze,Ee),O(ht,ht,Ee),O(Tt,Tt,Ee),O(kt,kt,Ee);var It=S(Ze[0],ht[0],Tt[0],kt[0]),St=S(Ze[1],ht[1],Tt[1],kt[1]),ut=[];ut.push("M11=",Ee[0]/Oe,x,"M12=",Ee[2]/De,x,"M21=",Ee[1]/Oe,x,"M22=",Ee[3]/De,x,"Dx=",s(Mt*Oe+Ee[4]),x,"Dy=",s(Qe*De+Ee[5])),me.padding="0 "+s(It)+"px "+s(St)+"px 0",me.filter=L+".Matrix("+ut.join("")+", SizingMethod=clip)"}else Ee&&(Mt=Mt*Oe+Ee[4],Qe=Qe*De+Ee[5]),me.filter="",me.left=s(Mt)+"px",me.top=s(Qe)+"px";var nt=this._imageEl,tt=this._cropEl;nt||(nt=i.doc.createElement("div"),this._imageEl=nt);var Ce=nt.style;if(Le){if(ke&&ct)Ce.width=s(Oe*ke*Ne/dt)+"px",Ce.height=s(De*ct*lt/Ye)+"px";else{var Pe=new Image,pt=this;Pe.onload=function(){Pe.onload=null,ke=Pe.width,ct=Pe.height,Ce.width=s(Oe*ke*Ne/dt)+"px",Ce.height=s(De*ct*lt/Ye)+"px",pt._imageWidth=ke,pt._imageHeight=ct,pt._imageSrc=Fe},Pe.src=Fe}tt||(tt=i.doc.createElement("div"),tt.style.overflow="hidden",this._cropEl=tt);var it=tt.style;it.width=s((Ne+st*Ne/dt)*Oe),it.height=s((lt+je*lt/Ye)*De),it.filter=L+".Matrix(Dx="+-st*Ne/dt*Oe+",Dy="+-je*lt/Ye*De+")",tt.parentNode||Me.appendChild(tt),nt.parentNode!==tt&&tt.appendChild(nt)}else Ce.width=s(Oe*Ne)+"px",Ce.height=s(De*lt)+"px",Me.appendChild(nt),tt&&tt.parentNode&&(Me.removeChild(tt),this._cropEl=null);var xt="",_t=xe.opacity;_t<1&&(xt+=".Alpha(opacity="+s(_t*100)+") "),xt+=L+".AlphaImageLoader(src="+Fe+", SizingMethod=scale)",Ce.filter=xt,Me.style.zIndex=P(this.zlevel,this.z,this.z2),m(ce,Me),xe.text!=null&&this.drawRectText(ce,this.getBoundingRect())},E.prototype.onRemove=function(ce){F(ce,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ce)},E.prototype.onAdd=function(ce){m(ce,this._vmlEl),this.appendRectText(ce)};var ge="normal",we={},Re=0,He=100,Se=document.createElement("div"),Te=function(ce){var xe=we[ce];if(!xe){Re>He&&(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<yt.lines.length;Et++){for(var Ot=yt.lines[Et].tokens,Mt=[],Qe=0;Qe<Ot.length;Qe++)Mt.push(Ot[Qe].text);ft.push(Mt.join(""))}ft=ft.join(`
|
|
`)}var Ne,lt,dt=ct.textAlign,Ye=ct.textVerticalAlign,st=Te(ct.font),je=st.style+" "+st.variant+" "+st.weight+" "+st.size+'px "'+st.family+'"';Fe=Fe||B.getBoundingRect(ft,je,dt,Ye,ct.textPadding,ct.textLineHeight);var Le=this.transform;if(Le&&!ke&&(bt.copy(xe),bt.applyTransform(Le),xe=bt),ke)Ne=xe.x,lt=xe.y;else{var Me=ct.textPosition;if(Me instanceof Array)Ne=xe.x+z(Me[0],xe.width),lt=xe.y+z(Me[1],xe.height),dt=dt||"left";else{var me=this.calculateTextPosition?this.calculateTextPosition({},ct,xe):B.calculateTextPosition({},ct,xe);Ne=me.x,lt=me.y,dt=dt||me.textAlign,Ye=Ye||me.textVerticalAlign}}Ne=B.adjustTextX(Ne,Fe.width,dt),lt=B.adjustTextY(lt,Fe.height,Ye),lt+=Fe.height/2;var ye=i.createNode,Ee=this._textVmlEl,Oe,De,Ze;Ee?(Ze=Ee.firstChild,Oe=Ze.nextSibling,De=Oe.nextSibling):(Ee=ye("line"),Oe=ye("path"),De=ye("textpath"),Ze=ye("skew"),De.style["v-text-align"]="left",f(Ee),Oe.textpathok=!0,De.on=!0,Ee.from="0 0",Ee.to="1000 0.05",m(Ee,Ze),m(Ee,Oe),m(Ee,De),this._textVmlEl=Ee);var ht=[Ne,lt],Tt=Ee.style;Le&&ke?(O(ht,ht,Le),Ze.on=!0,Ze.matrix=Le[0].toFixed(3)+x+Le[2].toFixed(3)+x+Le[1].toFixed(3)+x+Le[3].toFixed(3)+",0,0",Ze.offset=(s(ht[0])||0)+","+(s(ht[1])||0),Ze.origin="0 0",Tt.left="0px",Tt.top="0px"):(Ze.on=!1,Tt.left=s(Ne)+"px",Tt.top=s(lt)+"px"),De.string=C(ft);try{De.style.font=je}catch(kt){}X(Ee,"fill",{fill:ct.textFill,opacity:ct.opacity},this),X(Ee,"stroke",{stroke:ct.textStroke,opacity:ct.opacity,lineDash:ct.lineDash||null},this),Ee.style.zIndex=P(this.zlevel,this.z,this.z2),m(ce,Ee)},ze=function(ce){F(ce,this._textVmlEl),this._textVmlEl=null},at=function(ce){m(ce,this._textVmlEl)},Ae=[v,T,E,u,n],ne=0;ne<Ae.length;ne++){var ae=Ae[ne].prototype;ae.drawRectText=Ie,ae.removeRectText=ze,ae.appendRectText=at}n.prototype.brushVML=function(ce){var xe=this.style;xe.text!=null?this.drawRectText(ce,{x:xe.x||0,y:xe.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ce)},n.prototype.onRemove=function(ce){this.removeRectText(ce)},n.prototype.onAdd=function(ce){this.appendRectText(ce)}}},r6Bn:function(qe,pe,G){var q=G("bYtY"),Q=G("ItGF"),O=G("4fz+"),j=G("BPZU");function D(v,T){return v.zlevel===T.zlevel?v.z===T.z?v.z2-T.z2:v.z-T.z:v.zlevel-T.zlevel}var B=function(){this._roots=[],this._displayList=[],this._displayListLen=0};B.prototype={constructor:B,traverse:function(v,T){for(var E=0;E<this._roots.length;E++)this._roots[E].traverse(v,T)},getDisplayList:function(v,T){return T=T||!1,v&&this.updateDisplayList(T),this._displayList},updateDisplayList:function(v){this._displayListLen=0;for(var T=this._roots,E=this._displayList,n=0,u=T.length;n<u;n++)this._updateAndAddDisplayable(T[n],null,v);E.length=this._displayListLen,Q.canvasSupported&&j(E,D)},_updateAndAddDisplayable:function(v,T,E){if(v.ignore&&!E)return;v.beforeUpdate(),v.__dirty&&v.update(),v.afterUpdate();var n=v.clipPath;if(n){T?T=T.slice():T=[];for(var u=n,c=v;u;)u.parent=c,u.updateTransform(),T.push(u),c=u,u=u.clipPath}if(v.isGroup){for(var o=v._children,i=0;i<o.length;i++){var d=o[i];v.__dirty&&(d.__dirty=!0),this._updateAndAddDisplayable(d,T,E)}v.__dirty=!1}else v.__clipPaths=T,this._displayList[this._displayListLen++]=v},addRoot:function(v){if(v.__storage===this)return;v instanceof O&&v.addChildrenToStorage(this),this.addToStorage(v),this._roots.push(v)},delRoot:function(v){if(v==null){for(var T=0;T<this._roots.length;T++){var E=this._roots[T];E instanceof O&&E.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(v instanceof Array){for(var T=0,n=v.length;T<n;T++)this.delRoot(v[T]);return}var u=q.indexOf(this._roots,v);u>=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<arguments.length;h++){r=arguments[h];for(l in r)Object.prototype.hasOwnProperty.call(r,l)&&(b[l]=r[l])}return b}function w(b,h){const r=b.replace(/\|/g,(C,g,m)=>{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<h;)l.push("");for(;f<l.length;f++)l[f]=l[f].trim().replace(/\\\|/g,"|");return l}function S(b,h,r){const l=b.length;if(l===0)return"";let f=0;for(;f<l;){const C=b.charAt(l-f-1);if(C===h&&!r)f++;else if(C!==h&&r)f++;else break}return b.substr(0,l-f)}function x(b,h){if(b.indexOf(h[1])===-1)return-1;const r=b.length;let l=0,f=0;for(;f<r;f++)if(b[f]==="\\")f++;else if(b[f]===h[0])l++;else if(b[f]===h[1]&&(l--,l<0))return f;return-1}function L(b){b&&b.sanitize&&!b.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}qe.exports={escape:B,unescape:v,edit:E,cleanUrl:c,resolveUrl:A,noopTest:a,merge:p,splitCells:w,rtrim:S,findClosingBracket:x,checkSanitizeDeprecation:L}},rmlV:function(qe,pe,G){var q=G("y+Vt"),Q=q.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(O,j){var D=.5522848,B=j.cx,I=j.cy,v=j.rx,T=j.ry,E=v*D,n=T*D;O.moveTo(B-v,I),O.bezierCurveTo(B-v,I-n,B-E,I-T,B,I-T),O.bezierCurveTo(B+E,I-T,B+v,I-n,B+v,I),O.bezierCurveTo(B+v,I+n,B+E,I+T,B,I+T),O.bezierCurveTo(B-E,I+T,B-v,I+n,B-v,I),O.closePath()}});qe.exports=Q},sR1s:function(qe,pe,G){"use strict";G.d(pe,"b",function(){return j}),G.d(pe,"a",function(){return D}),G.d(pe,"c",function(){return B}),G.d(pe,"d",function(){return I});var q=G("U8pU"),Q="RC_TABLE_KEY";function O(v){return v==null?[]:Array.isArray(v)?v:[v]}function j(v,T){if(!T&&typeof T!="number")return v;for(var E=O(T),n=v,u=0;u<E.length;u+=1){if(!n)return null;var c=E[u];n=n[c]}return n}function D(v){var T=[],E={};return v.forEach(function(n){for(var u=n||{},c=u.key,o=u.dataIndex,i=c||O(o).join("-")||Q;E[i];)i="".concat(i,"_next");E[i]=!0,T.push(i)}),T}function B(){var v={};function T(c,o){o&&Object.keys(o).forEach(function(i){var d=o[i];d&&Object(q.a)(d)==="object"?(c[i]=c[i]||{},T(c[i],d)):c[i]=d})}for(var E=arguments.length,n=new Array(E),u=0;u<E;u++)n[u]=arguments[u];return n.forEach(function(c){T(v,c)}),v}function I(v){return v!=null}},"sW+o":function(qe,pe,G){var q=G("SrGk"),Q=G("bYtY"),O=G("SUKs"),j=G("Qe9p");function D(I,v){q.call(this,I,v,["linearGradient","radialGradient"],"__gradient_in_use__")}Q.inherits(D,q),D.prototype.addWithoutUpdate=function(I,v){if(v&&v.style){var T=this;Q.each(["fill","stroke"],function(E){if(v.style[E]&&(v.style[E].type==="linear"||v.style[E].type==="radial")){var n=v.style[E],u=T.getDefs(!0),c;n._dom?(c=n._dom,u.contains(n._dom)||T.addDom(c)):c=T.add(n),T.markUsed(v);var o=c.getAttribute("id");I.setAttribute(E,"url(#"+o+")")}})}},D.prototype.add=function(I){var v;if(I.type==="linear")v=this.createElement("linearGradient");else if(I.type==="radial")v=this.createElement("radialGradient");else return O("Illegal gradient type."),null;return I.id=I.id||this.nextId++,v.setAttribute("id","zr"+this._zrId+"-gradient-"+I.id),this.updateDom(I,v),this.addDom(v),v},D.prototype.update=function(I){var v=this;q.prototype.update.call(this,I,function(){var T=I.type,E=I._dom.tagName;T==="linear"&&E==="linearGradient"||T==="radial"&&E==="radialGradient"?v.updateDom(I,I._dom):(v.removeDom(I),v.add(I))})},D.prototype.updateDom=function(I,v){if(I.type==="linear")v.setAttribute("x1",I.x),v.setAttribute("y1",I.y),v.setAttribute("x2",I.x2),v.setAttribute("y2",I.y2);else if(I.type==="radial")v.setAttribute("cx",I.x),v.setAttribute("cy",I.y),v.setAttribute("r",I.r);else{O("Illegal gradient type.");return}I.global?v.setAttribute("gradientUnits","userSpaceOnUse"):v.setAttribute("gradientUnits","objectBoundingBox"),v.innerHTML="";for(var T=I.colorStops,E=0,n=T.length;E<n;++E){var u=this.createElement("stop");u.setAttribute("offset",T[E].offset*100+"%");var c=T[E].color;if(c.indexOf("rgba">-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);i<d;i++)s[i]=o[i].fn;return s},E.prototype.listenerCount=function(u){var c=D?D+u:u,o=this._events[c];return o?o.fn?1:o.length:0},E.prototype.emit=function(u,c,o,i,d,s){var A=D?D+u:u;if(!this._events[A])return!1;var a=this._events[A],p=arguments.length,w,S;if(a.fn){a.once&&this.removeListener(u,a.fn,void 0,!0);switch(p){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,c),!0;case 3:return a.fn.call(a.context,c,o),!0;case 4:return a.fn.call(a.context,c,o,i),!0;case 5:return a.fn.call(a.context,c,o,i,d),!0;case 6:return a.fn.call(a.context,c,o,i,d,s),!0}for(S=1,w=new Array(p-1);S<p;S++)w[S-1]=arguments[S];a.fn.apply(a.context,w)}else{var x=a.length,L;for(S=0;S<x;S++){a[S].once&&this.removeListener(u,a[S].fn,void 0,!0);switch(p){case 1:a[S].fn.call(a[S].context);break;case 2:a[S].fn.call(a[S].context,c);break;case 3:a[S].fn.call(a[S].context,c,o);break;case 4:a[S].fn.call(a[S].context,c,o,i);break;default:if(!w)for(L=1,w=new Array(p-1);L<p;L++)w[L-1]=arguments[L];a[S].fn.apply(a[S].context,w)}}}return!0},E.prototype.on=function(u,c,o){return v(this,u,c,o,!1)},E.prototype.once=function(u,c,o){return v(this,u,c,o,!0)},E.prototype.removeListener=function(u,c,o,i){var d=D?D+u:u;if(!this._events[d])return this;if(!c)return T(this,d),this;var s=this._events[d];if(s.fn)s.fn===c&&(!i||s.once)&&(!o||s.context===o)&&T(this,d);else{for(var A=0,a=[],p=s.length;A<p;A++)(s[A].fn!==c||i&&!s[A].once||o&&s[A].context!==o)&&a.push(s[A]);a.length?this._events[d]=a.length===1?a[0]:a:T(this,d)}return this},E.prototype.removeAllListeners=function(u){var c;return u?(c=D?D+u:u,this._events[c]&&T(this,c)):(this._events=new B,this._eventsCount=0),this},E.prototype.off=E.prototype.removeListener,E.prototype.addListener=E.prototype.on,E.prefixed=D,E.EventEmitter=E,q.exports=E},"./node_modules/url-toolkit/src/url-toolkit.js":function(q,Q,O){(function(j){var D=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,B=/^([^\/?#]*)([^]*)$/,I=/(?:\/|^)\.(?=\/)/g,v=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,T={buildAbsoluteURL:function(E,n,u){if(u=u||{},E=E.trim(),n=n.trim(),!n){if(!u.alwaysNormalize)return E;var c=T.parseURL(E);if(!c)throw new Error("Error trying to parse base URL.");return c.path=T.normalizePath(c.path),T.buildURLFromParts(c)}var o=T.parseURL(n);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return u.alwaysNormalize?(o.path=T.normalizePath(o.path),T.buildURLFromParts(o)):n;var i=T.parseURL(E);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var d=B.exec(i.path);i.netLoc=d[1],i.path=d[2]}i.netLoc&&!i.path&&(i.path="/");var s={scheme:i.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(s.netLoc=i.netLoc,o.path[0]!=="/"))if(!o.path)s.path=i.path,o.params||(s.params=i.params,o.query||(s.query=i.query));else{var A=i.path,a=A.substring(0,A.lastIndexOf("/")+1)+o.path;s.path=T.normalizePath(a)}return s.path===null&&(s.path=u.alwaysNormalize?T.normalizePath(o.path):o.path),T.buildURLFromParts(s)},parseURL:function(E){var n=D.exec(E);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(E){for(E=E.split("").reverse().join("").replace(I,"");E.length!==(E=E.replace(v,"")).length;);return E.split("").reverse().join("")},buildURLFromParts:function(E){return E.scheme+E.netLoc+E.path+E.params+E.query+E.fragment}};q.exports=T})(this)},"./node_modules/webworkify-webpack/index.js":function(q,Q,O){function j(u){var c={};function o(d){if(c[d])return c[d].exports;var s=c[d]={i:d,l:!1,exports:{}};return u[d].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=u,o.c=c,o.i=function(d){return d},o.d=function(d,s,A){o.o(d,s)||Object.defineProperty(d,s,{configurable:!1,enumerable:!0,get:A})},o.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},o.n=function(d){var s=d&&d.__esModule?function(){return d.default}:function(){return d};return o.d(s,"a",s),s},o.o=function(d,s){return Object.prototype.hasOwnProperty.call(d,s)},o.p="/",o.oe=function(d){throw console.error(d),d};var i=o(o.s=ENTRY_MODULE);return i.default||i}var D="[\\.|\\-|\\+|\\w|/|@]+",B="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+D+").*?\\)";function I(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function v(u){return!isNaN(1*u)}function T(u,c,o){var i={};i[o]=[];var d=c.toString(),s=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return i;for(var A=s[1],a=new RegExp("(\\\\n|\\W)"+I(A)+B,"g"),p;p=a.exec(d);){if(p[3]==="dll-reference")continue;i[o].push(p[3])}for(a=new RegExp("\\("+I(A)+'\\("(dll-reference\\s('+D+'))"\\)\\)'+B,"g");p=a.exec(d);)u[p[2]]||(i[o].push(p[1]),u[p[2]]=O(p[1]).m),i[p[2]]=i[p[2]]||[],i[p[2]].push(p[4]);for(var w=Object.keys(i),S=0;S<w.length;S++)for(var x=0;x<i[w[S]].length;x++)v(i[w[S]][x])&&(i[w[S]][x]=1*i[w[S]][x]);return i}function E(u){var c=Object.keys(u);return c.reduce(function(o,i){return o||u[i].length>0},!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<s.length;A++){var a=s[A],p=o[a],w=p.pop();if(d[a]=d[a]||{},d[a][w]||!u[a][w])continue;d[a][w]=!0,i[a]=i[a]||[],i[a].push(w);for(var S=T(u,u[a][w],a),x=Object.keys(S),L=0;L<x.length;L++)o[x[L]]=o[x[L]]||[],o[x[L]]=o[x[L]].concat(S[x[L]])}return i}q.exports=function(u,c){c=c||{};var o={main:O.m},i=c.all?{main:Object.keys(o.main)}:n(o,u),d="";Object.keys(i).filter(function(w){return w!=="main"}).forEach(function(w){for(var S=0;i[w][S];)S++;i[w].push(S),o[w][S]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+w+" = ("+j.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+i[w].map(function(x){return""+JSON.stringify(x)+": "+o[w][x].toString()}).join(",")+`});
|
|
`}),d=d+"new (("+j.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+i.main.map(function(w){return""+JSON.stringify(w)+": "+o.main[w].toString()}).join(",")+"}))(self);";var s=new window.Blob([d],{type:"text/javascript"});if(c.bare)return s;var A=window.URL||window.webkitURL||window.mozURL||window.msURL,a=A.createObjectURL(s),p=new window.Worker(a);return p.objectURL=a,p}},"./src/config.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"hlsDefaultConfig",function(){return L}),O.d(Q,"mergeConfig",function(){return h}),O.d(Q,"enableStreamingMode",function(){return r});var j=O("./src/controller/abr-controller.ts"),D=O("./src/controller/audio-stream-controller.ts"),B=O("./src/controller/audio-track-controller.ts"),I=O("./src/controller/subtitle-stream-controller.ts"),v=O("./src/controller/subtitle-track-controller.ts"),T=O("./src/controller/buffer-controller.ts"),E=O("./src/controller/timeline-controller.ts"),n=O("./src/controller/cap-level-controller.ts"),u=O("./src/controller/fps-controller.ts"),c=O("./src/controller/eme-controller.ts"),o=O("./src/controller/cmcd-controller.ts"),i=O("./src/utils/xhr-loader.ts"),d=O("./src/utils/fetch-loader.ts"),s=O("./src/utils/cues.ts"),A=O("./src/utils/mediakeys-helper.ts"),a=O("./src/utils/logger.ts");function p(){return p=Object.assign||function(l){for(var f=1;f<arguments.length;f++){var C=arguments[f];for(var g in C)Object.prototype.hasOwnProperty.call(C,g)&&(l[g]=C[g])}return l},p.apply(this,arguments)}function w(l,f){var C=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),C.push.apply(C,g)}return C}function S(l){for(var f=1;f<arguments.length;f++){var C=arguments[f]!=null?arguments[f]:{};f%2?w(Object(C),!0).forEach(function(g){x(l,g,C[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(C)):w(Object(C)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(C,g))})}return l}function x(l,f,C){return f in l?Object.defineProperty(l,f,{value:C,enumerable:!0,configurable:!0,writable:!0}):l[f]=C,l}var L=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:j.default,bufferController:T.default,capLevelController:n.default,fpsController:u.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:A.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},b()),{},{subtitleStreamController:I.SubtitleStreamController,subtitleTrackController:v.default,timelineController:E.TimelineController,audioStreamController:D.default,audioTrackController:B.default,emeController:c.default,cmcdController:o.default});function b(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function h(l,f){if((f.liveSyncDurationCount||f.liveMaxLatencyDurationCount)&&(f.liveSyncDuration||f.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(f.liveMaxLatencyDurationCount!==void 0&&(f.liveSyncDurationCount===void 0||f.liveMaxLatencyDurationCount<=f.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(f.liveMaxLatencyDuration!==void 0&&(f.liveSyncDuration===void 0||f.liveMaxLatencyDuration<=f.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return p({},l,f)}function r(l){var f=l.loader;if(f!==d.default&&f!==i.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var C=Object(d.fetchSupported)();C&&(l.loader=d.default,l.progressive=!0,l.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/polyfills/number.ts"),D=O("./src/utils/ewma-bandwidth-estimator.ts"),B=O("./src/events.ts"),I=O("./src/utils/buffer-helper.ts"),v=O("./src/errors.ts"),T=O("./src/types/loader.ts"),E=O("./src/utils/logger.ts");function n(o,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function u(o,i,d){return i&&n(o.prototype,i),d&&n(o,d),o}var c=function(){function o(d){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=d;var s=d.config;this.bwEstimator=new D.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var i=o.prototype;return i.registerListeners=function(){var s=this.hls;s.on(B.Events.FRAG_LOADING,this.onFragLoading,this),s.on(B.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(B.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var s=this.hls;s.off(B.Events.FRAG_LOADING,this.onFragLoading,this),s.off(B.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(B.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(s,A){var a=A.frag;if(a.type===T.PlaylistLevelType.MAIN&&!this.timer){var p;this.fragCurrent=a,this.partCurrent=(p=A.part)!=null?p:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(s,A){var a=this.hls.config;A.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var s=this.fragCurrent,A=this.partCurrent,a=this.hls,p=a.autoLevelEnabled,w=a.config,S=a.media;if(!s||!S)return;var x=A?A.stats:s.stats,L=A?A.duration:s.duration;if(x.aborted){E.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!p||S.paused||!S.playbackRate||!S.readyState)return;var b=performance.now()-x.loading.start,h=Math.abs(S.playbackRate);if(b<=500*L/h)return;var r=a.levels,l=a.minAutoLevel,f=r[s.level],C=x.total||Math.max(x.loaded,Math.round(L*f.maxBitrate/8)),g=Math.max(1,x.bwEstimate?x.bwEstimate/8:x.loaded*1e3/b),m=(C-x.loaded)/g,F=S.currentTime,P=(I.BufferHelper.bufferInfo(S,F,w.maxBufferHole).end-F)/h;if(P>=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<P)break}if(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||M<p))return m}return-1},u(o,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,A=this.bwEstimator;if(s!==-1&&(!A||!A.canEstimate()))return s;var a=this.getNextABRAutoLevel();return s!==-1&&(a=Math.min(s,a)),a},set:function(s){this._nextAutoLevel=s}}]),o}();Q.default=c},"./src/controller/audio-stream-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),B=O("./src/events.ts"),I=O("./src/utils/buffer-helper.ts"),v=O("./src/controller/fragment-tracker.ts"),T=O("./src/types/level.ts"),E=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),u=O("./src/demux/chunk-cache.ts"),c=O("./src/demux/transmuxer-interface.ts"),o=O("./src/types/transmuxer.ts"),i=O("./src/controller/fragment-finders.ts"),d=O("./src/utils/discontinuities.ts"),s=O("./src/errors.ts"),A=O("./src/utils/logger.ts");function a(){return a=Object.assign||function(L){for(var b=1;b<arguments.length;b++){var h=arguments[b];for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(L[r]=h[r])}return L},a.apply(this,arguments)}function p(L,b){L.prototype=Object.create(b.prototype),L.prototype.constructor=L,w(L,b)}function w(L,b){return w=Object.setPrototypeOf||function(r,l){return r.__proto__=l,r},w(L,b)}var S=100,x=function(L){p(b,L);function b(r,l){var f;return f=L.call(this,r,l,"[audio-stream-controller]")||this,f.videoBuffer=null,f.videoTrackCC=-1,f.waitingVideoCC=-1,f.audioSwitch=!1,f.trackId=-1,f.waitingData=null,f.mainDetails=null,f.bufferFlushed=!1,f._registerListeners(),f}var h=b.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var l=this.hls;l.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(B.Events.ERROR,this.onError,this),l.on(B.Events.BUFFER_RESET,this.onBufferReset,this),l.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var l=this.hls;l.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(B.Events.ERROR,this.onError,this),l.off(B.Events.BUFFER_RESET,this.onBufferReset,this),l.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(l,f){var C=f.frag,g=f.id,m=f.initPTS;if(g==="main"){var F=C.cc;this.initPTS[C.cc]=m,this.log("InitPTS for cc: "+F+" found from main: "+m),this.videoTrackCC=F,this.state===D.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=D.State.STOPPED;return}var f=this.lastCurrentTime;this.stopLoad(),this.setInterval(S),this.fragLoadError=0,f>0&&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&&ge<se&&((V.end>se||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<o.length;i++){var d=o[i];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(c,d.key,d)}}function T(c,o,i){return o&&v(c.prototype,o),i&&v(c,i),c}function E(c,o){c.prototype=Object.create(o.prototype),c.prototype.constructor=c,n(c,o)}function n(c,o){return n=Object.setPrototypeOf||function(d,s){return d.__proto__=s,d},n(c,o)}var u=function(c){E(o,c);function o(d){var s;return s=c.call(this,d,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var i=o.prototype;return i.registerListeners=function(){var s=this.hls;s.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(j.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var s=this.hls;s.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(j.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,c.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(s,A){this.tracks=A.audioTracks||[]},i.onAudioTrackLoaded=function(s,A){var a=A.id,p=A.details,w=this.tracksInGroup[a];if(!w){this.warn("Invalid audio track id "+a);return}var S=w.details;w.details=A.details,this.log("audioTrack "+a+" loaded ["+p.startSN+"-"+p.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,A,S))},i.onLevelLoading=function(s,A){this.switchLevel(A.level)},i.onLevelSwitching=function(s,A){this.switchLevel(A.level)},i.switchLevel=function(s){var A=this.hls.levels[s];if(!(A!=null&&A.audioGroupIds))return;var a=A.audioGroupIds[A.urlId];if(this.groupId!==a){this.groupId=a;var p=this.tracks.filter(function(S){return!a||S.groupId===a});this.selectDefaultTrack&&!p.some(function(S){return S.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=p;var w={audioTracks:p};this.log("Updating audio tracks, "+p.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(j.Events.AUDIO_TRACKS_UPDATED,w),this.selectInitialTrack()}},i.onError=function(s,A){if(c.prototype.onError.call(this,s,A),A.fatal||!A.context)return;A.context.type===I.PlaylistContextType.AUDIO_TRACK&&A.context.id===this.trackId&&A.context.groupId===this.groupId&&this.retryLoadingOrFail(A)},i.setAudioTrack=function(s){var A=this.tracksInGroup;if(s<0||s>=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;a<A.length;a++){var p=A[a];if((!this.selectDefaultTrack||p.default)&&(!s||s===p.name))return p.id}return-1},i.loadPlaylist=function(s){var A=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(A)){var a=A.id,p=A.groupId,w=A.url;if(s)try{w=s.addDirectives(w)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(j.Events.AUDIO_TRACK_LOADING,{url:w,id:a,groupId:p,deliveryDirectives:s||null})}},T(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),o}(B.default);Q.default=u},"./src/controller/base-playlist-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return T});var j=O("./src/polyfills/number.ts"),D=O("./src/types/level.ts"),B=O("./src/controller/level-helper.ts"),I=O("./src/utils/logger.ts"),v=O("./src/errors.ts"),T=function(){function E(u,c){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=I.logger.log.bind(I.logger,c+":"),this.warn=I.logger.warn.bind(I.logger,c+":"),this.hls=u}var n=E.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(c,o){o.fatal&&o.type===v.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(c,o){var i=o==null?void 0:o.renditionReports;if(i)for(var d=0;d<i.length;d++){var s=i[d],A=""+s.URI;if(A===c.substr(-A.length)){var a=parseInt(s["LAST-MSN"]),p=parseInt(s["LAST-PART"]);if(o&&this.hls.config.lowLatencyMode){var w=Math.min(o.age-o.partTarget,o.targetduration);p!==void 0&&w>o.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<i.levelLoadingMaxRetry;if(d){var s;if(this.retryCount++,c.details.indexOf("LoadTimeOut")>-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;f<l.length;f++){var C=l[f];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(r,C.key,C)}}function w(r,l,f){return l&&p(r.prototype,l),f&&p(r,f),r}function S(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function x(r,l){r.prototype=Object.create(l.prototype),r.prototype.constructor=r,L(r,l)}function L(r,l){return L=Object.setPrototypeOf||function(C,g){return C.__proto__=g,C},L(r,l)}var b={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},h=function(r){x(l,r);function l(C,g,m){var F;return F=r.call(this)||this,F.hls=void 0,F.fragPrevious=null,F.fragCurrent=null,F.fragmentTracker=void 0,F.transmuxer=null,F._state=b.STOPPED,F.media=void 0,F.mediaBuffer=void 0,F.config=void 0,F.bitrateTest=!1,F.lastCurrentTime=0,F.nextLoadPosition=0,F.startPosition=0,F.loadedmetadata=!1,F.fragLoadError=0,F.retryDate=0,F.levels=null,F.fragmentLoader=void 0,F.levelLastLoaded=null,F.startFragRequested=!1,F.decrypter=void 0,F.initPTS=[],F.onvseeking=null,F.onvended=null,F.logPrefix="",F.log=void 0,F.warn=void 0,F.logPrefix=m,F.log=v.logger.log.bind(v.logger,m+":"),F.warn=v.logger.warn.bind(v.logger,m+":"),F.hls=C,F.fragmentLoader=new d.default(C.config),F.fragmentTracker=g,F.config=C.config,F.decrypter=new s.default(C,C.config),C.on(T.Events.KEY_LOADED,F.onKeyLoaded,S(F)),F}var f=l.prototype;return f.doTick=function(){this.onTickEnd()},f.onTickEnd=function(){},f.startLoad=function(g){},f.stopLoad=function(){this.fragmentLoader.abort();var g=this.fragCurrent;g&&this.fragmentTracker.removeFragment(g),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=b.STOPPED},f._streamEnded=function(g,m){var F=this.fragCurrent,P=this.fragmentTracker;if(!m.live&&F&&F.sn===m.endSN&&!g.nextStart){var z=P.getState(F);return z===B.FragmentState.PARTIAL||z===B.FragmentState.OK}return!1},f.onMediaAttached=function(g,m){var F=this.media=this.mediaBuffer=m.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),F.addEventListener("seeking",this.onvseeking),F.addEventListener("ended",this.onvended);var P=this.config;this.levels&&P.autoStartLoad&&this.state===b.STOPPED&&this.startLoad(P.startPosition)},f.onMediaDetaching=function(){var g=this.media;g!=null&&g.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),g&&(g.removeEventListener("seeking",this.onvseeking),g.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onMediaSeeking=function(){var g=this.config,m=this.fragCurrent,F=this.media,P=this.mediaBuffer,z=this.state,Z=F?F.currentTime:0,V=I.BufferHelper.bufferInfo(P||F,Z,g.maxBufferHole);if(this.log("media seeking to "+(Object(j.isFiniteNumber)(Z)?Z.toFixed(3):Z)+", state: "+z),z===b.ENDED)this.resetLoadingState();else if(m&&!V.len){var M=g.maxFragLookUpTolerance,J=m.start-M,X=m.start+m.duration+M,re=Z>X;(Z<J||re)&&(re&&m.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),m.loader.abort()),this.resetLoadingState())}F&&(this.lastCurrentTime=Z),!this.loadedmetadata&&!V.len&&(this.nextLoadPosition=this.startPosition=Z),this.tickImmediate()},f.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},f.onKeyLoaded=function(g,m){if(this.state!==b.KEY_LOADING||m.frag!==this.fragCurrent||!this.levels)return;this.state=b.IDLE;var F=this.levels[m.frag.level].details;F&&this.loadFragment(m.frag,F,m.frag.start)},f.onHandlerDestroying=function(){this.stopLoad(),r.prototype.onHandlerDestroying.call(this)},f.onHandlerDestroyed=function(){this.state=b.STOPPED,this.hls.off(T.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,r.prototype.onHandlerDestroyed.call(this)},f.loadKey=function(g,m){this.log("Loading key for "+g.sn+" of ["+m.startSN+"-"+m.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=b.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(T.Events.KEY_LOADING,{frag:g})},f.loadFragment=function(g,m,F){this._loadFragForPlayback(g,m,F)},f._loadFragForPlayback=function(g,m,F){var P=this,z=function(V){if(P.fragContextChanged(g)){P.warn("Fragment "+g.sn+(V.part?" p: "+V.part.index:"")+" of level "+g.level+" was dropped during download."),P.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,P._handleFragmentLoadProgress(V)};this._doFragLoad(g,m,F,z).then(function(Z){if(!Z)return;P.fragLoadError=0;var V=P.state;if(P.fragContextChanged(g)){(V===b.FRAG_LOADING||V===b.BACKTRACKING||!P.fragCurrent&&V===b.PARSING)&&(P.fragmentTracker.removeFragment(g),P.state=b.IDLE);return}if("payload"in Z&&(P.log("Loaded fragment "+g.sn+" of level "+g.level),P.hls.trigger(T.Events.FRAG_LOADED,Z),P.state===b.BACKTRACKING)){P.fragmentTracker.backtrack(g,Z),P.resetFragmentLoading(g);return}P._handleFragmentLoadComplete(Z)}).catch(function(Z){P.warn(Z),P.resetFragmentLoading(g)})},f.flushMainBuffer=function(g,m,F){if(F===void 0&&(F=null),!(g-m))return;var P={startOffset:g,endOffset:m,type:F};this.fragLoadError=0,this.hls.trigger(T.Events.BUFFER_FLUSHING,P)},f._loadInitSegment=function(g){var m=this;this._doFragLoad(g).then(function(F){if(!F||m.fragContextChanged(g)||!m.levels)throw new Error("init load aborted");return F}).then(function(F){var P=m.hls,z=F.payload,Z=g.decryptdata;if(z&&z.byteLength>0&&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<Z.end)return I.BufferHelper.bufferInfo(g,P,Math.max(z.nextStart,F.maxBufferHole))}return z},f.getMaxBufferLength=function(g){var m=this.config,F;return g?F=Math.max(8*m.maxBufferSize/g,m.maxBufferLength):F=m.maxBufferLength,Math.min(F,m.maxMaxBufferLength)},f.reduceMaxBufferLength=function(g){var m=this.config,F=g||m.maxBufferLength;return m.maxMaxBufferLength>=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<X)return this.warn("Not enough fragments to start playback (have: "+Z+", need: "+X+")"),null;!m.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(J=this.getInitialLiveFragment(m,z),this.startPosition=J?this.hls.liveSyncPosition||J.start:g)}else g<=M&&(J=z[0]);if(!J){var re=V.lowLatencyMode?m.partEnd:m.fragmentEnd;J=this.getFragmentAtPosition(g,re,m)}return(F=J)!==null&&F!==void 0&&F.initSegment&&!((P=J)!==null&&P!==void 0&&P.initSegment.data)&&!this.bitrateTest&&(J=J.initSegment),J},f.getNextPart=function(g,m,F){for(var P=-1,z=!1,Z=!0,V=0,M=g.length;V<M;V++){var J=g[V];if(Z=Z&&!J.independent,P>-1&&F<J.start)break;var X=J.loaded;!X&&(z||J.independent||Z)&&J.fragment===m&&(P=V),z=X}return P},f.loadedEndOfParts=function(g,m){var F=g[g.length-1];return F&&m>F.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(g<m){var se=g>m-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<V&&this.fragmentTracker.getState(we)!==B.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+we.sn),re=we):re=null))}return re},f.synchronizeToLiveEdge=function(g){var m=this.config,F=this.media;if(!F)return;var P=this.hls.liveSyncPosition,z=F.currentTime,Z=g.fragments[0].start,V=g.edge,M=z>=Z-m.maxFragLookUpTolerance&&z<=V;if(P!==null&&F.duration>P&&(z<P||!M)){var J=m.liveMaxLatencyDuration!==void 0?m.liveMaxLatencyDuration:m.liveMaxLatencyDurationCount*g.targetduration;(!M&&F.readyState<4||z<V-J)&&(this.loadedmetadata||(this.nextLoadPosition=P),F.readyState&&(this.warn("Playback: "+z.toFixed(3)+" is located too far from the end of live sliding playlist: "+V+", reset currentTime to : "+P.toFixed(3)),F.currentTime=P))}},f.alignPlaylists=function(g,m){var F=this.levels,P=this.levelLastLoaded,z=this.fragPrevious,Z=P!==null?F[P]:null,V=g.fragments.length;if(!V)return this.warn("No fragments in live playlist"),0;var M=g.fragments[0].start,J=!m,X=g.alignedSliding&&Object(j.isFiniteNumber)(M);if(J||!X&&!M){Object(c.alignStream)(z,Z,g);var re=g.fragments[0].start;return this.log("Live playlist sliding: "+re.toFixed(2)+" start-sn: "+(m?m.startSN:"na")+"->"+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<m&&(F=-1),F===-1||this.lastCurrentTime===-1){var P=g.startTimeOffset;Object(j.isFiniteNumber)(P)?(F=m+P,P<0&&(F+=g.totalduration),F=Math.min(Math.max(m,F),m+g.totalduration),this.log("Start time offset "+P+" found in playlist, adjust startPosition to "+F),this.startPosition=F):g.live?F=this.hls.liveSyncPosition||m:this.startPosition=F=0,this.lastCurrentTime=F}this.nextLoadPosition=F},f.getLoadPosition=function(){var g=this.media,m=0;return this.loadedmetadata&&g?m=g.currentTime:this.nextLoadPosition&&(m=this.nextLoadPosition),m},f.handleFragLoadAborted=function(g,m){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(m?" part"+m.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},f.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=b.IDLE)},f.onFragmentOrKeyLoadError=function(g,m){if(m.fatal)return;var F=m.frag;if(!F||F.type!==g)return;var P=this.fragCurrent;console.assert(P&&F.sn===P.sn&&F.level===P.level&&F.urlId===P.urlId,"Frag load error must match current frag to retry");var z=this.config;if(this.fragLoadError+1<=z.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(F.level))return;var Z=Math.min(Math.pow(2,this.fragLoadError)*z.fragLoadingRetryDelay,z.fragLoadingMaxRetryTimeout);this.warn("Fragment "+F.sn+" of "+g+" "+F.level+" failed to load, retrying in "+Z+"ms"),this.retryDate=self.performance.now()+Z,this.fragLoadError++,this.state=b.FRAG_LOADING_WAITING_RETRY}else m.levelRetry?(g===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=b.IDLE):(v.logger.error(m.details+" reaches max retry, redispatch as fatal ..."),m.fatal=!0,this.hls.stopLoad(),this.state=b.ERROR)},f.afterBufferFlushed=function(g,m,F){if(!g)return;var P=I.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(m,P,F),this.state===b.ENDED&&this.resetLoadingState()},f.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=b.IDLE},f.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var m=this.levels?this.levels[g].details:null;if(m!=null&&m.live)return this.startPosition=-1,this.setStartPosition(m,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},f.updateLevelTiming=function(g,m,F,P){var z=this,Z=F.details;console.assert(!!Z,"level.details must be defined");var V=Object.keys(g.elementaryStreams).reduce(function(M,J){var X=g.elementaryStreams[J];if(X){var re=X.endPTS-X.startPTS;if(re<=0)return z.warn("Could not parse fragment "+g.sn+" "+J+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),z.resetTransmuxer(),M||!1;var se=P?0:Object(i.updateFragPTSDTS)(Z,g,X.startPTS,X.endPTS,X.startDTS,X.endDTS);return z.hls.trigger(T.Events.LEVEL_PTS_UPDATED,{details:Z,level:F,drift:se,type:J,frag:g,start:X.startPTS,end:X.endPTS}),!0}return M},!1);V?(this.state=b.PARSED,this.hls.trigger(T.Events.FRAG_PARSED,{frag:g,part:m})):this.resetLoadingState()},f.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},w(l,[{key:"state",get:function(){return this._state},set:function(g){var m=this._state;m!==g&&(this._state=g,this.log(m+"->"+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;E<T.length;E++){var n=T[E];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(v,n.key,n)}}function B(v,T,E){return T&&D(v.prototype,T),E&&D(v,E),v}var I=function(){function v(E){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=E,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var T=v.prototype;return T.setStreamController=function(n){this.streamController=n},T.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},T.registerListeners=function(){var n=this.hls;n.on(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},T.unregisterListener=function(){var n=this.hls;n.off(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},T.onFpsDropLevelCapping=function(n,u){v.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},T.onMediaAttaching=function(n,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},T.onManifestParsed=function(n,u){var c=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,c.config.capLevelToPlayerSize&&u.video&&this.startCapping()},T.onBufferCodecs=function(n,u){var c=this.hls;c.config.capLevelToPlayerSize&&u.video&&this.startCapping()},T.onMediaDetaching=function(){this.stopCapping()},T.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&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<n.length;d+=1){var s=n[d];if((s.width>=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<d.length;s++){var A=d[s];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(i,A.key,A)}}function T(i,d,s){return d&&v(i.prototype,d),s&&v(i,s),i}function E(i,d){var s=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(s)return(s=s.call(i)).next.bind(s);if(Array.isArray(i)||(s=n(i))||d&&i&&typeof i.length=="number"){s&&(i=s);var A=0;return function(){return A>=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);s<d;s++)A[s]=i[s];return A}function c(){return c=Object.assign||function(i){for(var d=1;d<arguments.length;d++){var s=arguments[d];for(var A in s)Object.prototype.hasOwnProperty.call(s,A)&&(i[A]=s[A])}return i},c.apply(this,arguments)}var o=function(){function i(s){var A=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){A.initialized&&(A.starved=!0),A.buffering=!0},this.onPlaying=function(){A.initialized||(A.initialized=!0),A.buffering=!1},this.applyPlaylistData=function(w){try{A.apply(w,{ot:D.CMCDObjectType.MANIFEST,su:!A.initialized})}catch(S){I.logger.warn("Could not generate manifest CMCD data.",S)}},this.applyFragmentData=function(w){try{var S=w.frag,x=A.hls.levels[S.level],L=A.getObjectType(S),b={d:S.duration*1e3,ot:L};(L===D.CMCDObjectType.VIDEO||L===D.CMCDObjectType.AUDIO||L==D.CMCDObjectType.MUXED)&&(b.br=x.bitrate/1e3,b.tb=A.getTopBandwidth(L),b.bl=A.getBufferLength(L)),A.apply(w,b)}catch(h){I.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=s;var a=this.config=s.config,p=a.cmcd;p!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=p.sessionId||i.uuid(),this.cid=p.contentId,this.useHeaders=p.useHeaders===!0,this.registerListeners())}var d=i.prototype;return d.registerListeners=function(){var A=this.hls;A.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),A.on(j.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var A=this.hls;A.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),A.off(j.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(A,a){this.media=a.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(A,a){var p,w;this.audioBuffer=(p=a.tracks.audio)===null||p===void 0?void 0:p.buffer,this.videoBuffer=(w=a.tracks.video)===null||w===void 0?void 0:w.buffer},d.createData=function(){var A;return{v:D.CMCDVersion,sf:D.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(A=this.media)===null||A===void 0?void 0:A.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(A,a){a===void 0&&(a={}),c(a,this.createData());var p=a.ot===D.CMCDObjectType.INIT||a.ot===D.CMCDObjectType.VIDEO||a.ot===D.CMCDObjectType.MUXED;if(this.starved&&p&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var w=i.toHeaders(a);if(!Object.keys(w).length)return;A.headers||(A.headers={}),c(A.headers,w)}else{var S=i.toQuery(a);if(!S)return;A.url=i.appendQueryToUri(A.url,S)}},d.getObjectType=function(A){var a=A.type;return a==="subtitle"?D.CMCDObjectType.TIMED_TEXT:A.sn==="initSegment"?D.CMCDObjectType.INIT:a==="audio"?D.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?D.CMCDObjectType.VIDEO:D.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(A){for(var a=0,p=A===D.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,w=E(p),S;!(S=w()).done;){var x=S.value;x.bitrate>a&&(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;L<b.length;L++){var h=b[L],r=x[h]!=null?x[h]:1;S[r][h]=A[h]}for(var l=0;l<S.length;l++){var f=i.serialize(S[l]);f&&(p["CMCD-"+w[l]]=f)}return p},i.toQuery=function(A){return"CMCD="+encodeURIComponent(i.serialize(A))},i.appendQueryToUri=function(A,a){if(!a)return A;var p=A.includes("?")?"&":"?";return""+A+p+a},i}()},"./src/controller/eme-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/utils/logger.ts"),I=O("./src/utils/mediakeys-helper.ts");function v(o,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function T(o,i,d){return i&&v(o.prototype,i),d&&v(o,d),o}var E=3,n=function(i,d,s){var A={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(a){A.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:s.audioRobustness||""})}),d.forEach(function(a){A.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:s.videoRobustness||""})}),[A]},u=function(i,d,s,A){switch(i){case I.KeySystems.WIDEVINE:return n(d,s,A);default:throw new Error("Unknown key-system: "+i)}},c=function(){function o(d){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=d,this._config=d.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var i=o.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(s){switch(s){case I.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},i._attemptKeySystemAccess=function(s,A,a){var p=this,w=u(s,A,a,this._drmSystemOptions);B.logger.log("Requesting encrypted media key-system access");var S=this.requestMediaKeySystemAccess(s,w);this.mediaKeysPromise=S.then(function(x){return p._onMediaKeySystemAccessObtained(s,x)}),S.catch(function(x){B.logger.error('Failed to obtain key-system "'+s+'" access:',x)})},i._onMediaKeySystemAccessObtained=function(s,A){var a=this;B.logger.log('Access for key-system "'+s+'" obtained');var p={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:A,mediaKeySystemDomain:s};this._mediaKeysList.push(p);var w=Promise.resolve().then(function(){return A.createMediaKeys()}).then(function(S){return p.mediaKeys=S,B.logger.log('Media-keys created for key-system "'+s+'"'),a._onMediaKeysCreated(),S});return w.catch(function(S){B.logger.error("Failed to create media-keys:",S)}),w},i._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(A){A.mediaKeysSession||(A.mediaKeysSession=A.mediaKeys.createSession(),s._onNewMediaKeySession(A.mediaKeysSession))})},i._onNewMediaKeySession=function(s){var A=this;B.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(a){A._onKeySessionMessage(s,a.message)},!1)},i._onKeySessionMessage=function(s,A){B.logger.log("Got EME message event, creating license request"),this._requestLicense(A,function(a){B.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),s.update(a)})},i.onMediaEncrypted=function(s){var A=this;if(B.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(w){if(!A._media)return;A._attemptSetMediaKeys(w),A._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(a).catch(a)},i._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var A=this._mediaKeysList[0];if(!A||!A.mediaKeys){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}B.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(A.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(s,A){var a=this,p=this._mediaKeysList[0];if(!p){B.logger.error("Fatal: Media is encrypted but not any 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}if(p.mediaKeysSessionInitialized){B.logger.warn("Key-Session already initialized but requested again");return}var w=p.mediaKeysSession;if(!w){B.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!A){B.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}B.logger.log('Generating key-session request for "'+s+'" init data type'),p.mediaKeysSessionInitialized=!0,w.generateRequest(s,A).then(function(){B.logger.debug("Key-session generation succeeded")}).catch(function(S){B.logger.error("Error generating key-session request:",S),a.hls.trigger(j.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(s,A,a){var p=new XMLHttpRequest;p.responseType="arraybuffer",p.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,p,s,A,a);var w=this._licenseXhrSetup;if(w)try{w.call(this.hls,p,s),w=void 0}catch(S){B.logger.error(S)}try{p.readyState||p.open("POST",s,!0),w&&w.call(this.hls,p,s)}catch(S){throw new Error("issue setting up KeySystem license XHR "+S)}return p},i._onLicenseRequestReadyStageChange=function(s,A,a,p){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,B.logger.log("License request succeeded");var w=s.response,S=this._licenseResponseCallback;if(S)try{w=S.call(this.hls,s,A)}catch(L){B.logger.error(L)}p(w)}else{if(B.logger.error("License Request XHR failed ("+A+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>E){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;d<n.length;++d){var s=n[d];if(T(u,c,s))return s}return null}function I(n,u,c,o){c===void 0&&(c=0),o===void 0&&(o=0);var i=null;if(n?i=u[n.sn-u[0].sn+1]||null:c===0&&u[0].start===0&&(i=u[0]),i&&v(c,o,i)===0)return i;var d=D.default.search(u,v.bind(null,c,o));return d||i}function v(n,u,c){n===void 0&&(n=0),u===void 0&&(u=0);var o=Math.min(u,c.duration+(c.deltaPTS?c.deltaPTS:0));return c.start+c.duration-o<=n?1:c.start-o>n&&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.cc<u?1:c.cc>u?-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<d.length;S++){var x=d.start(S)-this.bufferPadding,L=d.end(S)+this.bufferPadding;if(w>=x&&p<=L){s.time.push({startPTS:Math.max(A,d.start(S)),endPTS:Math.min(a,d.end(S))});break}else if(A<L&&a>x)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<i.length;A++){if(d=i.start(A)-this.bufferPadding,s=i.end(A)+this.bufferPadding,c>=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;S<w.length;S++)d.appendedPTS=Math.max(w.end(S),d.appendedPTS||0)})},n.onFragBuffered=function(c,o){this.detectPartialFragments(o)},n.hasFragment=function(c){var o=T(c);return!!this.fragments[o]},n.removeFragmentsInRange=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){var a=A.body;a.type===i&&a.start<o&&a.end>c&&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<S.length;x++){var L=S.start(x);if(p+s.maxBufferHole>=w&&p<L){var b=Math.max(L+n,a.currentTime+E);return I.logger.warn("skipping hole, adjusting currentTime from "+p+" to "+b),this.moved=!0,this.stalled=null,a.currentTime=b,d&&A.trigger(B.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+p+" to "+b,frag:d}),b}w=S.end(x)}return 0},o._tryNudgeBuffer=function(){var d=this.config,s=this.hls,A=this.media,a=A.currentTime,p=(this.nudgeRetry||0)+1;if(this.nudgeRetry=p,p<d.nudgeMaxRetry){var w=a+p*d.nudgeOffset;I.logger.warn("Nudging 'currentTime' from "+a+" to "+w),A.currentTime=w,s.trigger(B.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else I.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+d.nudgeMaxRetry+" nudges"),s.trigger(B.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},c}()},"./src/controller/id3-track-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),B=O("./src/demux/id3.ts"),I=.25,v=function(){function T(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var E=T.prototype;return E.destroy=function(){this._unregisterListeners()},E._registerListeners=function(){var u=this.hls;u.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var u=this.hls;u.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.onMediaAttached=function(u,c){this.media=c.media},E.onMediaDetaching=function(){if(!this.id3Track)return;Object(D.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},E.getID3Track=function(u){if(!this.media)return;for(var c=0;c<u.length;c++){var o=u[c];if(o.kind==="metadata"&&o.label==="id3")return Object(D.sendAddTrackEvent)(o,this.media),o}return this.media.addTextTrack("metadata","id3")},E.onFragParsingMetadata=function(u,c){if(!this.media)return;var o=c.frag,i=c.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<i.length;s++){var A=B.getID3Frames(i[s].data);if(A){var a=i[s].pts,p=s<i.length-1?i[s+1].pts:o.end,w=p-a;w<=0&&(p=a+I);for(var S=0;S<A.length;S++){var x=A[S];if(!B.isTimeStampFrame(x)){var L=new d(a,p,"");L.value=x,this.id3Track.addCue(L)}}}}},E.onBufferFlushing=function(u,c){var o=c.startOffset,i=c.endOffset,d=c.type;if(!d||d==="audio"){var s=this.id3Track;s&&Object(D.removeCuesInRange)(s,o,i)}},T}();Q.default=v},"./src/controller/latency-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return T});var j=O("./src/errors.ts"),D=O("./src/events.ts"),B=O("./src/utils/logger.ts");function I(E,n){for(var u=0;u<n.length;u++){var c=n[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(E,c.key,c)}}function v(E,n,u){return n&&I(E.prototype,n),u&&I(E,u),E}var T=function(){function E(u){var c=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return c.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var n=E.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(D.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(D.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(D.Events.ERROR,this.onError)},n.onMediaAttached=function(c,o){this.media=o.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(c,o){var i=o.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(c,o){if(o.details!==j.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,B.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var c=this.media,o=this.levelDetails;if(!c||!o)return;this.currentTime=c.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var d=this.config,s=d.lowLatencyMode,A=d.maxLiveSyncPlaybackRate;if(!s||A===1)return;var a=this.targetLatency;if(a===null)return;var p=i-a,w=Math.min(this.maxLatency,a+o.targetduration),S=p<w;if(o.live&&S&&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;a<arguments.length;a++){var p=arguments[a];for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(A[w]=p[w])}return A},n.apply(this,arguments)}function u(A,a){for(var p=0;p<a.length;p++){var w=a[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(A,w.key,w)}}function c(A,a,p){return a&&u(A.prototype,a),p&&u(A,p),A}function o(A,a){A.prototype=Object.create(a.prototype),A.prototype.constructor=A,i(A,a)}function i(A,a){return i=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},i(A,a)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(A){o(a,A);function a(w){var S;return S=A.call(this,w,"[level-controller]")||this,S._levels=[],S._firstLevel=-1,S._startLevel=void 0,S.currentLevelIndex=-1,S.manualLevelIndex=-1,S.onParsedComplete=void 0,S._registerListeners(),S}var p=a.prototype;return p._registerListeners=function(){var S=this.hls;S.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),S.on(D.Events.ERROR,this.onError,this)},p._unregisterListeners=function(){var S=this.hls;S.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),S.off(D.Events.ERROR,this.onError,this)},p.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,A.prototype.destroy.call(this)},p.startLoad=function(){var S=this._levels;S.forEach(function(x){x.loadError=0}),A.prototype.startLoad.call(this)},p.onManifestLoaded=function(S,x){var L=[],b=[],h=[],r,l={},f,C=!1,g=!1,m=!1;if(x.levels.forEach(function(Z){var V=Z.attrs;C=C||!!(Z.width&&Z.height),g=g||!!Z.videoCodec,m=m||!!Z.audioCodec,d&&Z.audioCodec&&Z.audioCodec.indexOf("mp4a.40.34")!==-1&&(Z.audioCodec=void 0);var M=Z.bitrate+"-"+Z.attrs.RESOLUTION+"-"+Z.attrs.CODECS;f=l[M],f?f.url.push(Z.url):(f=new j.Level(Z),l[M]=f,L.push(f)),V&&(V.AUDIO&&Object(v.addGroupId)(f,"audio",V.AUDIO),V.SUBTITLES&&Object(v.addGroupId)(f,"text",V.SUBTITLES))}),(C||g)&&m&&(L=L.filter(function(Z){var V=Z.videoCodec,M=Z.width,J=Z.height;return!!V||!!(M&&J)})),L=L.filter(function(Z){var V=Z.audioCodec,M=Z.videoCodec;return(!V||Object(I.isCodecSupportedInMp4)(V,"audio"))&&(!M||Object(I.isCodecSupportedInMp4)(M,"video"))}),x.audioTracks&&(b=x.audioTracks.filter(function(Z){return!Z.audioCodec||Object(I.isCodecSupportedInMp4)(Z.audioCodec,"audio")}),Object(v.assignTrackIdsByGroup)(b)),x.subtitles&&(h=x.subtitles,Object(v.assignTrackIdsByGroup)(h)),L.length>0){r=L[0].bitrate,L.sort(function(Z,V){return Z.bitrate-V.bitrate}),this._levels=L;for(var F=0;F<L.length;F++)if(L[F].bitrate===r){this._firstLevel=F,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+r);break}var P=m&&!g,z={levels:L,audioTracks:b,subtitleTracks:h,firstLevel:this._firstLevel,stats:x.stats,audio:m,video:g,altAudio:!P&&b.some(function(Z){return!!Z.url})};this.hls.trigger(D.Events.MANIFEST_PARSED,z),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(D.Events.ERROR,{type:B.ErrorTypes.MEDIA_ERROR,details:B.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:x.url,reason:"no level with compatible codecs found in manifest"})},p.onError=function(S,x){if(A.prototype.onError.call(this,S,x),x.fatal)return;var L=x.context,b=this._levels[this.currentLevelIndex];if(L&&(L.type===E.PlaylistContextType.AUDIO_TRACK&&b.audioGroupIds&&L.groupId===b.audioGroupIds[b.urlId]||L.type===E.PlaylistContextType.SUBTITLE_TRACK&&b.textGroupIds&&L.groupId===b.textGroupIds[b.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,r=!0,l;switch(x.details){case B.ErrorDetails.FRAG_LOAD_ERROR:case B.ErrorDetails.FRAG_LOAD_TIMEOUT:case B.ErrorDetails.KEY_LOAD_ERROR:case B.ErrorDetails.KEY_LOAD_TIMEOUT:if(x.frag){var f=this._levels[x.frag.level];f?(f.fragmentError++,f.fragmentError>this.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.loadError<f)S.levelRetry=!0,this.redundantFailover(x);else if(this.manualLevelIndex===-1){var C=x===0?this._levels.length-1:x-1;this.currentLevelIndex!==C&&this._levels[C].loadError===0&&(this.warn(h+": switch to "+C),S.levelRetry=!0,this.hls.nextAutoLevel=C)}}},p.redundantFailover=function(S){var x=this._levels[S],L=x.url.length;if(L>1){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;r<L.audioGroupIds.length;r++)if(L.audioGroupIds[r]===h){b=r;break}b!==L.urlId&&(L.urlId=b,this.startLoad())}},p.loadPlaylist=function(S){var x=this.currentLevelIndex,L=this._levels[x];if(this.canLoad&&L&&L.url.length>0){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||m<a.startSN||m>a.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<z.length-1;F++)T(z[F],z[F+1]);return a.fragmentHint&&T(z[z.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,g}function n(a,p){for(var w=null,S=a.fragments,x=S.length-1;x>=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<f.length;C++)f[C].cc+=b}p.skippedSegments&&(p.startCC=p.fragments[0].cc),u(a.partList,p.partList,function(F,P){P.elementaryStreams=F.elementaryStreams,P.stats=F.stats}),h?E(p,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):o(a,p),f.length&&(p.totalduration=p.edge-f[0].start),p.driftStartTime=a.driftStartTime,p.driftStart=a.driftStart;var g=p.advancedDateTime;if(p.advanced&&g){var m=p.edge;p.driftStart||(p.driftStartTime=g,p.driftStart=m),p.driftEndTime=g,p.driftEnd=m}else p.driftEndTime=a.driftEndTime,p.driftEnd=a.driftEnd,p.advancedDateTime=a.advancedDateTime}function u(a,p,w){if(a&&p)for(var S=0,x=0,L=a.length;x<=L;x++){var b=a[x],h=p[x+S];b&&h&&b.index===h.index&&b.fragment.sn===h.fragment.sn?w(b,h):S--}}function c(a,p,w){for(var S=p.skippedSegments,x=Math.max(a.startSN,p.startSN)-p.startSN,L=(a.fragmentHint?1:0)+(S?p.endSN:Math.min(a.endSN,p.endSN))-p.startSN,b=p.startSN-a.startSN,h=p.fragmentHint?p.fragments.concat(p.fragmentHint):p.fragments,r=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,l=x;l<=L;l++){var f=r[b+l],C=h[l];S&&!C&&l<S&&(C=p.fragments[l]=f),f&&C&&w(f,C)}}function o(a,p){var w=p.startSN+p.skippedSegments-a.startSN,S=a.fragments;if(w<0||w>=S.length)return;i(p,S[w].start)}function i(a,p){if(p){for(var w=a.fragments,S=a.skippedSegments;S<w.length;S++)w[S].start+=p;a.fragmentHint&&(a.fragmentHint.start+=p)}}function d(a,p){var w=1e3*a.levelTargetDuration,S=w/2,x=a.age,L=x>0&&x<w*3,b=p.loading.end-p.loading.start,h,r=a.availabilityDelay;if(a.updated===!1)if(L){var l=333*a.misses;h=Math.max(Math.min(S,b*2),l),a.availabilityDelay=(a.availabilityDelay||0)+h}else h=S;else L?(r=Math.min(r||w/2,x),a.availabilityDelay=r,h=r+w-x):h=w-b;return Math.round(h)}function s(a,p,w){if(!a||!a.details)return null;var S=a.details,x=S.fragments[p-S.startSN];return x||(x=S.fragmentHint,x&&x.sn===p?x:p<S.startSN&&w&&w.sn===p?w:null)}function A(a,p,w){if(!a||!a.details)return null;var S=a.details.partList;if(S)for(var x=S.length;x--;){var L=S[x];if(L.index===w&&L.fragment.sn===p)return L}return null}},"./src/controller/stream-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return S});var j=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),B=O("./src/is-supported.ts"),I=O("./src/events.ts"),v=O("./src/utils/buffer-helper.ts"),T=O("./src/controller/fragment-tracker.ts"),E=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),u=O("./src/demux/transmuxer-interface.ts"),c=O("./src/types/transmuxer.ts"),o=O("./src/controller/gap-controller.ts"),i=O("./src/errors.ts"),d=O("./src/utils/logger.ts");function s(x,L){for(var b=0;b<L.length;b++){var h=L[b];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(x,h.key,h)}}function A(x,L,b){return L&&s(x.prototype,L),b&&s(x,b),x}function a(x,L){x.prototype=Object.create(L.prototype),x.prototype.constructor=x,p(x,L)}function p(x,L){return p=Object.setPrototypeOf||function(h,r){return h.__proto__=r,h},p(x,L)}var w=100,S=function(x){a(L,x);function L(h,r){var l;return l=x.call(this,h,r,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var b=L.prototype;return b._registerListeners=function(){var r=this.hls;r.on(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(I.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(I.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(I.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(I.Events.ERROR,this.onError,this),r.on(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(I.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(I.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(I.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var r=this.hls;r.off(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(I.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(I.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(I.Events.ERROR,this.onError,this),r.off(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(I.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(I.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(I.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},b.startLoad=function(r){if(this.levels){var l=this.lastCurrentTime,f=this.hls;if(this.stopLoad(),this.setInterval(w),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var C=f.startLevel;C===-1&&(f.config.testBandwidth?(C=0,this.bitrateTest=!0):C=f.nextAutoLevel),this.level=f.nextLoadLevel=C,this.loadedmetadata=!1}l>0&&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&&l<f){if(r.seeking){d.logger.log("could not seek to "+f+", already seeking at "+l);return}var C=v.BufferHelper.getBuffered(r),g=C.length?C.start(0):0,m=g-f;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+m+" to match buffer start"),f+=m,this.startPosition=f),this.log("seek to target start position "+f+" from current time "+l),r.currentTime=f}},b._getAudioCodec=function(r){var l=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},b._loadBitrateTestFrag=function(r){var l=this;this._doFragLoad(r).then(function(f){var C=l.hls;if(!f||C.nextLoadLevel||l.fragContextChanged(r))return;l.fragLoadError=0,l.state=D.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var g=r.stats;g.parsing.start=g.parsing.end=g.buffering.start=g.buffering.end=self.performance.now(),C.trigger(I.Events.FRAG_LOADED,f)})},b._handleTransmuxComplete=function(r){var l,f="main",C=this.hls,g=r.remuxResult,m=r.chunkMeta,F=this.getCurrentContext(m);if(!F){this.warn("The loading context changed while buffering fragment "+m.sn+" of level "+m.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(m.level);return}var P=F.frag,z=F.part,Z=F.level,V=g.video,M=g.text,J=g.id3,X=g.initSegment,re=this.altAudio?void 0:g.audio;if(this.fragContextChanged(P))return;if(this.state=D.State.PARSING,X){X.tracks&&(this._bufferInitSegment(Z,X.tracks,P,m),C.trigger(I.Events.FRAG_PARSING_INIT_SEGMENT,{frag:P,id:f,tracks:X.tracks}));var se=X.initPTS,_e=X.timescale;Object(j.isFiniteNumber)(se)&&(this.initPTS[P.cc]=se,C.trigger(I.Events.INIT_PTS_FOUND,{frag:P,id:f,initPTS:se,timescale:_e}))}if(V&&g.independent!==!1){if(Z.details){var ge=V.startPTS,we=V.endPTS,Re=V.startDTS,He=V.endDTS;if(z)z.elementaryStreams[V.type]={startPTS:ge,endPTS:we,startDTS:Re,endDTS:He};else if(V.firstKeyFrame&&V.independent&&(this.couldBacktrack=!0),V.dropped&&V.independent){var Se=this.getLoadPosition()+this.config.maxBufferHole;if(Se<ge){this.backtrack(P);return}P.setElementaryStreamInfo(V.type,P.start,we,P.start,He,!0)}P.setElementaryStreamInfo(V.type,ge,we,Re,He),this.bufferFragmentData(V,P,z,m)}}else if(g.independent===!1){this.backtrack(P);return}if(re){var Te=re.startPTS,$e=re.endPTS,bt=re.startDTS,Ie=re.endDTS;z&&(z.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:Te,endPTS:$e,startDTS:bt,endDTS:Ie}),P.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,Te,$e,bt,Ie),this.bufferFragmentData(re,P,z,m)}if(J!=null&&(l=J.samples)!==null&&l!==void 0&&l.length){var ze={frag:P,id:f,samples:J.samples};C.trigger(I.Events.FRAG_PARSING_METADATA,ze)}if(M){var at={frag:P,id:f,samples:M.samples};C.trigger(I.Events.FRAG_PARSING_USERDATA,at)}},b._bufferInitSegment=function(r,l,f,C){var g=this;if(this.state!==D.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var m=l.audio,F=l.video,P=l.audiovideo;if(m){var z=r.audioCodec,Z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(z&&(z.indexOf("mp4a.40.5")!==-1?z="mp4a.40.2":z="mp4a.40.5"),m.metadata.channelCount!==1&&Z.indexOf("firefox")===-1&&(z="mp4a.40.5")),Z.indexOf("android")!==-1&&m.container!=="audio/mpeg"&&(z="mp4a.40.2",this.log("Android: force audio codec to "+z)),r.audioCodec&&r.audioCodec!==z&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+z+'"'),m.levelCodec=z,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(z||"")+"/"+(r.audioCodec||"")+"/"+m.codec+"]")}F&&(F.levelCodec=r.videoCodec,F.id="main",this.log("Init video buffer, container:"+F.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+F.codec+"]")),P&&this.log("Init audiovideo buffer, container:"+P.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+P.codec+"]"),this.hls.trigger(I.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(V){var M=l[V],J=M.initSegment;J!=null&&J.byteLength&&g.hls.trigger(I.Events.BUFFER_APPENDING,{type:V,data:J,frag:f,part:null,chunkMeta:C,parent:f.type})}),this.tick()},b.backtrack=function(r){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(r);var l=this.fragmentTracker.backtrack(r);this.fragPrevious=null,this.nextLoadPosition=r.start,l?this.resetFragmentLoading(r):this.state=D.State.BACKTRACKING},b.checkFragmentChanged=function(){var r=this.media,l=null;if(r&&r.readyState>1&&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<w.length;S++){var x=w[S];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(p,x.key,x)}}function i(p,w,S){return w&&o(p.prototype,w),S&&o(p,S),p}function d(p,w){p.prototype=Object.create(w.prototype),p.prototype.constructor=p,s(p,w)}function s(p,w){return s=Object.setPrototypeOf||function(x,L){return x.__proto__=L,x},s(p,w)}var A=500,a=function(p){d(w,p);function w(x,L){var b;return b=p.call(this,x,L,"[subtitle-stream-controller]")||this,b.levels=[],b.currentTrackId=-1,b.tracksBuffered=[],b.mainDetails=null,b._registerListeners(),b}var S=w.prototype;return S.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},S._registerListeners=function(){var L=this.hls;L.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(j.Events.ERROR,this.onError,this),L.on(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var L=this.hls;L.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(j.Events.ERROR,this.onError,this),L.off(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(A),this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},S.onLevelLoaded=function(L,b){this.mainDetails=b.details},S.onSubtitleFragProcessed=function(L,b){var h=b.frag,r=b.success;if(this.fragPrevious=h,this.state=n.State.IDLE,!r)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var f,C=h.start,g=0;g<l.length;g++)if(C>=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<F.length;){if(F[P].end<=m){F.shift();continue}else if(F[P].start<m)F[P].start=m;else break;P++}}),this.fragmentTracker.removeFragmentsInRange(h,m,u.PlaylistLevelType.SUBTITLE)}},S.onError=function(L,b){var h,r=b.frag;if(!r||r.type!==u.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},S.onSubtitleTracksUpdated=function(L,b){var h=this,r=b.subtitleTracks;this.tracksBuffered=[],this.levels=r.map(function(l){return new c.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){h.tracksBuffered[l.id]=[]}),this.mediaBuffer=null},S.onSubtitleTrackSwitch=function(L,b){if(this.currentTrackId=b.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var h=this.levels[this.currentTrackId];h!=null&&h.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,h&&this.setInterval(A)},S.onSubtitleTrackLoaded=function(L,b){var h,r=b.details,l=b.id,f=this.currentTrackId,C=this.levels;if(!C.length)return;var g=C[f];if(l>=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<V){var X=f.maxFragLookUpTolerance;J&&r.hasProgramDateTime&&(M=Object(I.findFragmentByPDT)(z,J.endProgramDateTime,X)),M||(M=Object(I.findFragmentByPTS)(J,z,m,X),!M&&J&&J.start<z[0].start&&(M=z[0]))}else M=z[Z-1];(L=M)!==null&&L!==void 0&&L.encrypted?(D.logger.log("Loading key for "+M.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(j.Events.KEY_LOADING,{frag:M})):M&&this.fragmentTracker.getState(M)===E.FragmentState.NOT_LOADED&&this.loadFragment(M,r,m)}},S.loadFragment=function(L,b,h){this.fragCurrent=L,p.prototype.loadFragment.call(this,L,b,h)},i(w,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),w}(n.default)},"./src/controller/subtitle-track-controller.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),B=O("./src/controller/base-playlist-controller.ts"),I=O("./src/types/loader.ts");function v(o,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function T(o,i,d){return i&&v(o.prototype,i),d&&v(o,d),o}function E(o,i){o.prototype=Object.create(i.prototype),o.prototype.constructor=o,n(o,i)}function n(o,i){return n=Object.setPrototypeOf||function(s,A){return s.__proto__=A,s},n(o,i)}var u=function(o){E(i,o);function i(s){var A;return A=o.call(this,s,"[subtitle-track-controller]")||this,A.media=null,A.tracks=[],A.groupId=null,A.tracksInGroup=[],A.trackId=-1,A.selectDefaultTrack=!0,A.queuedDefaultTrack=-1,A.trackChangeListener=function(){return A.onTextTracksChanged()},A.asyncPollTrackChange=function(){return A.pollTrackChange(0)},A.useTextTrackPolling=!1,A.subtitlePollingInterval=-1,A.subtitleDisplay=!0,A.registerListeners(),A}var d=i.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},d.registerListeners=function(){var A=this.hls;A.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),A.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),A.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),A.on(j.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var A=this.hls;A.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),A.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),A.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),A.off(j.Events.ERROR,this.onError,this)},d.onMediaAttached=function(A,a){if(this.media=a.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},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<a.length;p++){var w=a[p];if((!this.selectDefaultTrack||w.default)&&(!A||A===w.name))return w.id}return-1},d.onError=function(A,a){if(o.prototype.onError.call(this,A,a),a.fatal||!a.context)return;a.context.type===I.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},d.loadPlaylist=function(A){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var p=a.id,w=a.groupId,S=a.url;if(A)try{S=A.addDirectives(S)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+p),this.hls.trigger(j.Events.SUBTITLE_TRACK_LOADING,{url:S,id:p,groupId:w,deliveryDirectives:A||null})}},d.toggleTrackModes=function(A){var a=this,p=this.media,w=this.subtitleDisplay,S=this.trackId;if(!p)return;var x=c(p.textTracks),L=x.filter(function(r){return r.groupId===a.groupId});if(A===-1)[].slice.call(x).forEach(function(r){r.mode="disabled"});else{var b=L[S];b&&(b.mode="disabled")}var h=L[A];h&&(h.mode=w?"showing":"hidden")},d.setSubtitleTrack=function(A,a){var p,w=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=A;return}if(this.trackId!==A&&this.toggleTrackModes(A),this.trackId===A&&(A===-1||(p=w[A])!==null&&p!==void 0&&p.details)||A<-1||A>=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<a.length;p++)if(a[p].mode==="hidden")A=p;else if(a[p].mode==="showing"){A=p;break}this.subtitleTrack!==A&&(this.subtitleTrack=A)},T(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(A){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(A,a)}}]),i}(B.default);function c(o){for(var i=[],d=0;d<o.length;d++){var s=o[d];s.kind==="subtitles"&&s.label&&i.push(o[d])}return i}Q.default=u},"./src/controller/timeline-controller.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"TimelineController",function(){return c});var j=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),B=O("./src/utils/cea-608-parser.ts"),I=O("./src/utils/output-filter.ts"),v=O("./src/utils/webvtt-parser.ts"),T=O("./src/utils/texttrack-utils.ts"),E=O("./src/utils/imsc1-ttml-parser.ts"),n=O("./src/types/loader.ts"),u=O("./src/utils/logger.ts"),c=function(){function s(a){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this.captionsProperties=void 0,this.hls=a,this.config=a.config,this.Cues=a.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var p=new I.default(this,"textTrack1"),w=new I.default(this,"textTrack2"),S=new I.default(this,"textTrack3"),x=new I.default(this,"textTrack4");this.cea608Parser1=new B.default(1,p,w),this.cea608Parser2=new B.default(3,S,x)}a.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(D.Events.FRAG_LOADING,this.onFragLoading,this),a.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var A=s.prototype;return A.destroy=function(){var p=this.hls;p.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),p.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),p.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),p.off(D.Events.FRAG_LOADING,this.onFragLoading,this),p.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),p.off(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),p.off(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),p.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.off(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),p.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},A.addCues=function(p,w,S,x,L){for(var b=!1,h=L.length;h--;){var r=L[h],l=i(r[0],r[1],w,S);if(l>=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<w.textTracks.length;S++){var x=w.textTracks[S];if(x[p])return x}return null},A.createCaptionsTrack=function(p){this.config.renderTextTracksNatively?this.createNativeTrack(p):this.createNonNativeTrack(p)},A.createNativeTrack=function(p){if(this.captionsTracks[p])return;var w=this.captionsProperties,S=this.captionsTracks,x=this.media,L=w[p],b=L.label,h=L.languageCode,r=this.getExistingTrack(p);if(r)S[p]=r,Object(T.clearCurrentCues)(S[p]),Object(T.sendAddTrackEvent)(S[p],x);else{var l=this.createTextTrack("captions",b,h);l&&(l[p]=!0,S[p]=l)}},A.createNonNativeTrack=function(p){if(this.nonNativeCaptionsTracks[p])return;var w=this.captionsProperties[p];if(!w)return;var S=w.label,x={_id:p,label:S,kind:"captions",default:w.media?!!w.media.default:!1,closedCaptions:w.media};this.nonNativeCaptionsTracks[p]=x,this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[x]})},A.createTextTrack=function(p,w,S){var x=this.media;return x?x.addTextTrack(p,w,S):void 0},A.onMediaAttaching=function(p,w){this.media=w.media,this._cleanTracks()},A.onMediaDetaching=function(){var p=this.captionsTracks;Object.keys(p).forEach(function(w){Object(T.clearCurrentCues)(p[w]),delete p[w]}),this.nonNativeCaptionsTracks={}},A.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},A._cleanTracks=function(){var p=this.media;if(!p)return;var w=p.textTracks;if(w)for(var S=0;S<w.length;S++)Object(T.clearCurrentCues)(w[S])},A.onSubtitleTracksUpdated=function(p,w){var S=this;this.textTracks=[];var x=w.subtitleTracks||[],L=x.some(function(l){return l.textCodec===E.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var b=this.tracks&&x&&this.tracks.length===x.length;if(this.tracks=x||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,f){var C;if(f<h.length){for(var g=null,m=0;m<h.length;m++)if(o(h[m],l)){g=h[m];break}g&&(C=g)}C?Object(T.clearCurrentCues)(C):(C=S.createTextTrack("subtitles",l.name,l.lang),C&&(C.mode="disabled")),C&&(C.groupId=l.groupId,S.textTracks.push(C))})}else if(!b&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},A.onManifestLoaded=function(p,w){var S=this;this.config.enableCEA708Captions&&w.captions&&w.captions.forEach(function(x){var L=/(?:CC|SERVICE)([1-4])/.exec(x.instreamId);if(!L)return;var b="textTrack"+L[1],h=S.captionsProperties[b];if(!h)return;h.label=x.name,x.lang&&(h.languageCode=x.lang),h.media=x})},A.onFragLoading=function(p,w){var S=this.cea608Parser1,x=this.cea608Parser2,L=this.lastSn,b=this.lastPartIndex;if(!this.enabled||!(S&&x))return;if(w.frag.type===n.PlaylistLevelType.MAIN){var h,r,l=w.frag.sn,f=(h=w==null||((r=w.part)===null||r===void 0)?void 0:r.index)!=null?h:-1;l===L+1||l===L&&f===b+1||(S.reset(),x.reset()),this.lastSn=l,this.lastPartIndex=f}},A.onFragLoaded=function(p,w){var S=w.frag,x=w.payload,L=this.initPTS,b=this.unparsedVttFrags;if(S.type===n.PlaylistLevelType.SUBTITLE)if(x.byteLength){if(!Object(j.isFiniteNumber)(L[S.cc])){b.push(w),L.length&&this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Missing initial subtitle PTS")});return}var h=S.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var r=this.tracks[S.level],l=this.vttCCs;l[S.cc]||(l[S.cc]={start:S.start,prevCC:this.prevCC,new:!0},this.prevCC=S.cc),r&&r.textCodec===E.IMSC1_CODEC?this._parseIMSC1(S,x):this._parseVTTs(S,x,l)}}else this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Empty subtitle payload")})},A._parseIMSC1=function(p,w){var S=this,x=this.hls;Object(E.parseIMSC1)(w,this.initPTS[p.cc],this.timescale[p.cc],function(L){S._appendCues(L,p.level),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:p})},function(L){u.logger.log("Failed to parse IMSC1: "+L),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:p,error:L})})},A._parseVTTs=function(p,w,S){var x=this,L=this.hls;Object(v.parseWebVTT)(w,this.initPTS[p.cc],this.timescale[p.cc],S,p.cc,p.start,function(b){x._appendCues(b,p.level),L.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:p})},function(b){x._fallbackToIMSC1(p,w),u.logger.log("Failed to parse VTT cue: "+b),L.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:p,error:b})})},A._fallbackToIMSC1=function(p,w){var S=this,x=this.tracks[p.level];x.textCodec||Object(E.parseIMSC1)(w,this.initPTS[p.cc],this.timescale[p.cc],function(){x.textCodec=E.IMSC1_CODEC,S._parseIMSC1(p,w)},function(){x.textCodec="wvtt"})},A._appendCues=function(p,w){var S=this.hls;if(this.config.renderTextTracksNatively){var x=this.textTracks[w];if(x.mode==="disabled")return;p.forEach(function(h){return Object(T.addCueToTrack)(x,h)})}else{var L=this.tracks[w],b=L.default?"default":"subtitles"+w;S.trigger(D.Events.CUES_PARSED,{type:"subtitles",cues:p,track:b})}},A.onFragDecrypted=function(p,w){var S=w.frag;if(S.type===n.PlaylistLevelType.SUBTITLE){if(!Object(j.isFiniteNumber)(this.initPTS[S.cc])){this.unparsedVttFrags.push(w);return}this.onFragLoaded(D.Events.FRAG_LOADED,w)}},A.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},A.onFragParsingUserdata=function(p,w){var S=this.cea608Parser1,x=this.cea608Parser2;if(!this.enabled||!(S&&x))return;for(var L=0;L<w.samples.length;L++){var b=w.samples[L].bytes;if(b){var h=this.extractCea608Data(b);S.addData(w.samples[L].pts,h[0]),x.addData(w.samples[L].pts,h[1])}}},A.onBufferFlushing=function(p,w){var S=w.startOffset,x=w.endOffset,L=w.endOffsetSubtitles,b=w.type,h=this.media;if(!h||h.currentTime<x)return;if(!b||b==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(f){return Object(T.removeCuesInRange)(r[f],S,x)})}if(this.config.renderTextTracksNatively&&(S===0&&L!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(f){return Object(T.removeCuesInRange)(l[f],S,L)})}},A.extractCea608Data=function(p){for(var w=p[0]&31,S=2,x=[[],[]],L=0;L<w;L++){var b=p[S++],h=127&p[S++],r=127&p[S++],l=(4&b)!==0,f=3&b;if(h===0&&r===0)continue;l&&((f===0||f===1)&&(x[f].push(h),x[f].push(r)))}return x},s}();function o(s,A){return s&&s.label===A.name&&!(s.textTrack1||s.textTrack2)}function i(s,A,a,p){return Math.min(A,p)-Math.max(s,a)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return j});var j=function(){function D(I,v){this.subtle=void 0,this.aesIV=void 0,this.subtle=I,this.aesIV=v}var B=D.prototype;return B.decrypt=function(v,T){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},T,v)},D}()},"./src/crypt/aes-decryptor.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"removePadding",function(){return D}),O.d(Q,"default",function(){return B});var j=O("./src/utils/typed-array.ts");function D(I){var v=I.byteLength,T=v&&new DataView(I.buffer).getUint8(v-1);return T?Object(j.sliceUint8)(I,0,v-T):I}var B=function(){function I(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var v=I.prototype;return v.uint8ArrayToUint32Array_=function(E){for(var n=new DataView(E),u=new Uint32Array(4),c=0;c<4;c++)u[c]=n.getUint32(c*4);return u},v.initTable=function(){var E=this.sBox,n=this.invSBox,u=this.subMix,c=u[0],o=u[1],i=u[2],d=u[3],s=this.invSubMix,A=s[0],a=s[1],p=s[2],w=s[3],S=new Uint32Array(256),x=0,L=0,b=0;for(b=0;b<256;b++)b<128?S[b]=b<<1:S[b]=b<<1^283;for(b=0;b<256;b++){var h=L^L<<1^L<<2^L<<3^L<<4;h=h>>>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<n.length&&u;)u=n[c]===this.key[c],c++;if(u)return;this.key=n;var o=this.keySize=n.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var i=this.ksRows=(o+6+1)*4,d,s,A=this.keySchedule=new Uint32Array(i),a=this.invKeySchedule=new Uint32Array(i),p=this.sBox,w=this.rcon,S=this.invSubMix,x=S[0],L=S[1],b=S[2],h=S[3],r,l;for(d=0;d<i;d++){if(d<o){r=A[d]=n[d];continue}l=r,d%o===0?(l=l<<8|l>>>24,l=p[l>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[l&255],l^=w[d/o|0]<<24):o>6&&d%o===4&&(l=p[l>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[l&255]),A[d]=r=(A[d-o]^l)>>>0}for(s=0;s<i;s++)d=i-s,s&3?l=A[d]:l=A[d-4],s<4||d<=4?a[s]=l:a[s]=x[p[l>>>24]]^L[p[l>>>16&255]]^b[p[l>>>8&255]]^h[p[l&255]],a[s]=a[s]>>>0},v.networkToHostOrderSwap=function(E){return E<<24|(E&65280)<<8|(E&16711680)>>8|E>>>24},v.decrypt=function(E,n,u){for(var c=this.keySize+6,o=this.invKeySchedule,i=this.invSBox,d=this.invSubMix,s=d[0],A=d[1],a=d[2],p=d[3],w=this.uint8ArrayToUint32Array_(u),S=w[0],x=w[1],L=w[2],b=w[3],h=new Int32Array(E),r=new Int32Array(h.length),l,f,C,g,m,F,P,z,Z,V,M,J,X,re,se=this.networkToHostOrderSwap;n<h.length;){for(Z=se(h[n]),V=se(h[n+1]),M=se(h[n+2]),J=se(h[n+3]),m=Z^o[0],F=J^o[1],P=M^o[2],z=V^o[3],X=4,re=1;re<c;re++)l=s[m>>>24]^A[F>>16&255]^a[P>>8&255]^p[z&255]^o[X],f=s[F>>>24]^A[P>>16&255]^a[z>>8&255]^p[m&255]^o[X+1],C=s[P>>>24]^A[z>>16&255]^a[m>>8&255]^p[F&255]^o[X+2],g=s[z>>>24]^A[m>>16&255]^a[F>>8&255]^p[P&255]^o[X+3],m=l,F=f,P=C,z=g,X=X+4;l=i[m>>>24]<<24^i[F>>16&255]<<16^i[P>>8&255]<<8^i[z&255]^o[X],f=i[F>>>24]<<24^i[P>>16&255]<<16^i[z>>8&255]<<8^i[m&255]^o[X+1],C=i[P>>>24]<<24^i[z>>16&255]<<16^i[m>>8&255]<<8^i[F&255]^o[X+2],g=i[z>>>24]<<24^i[m>>16&255]<<16^i[F>>8&255]<<8^i[P&255]^o[X+3],r[n]=se(l^S),r[n+1]=se(g^x),r[n+2]=se(C^L),r[n+3]=se(f^b),S=Z,x=V,L=M,b=J,n=n+4}return r.buffer},I}()},"./src/crypt/decrypter.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return n});var j=O("./src/crypt/aes-crypto.ts"),D=O("./src/crypt/fast-aes-key.ts"),B=O("./src/crypt/aes-decryptor.ts"),I=O("./src/utils/logger.ts"),v=O("./src/utils/mp4-tools.ts"),T=O("./src/utils/typed-array.ts"),E=16,n=function(){function u(o,i,d){var s=d===void 0?{}:d,A=s.removePKCS7Padding,a=A===void 0?!0:A;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=o,this.config=i,this.removePKCS7Padding=a,a)try{var p=self.crypto;p&&(this.subtle=p.subtle||p.webkitSubtle)}catch(w){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var c=u.prototype;return c.destroy=function(){this.observer=null},c.isSync=function(){return this.config.enableSoftwareAES},c.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var d=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(B.removePadding)(d):d},c.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},c.decrypt=function(i,d,s,A){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),d,s);var a=this.flush();a&&A(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),d,s).then(A)},c.softwareDecrypt=function(i,d,s){var A=this.currentIV,a=this.currentResult,p=this.remainderData;this.logOnce("JS AES decrypt"),p&&(i=Object(v.appendUint8Array)(p,i),this.remainderData=null);var w=this.getValidChunk(i);if(!w.length)return null;A&&(s=A);var S=this.softwareDecrypter;S||(S=this.softwareDecrypter=new B.default),S.expandKey(d);var x=a;return this.currentResult=S.decrypt(w.buffer,0,s),this.currentIV=Object(T.sliceUint8)(w,-16).buffer,x||null},c.webCryptoDecrypt=function(i,d,s){var A=this,a=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new D.default(a,d)),this.fastAesKey.expandKey().then(function(p){if(!a)return Promise.reject(new Error("web crypto not initialized"));var w=new j.default(a,s);return w.decrypt(i.buffer,p)}).catch(function(p){return A.onWebCryptoError(p,i,d,s)})},c.onWebCryptoError=function(i,d,s,A){return I.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,s,A)},c.getValidChunk=function(i){var d=i,s=i.length-i.length%E;return s!==i.length&&(d=Object(T.sliceUint8)(i,0,s),this.remainderData=Object(T.sliceUint8)(i,s)),d},c.logOnce=function(i){if(!this.logEnabled)return;I.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return j});var j=function(){function D(I,v){this.subtle=void 0,this.key=void 0,this.subtle=I,this.key=v}var B=D.prototype;return B.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},D}()},"./src/demux/aacdemuxer.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/adts.ts"),B=O("./src/utils/logger.ts"),I=O("./src/demux/id3.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(o,i){var d;return d=n.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=o,d.config=i,d}var c=u.prototype;return c.resetInitSegment=function(i,d,s){n.prototype.resetInitSegment.call(this,i,d,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:s,inputTimeScale:9e4,dropped:0}},u.probe=function(i){if(!i)return!1;for(var d=I.getID3Data(i,0)||[],s=d.length,A=i.length;s<A;s++)if(D.probe(i,s))return B.logger.log("ADTS sync word found !"),!0;return!1},c.canParse=function(i,d){return D.canParse(i,d)},c.appendFrame=function(i,d,s){D.initTrackConfig(i,this.observer,d,s,i.manifestCodec);var A=D.appendFrame(i,d,s,this.initPTS,this.frameIndex);if(A&&A.missing===0)return A},u}(j.default);E.minProbeByteLength=9,Q.default=E},"./src/demux/adts.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"getAudioConfig",function(){return I}),O.d(Q,"isHeaderPattern",function(){return v}),O.d(Q,"getHeaderLength",function(){return T}),O.d(Q,"getFullFrameLength",function(){return E}),O.d(Q,"canGetFrameLength",function(){return n}),O.d(Q,"isHeader",function(){return u}),O.d(Q,"canParse",function(){return c}),O.d(Q,"probe",function(){return o}),O.d(Q,"initTrackConfig",function(){return i}),O.d(Q,"getFrameDuration",function(){return d}),O.d(Q,"parseFrameHeader",function(){return s}),O.d(Q,"appendFrame",function(){return A});var j=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),B=O("./src/events.ts");function I(a,p,w,S){var x,L,b,h,r=navigator.userAgent.toLowerCase(),l=S,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];x=((p[w+2]&192)>>>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}function u(a,p){return p+1<a.length&&v(a,p)}function c(a,p){return n(a,p)&&v(a,p)&&E(a,p)<=a.length-p}function o(a,p){if(u(a,p)){var w=T(a,p);if(p+w>=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;s<x;){if(this.canParse(o,s)){var L=this.appendFrame(p,o,s);L?(this.frameIndex++,a=L.sample.pts,s+=L.length,A=s):s=x}else D.canParse(o,s)?(d=D.getID3Data(o,s),w.samples.push({pts:a,dts:a,data:d}),s+=d.length,A=s):s++;if(s===x&&A!==x){var b=Object(v.sliceUint8)(o,A);this.cachedData?this.cachedData=Object(I.appendUint8Array)(this.cachedData,b):this.cachedData=b}}return{audioTrack:p,avcTrack:Object(B.dummyTrack)(),id3Track:w,textTrack:Object(B.dummyTrack)()}},u.demuxSampleAes=function(o,i,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(o){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(B.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(B.dummyTrack)()}},u.destroy=function(){},n}(),E=function(u,c){return Object(j.isFiniteNumber)(u)?u*90:c*9e4};Q.default=T},"./src/demux/chunk-cache.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return j});var j=function(){function B(){this.chunks=[],this.dataLength=0}var I=B.prototype;return I.push=function(T){this.chunks.push(T),this.dataLength+=T.length},I.flush=function(){var T=this.chunks,E=this.dataLength,n;if(T.length)T.length===1?n=T[0]:n=D(T,E);else return new Uint8Array(0);return this.reset(),n},I.reset=function(){this.chunks.length=0,this.dataLength=0},B}();function D(B,I){for(var v=new Uint8Array(I),T=0,E=0;E<B.length;E++){var n=B[E];v.set(n,T),T+=n.length}return v}},"./src/demux/dummy-demuxed-track.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"dummyTrack",function(){return j});function j(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/utils/logger.ts"),D=function(){function B(v){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=v,this.bytesAvailable=v.byteLength,this.word=0,this.bitsAvailable=0}var I=B.prototype;return I.loadWord=function(){var T=this.data,E=this.bytesAvailable,n=T.byteLength-E,u=new Uint8Array(4),c=Math.min(4,E);if(c===0)throw new Error("no bytes available");u.set(T.subarray(n,n+c)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=c*8,this.bytesAvailable-=c},I.skipBits=function(T){var E;this.bitsAvailable>T?(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<<E|this.readBits(E):n},I.skipLZ=function(){var T;for(T=0;T<this.bitsAvailable;++T)if((this.word&2147483648>>>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;c<T;c++)n!==0&&(u=this.readEG(),n=(E+u+256)%256),E=n===0?E:n},I.readSPS=function(){var T=0,E=0,n=0,u=0,c,o,i,d=this.readUByte.bind(this),s=this.readBits.bind(this),A=this.readUEG.bind(this),a=this.readBoolean.bind(this),p=this.skipBits.bind(this),w=this.skipEG.bind(this),S=this.skipUEG.bind(this),x=this.skipScalingList.bind(this);d();var L=d();if(s(5),p(3),d(),S(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var b=A();if(b===3&&p(1),S(),S(),p(1),a())for(o=b!==3?8:12,i=0;i<o;i++)a()&&(i<6?x(16):x(64))}S();var h=A();if(h===0)A();else if(h===1)for(p(1),w(),w(),c=A(),i=0;i<c;i++)w();S(),p(1);var r=A(),l=A(),f=s(1);f===0&&p(1),p(1),a()&&(T=A(),E=A(),n=A(),u=A());var C=[1,1];if(a()&&a()){var g=d();switch(g){case 1:C=[1,1];break;case 2:C=[12,11];break;case 3:C=[10,11];break;case 4:C=[16,11];break;case 5:C=[40,33];break;case 6:C=[24,11];break;case 7:C=[20,11];break;case 8:C=[32,11];break;case 9:C=[80,33];break;case 10:C=[18,11];break;case 11:C=[15,11];break;case 12:C=[64,33];break;case 13:C=[160,99];break;case 14:C=[4,3];break;case 15:C=[3,2];break;case 16:C=[2,1];break;case 255:{C=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((r+1)*16-T*2-E*2),height:(2-f)*(l+1)*16-(f?2:4)*(n+u),pixelRatio:C}},I.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},B}();Q.default=D},"./src/demux/id3.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"isHeader",function(){return j}),O.d(Q,"isFooter",function(){return D}),O.d(Q,"getID3Data",function(){return B}),O.d(Q,"canParse",function(){return v}),O.d(Q,"getTimeStamp",function(){return T}),O.d(Q,"isTimeStampFrame",function(){return E}),O.d(Q,"getID3Frames",function(){return u}),O.d(Q,"decodeFrame",function(){return c}),O.d(Q,"utf8ArrayToStr",function(){return A}),O.d(Q,"testables",function(){return a});var j=function(x,L){return L+10<=x.length&&(x[L]===73&&x[L+1]===68&&x[L+2]===51&&(x[L+3]<255&&x[L+4]<255&&(x[L+6]<128&&x[L+7]<128&&x[L+8]<128&&x[L+9]<128)))},D=function(x,L){return L+10<=x.length&&(x[L]===51&&x[L+1]===68&&x[L+2]===73&&(x[L+3]<255&&x[L+4]<255&&(x[L+6]<128&&x[L+7]<128&&x[L+8]<128&&x[L+9]<128)))},B=function(x,L){for(var b=L,h=0;j(x,L);){h+=10;var r=I(x,L+6);h+=r,D(x,L+10)&&(h+=10),L+=h}return h>0?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<L.length;b++){var h=L[b];if(E(h))return s(h)}return},E=function(x){return x&&x.key==="PRIV"&&x.info==="com.apple.streaming.transportStreamTimestamp"},n=function(x){var L=String.fromCharCode(x[0],x[1],x[2],x[3]),b=I(x,4),h=10;return{type:L,size:b,data:x.subarray(h,h+b)}},u=function(x){for(var L=0,b=[];j(x,L);){var h=I(x,L+6);L+=10;for(var r=L+h;L+8<r;){var l=n(x.subarray(L)),f=c(l);f&&b.push(f),L+=l.size+10}D(x,L)&&(L+=10)}return b},c=function(x){return x.type==="PRIV"?o(x):x.type[0]==="W"?d(x):i(x)},o=function(x){if(x.size<2)return;var L=A(x.data,!0),b=new Uint8Array(x.data.subarray(L.length+1));return{key:x.type,info:L,data:b.buffer}},i=function(x){if(x.size<2)return;if(x.type==="TXXX"){var L=1,b=A(x.data.subarray(L),!0);L+=b.length+1;var h=A(x.data.subarray(L));return{key:x.type,info:b,data:h}}var r=A(x.data.subarray(1));return{key:x.type,data:r}},d=function(x){if(x.type==="WXXX"){if(x.size<2)return;var L=1,b=A(x.data.subarray(L),!0);L+=b.length+1;var h=A(x.data.subarray(L));return{key:x.type,info:b,data:h}}var r=A(x.data);return{key:x.type,data:r}},s=function(x){if(x.data.byteLength===8){var L=new Uint8Array(x.data),b=L[3]&1,h=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return h/=45,b&&(h+=4772185884e-2),Math.round(h)}return},A=function(x,L){L===void 0&&(L=!1);var b=w();if(b){var h=b.decode(x);if(L){var r=h.indexOf("\0");return r!==-1?h.substring(0,r):h}return h.replace(/\0/g,"")}for(var l=x.length,f,C,g,m="",F=0;F<l;){if(f=x[F++],f===0&&L)return m;if(f===0||f===3)continue;switch(f>>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;s<A;s++)if(I.probe(i,s))return B.logger.log("MPEG Audio sync word found !"),!0;return!1},c.canParse=function(i,d){return I.canParse(i,d)},c.appendFrame=function(i,d,s){return this.initPTS===null?void 0:I.appendFrame(i,d,s,this.initPTS,this.frameIndex)},u}(j.default);E.minProbeByteLength=4,Q.default=E},"./src/demux/mp4demuxer.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/utils/mp4-tools.ts"),D=O("./src/demux/dummy-demuxed-track.ts"),B=function(){function I(T,E){this.remainderData=null,this.config=void 0,this.config=E}var v=I.prototype;return v.resetTimeStamp=function(){},v.resetInitSegment=function(){},v.resetContiguity=function(){},I.probe=function(E){return Object(j.findBox)({data:E,start:0,end:Math.min(E.length,16384)},["moof"]).length>0},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<i.length&&n(i,d)}function c(i,d){var s=4;return n(i,d)&&s<=i.length-d}function o(i,d){if(d+1<i.length&&n(i,d)){var s=4,A=E(i,d),a=s;A!=null&&A.frameLength&&(a=A.frameLength);var p=d+a;return p===i.length||u(i,p)}return!1}},"./src/demux/sample-aes.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/crypt/decrypter.ts"),D=O("./src/demux/tsdemuxer.ts"),B=function(){function I(T,E,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new j.default(T,E,{removePKCS7Padding:!1})}var v=I.prototype;return v.decryptBuffer=function(E,n){this.decrypter.decrypt(E,this.keyData.key.buffer,this.keyData.iv.buffer,n)},v.decryptAacSample=function(E,n,u,c){var o=E[n].unit,i=o.subarray(16,o.length-o.length%16),d=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),s=this;this.decryptBuffer(d,function(A){var a=new Uint8Array(A);o.set(a,16),c||s.decryptAacSamples(E,n+1,u)})},v.decryptAacSamples=function(E,n,u){for(;;n++){if(n>=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;X<re;X++)if(s[X].demux.probe(l)){J=s[X];break}J||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),J={demux:v.default,remux:u.default});var se=this.demuxer,_e=this.remuxer,ge=J.remux,we=J.demux;(!_e||!(_e instanceof ge))&&(this.remuxer=new ge(g,C,m,F)),(!se||!(se instanceof we))&&(this.demuxer=new we(g,C,m),this.probe=we.probe),this.resetInitSegment(V,P,M,Z),this.resetInitialTimestamp(z)},h.needsProbing=function(l,f,C){return!this.demuxer||!this.remuxer||f||C},h.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new B.default(this.observer,this.config)),l},b}();function p(b,h){var r=null;return b.byteLength>0&&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<h;){if(b[r]===71&&b[r+188]===71&&b[r+2*188]===71)return r;r++}return-1},S.createTrack=function(b,h){return{container:b==="video"||b==="audio"?"video/mp2t":void 0,type:b,id:c[b],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:b==="audio"?h:void 0}};var x=S.prototype;return x.resetInitSegment=function(b,h,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=S.createTrack("video",r),this._audioTrack=S.createTrack("audio",r),this._id3Track=S.createTrack("id3",r),this._txtTrack=S.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=b,this.videoCodec=h,this._duration=r},x.resetTimeStamp=function(){},x.resetContiguity=function(){var b=this._audioTrack,h=this._avcTrack,r=this._id3Track;b&&(b.pesData=null),h&&(h.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},x.demux=function(b,h,r,l){r===void 0&&(r=!1),l===void 0&&(l=!1),r||(this.sampleAes=null);var f,C=this._avcTrack,g=this._audioTrack,m=this._id3Track,F=C.pid,P=C.pesData,z=g.pid,Z=m.pid,V=g.pesData,M=m.pesData,J=!1,X=this.pmtParsed,re=this._pmtId,se=b.length;if(this.remainderData&&(b=Object(E.appendUint8Array)(this.remainderData,b),se=b.length,this.remainderData=null),se<188&&!l)return this.remainderData=b,{audioTrack:g,avcTrack:C,id3Track:m,textTrack:this._txtTrack};var _e=Math.max(0,S.syncOffset(b));se-=(se+_e)%188,se<b.byteLength&&!l&&(this.remainderData=new Uint8Array(b.buffer,se,b.buffer.byteLength-se));for(var ge=_e;ge<se;ge+=188)if(b[ge]===71){var we=!!(b[ge+1]&64),Re=((b[ge+1]&31)<<8)+b[ge+2],He=(b[ge+3]&48)>>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;$e<Se;$e++)Te.push(V.readUByte()),Te.push(V.readUByte()),Te.push(V.readUByte());p(r._txtTrack.samples,{type:3,pts:b.pts,bytes:Te})}}}}}else if(M===5&&V.bytesAvailable!==0){if(X=!0,J>16){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<ze;Ae++)at[Ae]=V.readUByte();p(r._txtTrack.samples,{pts:b.pts,payloadType:M,uuid:bt.join(""),userData:Object(I.utf8ArrayToStr)(at),userDataBytes:at})}}else if(J<V.bytesAvailable)for(var ne=0;ne<J;ne++)V.readUByte()}break}case 7:if(m=!0,F=!0,C&&g&&(g.debug+="SPS "),!l.sps){var ae=new B.default(P.data),ce=ae.readSPS();l.width=ce.width,l.height=ce.height,l.pixelRatio=ce.pixelRatio,l.sps=[P.data],l.duration=r._duration;for(var xe=P.data.subarray(1,4),Fe="avc1.",ke=0;ke<3;ke++){var ct=xe[ke].toString(16);ct.length<2&&(ct="0"+ct),Fe+=ct}l.codec=Fe}break;case 8:m=!0,C&&g&&(g.debug+="PPS "),l.pps||(l.pps=[P.data]);break;case 9:m=!1,l.audFound=!0,g&&a(g,l),g=r.avcSample=i(!1,b.pts,b.dts,C?"AUD ":"");break;case 12:m=!1;break;default:m=!1,g&&(g.debug+="unknown NAL "+P.type+" ");break}if(g&&m){var ft=g.units;ft.push(P)}}),h&&g&&(a(g,l),this.avcSample=null)},x.getLastNalUnit=function(){var b,h=this.avcSample,r;if(!h||h.units.length===0){var l=this._avcTrack.samples;h=l[l.length-1]}if((b=h)!==null&&b!==void 0&&b.units){var f=h.units;r=f[f.length-1]}return r},x.parseAVCNALu=function(b){var h=b.byteLength,r=this._avcTrack,l=r.naluState||0,f=l,C=[],g=0,m,F,P,z=-1,Z=0;for(l===-1&&(z=0,Z=b[0]&31,l=0,g=1);g<h;){if(m=b[g++],!l){l=m?0:1;continue}if(l===1){l=m?0:2;continue}if(!m)l=3;else if(m===1){if(z>=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<h?(P=b[g]&31,z=g,Z=P,l=0):l=-1}else l=0}if(z>=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;F<P-1&&!j.isHeader(f,F);F++);if(F!==h){var z,Z;if(F<P-1?(z="AAC PES did not start with ADTS header,offset:"+F,Z=!1):(z="no ADTS header found in AAC PES",Z=!0),n.logger.warn("parsing error:"+z),this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:Z,reason:z}),Z)return}j.initTrackConfig(r,this.observer,f,F,this.audioCodec);var V;if(b.pts!==void 0)V=b.pts;else if(l){var M=j.getFrameDuration(r.samplerate);V=l.sample.pts+M}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var J=0;F<P;)if(j.isHeader(f,F)){if(F+5<P){var X=j.appendFrame(r,f,F,V,J);if(X)if(X.missing)this.aacOverFlow=X;else{F+=X.length,J++;continue}}break}else F++},x.parseMPEGPES=function(b){var h=b.data,r=h.length,l=0,f=0,C=b.pts;if(C===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;f<r;)if(D.isHeader(h,f)){var g=D.appendFrame(this._audioTrack,h,f,C,l);if(g)f+=g.length,l++;else break}else f++},x.parseID3PES=function(b){if(b.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(b)},S}();o.minProbeByteLength=188;function i(S,x,L,b){return{key:S,frame:!1,pts:x,dts:L,units:[],debug:b,length:0}}function d(S,x){return(S[x+10]&31)<<8|S[x+11]}function s(S,x,L,b){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},r=(S[x+1]&15)<<8|S[x+2],l=x+3+r-4,f=(S[x+10]&15)<<8|S[x+11];for(x+=12+f;x<l;){var C=(S[x+1]&31)<<8|S[x+2];switch(S[x]){case 207:if(!b){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=C);break;case 21:h.id3===-1&&(h.id3=C);break;case 219:if(!b){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=C);break;case 3:case 4:L?h.audio===-1&&(h.audio=C,h.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}x+=((S[x+3]&15)<<8|S[x+4])+5}return h}function A(S){var x=0,L,b,h,r,l,f=S.data;if(!S||S.size===0)return null;for(;f[0].length<19&&f.length>1;){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;z<Z;z++){L=f[z];var V=L.byteLength;if(F)if(F>V){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.pts<S[b].pts){S.splice(b,0,x);break}}else S.push(x)}function w(S){for(var x=S.byteLength,L=[],b=1;b<x-2;)S[b]===0&&S[b+1]===0&&S[b+2]===3?(L.push(b+2),b+=2):b++;if(L.length===0)return S;var h=x-L.length,r=new Uint8Array(h),l=0;for(b=0;b<h;l++,b++)l===L[0]&&(l++,L.shift()),r[b]=S[l];return r}Q.default=o},"./src/errors.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"ErrorTypes",function(){return j}),O.d(Q,"ErrorDetails",function(){return D});var j;(function(B){B.NETWORK_ERROR="networkError",B.MEDIA_ERROR="mediaError",B.KEY_SYSTEM_ERROR="keySystemError",B.MUX_ERROR="muxError",B.OTHER_ERROR="otherError"})(j||(j={}));var D;(function(B){B.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",B.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",B.KEY_SYSTEM_NO_SESSION="keySystemNoSession",B.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",B.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",B.MANIFEST_LOAD_ERROR="manifestLoadError",B.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",B.MANIFEST_PARSING_ERROR="manifestParsingError",B.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",B.LEVEL_EMPTY_ERROR="levelEmptyError",B.LEVEL_LOAD_ERROR="levelLoadError",B.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",B.LEVEL_SWITCH_ERROR="levelSwitchError",B.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",B.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",B.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",B.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",B.FRAG_LOAD_ERROR="fragLoadError",B.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",B.FRAG_DECRYPT_ERROR="fragDecryptError",B.FRAG_PARSING_ERROR="fragParsingError",B.REMUX_ALLOC_ERROR="remuxAllocError",B.KEY_LOAD_ERROR="keyLoadError",B.KEY_LOAD_TIMEOUT="keyLoadTimeOut",B.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",B.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",B.BUFFER_APPEND_ERROR="bufferAppendError",B.BUFFER_APPENDING_ERROR="bufferAppendingError",B.BUFFER_STALLED_ERROR="bufferStalledError",B.BUFFER_FULL_ERROR="bufferFullError",B.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",B.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",B.INTERNAL_EXCEPTION="internalException",B.INTERNAL_ABORTED="aborted",B.UNKNOWN="unknown"})(D||(D={}))},"./src/events.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"Events",function(){return j});var j;(function(D){D.MEDIA_ATTACHING="hlsMediaAttaching",D.MEDIA_ATTACHED="hlsMediaAttached",D.MEDIA_DETACHING="hlsMediaDetaching",D.MEDIA_DETACHED="hlsMediaDetached",D.BUFFER_RESET="hlsBufferReset",D.BUFFER_CODECS="hlsBufferCodecs",D.BUFFER_CREATED="hlsBufferCreated",D.BUFFER_APPENDING="hlsBufferAppending",D.BUFFER_APPENDED="hlsBufferAppended",D.BUFFER_EOS="hlsBufferEos",D.BUFFER_FLUSHING="hlsBufferFlushing",D.BUFFER_FLUSHED="hlsBufferFlushed",D.MANIFEST_LOADING="hlsManifestLoading",D.MANIFEST_LOADED="hlsManifestLoaded",D.MANIFEST_PARSED="hlsManifestParsed",D.LEVEL_SWITCHING="hlsLevelSwitching",D.LEVEL_SWITCHED="hlsLevelSwitched",D.LEVEL_LOADING="hlsLevelLoading",D.LEVEL_LOADED="hlsLevelLoaded",D.LEVEL_UPDATED="hlsLevelUpdated",D.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",D.LEVELS_UPDATED="hlsLevelsUpdated",D.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",D.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",D.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",D.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",D.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",D.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",D.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",D.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",D.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",D.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",D.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",D.CUES_PARSED="hlsCuesParsed",D.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",D.INIT_PTS_FOUND="hlsInitPtsFound",D.FRAG_LOADING="hlsFragLoading",D.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",D.FRAG_LOADED="hlsFragLoaded",D.FRAG_DECRYPTED="hlsFragDecrypted",D.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",D.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",D.FRAG_PARSING_METADATA="hlsFragParsingMetadata",D.FRAG_PARSED="hlsFragParsed",D.FRAG_BUFFERED="hlsFragBuffered",D.FRAG_CHANGED="hlsFragChanged",D.FPS_DROP="hlsFpsDrop",D.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",D.ERROR="hlsError",D.DESTROYING="hlsDestroying",D.KEY_LOADING="hlsKeyLoading",D.KEY_LOADED="hlsKeyLoaded",D.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",D.BACK_BUFFER_REACHED="hlsBackBufferReached"})(j||(j={}))},"./src/hls.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return S});var j=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(j),B=O("./src/loader/playlist-loader.ts"),I=O("./src/loader/key-loader.ts"),v=O("./src/controller/id3-track-controller.ts"),T=O("./src/controller/latency-controller.ts"),E=O("./src/controller/level-controller.ts"),n=O("./src/controller/fragment-tracker.ts"),u=O("./src/controller/stream-controller.ts"),c=O("./src/is-supported.ts"),o=O("./src/utils/logger.ts"),i=O("./src/config.ts"),d=O("./node_modules/eventemitter3/index.js"),s=O.n(d),A=O("./src/events.ts"),a=O("./src/errors.ts");function p(x,L){for(var b=0;b<L.length;b++){var h=L[b];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(x,h.key,h)}}function w(x,L,b){return L&&p(x.prototype,L),b&&p(x,b),x}var S=function(){x.isSupported=function(){return Object(c.isSupported)()};function x(b){b===void 0&&(b={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var h=this.config=Object(i.mergeConfig)(x.DefaultConfig,b);this.userConfig=b,Object(o.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(i.enableStreamingMode)(h);var r=h.abrController,l=h.bufferController,f=h.capLevelController,C=h.fpsController,g=this.abrController=new r(this),m=this.bufferController=new l(this),F=this.capLevelController=new f(this),P=new C(this),z=new B.default(this),Z=new I.default(this),V=new v.default(this),M=this.levelController=new E.default(this),J=new n.FragmentTracker(this),X=this.streamController=new u.default(this,J);F.setStreamController(X),P.setStreamController(X);var re=[M,X];this.networkControllers=re;var se=[z,Z,g,m,F,P,V,J];this.audioTrackController=this.createController(h.audioTrackController,null,re),this.createController(h.audioStreamController,J,re),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,re),this.createController(h.subtitleStreamController,J,re),this.createController(h.timelineController,null,se),this.emeController=this.createController(h.emeController,null,se),this.cmcdController=this.createController(h.cmcdController,null,se),this.latencyController=this.createController(T.default,null,se),this.coreComponents=se}var L=x.prototype;return L.createController=function(h,r,l){if(h){var f=r?new h(this,r):new h(this);return l&&l.push(f),f}return null},L.on=function(h,r,l){l===void 0&&(l=this),this._emitter.on(h,r,l)},L.once=function(h,r,l){l===void 0&&(l=this),this._emitter.once(h,r,l)},L.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},L.off=function(h,r,l,f){l===void 0&&(l=this),this._emitter.off(h,r,l,f)},L.listeners=function(h){return this._emitter.listeners(h)},L.emit=function(h,r,l){return this._emitter.emit(h,r,l)},L.trigger=function(h,r){if(this.config.debug)return this.emit(h,h,r);try{return this.emit(h,h,r)}catch(l){o.logger.error("An internal error happened while handling event "+h+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(A.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:l})}return!1},L.listenerCount=function(h){return this._emitter.listenerCount(h)},L.destroy=function(){o.logger.log("destroy"),this.trigger(A.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(h){return h.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(h){return h.destroy()}),this.coreComponents.length=0},L.attachMedia=function(h){o.logger.log("attachMedia"),this._media=h,this.trigger(A.Events.MEDIA_ATTACHING,{media:h})},L.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(A.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(h){this.stopLoad();var r=this.media,l=this.url,f=this.url=j.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});o.logger.log("loadSource:"+f),r&&l&&l!==f&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(r)),this.trigger(A.Events.MANIFEST_LOADING,{url:h})},L.startLoad=function(h){h===void 0&&(h=-1),o.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(r){r.startLoad(h)})},L.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},L.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){o.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},L.removeLevel=function(h,r){r===void 0&&(r=0),this.levelController.removeLevel(h,r)},w(x,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){o.logger.log("set currentLevel:"+h),this.loadLevel=h,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(h){o.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){o.logger.log("set loadLevel:"+h),this.levelController.manualLevel=h}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(h){this.levelController.nextLoadLevel=h}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(h){o.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){o.logger.log("set startLevel:"+h),h!==-1&&(h=Math.max(h,this.minAutoLevel)),this.levelController.startLevel=h}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(h){var r=!!h;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(o.logger.log("set autoLevelCapping:"+h),this._autoLevelCapping=h)}},{key:"bandwidthEstimate",get:function(){var h=this.abrController.bwEstimator;return h?h.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var h=this.levels,r=this.config.minAutoBitrate;if(!h)return 0;for(var l=h.length,f=0;f<l;f++)if(h[f].maxBitrate>r)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<w;x++)S[x-1]=arguments[x];return p=s.call.apply(s,[this].concat(S))||this,p.data=void 0,p.data=a,p}return A}(I(Error))},"./src/loader/fragment.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"ElementaryStreamTypes",function(){return o}),O.d(Q,"BaseSegment",function(){return i}),O.d(Q,"Fragment",function(){return d}),O.d(Q,"Part",function(){return s});var j=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(D),I=O("./src/utils/logger.ts"),v=O("./src/loader/level-key.ts"),T=O("./src/loader/load-stats.ts");function E(A,a){A.prototype=Object.create(a.prototype),A.prototype.constructor=A,n(A,a)}function n(A,a){return n=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},n(A,a)}function u(A,a){for(var p=0;p<a.length;p++){var w=a[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(A,w.key,w)}}function c(A,a,p){return a&&u(A.prototype,a),p&&u(A,p),A}var o;(function(A){A.AUDIO="audio",A.VIDEO="video",A.AUDIOVIDEO="audiovideo"})(o||(o={}));var i=function(){function A(p){var w;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(w={},w[o.AUDIO]=null,w[o.VIDEO]=null,w[o.AUDIOVIDEO]=null,w),this.baseurl=p}var a=A.prototype;return a.setByteRange=function(w,S){var x=w.split("@",2),L=[];x.length===1?L[0]=S?S.byteRangeEndOffset:0:L[0]=parseInt(x[1]),L[1]=parseInt(x[0])+L[0],this._byteRange=L},c(A,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(D.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(w){this._url=w}}]),A}(),d=function(A){E(a,A);function a(w,S){var x;return x=A.call(this,S)||this,x._decryptdata=null,x.rawProgramDateTime=null,x.programDateTime=null,x.tagList=[],x.duration=0,x.sn=0,x.levelkey=void 0,x.type=void 0,x.loader=null,x.level=-1,x.cc=0,x.startPTS=void 0,x.endPTS=void 0,x.appendedPTS=void 0,x.startDTS=void 0,x.endDTS=void 0,x.start=0,x.deltaPTS=void 0,x.maxStartPTS=void 0,x.minEndPTS=void 0,x.stats=new T.LoadStats,x.urlId=0,x.data=void 0,x.bitrateTest=!1,x.title=null,x.initSegment=null,x.type=w,x}var p=a.prototype;return p.createInitializationVector=function(S){for(var x=new Uint8Array(16),L=12;L<16;L++)x[L]=S>>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;n<E.length;n++){var u=E[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(T,u.key,u)}}function B(T,E,n){return E&&D(T.prototype,E),n&&D(T,n),T}var I=10,v=function(){function T(n){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=n}var E=T.prototype;return E.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var c=this.lastPartSn-u.lastPartSn,o=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!o||!!c,this.advanced=this.endSN>u.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;n<E.length;n++){var u=E[n];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(T,u.key,u)}}function I(T,E,n){return E&&B(T.prototype,E),n&&B(T,n),T}var v=function(){T.fromURL=function(n,u){return new T(n,u)},T.fromURI=function(n){return new T(n)};function T(E,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(j.buildAbsoluteURL)(E,n,{alwaysNormalize:!0}):this._uri=E}return I(T,[{key:"uri",get:function(){return this._uri}}]),T}()},"./src/loader/load-stats.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"LoadStats",function(){return j});var j=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a});var j=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(D),I=O("./src/loader/fragment.ts"),v=O("./src/loader/level-details.ts"),T=O("./src/loader/level-key.ts"),E=O("./src/utils/attr-list.ts"),n=O("./src/utils/logger.ts"),u=O("./src/utils/codecs.ts"),c=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,o=/#EXT-X-MEDIA:(.*)/g,i=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),d=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function A(L){var b,h;return s.test((b=(h=D.parseURL(L))===null||h===void 0?void 0:h.path)!=null?b:"")}var a=function(){function L(){}return L.findGroup=function(h,r){for(var l=0;l<h.length;l++){var f=h[l];if(f.id===r)return f}},L.convertAVC1ToAVCOTI=function(h){var r=h.split(".");if(r.length>2){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<X.length&&!(typeof X[re]!="undefined");re++);var Se=(" "+X[re]).slice(1),Te=(" "+X[re+1]).slice(1),$e=X[re+2]?(" "+X[re+2]).slice(1):"";switch(Se){case"PLAYLIST-TYPE":g.type=Te.toUpperCase();break;case"MEDIA-SEQUENCE":P=g.startSN=parseInt(Te);break;case"SKIP":{var bt=new E.AttrList(Te),Ie=bt.decimalInteger("SKIPPED-SEGMENTS");if(Object(j.isFiniteNumber)(Ie)){g.skippedSegments=Ie;for(var ze=Ie;ze--;)m.unshift(null);P+=Ie}var at=bt.enumeratedString("RECENTLY-REMOVED-DATERANGES");at&&(g.recentlyRemovedDateranges=at.split(" "));break}case"TARGETDURATION":g.targetduration=parseFloat(Te);break;case"VERSION":g.version=parseInt(Te);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":(Te||$e)&&J.tagList.push($e?[Te,$e]:[Te]);break;case"DIS":V++;case"GAP":J.tagList.push([Se]);break;case"BITRATE":J.tagList.push([Se,Te]);break;case"DISCONTINUITY-SEQ":V=parseInt(Te);break;case"KEY":{var Ae,ne=new E.AttrList(Te),ae=ne.enumeratedString("METHOD"),ce=ne.URI,xe=ne.hexadecimalInteger("IV"),Fe=ne.enumeratedString("KEYFORMATVERSIONS"),ke=ne.enumeratedString("KEYID"),ct=(Ae=ne.enumeratedString("KEYFORMAT"))!=null?Ae:"identity",ft=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ft.indexOf(ct)>-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<E;u++)n[u-1]=arguments[u];for(var c=n.length,o=c;c--;)T+=n[c].byteLength;var i=new Uint8Array(T);for(i[0]=T>>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<o;c++)i.set(n[c],T),T+=n[c].byteLength;return i},B.hdlr=function(v){return B.box(B.types.hdlr,B.HDLR_TYPES[v])},B.mdat=function(v){return B.box(B.types.mdat,v)},B.mdhd=function(v,T){T*=v;var E=Math.floor(T/(j+1)),n=Math.floor(T%(j+1));return B.box(B.types.mdhd,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,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<T.length;n++)u=T[n].flags,E[n+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return B.box(B.types.sdtp,E)},B.stbl=function(v){return B.box(B.types.stbl,B.stsd(v),B.box(B.types.stts,B.STTS),B.box(B.types.stsc,B.STSC),B.box(B.types.stsz,B.STSZ),B.box(B.types.stco,B.STCO))},B.avc1=function(v){var T=[],E=[],n,u,c;for(n=0;n<v.sps.length;n++)u=v.sps[n],c=u.byteLength,T.push(c>>>8&255),T.push(c&255),T=T.concat(Array.prototype.slice.call(u));for(n=0;n<v.pps.length;n++)u=v.pps[n],c=u.byteLength,E.push(c>>>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<n;o++)i=E[o],d=i.duration,s=i.size,A=i.flags,a=i.cts,c.set([d>>>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;b<arguments.length;b++){var h=arguments[b];for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(L[r]=h[r])}return L},u.apply(this,arguments)}var c=10*1e3,o=1024,i=1152,d=null,s=null,A=!1,a=function(){function L(h,r,l,f){if(f===void 0&&(f=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=h,this.config=r,this.typeSupported=l,this.ISGenerated=!1,d===null){var C=navigator.userAgent||"",g=C.match(/Chrome\/(\d+)/i);d=g?parseInt(g[1]):0}if(s===null){var m=navigator.userAgent.match(/Safari\/(\d+)/i);s=m?parseInt(m[1]):0}A=!!d&&d<75||!!s&&s<600}var b=L.prototype;return b.destroy=function(){},b.resetTimeStamp=function(r){T.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},b.resetNextTimestamp=function(){T.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},b.resetInitSegment=function(){T.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},b.getVideoStartPts=function(r){var l=!1,f=r.reduce(function(C,g){var m=g.pts-C;return m<-4294967296?(l=!0,p(C,g.pts)):m>0?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;He<P;He++){var Se=m[He];if(Se.pts=p(Se.pts-z,Z),Se.dts=p(Se.dts-z,Z),Se.dts>Se.pts){var Te=9e4*.2;_e=Math.max(Math.min(_e,Se.pts-Se.dts),-1*Te)}Se.dts<m[He>0?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<P;Ie++)m[Ie].dts=bt=Math.max(bt,m[Ie].pts-$e),m[Ie].pts=Math.max(bt,m[Ie].pts)}else{T.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var ze=0;ze<P;ze++)m[ze].dts=m[ze].dts+_e}J=m[0].dts}if(f){var at=J-Z,Ae=at>$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;Fe<P;Fe++){for(var ke=m[Fe],ct=ke.units,ft=ct.length,yt=0,Et=0;Et<ft;Et++)yt+=ct[Et].data.length;xe+=yt,ce+=ft,ke.length=yt,ke.dts=Math.max(ke.dts,J),ke.pts=Math.max(ke.pts,ke.dts,0),re=Math.min(ke.pts,re),se=Math.max(ke.pts,se)}X=m[P-1].dts;var Ot=xe+4*ce+8,Mt;try{Mt=new Uint8Array(Ot)}catch(St){this.observer.emit(I.Events.ERROR,I.Events.ERROR,{type:v.ErrorTypes.MUX_ERROR,details:v.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ot,reason:"fail allocating video mdat "+Ot});return}var Qe=new DataView(Mt.buffer);Qe.setUint32(0,Ot),Mt.set(B.default.types.mdat,4);for(var Ne=0;Ne<P;Ne++){for(var lt=m[Ne],dt=lt.units,Ye=0,st=0,je=dt.length;st<je;st++){var Le=dt[st],Me=Le.data,me=Le.data.byteLength;Qe.setUint32(V,me),V+=4,Mt.set(Me,V),V+=me,Ye+=4+me}if(Ne<P-1)M=m[Ne+1].dts-lt.dts;else{var ye=this.config,Ee=lt.dts-m[Ne>0?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<X.length;Re++){var Se=X[Re],Te=Se.pts,$e=Te-He,bt=Math.abs(1e3*$e/m);if($e<=-we*Z&&ge)Re===0&&(T.logger.warn("Audio frame @ "+(Te/m).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*$e/m)+" ms."),this.nextAudioPts=se=He=Te);else if($e>=we*Z&&bt<c&&ge){var Ie=Math.round($e/Z);He=Te-Ie*Z,He<0&&(Ie--,He+=Z),Re===0&&(this.nextAudioPts=se=He),T.logger.warn("[mp4-remuxer]: Injecting "+Ie+" audio frame @ "+(He/m).toFixed(3)+"s due to "+Math.round(1e3*$e/m)+" ms gap.");for(var ze=0;ze<Ie;ze++){var at=Math.max(He,0),Ae=D.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);Ae||(T.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Ae=Se.unit.subarray()),X.splice(Re,0,{unit:Ae,pts:at}),He+=Z,Re++}}Se.pts=He,He+=Z}for(var ne=null,ae=null,ce,xe=0,Fe=X.length;Fe--;)xe+=X[Fe].unit.byteLength;for(var ke=0,ct=X.length;ke<ct;ke++){var ft=X[ke],yt=ft.unit,Et=ft.pts;if(ae!==null){var Ot=J[ke-1];Ot.duration=Math.round((Et-ae)/P)}else if(f&&r.isAAC&&(Et=se),ne=Et,xe>0){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;re<M;re++){var se=z+re*V;X.push({unit:J,pts:se,dts:se})}return r.samples=X,this.remuxAudio(r,l,f,!1)},b.remuxID3=function(r,l){var f=r.samples.length;if(!f)return;for(var C=r.inputTimeScale,g=this._initPTS,m=this._initDTS,F=0;F<f;F++){var P=r.samples[F];P.pts=p(P.pts-g,l*C)/C,P.dts=p(P.dts-m,l*C)/C}var z=r.samples;return r.samples=[],{samples:z}},b.remuxText=function(r,l){var f=r.samples.length;if(!f)return;for(var C=r.inputTimeScale,g=this._initPTS,m=0;m<f;m++){var F=r.samples[m];F.pts=p(F.pts-g,l*C)/C}r.samples.sort(function(z,Z){return z.pts-Z.pts});var P=r.samples;return r.samples=[],{samples:P}},L}();function p(L,b){var h;if(b===null)return L;for(b<L?h=-8589934592:h=8589934592;Math.abs(L-b)>4294967296;)L+=h;return L}function w(L){for(var b=0;b<L.length;b++)if(L[b].key)return b;return-1}var S=function(b,h,r,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=r,this.cts=l,this.flags=new x(b)},x=function(b){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=b?2:1,this.isNonSync=b?0:1}},"./src/remux/passthrough-remuxer.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/polyfills/number.ts"),D=O("./src/utils/mp4-tools.ts"),B=O("./src/loader/fragment.ts"),I=O("./src/utils/logger.ts"),v=function(){function n(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var u=n.prototype;return u.destroy=function(){},u.resetTimeStamp=function(o){this.initPTS=o,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(o,i,d){this.audioCodec=i,this.videoCodec=d,this.generateInitSegment(o),this.emitInitSegment=!0},u.generateInitSegment=function(o){var i=this.audioCodec,d=this.videoCodec;if(!o||!o.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(D.parseInitSegment)(o);i||(i=E(s.audio,B.ElementaryStreamTypes.AUDIO)),d||(d=E(s.video,B.ElementaryStreamTypes.VIDEO));var A={};s.audio&&s.video?A.audiovideo={container:"video/mp4",codec:i+","+d,initSegment:o,id:"main"}:s.audio?A.audio={container:"audio/mp4",codec:i,initSegment:o,id:"audio"}:s.video?A.video={container:"video/mp4",codec:d,initSegment:o,id:"main"}:I.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=A},u.remux=function(o,i,d,s,A){var a=this.initPTS,p=this.lastEndDTS,w={audio:void 0,video:void 0,text:s,id3:d,initSegment:void 0};Object(j.isFiniteNumber)(p)||(p=this.lastEndDTS=A||0);var S=i.samples;if(!S||!S.length)return w;var x={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(S),L=this.initData),!L||!L.length)return I.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1),Object(j.isFiniteNumber)(a)||(this.initPTS=x.initPTS=a=T(L,S,p));var b=Object(D.getDuration)(S,L),h=p,r=b+h;Object(D.offsetStartDTS)(L,S,a),b>0?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;u<n.length;u++){var c=n[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(E,c.key,c)}}function D(E,n,u){return n&&j(E.prototype,n),u&&j(E,u),E}var B;(function(E){E.No="",E.Yes="YES",E.v2="v2"})(B||(B={}));function I(E,n){var u=E.canSkipUntil,c=E.canSkipDateRanges,o=E.endSN,i=n!==void 0?n-o:0;return u&&i<u?c?B.v2:B.Yes:B.No}var v=function(){function E(u,c,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=c,this.skip=o}var n=E.prototype;return n.addDirectives=function(c){var o=new self.URL(c);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.toString()},E}(),T=function(){function E(n){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return D(E,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(u){var c=u%this.url.length;this._urlId!==c&&(this.details=void 0,this._urlId=c)}}]),E}()},"./src/types/loader.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"PlaylistContextType",function(){return j}),O.d(Q,"PlaylistLevelType",function(){return D});var j;(function(B){B.MANIFEST="manifest",B.LEVEL="level",B.AUDIO_TRACK="audioTrack",B.SUBTITLE_TRACK="subtitleTrack"})(j||(j={}));var D;(function(B){B.MAIN="main",B.AUDIO="audio",B.SUBTITLE="subtitle"})(D||(D={}))},"./src/types/transmuxer.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"ChunkMetadata",function(){return j});var j=function(I,v,T,E,n,u){E===void 0&&(E=0),n===void 0&&(n=-1),u===void 0&&(u=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=D(),this.buffering={audio:D(),video:D(),audiovideo:D()},this.level=I,this.sn=v,this.id=T,this.size=E,this.part=n,this.partial=u};function D(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"AttrList",function(){return B});var j=/^(\d+)x(\d+)$/,D=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,B=function(){function I(T){typeof T=="string"&&(T=I.parseAttrList(T));for(var E in T)T.hasOwnProperty(E)&&(this[E]=T[E])}var v=I.prototype;return v.decimalInteger=function(E){var n=parseInt(this[E],10);return n>Number.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;c<n.length/2;c++)u[c]=parseInt(n.slice(c*2,c*2+2),16);return u}else return null},v.hexadecimalIntegerAsNumber=function(E){var n=parseInt(this[E],16);return n>Number.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.length;u++)if(E>=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;o<u.length;o++)c.push({start:u.start(o),end:u.end(o)});return this.bufferedInfo(c,E,n)}}catch(i){}return{len:0,start:E,end:E,nextStart:void 0}},I.bufferedInfo=function(T,E,n){E=Math.max(0,E),T.sort(function(x,L){var b=x.start-L.start;return b||L.end-x.end});var u=[];if(n)for(var c=0;c<T.length;c++){var o=u.length;if(o){var i=u[o-1].end;T[c].start-i<n?T[c].end>i&&(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<u.length;p++){var w=u[p].start,S=u[p].end;if(E+n>=w&&E<S)A=w,a=S,d=a-E;else if(E+n<w){s=w;break}}return{len:d,start:A||0,end:a||0,nextStart:s}},I.getBuffered=function(T){try{return T.buffered}catch(E){return j.logger.log("failed to get media.buffered",E),D}},I}()},"./src/utils/cea-608-parser.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"Row",function(){return a}),O.d(Q,"CaptionScreen",function(){return p});var j=O("./src/utils/logger.ts"),D={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},B=function(r){var l=r;return D.hasOwnProperty(r)&&(l=D[r]),String.fromCharCode(l)},I=15,v=100,T={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},E={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},c=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(h){h[h.ERROR=0]="ERROR",h[h.TEXT=1]="TEXT",h[h.WARNING=2]="WARNING",h[h.INFO=2]="INFO",h[h.DEBUG=3]="DEBUG",h[h.DATA=3]="DATA"})(o||(o={}));var i=function(){function h(){this.time=null,this.verboseLevel=o.ERROR}var r=h.prototype;return r.log=function(f,C){this.verboseLevel>=f&&j.logger.log(this.time+" ["+f+"] "+C)},h}(),d=function(r){for(var l=[],f=0;f<r.length;f++)l.push(r[f].toString(16));return l},s=function(){function h(l,f,C,g,m){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=l||"white",this.underline=f||!1,this.italics=C||!1,this.background=g||"black",this.flash=m||!1}var r=h.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(f){for(var C=["foreground","underline","italics","background","flash"],g=0;g<C.length;g++){var m=C[g];f.hasOwnProperty(m)&&(this[m]=f[m])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(f){return this.foreground===f.foreground&&this.underline===f.underline&&this.italics===f.italics&&this.background===f.background&&this.flash===f.flash},r.copy=function(f){this.foreground=f.foreground,this.underline=f.underline,this.italics=f.italics,this.background=f.background,this.flash=f.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),A=function(){function h(l,f,C,g,m,F){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new s(f,C,g,m,F)}var r=h.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(f,C){this.uchar=f,this.penState.copy(C)},r.setPenState=function(f){this.penState.copy(f)},r.equals=function(f){return this.uchar===f.uchar&&this.penState.equals(f.penState)},r.copy=function(f){this.uchar=f.uchar,this.penState.copy(f.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),a=function(){function h(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var f=0;f<v;f++)this.chars.push(new A);this.logger=l,this.pos=0,this.currPenState=new s}var r=h.prototype;return r.equals=function(f){for(var C=!0,g=0;g<v;g++)if(!this.chars[g].equals(f.chars[g])){C=!1;break}return C},r.copy=function(f){for(var C=0;C<v;C++)this.chars[C].copy(f.chars[C])},r.isEmpty=function(){for(var f=!0,C=0;C<v;C++)if(!this.chars[C].isEmpty()){f=!1;break}return f},r.setCursor=function(f){this.pos!==f&&(this.pos=f),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>v&&(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<C+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(C)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(f){f>=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;C<v;C++)this.chars[C].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var f=[],C=!0,g=0;g<v;g++){var m=this.chars[g].uchar;m!==" "&&(C=!1),f.push(m)}return C?"":f.join("")},r.setPenStyles=function(f){this.currPenState.setStyles(f);var C=this.chars[this.pos];C.setPenState(this.currPenState)},h}(),p=function(){function h(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var f=0;f<I;f++)this.rows.push(new a(l));this.logger=l,this.currRow=I-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=h.prototype;return r.reset=function(){for(var f=0;f<I;f++)this.rows[f].clear();this.currRow=I-1},r.equals=function(f){for(var C=!0,g=0;g<I;g++)if(!this.rows[g].equals(f.rows[g])){C=!1;break}return C},r.copy=function(f){for(var C=0;C<I;C++)this.rows[C].copy(f.rows[C])},r.isEmpty=function(){for(var f=!0,C=0;C<I;C++)if(!this.rows[C].isEmpty()){f=!1;break}return f},r.backSpace=function(){var f=this.rows[this.currRow];f.backSpace()},r.clearToEndOfRow=function(){var f=this.rows[this.currRow];f.clearToEndOfRow()},r.insertChar=function(f){var C=this.rows[this.currRow];C.insertChar(f)},r.setPen=function(f){var C=this.rows[this.currRow];C.setPenStyles(f)},r.moveCursor=function(f){var C=this.rows[this.currRow];C.moveCursor(f)},r.setCursor=function(f){this.logger.log(o.INFO,"setCursor: "+f);var C=this.rows[this.currRow];C.setCursor(f)},r.setPAC=function(f){this.logger.log(o.INFO,"pacData = "+JSON.stringify(f));var C=f.row-1;if(this.nrRollUpRows&&C<this.nrRollUpRows-1&&(C=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==C){for(var g=0;g<I;g++)this.rows[g].clear();var m=this.currRow+1-this.nrRollUpRows,F=this.lastOutputScreen;if(F){var P=F.rows[m].cueStartTime,z=this.logger.time;if(P&&z!==null&&P<z)for(var Z=0;Z<this.nrRollUpRows;Z++)this.rows[C-this.nrRollUpRows+Z+1].copy(F.rows[m+Z])}}this.currRow=C;var V=this.rows[this.currRow];if(f.indent!==null){var M=f.indent,J=Math.max(M-1,0);V.setCursor(f.indent),f.color=V.chars[J].penState.foreground}var X={foreground:f.color,underline:f.underline,italics:f.italics,background:"black",flash:!1};this.setPen(X)},r.setBkgData=function(f){this.logger.log(o.INFO,"bkgData = "+JSON.stringify(f)),this.backSpace(),this.setPen(f),this.insertChar(32)},r.setRollUpRows=function(f){this.nrRollUpRows=f},r.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,this.getDisplayText());var f=this.currRow+1-this.nrRollUpRows,C=this.rows.splice(f,1)[0];C.clear(),this.rows.splice(this.currRow,0,C),this.logger.log(o.INFO,"Rolling up")},r.getDisplayText=function(f){f=f||!1;for(var C=[],g="",m=-1,F=0;F<I;F++){var P=this.rows[F].getTextString();P&&(m=F+1,f?C.push("Row "+m+": '"+P+"'"):C.push(P.trim()))}return C.length>0&&(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<f.length;C++)this.writeScreen.insertChar(f[C]);var g=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,g+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(f){this.logger.log(o.INFO,"RU("+f+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(f)},r.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var f=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=f,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},r.ccTO=function(f){this.logger.log(o.INFO,"TO("+f+") - Tab Offset"),this.writeScreen.moveCursor(f)},r.ccMIDROW=function(f){var C={flash:!1};if(C.underline=f%2===1,C.italics=f>=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<C.length;z+=2){if(m=C[z]&127,F=C[z+1]&127,m===0&&F===0)continue;if(this.logger.log(o.DATA,"["+d([C[z],C[z+1]])+"] -> ("+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<Object.keys(this.channels).length;f++){var C=this.channels[f];C&&C.reset()}this.cmdHistory=b()},r.cueSplitAtTime=function(f){for(var C=0;C<this.channels.length;C++){var g=this.channels[C];g&&g.cueSplitAtTime(f)}},h}();function x(h,r,l){l.a=h,l.b=r}function L(h,r,l){return l.a===h&&l.b===r}function b(){return{a:null,b:null}}Q.default=S},"./src/utils/codecs.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"isCodecType",function(){return D}),O.d(Q,"isCodecSupportedInMp4",function(){return B});var j={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function D(I,v){var T=j[v];return!!T&&T[I.slice(0,4)]===!0}function B(I,v){return MediaSource.isTypeSupported((v||"video")+'/mp4;codecs="'+I+'"')}},"./src/utils/cues.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/utils/vttparser.ts"),D=O("./src/utils/webvtt-parser.ts"),B=O("./src/utils/texttrack-utils.ts"),I=/\s/,v={newCue:function(E,n,u,c){for(var o=[],i,d,s,A,a,p=self.VTTCue||self.TextTrackCue,w=0;w<c.rows.length;w++)if(i=c.rows[w],s=!0,A=0,a="",!i.isEmpty()){for(var S=0;S<i.chars.length;S++)I.test(i.chars[S].uchar)&&s?A++:(a+=i.chars[S].uchar,s=!1);i.cueStartTime=n,n===u&&(u+=1e-4),A>=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;p<w;p++){var S=s[p];if(S&&S.cc===A){a=S;break}}return a}function v(s,A,a){return!!(A.details&&(a.endCC>a.startCC||s&&s.cc<a.startCC))}function T(s,A){var a=s.fragments,p=A.fragments;if(!p.length||!a.length){D.logger.log("No fragments to align");return}var w=I(a,p[0].cc);if(!w||w&&!w.startPTS){D.logger.log("No frag in previous level to align on");return}return w}function E(s,A){if(s){var a=s.start+A;s.start=s.startPTS=a,s.endPTS=a+s.duration}}function n(s,A){for(var a=A.fragments,p=0,w=a.length;p<w;p++)E(a[p],s);A.fragmentHint&&E(A.fragmentHint,s),A.alignedSliding=!0}function u(s,A,a){if(!A)return;c(s,a,A),!a.alignedSliding&&A.details&&o(a,A.details),!a.alignedSliding&&A.details&&!a.skippedSegments&&Object(B.adjustSliding)(A.details,a)}function c(s,A,a){if(v(s,a,A)){var p=T(a.details,A);p&&Object(j.isFiniteNumber)(p.start)&&(D.logger.log("Adjusting PTS using last level due to CC increase within current level "+A.url),n(p.start,A))}}function o(s,A){if(!A.fragments.length||!s.hasProgramDateTime||!A.hasProgramDateTime)return;var a=A.fragments[0].programDateTime,p=s.fragments[0].programDateTime,w=(p-a)/1e3+A.fragments[0].start;w&&Object(j.isFiniteNumber)(w)&&(D.logger.log("Adjusting PTS using programDateTime delta "+(p-a)+"ms, sliding:"+w.toFixed(3)+" "+s.url+" "),n(w,s))}function i(s,A){var a=s.programDateTime;if(!a)return;var p=(a-A)/1e3;s.start=s.startPTS=p,s.endPTS=p+s.duration}function d(s,A){if(!A.fragments.length||!s.hasProgramDateTime||!A.hasProgramDateTime)return;var a=A.fragments[0].programDateTime,p=A.fragments[0].start,w=a-p*1e3;s.fragments.forEach(function(S){i(S,w)}),s.fragmentHint&&i(s.fragmentHint,w),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(q,Q,O){"use strict";O.r(Q);var j=O("./src/utils/ewma.ts"),D=function(){function B(v,T,E){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=E,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new j.default(v),this.fast_=new j.default(T)}var I=B.prototype;return I.update=function(T,E){var n=this.slow_,u=this.fast_;this.slow_.halfLife!==T&&(this.slow_=new j.default(T,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==E&&(this.fast_=new j.default(E,u.getEstimate(),u.getTotalWeight()))},I.sample=function(T,E){T=Math.max(T,this.minDelayMs_);var n=8*E,u=T/1e3,c=n/u;this.fast_.sample(u,c),this.slow_.sample(u,c)},I.canEstimate=function(){var T=this.fast_;return T&&T.getTotalWeight()>=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<arguments.length;w++){var S=arguments[w];for(var x in S)Object.prototype.hasOwnProperty.call(S,x)&&(p[x]=S[x])}return p},o.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(p){}return!1}var d=function(){function p(S){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=S.fetchSetup||A,this.controller=new self.AbortController,this.stats=new D.LoadStats}var w=p.prototype;return w.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},w.abortInternal=function(){var x=this.response;(!x||!x.ok)&&(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var x;this.abortInternal(),(x=this.callbacks)!==null&&x!==void 0&&x.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(x,L,b){var h=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var l=s(x,this.controller.signal),f=b.onProgress,C=x.responseType==="arraybuffer",g=C?"byteLength":"length";this.context=x,this.config=L,this.callbacks=b,this.request=this.fetchSetup(x,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),b.onTimeout(r,x,h.response)},L.timeout),self.fetch(this.request).then(function(m){if(h.response=h.loader=m,!m.ok){var F=m.status,P=m.statusText;throw new a(P||"fetch, bad network response",F,m)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(m.headers.get("Content-Length")||"0"),f&&Object(j.isFiniteNumber)(L.highWaterMark)?h.loadProgressively(m,r,x,L.highWaterMark,f):C?m.arrayBuffer():m.text()}).then(function(m){var F=h.response;self.clearTimeout(h.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first),r.loaded=r.total=m[g];var P={url:F.url,data:m};f&&!Object(j.isFiniteNumber)(L.highWaterMark)&&f(r,x,m,F),b.onSuccess(P,r,x,F)}).catch(function(m){if(self.clearTimeout(h.requestTimeout),r.aborted)return;var F=m.code||0;b.onError({code:F,text:m.message},x,m.details)})},w.getCacheAge=function(){var x=null;if(this.response){var L=this.response.headers.get("age");x=L?parseFloat(L):null}return x},w.loadProgressively=function(x,L,b,h,r){h===void 0&&(h=0);var l=new B.default,f=x.body.getReader(),C=function g(){return f.read().then(function(m){if(m.done)return l.dataLength&&r(L,b,l.flush(),x),Promise.resolve(new ArrayBuffer(0));var F=m.value,P=F.length;return L.loaded+=P,P<h||l.dataLength?(l.push(F),l.dataLength>=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<arguments.length;r++){var l=arguments[r];for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(h[f]=l[f])}return h},E.apply(this,arguments)}var n="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,c=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(h,r,l,f,C){var g=Object(j.findBox)(new Uint8Array(h),["mdat"]);if(g.length===0){C(new Error("Could not parse IMSC1 mdat"));return}var m=g[0],F=Object(I.utf8ArrayToStr)(new Uint8Array(h,m.start,m.end-m.start)),P=Object(v.toTimescaleFromScale)(r,1,l);try{f(d(F,P))}catch(z){C(z)}}function d(h,r){var l=new DOMParser,f=l.parseFromString(h,"text/xml"),C=f.getElementsByTagName("tt")[0];if(!C)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},m=Object.keys(g).reduce(function(V,M){return V[M]=C.getAttribute("ttp:"+M)||g[M],V},{}),F=C.getAttribute("xml:space")!=="preserve",P=A(s(C,"styling","style")),z=A(s(C,"layout","region")),Z=s(C,"body","[begin]");return[].map.call(Z,function(V){var M=a(V,F);if(!M||!V.hasAttribute("begin"))return null;var J=x(V.getAttribute("begin"),m),X=x(V.getAttribute("dur"),m),re=x(V.getAttribute("end"),m);if(J===null)throw S(V);if(re===null){if(X===null)throw S(V);re=J+X}var se=new B.default(J-r,re-r,M);se.id=Object(T.generateCueId)(se.startTime,se.endTime,se.text);var _e=z[V.getAttribute("region")],ge=P[V.getAttribute("style")];se.position=10,se.size=80;var we=p(_e,ge),Re=we.textAlign;if(Re){var He=o[Re];He&&(se.lineAlign=He),se.align=Re}return E(se,we),se}).filter(function(V){return V!==null})}function s(h,r,l){var f=h.getElementsByTagName(r)[0];return f?[].slice.call(f.querySelectorAll(l)):[]}function A(h){return h.reduce(function(r,l){var f=l.getAttribute("xml:id");return f&&(r[f]=l),r},{})}function a(h,r){return[].slice.call(h.childNodes).reduce(function(l,f,C){var g;return f.nodeName==="br"&&C?l+`
|
|
`:(g=f.childNodes)!==null&&g!==void 0&&g.length?a(f,r):r?l+f.textContent.trim().replace(/\s+/g," "):l+f.textContent},"")}function p(h,r){var l="http://www.w3.org/ns/ttml#styling",f=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return f.reduce(function(C,g){var m=w(r,l,g)||w(h,l,g);return m&&(C[g]=m),C},{})}function w(h,r,l){return h.hasAttributeNS(r,l)?h.getAttributeNS(r,l):null}function S(h){return new Error("Could not parse ttml timestamp "+h)}function x(h,r){if(!h)return null;var l=Object(D.parseTimeStamp)(h);return l===null&&(u.test(h)?l=L(h,r):c.test(h)&&(l=b(h,r))),l}function L(h,r){var l=u.exec(h),f=(l[4]|0)+(l[5]|0)/r.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+f/r.frameRate}function b(h,r){var l=c.exec(h),f=Number(l[1]),C=l[2];switch(C){case"h":return f*3600;case"m":return f*60;case"ms":return f*1e3;case"f":return f/r.frameRate;case"t":return f/r.tickRate}return f}},"./src/utils/logger.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"enableLogs",function(){return T}),O.d(Q,"logger",function(){return E});var j=function(){},D={trace:j,debug:j,log:j,warn:j,info:j,error:j},B=D;function I(n){var u=self.console[n];return u?u.bind(self.console,"["+n+"] >"):j}function v(n){for(var u=arguments.length,c=new Array(u>1?u-1:0),o=1;o<u;o++)c[o-1]=arguments[o];c.forEach(function(i){B[i]=n[i]?n[i].bind(n):I(i)})}function T(n){if(self.console&&n===!0||typeof n=="object"){v(n,"debug","log","info","warn","error");try{B.log()}catch(u){B=D}}else B=D}var E=B},"./src/utils/mediakeys-helper.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"KeySystems",function(){return j}),O.d(Q,"requestMediaKeySystemAccess",function(){return D});var j;(function(B){B.WIDEVINE="com.widevine.alpha",B.PLAYREADY="com.microsoft.playready"})(j||(j={}));var D=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"getMediaSource",function(){return j});function j(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"bin2str",function(){return v}),O.d(Q,"readUint16",function(){return T}),O.d(Q,"readUint32",function(){return E}),O.d(Q,"writeUint32",function(){return n}),O.d(Q,"findBox",function(){return u}),O.d(Q,"parseSegmentIndex",function(){return c}),O.d(Q,"parseInitSegment",function(){return o}),O.d(Q,"getStartDTS",function(){return i}),O.d(Q,"getDuration",function(){return d}),O.d(Q,"computeRawDurationFromSamples",function(){return s}),O.d(Q,"offsetStartDTS",function(){return A}),O.d(Q,"segmentValidRange",function(){return a}),O.d(Q,"appendUint8Array",function(){return p});var j=O("./src/utils/typed-array.ts"),D=O("./src/loader/fragment.ts"),B=Math.pow(2,32)-1,I=[].push;function v(w){return String.fromCharCode.apply(null,w)}function T(w,S){"data"in w&&(S+=w.start,w=w.data);var x=w[S]<<8|w[S+1];return x<0?65536+x:x}function E(w,S){"data"in w&&(S+=w.start,w=w.data);var x=w[S]<<24|w[S+1]<<16|w[S+2]<<8|w[S+3];return x<0?4294967296+x:x}function n(w,S,x){"data"in w&&(S+=w.start,w=w.data),w[S]=x>>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;r<h;){var l=E(L,r),f=v(L.subarray(r+4,r+8)),C=l>1?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<P;z++){var Z=f,V=E(r,Z);Z+=4;var M=V&2147483647,J=(V&2147483648)>>>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;L<x.length;L++){var b=x[L],h=u(b,["tkhd"])[0];if(h){var r=h.data[h.start],l=r===0?12:20,f=E(h,l),C=u(b,["mdia","mdhd"])[0];if(C){r=C.data[C.start],l=r===0?12:20;var g=E(C,l),m=u(b,["mdia","hdlr"])[0];if(m){var F=v(m.data.subarray(m.start+8,m.start+12)),P={soun:D.ElementaryStreamTypes.AUDIO,vide:D.ElementaryStreamTypes.VIDEO}[F];if(P){var z=u(b,["mdia","minf","stbl","stsd"])[0],Z=void 0;z&&(Z=v(z.data.subarray(z.start+12,z.start+16))),S[f]={timescale:g,type:P},S[P]={timescale:g,id:f,codec:Z}}}}}}var V=u(w,["moov","mvex","trex"]);return V.forEach(function(M){var J=E(M,4),X=S[J];X&&(X.default={duration:E(M,12),flags:E(M,20)})}),S}function i(w,S){return u(S,["moof","traf"]).reduce(function(x,L){var b=u(L,["tfdt"])[0],h=b.data[b.start],r=u(L,["tfhd"]).reduce(function(l,f){var C=E(f,4),g=w[C];if(g){var m=E(b,4);h===1&&(m*=Math.pow(2,32),m+=E(b,8));var F=g.timescale||9e4,P=m/F;if(isFinite(P)&&(l===null||P<l))return P}return l},null);return r!==null&&isFinite(r)&&(x===null||r<x)?r:x},null)||0}function d(w,S){for(var x=0,L=0,b=0,h=u(w,["moof","traf"]),r=0;r<h.length;r++){var l=h[r],f=u(l,["tfhd"])[0],C=E(f,4),g=S[C];if(!g)continue;var m=g.default,F=E(f,0)|(m==null?void 0:m.flags),P=m==null?void 0:m.duration;F&8&&(F&2?P=E(f,12):P=E(f,8));for(var z=g.timescale||9e4,Z=u(l,["trun"]),V=0;V<Z.length;V++){if(P){var M=E(Z[V],4);x=P*M}else x=s(Z[V]);g.type===D.ElementaryStreamTypes.VIDEO?L+=x/z:g.type===D.ElementaryStreamTypes.AUDIO&&(b+=x/z)}}if(L===0&&b===0){var J=c(w);if(J!=null&&J.references)return J.references.reduce(function(X,re){return X+re.info.duration||0},0)}return L||b}function s(w){var S=E(w,0),x=8;S&1&&(x+=4),S&4&&(x+=4);for(var L=0,b=E(w,4),h=0;h<b;h++){if(S&256){var r=E(w,x);L+=r,x+=4}S&512&&(x+=4),S&1024&&(x+=4),S&2048&&(x+=4)}return L}function A(w,S,x){u(S,["moof","traf"]).forEach(function(L){u(L,["tfhd"]).forEach(function(b){var h=E(b,4),r=w[h];if(!r)return;var l=r.timescale||9e4;u(L,["tfdt"]).forEach(function(f){var C=f.data[f.start],g=E(f,4);if(C===0)n(f,4,g-x*l);else{g*=Math.pow(2,32),g+=E(f,8),g-=x*l,g=Math.max(g,0);var m=Math.floor(g/(B+1)),F=Math.floor(g%(B+1));n(f,4,m),n(f,8,F)}})})})}function a(w){var S={valid:null,remainder:null},x=u(w,["moof"]);if(x){if(x.length<2)return S.remainder=w,S}else return S;var L=x[x.length-1];return S.valid=Object(j.sliceUint8)(w,0,L.start-8),S.remainder=Object(j.sliceUint8)(w,L.start-8),S}function p(w,S){var x=new Uint8Array(w.length+S.length);return x.set(w),x.set(S,w.length),x}},"./src/utils/output-filter.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return j});var j=function(){function D(I,v){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=I,this.trackName=v}var B=D.prototype;return B.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},B.newCue=function(v,T,E){(this.startTime===null||this.startTime>v)&&(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;d<i.length;d++)n.removeCue(i[d]);o==="disabled"&&(n.mode=o)}function T(n,u){if(u<n[0].startTime)return 0;var c=n.length-1;if(u>n[c].endTime)return-1;for(var o=0,i=c;o<=i;){var d=Math.floor((i+o)/2);if(u<n[d].startTime)i=d-1;else if(u>n[d].startTime&&o<c)o=d+1;else return d}return n[o].startTime-u<u-n[i].startTime?o:i}function E(n,u,c){var o=[],i=T(n,u);if(i>-1)for(var d=i,s=n.length;d<s;d++){var A=n[d];if(A.startTime>=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;T<v;T++)I+="["+B.start(T).toFixed(3)+","+B.end(T).toFixed(3)+"]";return I}};Q.default=j},"./src/utils/timescale-conversion.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"toTimescaleFromBase",function(){return D}),O.d(Q,"toTimescaleFromScale",function(){return B}),O.d(Q,"toMsFromMpegTsClock",function(){return I}),O.d(Q,"toMpegTsClockFromTimescale",function(){return v});var j=9e4;function D(T,E,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var c=T*E*n;return u?Math.round(c):c}function B(T,E,n,u){return n===void 0&&(n=1),u===void 0&&(u=!1),D(T,E,1/n,u)}function I(T,E){return E===void 0&&(E=!1),D(T,1e3,1/j,E)}function v(T,E){return E===void 0&&(E=1),D(T,j,1/E)}},"./src/utils/typed-array.ts":function(q,Q,O){"use strict";O.r(Q),O.d(Q,"sliceUint8",function(){return j});function j(D,B,I){return Uint8Array.prototype.slice?D.slice(B,I):new Uint8Array(Array.prototype.slice.call(D,B,I))}},"./src/utils/vttcue.ts":function(q,Q,O){"use strict";O.r(Q),Q.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var j=["","lr","rl"],D=["start","middle","end","left","right"];function B(n,u){if(typeof u!="string")return!1;if(!Array.isArray(n))return!1;var c=u.toLowerCase();return~n.indexOf(c)?c:!1}function I(n){return B(j,n)}function v(n){return B(D,n)}function T(n){for(var u=arguments.length,c=new Array(u>1?u-1:0),o=1;o<u;o++)c[o-1]=arguments[o];for(var i=1;i<arguments.length;i++){var d=arguments[i];for(var s in d)n[s]=d[s]}return n}function E(n,u,c){var o=this,i={enumerable:!0};o.hasBeenReset=!1;var d="",s=!1,A=n,a=u,p=c,w=null,S="",x=!0,L="auto",b="start",h=50,r="middle",l=50,f="middle";Object.defineProperty(o,"id",T({},i,{get:function(){return d},set:function(g){d=""+g}})),Object.defineProperty(o,"pauseOnExit",T({},i,{get:function(){return s},set:function(g){s=!!g}})),Object.defineProperty(o,"startTime",T({},i,{get:function(){return A},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");A=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",T({},i,{get:function(){return a},set:function(g){if(typeof g!="number")throw new TypeError("End time must be set to a number.");a=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",T({},i,{get:function(){return p},set:function(g){p=""+g,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",T({},i,{get:function(){return w},set:function(g){w=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",T({},i,{get:function(){return S},set:function(g){var m=I(g);if(m===!1)throw new SyntaxError("An invalid or illegal string was specified.");S=m,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",T({},i,{get:function(){return x},set:function(g){x=!!g,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",T({},i,{get:function(){return L},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=g,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",T({},i,{get:function(){return b},set:function(g){var m=v(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");b=m,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",T({},i,{get:function(){return h},set:function(g){if(g<0||g>100)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<a.length;++p)if(A===a[p]){this.set(s,A);break}},i.integer=function(s,A){/^-?\d+$/.test(A)&&this.set(s,parseInt(A,10))},i.percent=function(s,A){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(A)){var a=parseFloat(A);if(a>=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(/<br(?: \/)?>/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<b.length&&b[h]!=="\r"&&b[h]!==`
|
|
`;)++h;var r=b.substr(0,h);return b[h]==="\r"&&++h,b[h]===`
|
|
`&&++h,A.buffer=b.substr(h),r}function p(b){v(b,function(h,r){},/:/)}try{var w="";if(A.state==="INITIAL"){if(!/\r\n|\n/.test(A.buffer))return this;w=a();var S=w.match(/^()?WEBVTT([ \t].*)?$/);if(!S||!S[0])throw new Error("Malformed WebVTT signature.");A.state="HEADER"}for(var x=!1;A.buffer;){if(!/\r\n|\n/.test(A.buffer))return this;x?x=!1:w=a();switch(A.state){case"HEADER":/:/.test(w)?p(w):w||(A.state="ID");continue;case"NOTE":w||(A.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(w)){A.state="NOTE";break}if(!w)continue;if(A.cue=new j.default(0,0,""),A.state="CUE",w.indexOf("-->")===-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;S<x;S++){if(!w)continue;w=w[p[S]]}w&&(d=w)}else d=A;if(!d){Q('Property "'+o+'" is not existed in element '+A.id);return}var L=A.animators,b=new q(d,i);return b.during(function(h){A.dirty(s)}).done(function(){L.splice(v(L,b),1)}),L.push(b),a&&a.animation.addAnimator(b),b},stopAnimation:function(o){for(var i=this.animators,d=i.length,s=0;s<d;s++)i[s].stop(o);return i.length=0,this},animateTo:function(o,i,d,s,A,a){E(this,o,i,d,s,A,a)},animateFrom:function(o,i,d,s,A,a){E(this,o,i,d,s,A,a,!0)}};function E(o,i,d,s,A,a,p,w){j(s)?(a=A,A=s,s=0):D(A)?(a=A,A="linear",s=0):D(s)?(a=s,s=0):D(d)?(a=d,d=500):d||(d=500),o.stopAnimation(),n(o,"",o,i,d,s,w);var S=o.animators.slice(),x=S.length;function L(){x--,x||a&&a()}x||a&&a();for(var b=0;b<S.length;b++)S[b].done(L).start(A,p)}function n(o,i,d,s,A,a,p){var w={},S=0;for(var x in s){if(!s.hasOwnProperty(x))continue;d[x]!=null?B(s[x])&&!I(s[x])?n(o,i?i+"."+x:x,d[x],s[x],A,a,p):(p?(w[x]=d[x],u(o,i,x,s[x])):w[x]=s[x],S++):s[x]!=null&&!p&&u(o,i,x,s[x])}S>0&&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<dt;st+=1)Ye(st);return Ne}function b(Qe){var Ne=Qe.stickyOffsets,lt=Qe.columns,dt=Qe.flattenColumns,Ye=Qe.onHeaderRow,st=B.useContext(a.a),je=st.prefixCls,Le=st.getComponent,Me=B.useMemo(function(){return L(lt)},[lt]),me=Le(["header","wrapper"],"thead"),ye=Le(["header","row"],"tr"),Ee=Le(["header","cell"],"th");return B.createElement(me,{className:"".concat(je,"-thead")},Me.map(function(Oe,De){var Ze=B.createElement(x,{key:De,flattenColumns:dt,cells:Oe,stickyOffsets:Ne,rowComponent:ye,cellComponent:Ee,onHeaderRow:Ye,index:De});return Ze}))}var h=b,r=G("hW8S");function l(Qe){for(var Ne=Qe.colWidths,lt=Qe.columns,dt=Qe.columCount,Ye=[],st=dt||lt.length,je=!1,Le=st-1;Le>=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;dt<Ne;dt+=1){var Ye=Qe[dt];if(Ye!==void 0)lt[dt]=Ye;else return null}return lt},[Qe.join("_"),Ne])}var g=B.forwardRef(function(Qe,Ne){var lt=Qe.noData,dt=Qe.columns,Ye=Qe.flattenColumns,st=Qe.colWidths,je=Qe.columCount,Le=Qe.stickyOffsets,Me=Qe.direction,me=Qe.fixHeader,ye=Qe.offsetHeader,Ee=Qe.stickyClassName,Oe=Qe.onScroll,De=Object(d.a)(Qe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ze=B.useContext(a.a),ht=Ze.prefixCls,Tt=Ze.scrollbarSize,kt=Ze.isSticky,It=kt&&!me?0:Tt,St=B.useRef(null),ut=B.useCallback(function(xt){Object(s.b)(Ne,xt),Object(s.b)(St,xt)},[]);B.useEffect(function(){var xt;function _t(Xe){var mt=Xe.currentTarget,Pt=Xe.deltaX;Pt&&(Oe({currentTarget:mt,scrollLeft:mt.scrollLeft+Pt}),Xe.preventDefault())}return(xt=St.current)===null||xt===void 0||xt.addEventListener("wheel",_t),function(){var Xe;(Xe=St.current)===null||Xe===void 0||Xe.removeEventListener("wheel",_t)}},[]);var nt=Ye[Ye.length-1],tt={fixed:nt?nt.fixed:null,onHeaderCell:function(){return{className:"".concat(ht,"-cell-scrollbar")}}},Ce=Object(B.useMemo)(function(){return It?[].concat(Object(O.a)(dt),[tt]):dt},[It,dt]),Pe=Object(B.useMemo)(function(){return It?[].concat(Object(O.a)(Ye),[tt]):Ye},[It,Ye]),pt=Object(B.useMemo)(function(){var xt=Le.right,_t=Le.left;return Object(Q.a)(Object(Q.a)({},Le),{},{left:Me==="rtl"?[].concat(Object(O.a)(_t.map(function(Xe){return Xe+It})),[0]):_t,right:Me==="rtl"?xt:[].concat(Object(O.a)(xt.map(function(Xe){return Xe+It})),[0]),isSticky:kt})},[It,Le,kt]),it=C(st,je);return B.createElement("div",{style:Object(Q.a)({overflow:"hidden"},kt?{top:ye}:{}),ref:ut,className:v()("".concat(ht,"-header"),Object(q.a)({},Ee,!!Ee))},B.createElement("table",{style:{tableLayout:"fixed",visibility:lt||it?null:"hidden"}},B.createElement(f,{colWidths:it?[].concat(Object(O.a)(it),[It]):[],columCount:je+1,columns:Pe}),B.createElement(h,Object.assign({},De,{stickyOffsets:pt,columns:Ce,flattenColumns:Pe}))))});g.displayName="FixedHeader";var m=g,F=B.createContext(null),P=F;function z(Qe){var Ne=Qe.prefixCls,lt=Qe.children,dt=Qe.component,Ye=Qe.cellComponent,st=Qe.fixHeader,je=Qe.fixColumn,Le=Qe.horizonScroll,Me=Qe.className,me=Qe.expanded,ye=Qe.componentWidth,Ee=Qe.colSpan,Oe=B.useContext(a.a),De=Oe.scrollbarSize;return B.useMemo(function(){var Ze=lt;return je&&(Ze=B.createElement("div",{style:{width:ye-(st?De:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ne,"-expanded-row-fixed")},Ze)),B.createElement(dt,{className:Me,style:{display:me?null:"none"}},B.createElement(A.a,{component:Ye,prefixCls:Ne,colSpan:Ee},Ze))},[lt,dt,st,Le,Me,me,ye,Ee,De])}var Z=z;function V(Qe){var Ne=Qe.className,lt=Qe.style,dt=Qe.record,Ye=Qe.index,st=Qe.rowKey,je=Qe.getRowKey,Le=Qe.rowExpandable,Me=Qe.expandedKeys,me=Qe.onRow,ye=Qe.indent,Ee=ye===void 0?0:ye,Oe=Qe.rowComponent,De=Qe.cellComponent,Ze=Qe.childrenColumnName,ht=B.useContext(a.a),Tt=ht.prefixCls,kt=ht.fixedInfoList,It=B.useContext(P),St=It.fixHeader,ut=It.fixColumn,nt=It.horizonScroll,tt=It.componentWidth,Ce=It.flattenColumns,Pe=It.expandableType,pt=It.expandRowByClick,it=It.onTriggerExpand,xt=It.rowClassName,_t=It.expandedRowClassName,Xe=It.indentSize,mt=It.expandIcon,Pt=It.expandedRowRender,Rt=It.expandIconColumnIndex,Qt=B.useState(!1),Ir=Object(D.a)(Qt,2),Fr=Ir[0],wr=Ir[1],Kt=Me&&Me.has(Qe.recordKey);B.useEffect(function(){Kt&&wr(!0)},[Kt]);var Ur=Pe==="row"&&(!Le||Le(dt)),Kr=Pe==="nest",Rr=Ze&&dt&&dt[Ze],pr=Ur||Kr,Or;me&&(Or=me(dt,Ye));var pn=function(U){if(pt&&pr&&it(dt,U),Or&&Or.onClick){for(var N,$=arguments.length,le=new Array($>1?$-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<Ne;Me+=1)if(lt==="rtl"){st[Me]=Le,Le+=Qe[Me]||0;var me=Ne-Me-1;Ye[me]=je,je+=Qe[me]||0}else{Ye[Me]=je,je+=Qe[Me]||0;var ye=Ne-Me-1;st[ye]=Le,Le+=Qe[ye]||0}return{left:Ye,right:st}},[Qe,Ne,lt]);return dt}var bt=$e;function Ie(Qe){var Ne=Qe.className,lt=Qe.children;return B.createElement("div",{className:Ne},lt)}var ze=Ie,at=G("n6Qo");function Ae(Qe){var Ne,lt=Qe.prefixCls,dt=Qe.record,Ye=Qe.onExpand,st=Qe.expanded,je=Qe.expandable,Le="".concat(lt,"-row-expand-icon");if(!je)return B.createElement("span",{className:v()(Le,"".concat(lt,"-row-spaced"))});var Me=function(ye){Ye(dt,ye),ye.stopPropagation()};return B.createElement("span",{className:v()(Le,(Ne={},Object(q.a)(Ne,"".concat(lt,"-row-expanded"),st),Object(q.a)(Ne,"".concat(lt,"-row-collapsed"),!st),Ne)),onClick:Me})}function ne(Qe,Ne,lt){var dt=[];function Ye(st){(st||[]).forEach(function(je,Le){dt.push(Ne(je,Le)),Ye(je[lt])})}return Ye(Qe),dt}var ae=G("zT1h"),ce=G("y0+3"),xe=function(Ne,lt){var dt,Ye,st=Ne.scrollBodyRef,je=Ne.onScroll,Le=Ne.offsetScroll,Me=B.useContext(a.a),me=Me.prefixCls,ye=((dt=st.current)===null||dt===void 0?void 0:dt.scrollWidth)||0,Ee=((Ye=st.current)===null||Ye===void 0?void 0:Ye.clientWidth)||0,Oe=ye&&Ee*(Ee/ye),De=B.useRef(),Ze=Se({scrollLeft:0,isHiddenScrollBar:!1}),ht=Object(D.a)(Ze,2),Tt=ht[0],kt=ht[1],It=B.useRef({delta:0,x:0}),St=B.useState(!1),ut=Object(D.a)(St,2),nt=ut[0],tt=ut[1],Ce=function(){tt(!1)},Pe=function(Xe){Xe.persist(),It.current.delta=Xe.pageX-Tt.scrollLeft,It.current.x=0,tt(!0),Xe.preventDefault()},pt=function(Xe){var mt,Pt=Xe||((mt=window)===null||mt===void 0?void 0:mt.event),Rt=Pt.buttons;if(!nt||Rt===0){nt&&tt(!1);return}var Qt=It.current.x+Xe.pageX-It.current.x-It.current.delta;Qt<=0&&(Qt=0),Qt+Oe>=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<Ro-hs)}},kn=function(){yr.current&&gn({currentTarget:yr.current})},er=function(Hr){var Yr=Hr.width;kn(),Ut(Ar.current?Ar.current.offsetWidth:Yr)};B.useEffect(function(){return kn},[]),B.useEffect(function(){$t&&kn()},[$t]),B.useEffect(function(){ut===yt&&tt&&(tt.body.current=yr.current)});var hr=Pt(["table"],"table"),Jt=B.useMemo(function(){return me||(vr?Me.x==="max-content"?"auto":"fixed":nr||Xt.some(function(Zr){var Hr=Zr.ellipsis;return Hr})?"fixed":"auto")},[nr,vr,Xt,me]),gr,Tr={colWidths:dr,columCount:Xt.length,stickyOffsets:tr,onHeaderRow:St,fixHeader:nr},Xr=B.useMemo(function(){return pt?null:typeof kt=="function"?kt():kt},[pt,kt]),Cr=B.createElement(ge,{data:Pe,measureColumnWidth:nr||$t||Er,expandedKeys:$,rowExpandable:Or,getRowKey:Rt,onRow:It,emptyNode:Xr,childrenColumnName:rt}),on=B.createElement(f,{colWidths:Xt.map(function(Zr){var Hr=Zr.width;return Hr}),columns:Xt}),Dn=De&&B.createElement(at.b,null,De(Pe)),Mr=Pt(["body"]);if(nr||Er){var li;typeof Mr=="function"?(li=Mr(Pe,{scrollbarSize:_t,ref:yr,onScroll:gn}),Tr.colWidths=Xt.map(function(Zr,Hr){var Yr=Zr.width,Ai=Hr===Yt.length-1?Yr-_t:Yr;return typeof Ai=="number"&&!Number.isNaN(Ai)?Ai:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):li=B.createElement("div",{style:Object(Q.a)(Object(Q.a)({},Qn),wn),onScroll:gn,ref:yr,className:v()("".concat(lt,"-body"))},B.createElement(hr,{style:Object(Q.a)(Object(Q.a)({},qr),{},{tableLayout:Jt})},on,Cr,Dn),Er&&B.createElement(Fe,{ref:mr,offsetScroll:Gr,scrollBodyRef:yr,onScroll:gn})),gr=B.createElement(B.Fragment,null,ht!==!1&&B.createElement(m,Object.assign({noData:!Pe.length},Tr,qt,{direction:ye,offsetHeader:On,stickyClassName:En,ref:Br,onScroll:gn})),li)}else gr=B.createElement("div",{style:Object(Q.a)(Object(Q.a)({},Qn),wn),className:v()("".concat(lt,"-content")),onScroll:gn,ref:yr},B.createElement(hr,{style:Object(Q.a)(Object(Q.a)({},qr),{},{tableLayout:Jt})},on,ht!==!1&&B.createElement(h,Object.assign({},Tr,qt)),Cr,Dn));var Nr=Object(r.b)(Qe),jn=B.createElement("div",Object.assign({className:v()(lt,dt,(Ne={},Object(q.a)(Ne,"".concat(lt,"-rtl"),ye==="rtl"),Object(q.a)(Ne,"".concat(lt,"-ping-left"),Dr),Object(q.a)(Ne,"".concat(lt,"-ping-right"),Jr),Object(q.a)(Ne,"".concat(lt,"-layout-fixed"),me==="fixed"),Object(q.a)(Ne,"".concat(lt,"-fixed-header"),nr),Object(q.a)(Ne,"".concat(lt,"-fixed-column"),vr),Object(q.a)(Ne,"".concat(lt,"-scroll-horizontal"),$t),Object(q.a)(Ne,"".concat(lt,"-has-fix-left"),Xt[0]&&Xt[0].fixed),Object(q.a)(Ne,"".concat(lt,"-has-fix-right"),Xt[Xt.length-1]&&Xt[Xt.length-1].fixed==="right"),Ne)),style:st,id:Ze,ref:Ar},Nr),B.createElement(Et,{pingLeft:Dr,pingRight:Jr,props:Object(Q.a)(Object(Q.a)({},Qe),{},{stickyOffsets:tr,mergedExpandedKeys:$})},Ee&&B.createElement(ze,{className:"".concat(lt,"-title")},Ee(Pe)),B.createElement("div",{className:"".concat(lt,"-container")},gr),Oe&&B.createElement(ze,{className:"".concat(lt,"-footer")},Oe(Pe))));$t&&(jn=B.createElement(u.a,{onResize:er},jn));var Kn=B.useMemo(function(){return{prefixCls:lt,getComponent:Pt,scrollbarSize:_t,direction:ye,fixedInfoList:Xt.map(function(Zr,Hr){return p(Hr,Hr,Xt,tr,ye)}),isSticky:Er}},[lt,Pt,_t,ye,Xt,tr,ye,Er]),ui=B.useMemo(function(){return Object(Q.a)(Object(Q.a)({},qt),{},{tableLayout:Jt,rowClassName:Ye,expandedRowClassName:un,componentWidth:Ct,fixHeader:nr,fixColumn:vr,horizonScroll:$t,expandIcon:Ue,expandableType:et,expandRowByClick:pr,expandedRowRender:Ur,onTriggerExpand:le,expandIconColumnIndex:pn,indentSize:be})},[qt,Jt,Ye,un,Ct,nr,vr,$t,Ue,et,pr,Ur,le,pn,be]),ds=B.useMemo(function(){return{onColumnResize:Ln}},[Ln]);return B.createElement(a.a.Provider,{value:Kn},B.createElement(P.Provider,{value:ui},B.createElement(X.Provider,{value:ds},jn)))}Ot.Column=i.a,Ot.ColumnGroup=o.a,Ot.Summary=at.a,Ot.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Mt=pe.b=Ot},wOnQ:function(qe,pe,G){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* 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;K<oe;K++){W=arguments[K];for(var he in W)Object.prototype.hasOwnProperty.call(W,he)&&(k[he]=W[he])}return k},O.apply(this,arguments)};function j(H,k,W,K){function oe(he){return he instanceof W?he:new W(function(Be){Be(he)})}return new(W||(W=Promise))(function(he,Be){function Ge(vt){try{ot(K.next(vt))}catch(Bt){Be(Bt)}}function We(vt){try{ot(K.throw(vt))}catch(Bt){Be(Bt)}}function ot(vt){vt.done?he(vt.value):oe(vt.value).then(Ge,We)}ot((K=K.apply(H,k||[])).next())})}function D(H,k){var W={label:0,sent:function(){if(he[0]&1)throw he[1];return he[1]},trys:[],ops:[]},K,oe,he,Be;return Be={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Be[Symbol.iterator]=function(){return this}),Be;function Ge(ot){return function(vt){return We([ot,vt])}}function We(ot){if(K)throw new TypeError("Generator is already executing.");for(;W;)try{if(K=1,oe&&(he=ot[0]&2?oe.return:ot[0]?oe.throw||((he=oe.return)&&he.call(oe),0):oe.next)&&!(he=he.call(oe,ot[1])).done)return he;(oe=0,he)&&(ot=[ot[0]&2,he.value]);switch(ot[0]){case 0:case 1:he=ot;break;case 4:return W.label++,{value:ot[1],done:!1};case 5:W.label++,oe=ot[1],ot=[0];continue;case 7:ot=W.ops.pop(),W.trys.pop();continue;default:if(!(he=W.trys,he=he.length>0&&he[he.length-1])&&(ot[0]===6||ot[0]===2)){W=0;continue}if(ot[0]===3&&(!he||ot[1]>he[0]&&ot[1]<he[3])){W.label=ot[1];break}if(ot[0]===6&&W.label<he[1]){W.label=he[1],he=ot;break}if(he&&W.label<he[2]){W.label=he[2],W.ops.push(ot);break}he[2]&&W.ops.pop(),W.trys.pop();continue}ot=k.call(H,W)}catch(vt){ot=[6,vt],oe=0}finally{K=he=0}if(ot[0]&5)throw ot[1];return{value:ot[0]?ot[1]:void 0,done:!0}}}function B(H,k,W){if(W||arguments.length===2)for(var K=0,oe=k.length,he;K<oe;K++)(he||!(K in k))&&(he||(he=Array.prototype.slice.call(k,0,K)),he[K]=k[K]);return H.concat(he||k)}for(var I=function(){function H(k,W,K,oe){this.left=k,this.top=W,this.width=K,this.height=oe}return H.prototype.add=function(k,W,K,oe){return new H(this.left+k,this.top+W,this.width+K,this.height+oe)},H.fromClientRect=function(k,W){return new H(W.left+k.windowBounds.left,W.top+k.windowBounds.top,W.width,W.height)},H.fromDOMRectList=function(k,W){var K=Array.from(W).find(function(oe){return oe.width!==0});return K?new H(K.left+k.windowBounds.left,K.top+k.windowBounds.top,K.width,K.height):H.EMPTY},H.EMPTY=new H(0,0,0,0),H}(),v=function(H,k){return I.fromClientRect(H,k.getBoundingClientRect())},T=function(H){var k=H.body,W=H.documentElement;if(!k||!W)throw new Error("Unable to get document size");var K=Math.max(Math.max(k.scrollWidth,W.scrollWidth),Math.max(k.offsetWidth,W.offsetWidth),Math.max(k.clientWidth,W.clientWidth)),oe=Math.max(Math.max(k.scrollHeight,W.scrollHeight),Math.max(k.offsetHeight,W.offsetHeight),Math.max(k.clientHeight,W.clientHeight));return new I(0,0,K,oe)},E=function(H){for(var k=[],W=0,K=H.length;W<K;){var oe=H.charCodeAt(W++);if(oe>=55296&&oe<=56319&&W<K){var he=H.charCodeAt(W++);(he&64512)===56320?k.push(((oe&1023)<<10)+(he&1023)+65536):(k.push(oe),W--)}else k.push(oe)}return k},n=function(){for(var H=[],k=0;k<arguments.length;k++)H[k]=arguments[k];if(String.fromCodePoint)return String.fromCodePoint.apply(String,H);var W=H.length;if(!W)return"";for(var K=[],oe=-1,he="";++oe<W;){var Be=H[oe];Be<=65535?K.push(Be):(Be-=65536,K.push((Be>>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<u.length;o++)c[u.charCodeAt(o)]=o;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<i.length;s++)d[i.charCodeAt(s)]=s;for(var A=function(H){var k=H.length*.75,W=H.length,K,oe=0,he,Be,Ge,We;H[H.length-1]==="="&&(k--,H[H.length-2]==="="&&k--);var ot=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(k):new Array(k),vt=Array.isArray(ot)?ot:new Uint8Array(ot);for(K=0;K<W;K+=4)he=d[H.charCodeAt(K)],Be=d[H.charCodeAt(K+1)],Ge=d[H.charCodeAt(K+2)],We=d[H.charCodeAt(K+3)],vt[oe++]=he<<2|Be>>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<k;K+=2)W.push(H[K+1]<<8|H[K]);return W},p=function(H){for(var k=H.length,W=[],K=0;K<k;K+=4)W.push(H[K+3]<<24|H[K+2]<<16|H[K+1]<<8|H[K]);return W},w=5,S=6+5,x=2,L=S-w,b=65536>>w,h=1<<w,r=h-1,l=1024>>w,f=b+l,C=f,g=2048>>6,m=C+g,F=65536>>S,P=1<<L,z=P-1,Z=function(H,k,W){return H.slice?H.slice(k,W):new Uint16Array(Array.prototype.slice.call(H,k,W))},V=function(H,k,W){return H.slice?H.slice(k,W):new Uint32Array(Array.prototype.slice.call(H,k,W))},M=function(H,k){var W=A(H),K=Array.isArray(W)?p(W):new Uint32Array(W),oe=Array.isArray(W)?a(W):new Uint16Array(W),he=24,Be=Z(oe,he/2,K[4]/2),Ge=K[5]===2?Z(oe,(he+K[4])/2):V(K,Math.ceil((he+K[4])/4));return new J(K[0],K[1],K[2],K[3],Be,Ge)},J=function(){function H(k,W,K,oe,he,Be){this.initialValue=k,this.errorValue=W,this.highStart=K,this.highValueIndex=oe,this.index=he,this.data=Be}return H.prototype.get=function(k){var W;if(k>=0){if(k<55296||k>56319&&k<=65535)return W=this.index[k>>w],W=(W<<x)+(k&r),this.data[W];if(k<=65535)return W=this.index[b+(k-55296>>w)],W=(W<<x)+(k&r),this.data[W];if(k<this.highStart)return W=m-F+(k>>S),W=this.index[W],W+=k>>w&z,W=this.index[W],W=(W<<x)+(k&r),this.data[W];if(k<=1114111)return this.data[this.highValueIndex]}return this.errorValue},H}(),X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",re=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),se=0;se<X.length;se++)re[X.charCodeAt(se)]=se;var _e="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",ge=50,we=1,Re=2,He=3,Se=4,Te=5,$e=7,bt=8,Ie=9,ze=10,at=11,Ae=12,ne=13,ae=14,ce=15,xe=16,Fe=17,ke=18,ct=19,ft=20,yt=21,Et=22,Ot=23,Mt=24,Qe=25,Ne=26,lt=27,dt=28,Ye=29,st=30,je=31,Le=32,Me=33,me=34,ye=35,Ee=36,Oe=37,De=38,Ze=39,ht=40,Tt=41,kt=42,It=43,St=[9001,65288],ut="!",nt="\xD7",tt="\xF7",Ce=M(_e),Pe=[st,Ee],pt=[we,Re,He,Te],it=[ze,bt],xt=[lt,Ne],_t=pt.concat(it),Xe=[De,Ze,ht,me,ye],mt=[ce,ne],Pt=function(H,k){k===void 0&&(k="strict");var W=[],K=[],oe=[];return H.forEach(function(he,Be){var Ge=Ce.get(he);if(Ge>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<Ge&&(vt=Ir(W,he,oe,++ot,Be))===nt;);if(vt!==nt||ot===Ge){var Bt=new wr(W,vt,We,ot);return We=ot,{value:Bt,done:!1}}return{done:!0,value:null}}}},Ur=1<<0,Kr=1<<1,Rr=1<<2,pr=1<<3,Or=10,pn=47,un=92,fe=9,be=32,Ue=34,rt=61,et=35,Dt=36,ee=37,U=39,N=40,$=41,le=95,te=45,Ke=33,Ct=60,Ut=62,Ht=64,wt=91,Yt=93,Xt=61,qt=123,Ar=63,Br=125,yr=124,Lr=126,cr=128,Dr=65533,Pr=42,An=43,zr=44,Jr=58,bn=59,$r=46,en=0,an=8,cn=11,mn=14,br=31,dr=127,tr=-1,nr=48,$t=97,vr=101,mr=102,xr=117,Er=122,On=65,Gr=69,En=70,Qn=85,wn=90,qr=function(H){return H>=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;Be<H.length;Be++){var Ge=H[Be].stop;if(Ge!==null){var We=nn(Ge,k);We>he?oe.push(We):oe.push(he),he=We}else oe.push(null)}for(var ot=null,Be=0;Be<oe.length;Be++){var vt=oe[Be];if(vt===null)ot===null&&(ot=Be);else if(ot!==null){for(var Bt=Be-ot,Lt=oe[ot-1],sr=(vt-Lt)/(Bt+1),Wt=1;Wt<=Bt;Wt++)oe[ot+Wt-1]=sr*Wt;ot=null}}return H.map(function(rr,Sr){var or=rr.color;return{color:or,stop:Math.max(Math.min(1,oe[Sr]/k),0)}})},vu=function(H,k,W){var K=k/2,oe=W/2,he=nn(H[0],k)-K,Be=oe-nn(H[1],W);return(Math.atan2(Be,he)+Math.PI*2)%(Math.PI*2)},yu=function(H,k,W){var K=typeof H=="number"?H:vu(H,k,W),oe=Math.abs(k*Math.sin(K))+Math.abs(W*Math.cos(K)),he=k/2,Be=W/2,Ge=oe/2,We=Math.sin(K-Math.PI/2)*Ge,ot=Math.cos(K-Math.PI/2)*Ge;return[oe,he-ot,he+ot,Be-We,Be+We]},Zn=function(H,k){return Math.sqrt(H*H+k*k)},da=function(H,k,W,K,oe){var he=[[0,0],[0,k],[H,0],[H,k]];return he.reduce(function(Be,Ge){var We=Ge[0],ot=Ge[1],vt=Zn(W-We,K-ot);return(oe?vt<Be.optimumDistance:vt>Be.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;he<W.length;he++){var Be=W[he];ci(Be)?(oe===0?K.offsetX=Be:oe===1?K.offsetY=Be:K.blur=Be,oe++):K.color=bi.parse(H,Be)}return K})}},oo={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(H,k){switch(k){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mu={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(H,k){if(k.type===20&&k.value==="none")return null;if(k.type===18){var W=Sl[k.name];if(typeof W=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+k.name+'"');return W(k.values)}return null}},Ko=function(H){var k=H.filter(function(W){return W.type===17}).map(function(W){return W.number});return k.length===6?k:null},pi=function(H){var k=H.filter(function(We){return We.type===17}).map(function(We){return We.number}),W=k[0],K=k[1];k[2],k[3];var oe=k[4],he=k[5];k[6],k[7],k[8],k[9],k[10],k[11];var Be=k[12],Ge=k[13];return k[14],k[15],k.length===16?[W,K,oe,he,Be,Ge]:null},Sl={matrix:Ko,matrix3d:pi},Bl={type:16,number:50,flags:Rr},Ol=[Bl,Bl],mi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(H,k){var W=k.filter(Rn);return W.length!==2?Ol:[W[0],W[1]]}},tn={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(H,k){switch(k){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},oi;(function(H){H.NORMAL="normal",H.BREAK_ALL="break-all",H.KEEP_ALL="keep-all"})(oi||(oi={}));for(var qi={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(H,k){switch(k){case"break-all":return oi.BREAK_ALL;case"keep-all":return oi.KEEP_ALL;case"normal":default:return oi.NORMAL}}},ea={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(H,k){if(k.type===20)return{auto:!0,order:0};if(ua(k))return{auto:!1,order:k.number};throw new Error("Invalid z-index number parsed")}},Bs={name:"time",parse:function(H,k){if(k.type===15)switch(k.unit.toLowerCase()){case"s":return 1e3*k.number;case"ms":return k.number}throw new Error("Unsupported time type")}},Os={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(H,k){return ua(k)?k.number:1}},Il={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fu={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(H,k){return k.filter(vn).map(function(W){switch(W.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(W){return W!==0})}},Is={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(H,k){var W=[],K=[];return k.forEach(function(oe){switch(oe.type){case 20:case 0:W.push(oe.value);break;case 17:W.push(oe.number.toString());break;case 4:K.push(W.join(" ")),W.length=0;break}}),W.length&&K.push(W.join(" ")),K.map(function(oe){return oe.indexOf(" ")===-1?oe:"'"+oe+"'"})}},so={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Rl={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(H,k){if(ua(k))return k.number;if(vn(k))switch(k.value){case"bold":return 700;case"normal":default:return 400}return 400}},Rs={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(H,k){return k.filter(vn).map(function(W){return W.value})}},ta={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(H,k){switch(k){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Nn=function(H,k){return(H&k)!==0},Ll={name:"content",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}},Uu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(H,k){if(k.length===0)return null;var W=k[0];if(W.type===20&&W.value==="none")return null;for(var K=[],oe=k.filter($a),he=0;he<oe.length;he++){var Be=oe[he],Ge=oe[he+1];if(Be.type===20){var We=Ge&&ua(Ge)?Ge.number:1;K.push({counter:Be.value,increment:We})}}return K}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(H,k){if(k.length===0)return[];for(var W=[],K=k.filter($a),oe=0;oe<K.length;oe++){var he=K[oe],Be=K[oe+1];if(vn(he)&&he.value!=="none"){var Ge=Be&&ua(Be)?Be.number:0;W.push({counter:he.value,reset:Ge})}}return W}},Ls={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(H,k){return k.filter(Ba).map(function(W){return Bs.parse(H,W)})}},Dl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(H,k){if(k.length===0)return null;var W=k[0];if(W.type===20&&W.value==="none")return null;var K=[],oe=k.filter(Za);if(oe.length%2!==0)return null;for(var he=0;he<oe.length;he+=2){var Be=oe[he].value,Ge=oe[he+1].value;K.push({open:Be,close:Ge})}return K}},Ml=function(H,k,W){if(!H)return"";var K=H[Math.min(k,H.length-1)];return K?W?K.open:K.close:""},Fl={name:"box-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:255,offsetX:Xn,offsetY:Xn,blur:Xn,spread:Xn,inset:!1},oe=0,he=0;he<W.length;he++){var Be=W[he];Ci(Be,"inset")?K.inset=!0:ci(Be)?(oe===0?K.offsetX=Be:oe===1?K.offsetY=Be:oe===2?K.blur=Be:K.spread=Be,oe++):K.color=bi.parse(H,Be)}return K})}},ku={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(H,k){var W=[0,1,2],K=[];return k.filter(vn).forEach(function(oe){switch(oe.value){case"stroke":K.push(1);break;case"fill":K.push(0);break;case"markers":K.push(2);break}}),W.forEach(function(oe){K.indexOf(oe)===-1&&K.push(oe)}),K}},Pu={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},zo={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(H,k){return Ba(k)?k.number:0}},Ul=function(){function H(k,W){var K,oe;this.animationDuration=ar(k,Ls,W.animationDuration),this.backgroundClip=ar(k,ul,W.backgroundClip),this.backgroundColor=ar(k,Al,W.backgroundColor),this.backgroundImage=ar(k,gl,W.backgroundImage),this.backgroundOrigin=ar(k,vl,W.backgroundOrigin),this.backgroundPosition=ar(k,Es,W.backgroundPosition),this.backgroundRepeat=ar(k,Da,W.backgroundRepeat),this.backgroundSize=ar(k,ko,W.backgroundSize),this.borderTopColor=ar(k,_u,W.borderTopColor),this.borderRightColor=ar(k,_s,W.borderRightColor),this.borderBottomColor=ar(k,ws,W.borderBottomColor),this.borderLeftColor=ar(k,Ma,W.borderLeftColor),this.borderTopLeftRadius=ar(k,wu,W.borderTopLeftRadius),this.borderTopRightRadius=ar(k,No,W.borderTopRightRadius),this.borderBottomRightRadius=ar(k,yl,W.borderBottomRightRadius),this.borderBottomLeftRadius=ar(k,ro,W.borderBottomLeftRadius),this.borderTopStyle=ar(k,fa,W.borderTopStyle),this.borderRightStyle=ar(k,io,W.borderRightStyle),this.borderBottomStyle=ar(k,pa,W.borderBottomStyle),this.borderLeftStyle=ar(k,ao,W.borderLeftStyle),this.borderTopWidth=ar(k,bl,W.borderTopWidth),this.borderRightWidth=ar(k,El,W.borderRightWidth),this.borderBottomWidth=ar(k,_l,W.borderBottomWidth),this.borderLeftWidth=ar(k,Cu,W.borderLeftWidth),this.boxShadow=ar(k,Fl,W.boxShadow),this.color=ar(k,ma,W.color),this.direction=ar(k,ga,W.direction),this.display=ar(k,xu,W.display),this.float=ar(k,Su,W.cssFloat),this.fontFamily=ar(k,Is,W.fontFamily),this.fontSize=ar(k,so,W.fontSize),this.fontStyle=ar(k,ta,W.fontStyle),this.fontVariant=ar(k,Rs,W.fontVariant),this.fontWeight=ar(k,Rl,W.fontWeight),this.letterSpacing=ar(k,Bu,W.letterSpacing),this.lineBreak=ar(k,Ou,W.lineBreak),this.lineHeight=ar(k,di,W.lineHeight),this.listStyleImage=ar(k,ri,W.listStyleImage),this.listStylePosition=ar(k,zn,W.listStylePosition),this.listStyleType=ar(k,va,W.listStyleType),this.marginTop=ar(k,jo,W.marginTop),this.marginRight=ar(k,Iu,W.marginRight),this.marginBottom=ar(k,Ru,W.marginBottom),this.marginLeft=ar(k,Lu,W.marginLeft),this.opacity=ar(k,Os,W.opacity);var he=ar(k,Cs,W.overflow);this.overflowX=he[0],this.overflowY=he[he.length>1?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<Fs.length;uo++)lo[Fs.charCodeAt(uo)]=uo;for(var $n=function(H){var k=H.length*.75,W=H.length,K,oe=0,he,Be,Ge,We;H[H.length-1]==="="&&(k--,H[H.length-2]==="="&&k--);var ot=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(k):new Array(k),vt=Array.isArray(ot)?ot:new Uint8Array(ot);for(K=0;K<W;K+=4)he=lo[H.charCodeAt(K)],Be=lo[H.charCodeAt(K+1)],Ge=lo[H.charCodeAt(K+2)],We=lo[H.charCodeAt(K+3)],vt[oe++]=he<<2|Be>>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<k;K+=2)W.push(H[K+1]<<8|H[K]);return W},Pl=function(H){for(var k=H.length,W=[],K=0;K<k;K+=4)W.push(H[K+3]<<24|H[K+2]<<16|H[K+1]<<8|H[K]);return W},ra=5,Vo=6+5,na=2,Xo=Vo-ra,Us=65536>>ra,Nl=1<<ra,Yo=Nl-1,Pa=1024>>ra,Hl=Us+Pa,Jo=Hl,Ql=2048>>6,Ao=Jo+Ql,Hu=65536>>Vo,Na=1<<Xo,jl=Na-1,ks=function(H,k,W){return H.slice?H.slice(k,W):new Uint16Array(Array.prototype.slice.call(H,k,W))},Kl=function(H,k,W){return H.slice?H.slice(k,W):new Uint32Array(Array.prototype.slice.call(H,k,W))},co=function(H,k){var W=$n(H),K=Array.isArray(W)?Pl(W):new Uint32Array(W),oe=Array.isArray(W)?Go(W):new Uint16Array(W),he=24,Be=ks(oe,he/2,K[4]/2),Ge=K[5]===2?ks(oe,(he+K[4])/2):Kl(K,Math.ceil((he+K[4])/4));return new ho(K[0],K[1],K[2],K[3],Be,Ge)},ho=function(){function H(k,W,K,oe,he,Be){this.initialValue=k,this.errorValue=W,this.highStart=K,this.highValueIndex=oe,this.index=he,this.data=Be}return H.prototype.get=function(k){var W;if(k>=0){if(k<55296||k>56319&&k<=65535)return W=this.index[k>>ra],W=(W<<na)+(k&Yo),this.data[W];if(k<=65535)return W=this.index[Us+(k-55296>>ra)],W=(W<<na)+(k&Yo),this.data[W];if(k<this.highStart)return W=Ao-Hu+(k>>Vo),W=this.index[W],W+=k>>ra&jl,W=this.index[W],W=(W<<na)+(k&Yo),this.data[W];if(k<=1114111)return this.data[this.highValueIndex]}return this.errorValue},H}(),Ha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),po=0;po<Ha.length;po++)fo[Ha.charCodeAt(po)]=po;var Qu=1,Zo=2,Li=3,ya=4,Qa=5,ju=7,Ps=8,Ns=9,Hs=10,Wl=11,ni=12,Qs=13,zl=14,js=15,Ku=function(H){for(var k=[],W=0,K=H.length;W<K;){var oe=H.charCodeAt(W++);if(oe>=55296&&oe<=56319&&W<K){var he=H.charCodeAt(W++);(he&64512)===56320?k.push(((oe&1023)<<10)+(he&1023)+65536):(k.push(oe),W--)}else k.push(oe)}return k},Gl=function(){for(var H=[],k=0;k<arguments.length;k++)H[k]=arguments[k];if(String.fromCodePoint)return String.fromCodePoint.apply(String,H);var W=H.length;if(!W)return"";for(var K=[],oe=-1,he="";++oe<W;){var Be=H[oe];Be<=65535?K.push(Be):(Be-=65536,K.push((Be>>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;K<W&&(Be=zu(k,he,++K))===gi;);if(Be!==gi||K===W){var Ge=Gl.apply(null,k.slice(oe,K));return oe=K,{value:Ge,done:!1}}return{done:!0,value:null}}}},mo=function(H){for(var k=ia(H),W=[],K;!(K=k.next()).done;)K.value&&W.push(K.value.slice());return W},$o=function(H){var k=123;if(H.createRange){var W=H.createRange();if(W.getBoundingClientRect){var K=H.createElement("boundtest");K.style.height=k+"px",K.style.display="block",H.body.appendChild(K),W.selectNode(K);var oe=W.getBoundingClientRect(),he=Math.round(oe.height);if(H.body.removeChild(K),he===k)return!0}}return!1},go=function(H){var k=H.createElement("boundtest");k.style.width="50px",k.style.display="block",k.style.fontSize="12px",k.style.letterSpacing="0px",k.style.wordSpacing="0px",H.body.appendChild(k);var W=H.createRange();k.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var K=k.firstChild,oe=E(K.data).map(function(We){return n(We)}),he=0,Be={},Ge=oe.every(function(We,ot){W.setStart(K,he),W.setEnd(K,he+We.length);var vt=W.getBoundingClientRect();he+=We.length;var Bt=vt.x>Be.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,<svg xmlns='http://www.w3.org/2000/svg'></svg>";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.width<H.height?new I(H.left,H.top+(H.height-H.width)/2,H.width,H.width):H},$u=function(H){var k=H.type===bo?new Array(H.value.length+1).join("\u2022"):H.value;return k.length===0?H.placeholder||"":k},ja="checkbox",aa="radio",bo="password",eu=707406591,is=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;oe.type=K.type.toLowerCase(),oe.checked=K.checked,oe.value=$u(K),(oe.type===ja||oe.type===aa)&&(oe.styles.backgroundColor=3739148031,oe.styles.borderTopColor=oe.styles.borderRightColor=oe.styles.borderBottomColor=oe.styles.borderLeftColor=2779096575,oe.styles.borderTopWidth=oe.styles.borderRightWidth=oe.styles.borderBottomWidth=oe.styles.borderLeftWidth=1,oe.styles.borderTopStyle=oe.styles.borderRightStyle=oe.styles.borderBottomStyle=oe.styles.borderLeftStyle=1,oe.styles.backgroundClip=[0],oe.styles.backgroundOrigin=[0],oe.bounds=ql(oe.bounds));switch(oe.type){case ja:oe.styles.borderTopRightRadius=oe.styles.borderTopLeftRadius=oe.styles.borderBottomRightRadius=oe.styles.borderBottomLeftRadius=Zu;break;case aa:oe.styles.borderTopRightRadius=oe.styles.borderTopLeftRadius=oe.styles.borderBottomRightRadius=oe.styles.borderBottomLeftRadius=$l;break}return oe}return k}(Bi),tu=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this,he=K.options[K.selectedIndex||0];return oe.value=he&&he.text||"",oe}return k}(Bi),ru=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),nu=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;oe.src=K.src,oe.width=parseInt(K.width,10)||0,oe.height=parseInt(K.height,10)||0,oe.backgroundColor=oe.styles.backgroundColor;try{if(K.contentWindow&&K.contentWindow.document&&K.contentWindow.document.documentElement){oe.tree=au(W,K.contentWindow.document.documentElement);var he=K.contentWindow.document.documentElement?ca(W,getComputedStyle(K.contentWindow.document.documentElement).backgroundColor):Si.TRANSPARENT,Be=K.contentWindow.document.body?ca(W,getComputedStyle(K.contentWindow.document.body).backgroundColor):Si.TRANSPARENT;oe.backgroundColor=ki(he)?ki(Be)?oe.styles.backgroundColor:Be:he}}catch(Ge){}return oe}return k}(Bi),qu=["OL","UL","MENU"],Eo=function(H,k,W,K){for(var oe=k.firstChild,he=void 0;oe;oe=he)if(he=oe.nextSibling,Zs(oe)&&oe.data.trim().length>0)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 H<k||H>W?_(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)+"<html></html>"),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+="<!DOCTYPE ",H.name&&(k+=H.name),H.internalSubset&&(k+=H.internalSubset),H.publicId&&(k+='"'+H.publicId+'"'),H.systemId&&(k+='"'+H.systemId+'"'),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;oe<k.length;oe++){var he=k[oe];he.container instanceof rs&&typeof he.container.value=="number"&&he.container.value!==0&&(W=he.container.value),he.listValue=_(W,he.container.styles.listStyleType,!0),W+=K?-1:1}},hA=function(H){var k=new oA(H,null),W=new aA(k),K=[];return rA(k,W,W,K),sA(k.container,K),W},lA=function(H,k){switch(k){case 0:return Fi(H.topLeftBorderBox,H.topLeftPaddingBox,H.topRightBorderBox,H.topRightPaddingBox);case 1:return Fi(H.topRightBorderBox,H.topRightPaddingBox,H.bottomRightBorderBox,H.bottomRightPaddingBox);case 2:return Fi(H.bottomRightBorderBox,H.bottomRightPaddingBox,H.bottomLeftBorderBox,H.bottomLeftPaddingBox);case 3:default:return Fi(H.bottomLeftBorderBox,H.bottomLeftPaddingBox,H.topLeftBorderBox,H.topLeftPaddingBox)}},fA=function(H,k){switch(k){case 0:return Fi(H.topLeftBorderBox,H.topLeftBorderDoubleOuterBox,H.topRightBorderBox,H.topRightBorderDoubleOuterBox);case 1:return Fi(H.topRightBorderBox,H.topRightBorderDoubleOuterBox,H.bottomRightBorderBox,H.bottomRightBorderDoubleOuterBox);case 2:return Fi(H.bottomRightBorderBox,H.bottomRightBorderDoubleOuterBox,H.bottomLeftBorderBox,H.bottomLeftBorderDoubleOuterBox);case 3:default:return Fi(H.bottomLeftBorderBox,H.bottomLeftBorderDoubleOuterBox,H.topLeftBorderBox,H.topLeftBorderDoubleOuterBox)}},pA=function(H,k){switch(k){case 0:return Fi(H.topLeftBorderDoubleInnerBox,H.topLeftPaddingBox,H.topRightBorderDoubleInnerBox,H.topRightPaddingBox);case 1:return Fi(H.topRightBorderDoubleInnerBox,H.topRightPaddingBox,H.bottomRightBorderDoubleInnerBox,H.bottomRightPaddingBox);case 2:return Fi(H.bottomRightBorderDoubleInnerBox,H.bottomRightPaddingBox,H.bottomLeftBorderDoubleInnerBox,H.bottomLeftPaddingBox);case 3:default:return Fi(H.bottomLeftBorderDoubleInnerBox,H.bottomLeftPaddingBox,H.topLeftBorderDoubleInnerBox,H.topLeftPaddingBox)}},mA=function(H,k){switch(k){case 0:return pu(H.topLeftBorderStroke,H.topRightBorderStroke);case 1:return pu(H.topRightBorderStroke,H.bottomRightBorderStroke);case 2:return pu(H.bottomRightBorderStroke,H.bottomLeftBorderStroke);case 3:default:return pu(H.bottomLeftBorderStroke,H.topLeftBorderStroke)}},pu=function(H,k){var W=[];return Sn(H)?W.push(H.subdivide(.5,!1)):W.push(H),Sn(k)?W.push(k.subdivide(.5,!0)):W.push(k),W},Fi=function(H,k,W,K){var oe=[];return Sn(H)?oe.push(H.subdivide(.5,!1)):oe.push(H),Sn(W)?oe.push(W.subdivide(.5,!0)):oe.push(W),Sn(K)?oe.push(K.subdivide(.5,!0).reverse()):oe.push(K),Sn(k)?oe.push(k.subdivide(.5,!1).reverse()):oe.push(k),oe},uA=function(H){var k=H.bounds,W=H.styles;return k.add(W.borderLeftWidth,W.borderTopWidth,-(W.borderRightWidth+W.borderLeftWidth),-(W.borderTopWidth+W.borderBottomWidth))},mu=function(H){var k=H.styles,W=H.bounds,K=nn(k.paddingLeft,W.width),oe=nn(k.paddingRight,W.width),he=nn(k.paddingTop,W.width),Be=nn(k.paddingBottom,W.width);return W.add(K+k.borderLeftWidth,he+k.borderTopWidth,-(k.borderRightWidth+k.borderLeftWidth+K+oe),-(k.borderTopWidth+k.borderBottomWidth+he+Be))},gA=function(H,k){return H===0?k.bounds:H===2?mu(k):uA(k)},vA=function(H,k){return H===0?k.bounds:H===2?mu(k):uA(k)},nA=function(H,k,W){var K=gA(As(H.styles.backgroundOrigin,k),H),oe=vA(As(H.styles.backgroundClip,k),H),he=yA(As(H.styles.backgroundSize,k),W,K),Be=he[0],Ge=he[1],We=Aa(As(H.styles.backgroundPosition,k),K.width-Be,K.height-Ge),ot=bA(As(H.styles.backgroundRepeat,k),We,he,K,oe),vt=Math.round(K.left+We[0]),Bt=Math.round(K.top+We[1]);return[ot,vt,Bt,Be,Ge]},us=function(H){return vn(H)&&H.value===ha.AUTO},gu=function(H){return typeof H=="number"},yA=function(H,k,W){var K=k[0],oe=k[1],he=k[2],Be=H[0],Ge=H[1];if(!Be)return[0,0];if(Rn(Be)&&Ge&&Rn(Ge))return[nn(Be,W.width),nn(Ge,W.height)];var We=gu(he);if(vn(Be)&&(Be.value===ha.CONTAIN||Be.value===ha.COVER)){if(gu(he)){var ot=W.width/W.height;return ot<he!==(Be.value===ha.COVER)?[W.width,W.width/he]:[W.height*he,W.height]}return[W.width,W.height]}var vt=gu(K),Bt=gu(oe),Lt=vt||Bt;if(us(Be)&&(!Ge||us(Ge))){if(vt&&Bt)return[K,oe];if(!We&&!Lt)return[W.width,W.height];if(Lt&&We){var sr=vt?K:oe*he,Wt=Bt?oe:K/he;return[sr,Wt]}var rr=vt?K:W.width,Sr=Bt?oe:W.height;return[rr,Sr]}if(We){var or=0,ur=0;return Rn(Be)?or=nn(Be,W.width):Rn(Ge)&&(ur=nn(Ge,W.height)),us(Be)?or=ur*he:(!Ge||us(Ge))&&(ur=or/he),[or,ur]}var rn=null,Wr=null;if(Rn(Be)?rn=nn(Be,W.width):Ge&&Rn(Ge)&&(Wr=nn(Ge,W.height)),rn!==null&&(!Ge||us(Ge))&&(Wr=vt&&Bt?rn/K*oe:W.height),Wr!==null&&us(Be)&&(rn=vt&&Bt?Wr/oe*K:W.width),rn!==null&&Wr!==null)return[rn,Wr];throw new Error("Unable to calculate background-size for element")},As=function(H,k){var W=H[k];return typeof W=="undefined"?H[0]:W},bA=function(H,k,W,K,oe){var he=k[0],Be=k[1],Ge=W[0],We=W[1];switch(H){case 2:return[new zt(Math.round(K.left),Math.round(K.top+Be)),new zt(Math.round(K.left+K.width),Math.round(K.top+Be)),new zt(Math.round(K.left+K.width),Math.round(We+K.top+Be)),new zt(Math.round(K.left),Math.round(We+K.top+Be))];case 3:return[new zt(Math.round(K.left+he),Math.round(K.top)),new zt(Math.round(K.left+he+Ge),Math.round(K.top)),new zt(Math.round(K.left+he+Ge),Math.round(K.height+K.top)),new zt(Math.round(K.left+he),Math.round(K.height+K.top))];case 1:return[new zt(Math.round(K.left+he),Math.round(K.top+Be)),new zt(Math.round(K.left+he+Ge),Math.round(K.top+Be)),new zt(Math.round(K.left+he+Ge),Math.round(K.top+Be+We)),new zt(Math.round(K.left+he),Math.round(K.top+Be+We))];default:return[new zt(Math.round(oe.left),Math.round(oe.top)),new zt(Math.round(oe.left+oe.width),Math.round(oe.top)),new zt(Math.round(oe.left+oe.width),Math.round(oe.height+oe.top)),new zt(Math.round(oe.left),Math.round(oe.height+oe.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",_A=function(){function H(k){this._data={},this._document=k}return H.prototype.parseMetrics=function(k,W){var K=this._document.createElement("div"),oe=this._document.createElement("img"),he=this._document.createElement("span"),Be=this._document.body;K.style.visibility="hidden",K.style.fontFamily=k,K.style.fontSize=W,K.style.margin="0",K.style.padding="0",K.style.whiteSpace="nowrap",Be.appendChild(K),oe.src=EA,oe.width=1,oe.height=1,oe.style.margin="0",oe.style.padding="0",oe.style.verticalAlign="baseline",he.style.fontFamily=k,he.style.fontSize=W,he.style.margin="0",he.style.padding="0",he.appendChild(this._document.createTextNode(AA)),K.appendChild(he),K.appendChild(oe);var Ge=oe.offsetTop-he.offsetTop+2;K.removeChild(he),K.appendChild(this._document.createTextNode(AA)),K.style.lineHeight="normal",oe.style.verticalAlign="super";var We=oe.offsetTop-K.offsetTop+2;return Be.removeChild(K),{baseline:Ge,middle:We}},H.prototype.getMetrics=function(k,W){var K=k+" "+W;return typeof this._data[K]=="undefined"&&(this._data[K]=this.parseMetrics(k,W)),this._data[K]},H}(),cA=function(){function H(k,W){this.context=k,this.options=W}return H}(),wA=1e4,CA=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe._activeEffects=[],oe.canvas=K.canvas?K.canvas:document.createElement("canvas"),oe.ctx=oe.canvas.getContext("2d"),K.canvas||(oe.canvas.width=Math.floor(K.width*K.scale),oe.canvas.height=Math.floor(K.height*K.scale),oe.canvas.style.width=K.width+"px",oe.canvas.style.height=K.height+"px"),oe.fontMetrics=new _A(document),oe.ctx.scale(oe.options.scale,oe.options.scale),oe.ctx.translate(-K.x,-K.y),oe.ctx.textBaseline="bottom",oe._activeEffects=[],oe.context.logger.debug("Canvas renderer initialized ("+K.width+"x"+K.height+") with scale "+K.scale),oe}return k.prototype.applyEffects=function(W){for(var K=this;this._activeEffects.length;)this.popEffect();W.forEach(function(oe){return K.applyEffect(oe)})},k.prototype.applyEffect=function(W){this.ctx.save(),tl(W)&&(this.ctx.globalAlpha=W.opacity),ii(W)&&(this.ctx.translate(W.offsetX,W.offsetY),this.ctx.transform(W.matrix[0],W.matrix[1],W.matrix[2],W.matrix[3],W.matrix[4],W.matrix[5]),this.ctx.translate(-W.offsetX,-W.offsetY)),xa(W)&&(this.path(W.path),this.ctx.clip()),this._activeEffects.push(W)},k.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},k.prototype.renderStack=function(W){return j(this,void 0,void 0,function(){var K;return D(this,function(oe){switch(oe.label){case 0:return K=W.element.container.styles,K.isVisible()?[4,this.renderStackContent(W)]:[3,2];case 1:oe.sent(),oe.label=2;case 2:return[2]}})})},k.prototype.renderNode=function(W){return j(this,void 0,void 0,function(){return D(this,function(K){switch(K.label){case 0:if(Nn(W.container.flags,16))debugger;return W.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(W)]:[3,3];case 1:return K.sent(),[4,this.renderNodeContent(W)];case 2:K.sent(),K.label=3;case 3:return[2]}})})},k.prototype.renderTextWithLetterSpacing=function(W,K,oe){var he=this;if(K===0)this.ctx.fillText(W.text,W.bounds.left,W.bounds.top+oe);else{var Be=Vs(W.text);Be.reduce(function(Ge,We){return he.ctx.fillText(We,Ge,W.bounds.top+oe),Ge+he.ctx.measureText(We).width},W.bounds.left)}},k.prototype.createFontStyle=function(W){var K=W.fontVariant.filter(function(Be){return Be==="normal"||Be==="small-caps"}).join(""),oe=OA(W.fontFamily).join(", "),he=Ba(W.fontSize)?""+W.fontSize.number+W.fontSize.unit:W.fontSize.number+"px";return[[W.fontStyle,K,W.fontWeight,he,oe].join(" "),oe,he]},k.prototype.renderTextNode=function(W,K){return j(this,void 0,void 0,function(){var oe,he,Be,Ge,We,ot,vt,Bt,Lt=this;return D(this,function(sr){return oe=this.createFontStyle(K),he=oe[0],Be=oe[1],Ge=oe[2],this.ctx.font=he,this.ctx.direction=K.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",We=this.fontMetrics.getMetrics(Be,Ge),ot=We.baseline,vt=We.middle,Bt=K.paintOrder,W.textBounds.forEach(function(Wt){Bt.forEach(function(rr){switch(rr){case 0:Lt.ctx.fillStyle=Wn(K.color),Lt.renderTextWithLetterSpacing(Wt,K.letterSpacing,ot);var Sr=K.textShadow;Sr.length&&Wt.text.trim().length&&(Sr.slice(0).reverse().forEach(function(or){Lt.ctx.shadowColor=Wn(or.color),Lt.ctx.shadowOffsetX=or.offsetX.number*Lt.options.scale,Lt.ctx.shadowOffsetY=or.offsetY.number*Lt.options.scale,Lt.ctx.shadowBlur=or.blur.number,Lt.renderTextWithLetterSpacing(Wt,K.letterSpacing,ot)}),Lt.ctx.shadowColor="",Lt.ctx.shadowOffsetX=0,Lt.ctx.shadowOffsetY=0,Lt.ctx.shadowBlur=0),K.textDecorationLine.length&&(Lt.ctx.fillStyle=Wn(K.textDecorationColor||K.color),K.textDecorationLine.forEach(function(or){switch(or){case 1:Lt.ctx.fillRect(Wt.bounds.left,Math.round(Wt.bounds.top+ot),Wt.bounds.width,1);break;case 2:Lt.ctx.fillRect(Wt.bounds.left,Math.round(Wt.bounds.top),Wt.bounds.width,1);break;case 3:Lt.ctx.fillRect(Wt.bounds.left,Math.ceil(Wt.bounds.top+vt),Wt.bounds.width,1);break}}));break;case 1:K.webkitTextStrokeWidth&&Wt.text.trim().length&&(Lt.ctx.strokeStyle=Wn(K.webkitTextStrokeColor),Lt.ctx.lineWidth=K.webkitTextStrokeWidth,Lt.ctx.lineJoin=window.chrome?"miter":"round",Lt.ctx.strokeText(Wt.text,Wt.bounds.left,Wt.bounds.top+ot)),Lt.ctx.strokeStyle="",Lt.ctx.lineWidth=0,Lt.ctx.lineJoin="miter";break}})}),[2]})})},k.prototype.renderReplacedElement=function(W,K,oe){if(oe&&W.intrinsicWidth>0&&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 Be<Ge.length?(We=Ge[Be],[4,this.renderTextNode(We,he)]):[3,4];case 2:lr.sent(),lr.label=3;case 3:return Be++,[3,1];case 4:if(!(K instanceof Xs))return[3,8];lr.label=5;case 5:return lr.trys.push([5,7,,8]),[4,this.context.cache.match(K.src)];case 6:return ot=lr.sent(),this.renderReplacedElement(K,oe,ot),[3,8];case 7:return lr.sent(),this.context.logger.error("Error loading image "+K.src),[3,8];case 8:if(K instanceof Ys&&this.renderReplacedElement(K,oe,K.canvas),!(K instanceof Zl))return[3,12];lr.label=9;case 9:return lr.trys.push([9,11,,12]),[4,this.context.cache.match(K.svg)];case 10:return ot=lr.sent(),this.renderReplacedElement(K,oe,ot),[3,12];case 11:return lr.sent(),this.context.logger.error("Error loading svg "+K.svg.substring(0,255)),[3,12];case 12:return K instanceof nu&&K.tree?(vt=new k(this.context,{scale:this.options.scale,backgroundColor:K.backgroundColor,x:0,y:0,width:K.width,height:K.height}),[4,vt.render(K.tree)]):[3,14];case 13:Bt=lr.sent(),K.width&&K.height&&this.ctx.drawImage(Bt,0,0,K.width,K.height,K.bounds.left,K.bounds.top,K.bounds.width,K.bounds.height),lr.label=14;case 14:if(K instanceof is&&(Lt=Math.min(K.bounds.width,K.bounds.height),K.type===ja?K.checked&&(this.ctx.save(),this.path([new zt(K.bounds.left+Lt*.39363,K.bounds.top+Lt*.79),new zt(K.bounds.left+Lt*.16,K.bounds.top+Lt*.5549),new zt(K.bounds.left+Lt*.27347,K.bounds.top+Lt*.44071),new zt(K.bounds.left+Lt*.39694,K.bounds.top+Lt*.5649),new zt(K.bounds.left+Lt*.72983,K.bounds.top+Lt*.23),new zt(K.bounds.left+Lt*.84,K.bounds.top+Lt*.34085),new zt(K.bounds.left+Lt*.39363,K.bounds.top+Lt*.79)]),this.ctx.fillStyle=Wn(eu),this.ctx.fill(),this.ctx.restore()):K.type===aa&&(K.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(K.bounds.left+Lt/2,K.bounds.top+Lt/2,Lt/4,0,Math.PI*2,!0),this.ctx.fillStyle=Wn(eu),this.ctx.fill(),this.ctx.restore()))),xA(K)&&K.value.length){sr=this.createFontStyle(he),Wt=sr[0],rr=sr[1],Sr=this.fontMetrics.getMetrics(Wt,rr).baseline,this.ctx.font=Wt,this.ctx.fillStyle=Wn(he.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=SA(K.styles.textAlign),or=mu(K),ur=0;switch(K.styles.textAlign){case 1:ur+=or.width/2;break;case 2:ur+=or.width;break}rn=or.add(ur,0,0,-or.height/2+1),this.ctx.save(),this.path([new zt(or.left,or.top),new zt(or.left+or.width,or.top),new zt(or.left+or.width,or.top+or.height),new zt(or.left,or.top+or.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Di(K.value,rn),he.letterSpacing,Sr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Nn(K.styles.display,2048))return[3,20];if(!(K.styles.listStyleImage!==null))return[3,19];if(Wr=K.styles.listStyleImage,!(Wr.type===0))return[3,18];ot=void 0,hn=Wr.url,lr.label=15;case 15:return lr.trys.push([15,17,,18]),[4,this.context.cache.match(hn)];case 16:return ot=lr.sent(),this.ctx.drawImage(ot,K.bounds.left-(ot.width+10),K.bounds.top),[3,18];case 17:return lr.sent(),this.context.logger.error("Error loading list-style-image "+hn),[3,18];case 18:return[3,20];case 19:W.listValue&&K.styles.listStyleType!==-1&&(Wt=this.createFontStyle(he)[0],this.ctx.font=Wt,this.ctx.fillStyle=Wn(he.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",or=new I(K.bounds.left,K.bounds.top+nn(K.styles.paddingTop,K.bounds.width),K.bounds.width,Pn(he.lineHeight,he.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Di(W.listValue,or),he.letterSpacing,Pn(he.lineHeight,he.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),lr.label=20;case 20:return[2]}})})},k.prototype.renderStackContent=function(W){return j(this,void 0,void 0,function(){var K,oe,he,Be,Ge,he,We,ot,he,vt,Bt,he,Lt,sr,he,Wt,rr,he,Sr,or,he;return D(this,function(ur){switch(ur.label){case 0:if(Nn(W.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(W.element)];case 1:ur.sent(),K=0,oe=W.negativeZIndex,ur.label=2;case 2:return K<oe.length?(he=oe[K],[4,this.renderStack(he)]):[3,5];case 3:ur.sent(),ur.label=4;case 4:return K++,[3,2];case 5:return[4,this.renderNodeContent(W.element)];case 6:ur.sent(),Be=0,Ge=W.nonInlineLevel,ur.label=7;case 7:return Be<Ge.length?(he=Ge[Be],[4,this.renderNode(he)]):[3,10];case 8:ur.sent(),ur.label=9;case 9:return Be++,[3,7];case 10:We=0,ot=W.nonPositionedFloats,ur.label=11;case 11:return We<ot.length?(he=ot[We],[4,this.renderStack(he)]):[3,14];case 12:ur.sent(),ur.label=13;case 13:return We++,[3,11];case 14:vt=0,Bt=W.nonPositionedInlineLevel,ur.label=15;case 15:return vt<Bt.length?(he=Bt[vt],[4,this.renderStack(he)]):[3,18];case 16:ur.sent(),ur.label=17;case 17:return vt++,[3,15];case 18:Lt=0,sr=W.inlineLevel,ur.label=19;case 19:return Lt<sr.length?(he=sr[Lt],[4,this.renderNode(he)]):[3,22];case 20:ur.sent(),ur.label=21;case 21:return Lt++,[3,19];case 22:Wt=0,rr=W.zeroOrAutoZIndexOrTransformedOrOpacity,ur.label=23;case 23:return Wt<rr.length?(he=rr[Wt],[4,this.renderStack(he)]):[3,26];case 24:ur.sent(),ur.label=25;case 25:return Wt++,[3,23];case 26:Sr=0,or=W.positiveZIndex,ur.label=27;case 27:return Sr<or.length?(he=or[Sr],[4,this.renderStack(he)]):[3,30];case 28:ur.sent(),ur.label=29;case 29:return Sr++,[3,27];case 30:return[2]}})})},k.prototype.mask=function(W){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(W.slice(0).reverse()),this.ctx.closePath()},k.prototype.path=function(W){this.ctx.beginPath(),this.formatPath(W),this.ctx.closePath()},k.prototype.formatPath=function(W){var K=this;W.forEach(function(oe,he){var Be=Sn(oe)?oe.start:oe;he===0?K.ctx.moveTo(Be.x,Be.y):K.ctx.lineTo(Be.x,Be.y),Sn(oe)&&K.ctx.bezierCurveTo(oe.startControl.x,oe.startControl.y,oe.endControl.x,oe.endControl.y,oe.end.x,oe.end.y)})},k.prototype.renderRepeat=function(W,K,oe,he){this.path(W),this.ctx.fillStyle=K,this.ctx.translate(oe,he),this.ctx.fill(),this.ctx.translate(-oe,-he)},k.prototype.resizeImage=function(W,K,oe){var he;if(W.width===K&&W.height===oe)return W;var Be=(he=this.canvas.ownerDocument)!==null&&he!==void 0?he:document,Ge=Be.createElement("canvas");Ge.width=Math.max(1,K),Ge.height=Math.max(1,oe);var We=Ge.getContext("2d");return We.drawImage(W,0,0,W.width,W.height,0,0,K,oe),Ge},k.prototype.renderBackgroundImage=function(W){return j(this,void 0,void 0,function(){var K,oe,he,Be,Ge,We;return D(this,function(ot){switch(ot.label){case 0:K=W.styles.backgroundImage.length-1,oe=function(vt){var Bt,Lt,sr,Wt,rr,Sr,or,ur,rn,Wr,Wt,rr,Sr,or,ur,hn,lr,ln,fn,jr,wi,yi,Oi,ai,rn,sa,Wt,Ga,Va,or,ur,Xa,rr,Sr,So,la,Ya,Bo,Oo,Ta,Io,Sa;return D(this,function(cs){switch(cs.label){case 0:if(!(vt.type===0))return[3,5];Bt=void 0,Lt=vt.url,cs.label=1;case 1:return cs.trys.push([1,3,,4]),[4,he.context.cache.match(Lt)];case 2:return Bt=cs.sent(),[3,4];case 3:return cs.sent(),he.context.logger.error("Error loading background-image "+Lt),[3,4];case 4:return Bt&&(sr=nA(W,K,[Bt.width,Bt.height,Bt.width/Bt.height]),Wt=sr[0],rr=sr[1],Sr=sr[2],or=sr[3],ur=sr[4],rn=he.ctx.createPattern(he.resizeImage(Bt,or,ur),"repeat"),he.renderRepeat(Wt,rn,rr,Sr)),[3,6];case 5:pl(vt)?(Wr=nA(W,K,[null,null,null]),Wt=Wr[0],rr=Wr[1],Sr=Wr[2],or=Wr[3],ur=Wr[4],hn=yu(vt.angle,or,ur),lr=hn[0],ln=hn[1],fn=hn[2],jr=hn[3],wi=hn[4],yi=document.createElement("canvas"),yi.width=or,yi.height=ur,Oi=yi.getContext("2d"),ai=Oi.createLinearGradient(ln,jr,fn,wi),cl(vt.stops,lr).forEach(function(rl){return ai.addColorStop(rl.stop,Wn(rl.color))}),Oi.fillStyle=ai,Oi.fillRect(0,0,or,ur),or>0&&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 Be<Ge.length?(We=Ge[Be],[5,oe(We)]):[3,4];case 2:ot.sent(),ot.label=3;case 3:return Be++,[3,1];case 4:return[2]}})})},k.prototype.renderSolidBorder=function(W,K,oe){return j(this,void 0,void 0,function(){return D(this,function(he){return this.path(lA(oe,K)),this.ctx.fillStyle=Wn(W),this.ctx.fill(),[2]})})},k.prototype.renderDoubleBorder=function(W,K,oe,he){return j(this,void 0,void 0,function(){var Be,Ge;return D(this,function(We){switch(We.label){case 0:return K<3?[4,this.renderSolidBorder(W,oe,he)]:[3,2];case 1:return We.sent(),[2];case 2:return Be=fA(he,oe),this.path(Be),this.ctx.fillStyle=Wn(W),this.ctx.fill(),Ge=pA(he,oe),this.path(Ge),this.ctx.fill(),[2]}})})},k.prototype.renderNodeBackgroundAndBorders=function(W){return j(this,void 0,void 0,function(){var K,oe,he,Be,Ge,We,ot,vt,Bt=this;return D(this,function(Lt){switch(Lt.label){case 0:return this.applyEffects(W.getEffects(2)),K=W.container.styles,oe=!ki(K.backgroundColor)||K.backgroundImage.length,he=[{style:K.borderTopStyle,color:K.borderTopColor,width:K.borderTopWidth},{style:K.borderRightStyle,color:K.borderRightColor,width:K.borderRightWidth},{style:K.borderBottomStyle,color:K.borderBottomColor,width:K.borderBottomWidth},{style:K.borderLeftStyle,color:K.borderLeftColor,width:K.borderLeftWidth}],Be=TA(As(K.backgroundClip,0),W.curves),oe||K.boxShadow.length?(this.ctx.save(),this.path(Be),this.ctx.clip(),ki(K.backgroundColor)||(this.ctx.fillStyle=Wn(K.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(W.container)]):[3,2];case 1:Lt.sent(),this.ctx.restore(),K.boxShadow.slice(0).reverse().forEach(function(sr){Bt.ctx.save();var Wt=vi(W.curves),rr=sr.inset?0:wA,Sr=dA(Wt,-rr+(sr.inset?1:-1)*sr.spread.number,(sr.inset?1:-1)*sr.spread.number,sr.spread.number*(sr.inset?-2:2),sr.spread.number*(sr.inset?-2:2));sr.inset?(Bt.path(Wt),Bt.ctx.clip(),Bt.mask(Sr)):(Bt.mask(Wt),Bt.ctx.clip(),Bt.path(Sr)),Bt.ctx.shadowOffsetX=sr.offsetX.number+rr,Bt.ctx.shadowOffsetY=sr.offsetY.number,Bt.ctx.shadowColor=Wn(sr.color),Bt.ctx.shadowBlur=sr.blur.number,Bt.ctx.fillStyle=sr.inset?Wn(sr.color):"rgba(0,0,0,1)",Bt.ctx.fill(),Bt.ctx.restore()}),Lt.label=2;case 2:Ge=0,We=0,ot=he,Lt.label=3;case 3:return We<ot.length?(vt=ot[We],vt.style!==0&&!ki(vt.color)&&vt.width>0?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)<Math.abs(rr-Wr)?rn:Wr),Sr&&(Be===3?this.ctx.setLineDash([0,Wt+rr]):this.ctx.setLineDash([Wt,rr])),Be===3?(this.ctx.lineCap="round",this.ctx.lineWidth=K):this.ctx.lineWidth=K*2+1.1,this.ctx.strokeStyle=Wn(W),this.ctx.stroke(),this.ctx.setLineDash([]),Be===2&&(Sn(We[0])&&(hn=We[3],lr=We[0],this.ctx.beginPath(),this.formatPath([new zt(hn.end.x,hn.end.y),new zt(lr.start.x,lr.start.y)]),this.ctx.stroke()),Sn(We[1])&&(hn=We[1],lr=We[2],this.ctx.beginPath(),this.formatPath([new zt(hn.end.x,hn.end.y),new zt(lr.start.x,lr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},k.prototype.render=function(W){return j(this,void 0,void 0,function(){var K;return D(this,function(oe){switch(oe.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Wn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),K=hA(W),[4,this.renderStack(K)];case 1:return oe.sent(),this.applyEffects([]),[2,this.canvas]}})})},k}(cA),xA=function(H){return H instanceof ru||H instanceof tu?!0:H instanceof is&&H.type!==aa&&H.type!==ja},TA=function(H,k){switch(H){case 0:return vi(k);case 2:return Vn(k);case 1:default:return za(k)}},SA=function(H){switch(H){case 1:return"center";case 2:return"right";case 0:default:return"left"}},BA=["-apple-system","system-ui"],OA=function(H){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?H.filter(function(k){return BA.indexOf(k)===-1}):H},IA=function(H){Q(k,H);function k(W,K){var oe=H.call(this,W,K)||this;return oe.canvas=K.canvas?K.canvas:document.createElement("canvas"),oe.ctx=oe.canvas.getContext("2d"),oe.options=K,oe.canvas.width=Math.floor(K.width*K.scale),oe.canvas.height=Math.floor(K.height*K.scale),oe.canvas.style.width=K.width+"px",oe.canvas.style.height=K.height+"px",oe.ctx.scale(oe.options.scale,oe.options.scale),oe.ctx.translate(-K.x,-K.y),oe.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+K.width+"x"+K.height+" at "+K.x+","+K.y+") with scale "+K.scale),oe}return k.prototype.render=function(W){return j(this,void 0,void 0,function(){var K,oe;return D(this,function(he){switch(he.label){case 0:return K=qo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,W),[4,RA(K)];case 1:return oe=he.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Wn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(oe,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},k}(cA),RA=function(H){return new Promise(function(k,W){var K=new Image;K.onload=function(){k(K)},K.onerror=W,K.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(H))})},LA=function(){function H(k){var W=k.id,K=k.enabled;this.id=W,this.enabled=K,this.start=Date.now()}return H.prototype.debug=function(){for(var k=[],W=0;W<arguments.length;W++)k[W]=arguments[W];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,B([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},H.prototype.getTime=function(){return Date.now()-this.start},H.prototype.info=function(){for(var k=[],W=0;W<arguments.length;W++)k[W]=arguments[W];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,B([this.id,this.getTime()+"ms"],k)))},H.prototype.warn=function(){for(var k=[],W=0;W<arguments.length;W++)k[W]=arguments[W];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,B([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},H.prototype.error=function(){for(var k=[],W=0;W<arguments.length;W++)k[W]=arguments[W];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,B([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},H.instances={},H}(),DA=function(){function H(k,W){var K;this.windowBounds=W,this.instanceName="#"+H.instanceCount++,this.logger=new LA({id:this.instanceName,enabled:k.logging}),this.cache=(K=k.cache)!==null&&K!==void 0?K:new kr(this,k)}return H.instanceCount=1,H}(),MA=function(H,k){return k===void 0&&(k={}),FA(H,k)};typeof window!="undefined"&&fr.setContext(window);var FA=function(H,k){return j(void 0,void 0,void 0,function(){var W,K,oe,he,Be,Ge,We,ot,vt,Bt,Lt,sr,Wt,rr,Sr,or,ur,rn,Wr,hn,lr,ln,lr,fn,jr,wi,yi,Oi,ai,sa,Ga,Va,Xa,So,la,Ya,Bo,Oo,Ta,Io;return D(this,function(Sa){switch(Sa.label){case 0:if(!H||typeof H!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(W=H.ownerDocument,!W)throw new Error("Element is not attached to a Document");if(K=W.defaultView,!K)throw new Error("Document is not attached to a Window");return oe={allowTaint:(fn=k.allowTaint)!==null&&fn!==void 0?fn:!1,imageTimeout:(jr=k.imageTimeout)!==null&&jr!==void 0?jr:15e3,proxy:k.proxy,useCORS:(wi=k.useCORS)!==null&&wi!==void 0?wi:!1},he=O({logging:(yi=k.logging)!==null&&yi!==void 0?yi:!0,cache:k.cache},oe),Be={windowWidth:(Oi=k.windowWidth)!==null&&Oi!==void 0?Oi:K.innerWidth,windowHeight:(ai=k.windowHeight)!==null&&ai!==void 0?ai:K.innerHeight,scrollX:(sa=k.scrollX)!==null&&sa!==void 0?sa:K.pageXOffset,scrollY:(Ga=k.scrollY)!==null&&Ga!==void 0?Ga:K.pageYOffset},Ge=new I(Be.scrollX,Be.scrollY,Be.windowWidth,Be.windowHeight),We=new DA(he,Ge),ot=(Va=k.foreignObjectRendering)!==null&&Va!==void 0?Va:!1,vt={allowTaint:(Xa=k.allowTaint)!==null&&Xa!==void 0?Xa:!1,onclone:k.onclone,ignoreElements:k.ignoreElements,inlineImages:ot,copyStyles:ot},We.logger.debug("Starting document clone with size "+Ge.width+"x"+Ge.height+" scrolled to "+-Ge.left+","+-Ge.top),Bt=new R(We,H,vt),Lt=Bt.clonedReferenceElement,Lt?[4,Bt.toIFrame(W,Ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return sr=Sa.sent(),Wt=_n(Lt)||tA(Lt)?T(Lt.ownerDocument):v(We,Lt),rr=Wt.width,Sr=Wt.height,or=Wt.left,ur=Wt.top,rn=UA(We,Lt,k.backgroundColor),Wr={canvas:k.canvas,backgroundColor:rn,scale:(la=(So=k.scale)!==null&&So!==void 0?So:K.devicePixelRatio)!==null&&la!==void 0?la:1,x:((Ya=k.x)!==null&&Ya!==void 0?Ya:0)+or,y:((Bo=k.y)!==null&&Bo!==void 0?Bo:0)+ur,width:(Oo=k.width)!==null&&Oo!==void 0?Oo:Math.ceil(rr),height:(Ta=k.height)!==null&&Ta!==void 0?Ta:Math.ceil(Sr)},ot?(We.logger.debug("Document cloned, using foreign object rendering"),lr=new IA(We,Wr),[4,lr.render(Lt)]):[3,3];case 2:return hn=Sa.sent(),[3,5];case 3:return We.logger.debug("Document cloned, element located at "+or+","+ur+" with size "+rr+"x"+Sr+" using computed rendering"),We.logger.debug("Starting DOM parsing"),ln=au(We,Lt),rn===ln.styles.backgroundColor&&(ln.styles.backgroundColor=Si.TRANSPARENT),We.logger.debug("Starting renderer for element at "+Wr.x+","+Wr.y+" with size "+Wr.width+"x"+Wr.height),lr=new CA(We,Wr),[4,lr.render(ln)];case 4:hn=Sa.sent(),Sa.label=5;case 5:return((Io=k.removeContainer)!==null&&Io!==void 0?Io:!0)&&(R.destroy(sr)||We.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),We.logger.debug("Finished rendering"),[2,hn]}})})},UA=function(H,k,W){var K=k.ownerDocument,oe=K.documentElement?ca(H,getComputedStyle(K.documentElement).backgroundColor):Si.TRANSPARENT,he=K.body?ca(H,getComputedStyle(K.body).backgroundColor):Si.TRANSPARENT,Be=typeof W=="string"?ca(H,W):W===null?Si.TRANSPARENT:4294967295;return k===K.documentElement?ki(oe)?ki(he)?Be:he:oe:Be};return MA})},wRmb:function(qe,pe,G){"use strict";G.d(pe,"a",function(){return E});var q=G("rePB"),Q=G("KQm4"),O=G("VTBJ"),j=G("Ff2n"),D=G("q1tI"),B=G.n(D),I=G("Kwbf"),v=G("Zm9Q"),T=G("hW8S");function E(i){return Object(v.a)(i).filter(function(d){return D.isValidElement(d)}).map(function(d){var s=d.key,A=d.props,a=A.children,p=Object(j.a)(A,["children"]),w=Object(O.a)({key:s},p);return a&&(w.children=E(a)),w})}function n(i){return i.reduce(function(d,s){var A=s.fixed,a=A===!0?"left":A,p=s.children;return p&&p.length>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<i.length;s+=1){var A=i[s];if(d&&A.fixed!=="left")d=!1;else if(!d&&A.fixed==="left"){Object(I.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,p=i.length-1;p>=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<T&&w.click.call(this,m)},pointerdown:function(m){w.mousedown.call(this,m)},pointermove:function(m){o(m)||w.mousemove.call(this,m)},pointerup:function(m){w.mouseup.call(this,m)},pointerout:function(m){o(m)||w.mouseout.call(this,m)}};B.each(["click","mousewheel","dblclick","contextmenu"],function(m){w[m]=function(F){F=j(this.dom,F),this.trigger(m,F)}});var S={pointermove:function(m){o(m)||S.mousemove.call(this,m)},pointerup:function(m){S.mouseup.call(this,m)},mousemove:function(m){this.trigger("mousemove",m)},mouseup:function(m){var F=this._pointerCapturing;r(this,!1),this.trigger("mouseup",m),F&&(m.zrEventControl="only_globalout",this.trigger("mouseout",m))}};function x(m,F){var P=F.domHandlers;v.pointerEventsSupported?B.each(n.pointer,function(z){b(F,z,function(Z){P[z].call(m,Z)})}):(v.touchEventsSupported&&B.each(n.touch,function(z){b(F,z,function(Z){P[z].call(m,Z),i(F)})}),B.each(n.mouse,function(z){b(F,z,function(Z){Z=D(Z),F.touching||P[z].call(m,Z)})}))}function L(m,F){v.pointerEventsSupported?B.each(u.pointer,P):v.touchEventsSupported||B.each(u.mouse,P);function P(z){function Z(V){V=D(V),A(m,V.target)||(V=s(m,V),F.domHandlers[z].call(m,V))}b(F,z,Z,{capture:!0})}}function b(m,F,P,z){m.mounted[F]=P,m.listenerOpts[F]=z,Q(m.domTarget,c(F),P,z)}function h(m){var F=m.mounted;for(var P in F)F.hasOwnProperty(P)&&O(m.domTarget,c(P),F[P],m.listenerOpts[P]);m.mounted={}}function r(m,F){if(m._mayPointerCapture=null,E&&m._pointerCapturing^F){m._pointerCapturing=F;var P=m._globalHandlerScope;F?L(m,P):h(P)}}function l(m,F){this.domTarget=m,this.domHandlers=F,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function f(m,F){I.call(this),this.dom=m,this.painterRoot=F,this._localHandlerScope=new l(m,w),E&&(this._globalHandlerScope=new l(document,S)),this._pointerCapturing=!1,this._mayPointerCapture=null,x(this,this._localHandlerScope)}var C=f.prototype;C.dispose=function(){h(this._localHandlerScope),E&&h(this._globalHandlerScope)},C.setCursor=function(m){this.dom.style&&(this.dom.style.cursor=m||"default")},B.mixin(f,I);var g=f;qe.exports=g}}]);
|